2 * ion/ioncore/clientwin.h
4 * Copyright (c) Tuomo Valkonen 1999-2009.
6 * See the included file LICENSE for details.
9 #ifndef ION_IONCORE_CLIENTWIN_H
10 #define ION_IONCORE_CLIENTWIN_H
12 #include <libextl/extl.h>
13 #include <libtu/ptrlist.h>
14 #include <libmainloop/hooks.h>
18 #include "rectangle.h"
22 #include "sizepolicy.h"
25 #define CLIENTWIN_P_WM_DELETE 0x00001
26 #define CLIENTWIN_P_WM_TAKE_FOCUS 0x00002
27 #define CLIENTWIN_PROP_ACROBATIC 0x00010
28 #define CLIENTWIN_PROP_TRANSPARENT 0x00020
29 #define CLIENTWIN_PROP_IGNORE_CFGRQ 0x00040
30 #define CLIENTWIN_PROP_LAZY_RESIZE 0x00080
31 #define CLIENTWIN_PROP_MINSIZE 0x00100
32 #define CLIENTWIN_PROP_MAXSIZE 0x00200
33 #define CLIENTWIN_PROP_ASPECT 0x00400
34 #define CLIENTWIN_PROP_RSZINC 0x00800
35 #define CLIENTWIN_PROP_I_MINSIZE 0x01000
36 #define CLIENTWIN_PROP_I_MAXSIZE 0x02000
37 #define CLIENTWIN_PROP_I_ASPECT 0x04000
38 #define CLIENTWIN_PROP_I_RSZINC 0x08000
39 #define CLIENTWIN_USE_NET_WM_NAME 0x10000
40 /* full screen mode has been requested by the client window itself */
41 #define CLIENTWIN_FS_RQ 0x20000
42 #define CLIENTWIN_UNMAP_RQ 0x40000
43 #define CLIENTWIN_NEED_CFGNTFY 0x80000
44 #define CLIENTWIN_PROP_O_VERT 0x100000
45 #define CLIENTWIN_PROP_O_HORIZ 0x200000
46 #define CLIENTWIN_SET_INPUT 0x400000
48 DECLCLASS(WClientWin
){
63 XSizeHints size_hints
;
69 extern void clientwin_get_protocols(WClientWin
*cwin
);
70 extern void clientwin_get_size_hints(WClientWin
*cwin
);
71 extern void clientwin_unmapped(WClientWin
*cwin
);
72 extern void clientwin_destroyed(WClientWin
*cwin
);
73 extern void clientwin_kill(WClientWin
*cwin
);
74 extern void clientwin_rqclose(WClientWin
*cwin
, bool relocate_ignored
);
76 extern void clientwin_tfor_changed(WClientWin
*cwin
);
78 extern void clientwin_get_set_name(WClientWin
*cwin
);
80 extern void clientwin_handle_configure_request(WClientWin
*cwin
,
81 XConfigureRequestEvent
*ev
);
83 extern void clientwin_broken_app_resize_kludge(WClientWin
*cwin
);
85 extern WRegion
*clientwin_load(WWindow
*par
, const WFitParams
*fp
,
88 /* Some standard winprops */
91 TRANSIENT_MODE_NORMAL
,
92 TRANSIENT_MODE_CURRENT
,
96 extern bool clientwin_get_switchto(const WClientWin
*cwin
);
97 extern int clientwin_get_transient_mode(const WClientWin
*cwin
);
98 extern WClientWin
*clientwin_get_transient_for(const WClientWin
*cwin
);
102 /* This hook has parameters (WClientWin*, WManageParams*). */
103 extern WHook
*clientwin_do_manage_alt
;
104 /* This hook has just WClientWin* as parameter. */
105 extern WHook
*clientwin_mapped_hook
;
106 /* This hook has an X Window id as parameter. */
107 extern WHook
*clientwin_unmapped_hook
;
108 /* This hook has (WClientWin*, const XPropertyEvent *) as parameters on
109 * C side, and (WClientWin*, int atom) on Lua side.
111 extern WHook
*clientwin_property_change_hook
;
115 extern WClientWin
*ioncore_manage_clientwin(Window win
, bool maprq
);
117 #endif /* ION_IONCORE_CLIENTWIN_H */