]> icculus.org git repositories - mikachu/openbox.git/blob - cwmcc/client_props.h
add getting of some root properties
[mikachu/openbox.git] / cwmcc / client_props.h
1 #ifndef __cwmcc_client_get_props_h
2 #define __cwmcc_client_get_props_h
3
4 void cwmcc_client_get_protocols(Window win, Atom **protocols);
5
6 void cwmcc_client_get_wm_state(Window win, gulong *state);
7 void cwmcc_client_set_wm_state(Window win, gulong state);
8
9 void cwmcc_client_get_name(Window win, char **name);
10 void cwmcc_client_set_name(Window win, char *name);
11
12 void cwmcc_client_get_icon_name(Window win, char **name);
13 void cwmcc_client_set_icon_name(Window win, char *name);
14
15 void cwmcc_client_get_class(Window win, char **class, char **name);
16
17 /*! Possible flags for MWM Hints (defined by Motif 2.0) */
18 enum Cwmcc_MwmFlags {
19     Cwmcc_MwmFlag_Functions   = 1 << 0, /*!< The Hints define functions */
20     Cwmcc_MwmFlag_Decorations = 1 << 1  /*!< The Hints define decorations */
21 };
22
23 /*! Possible functions for MWM Hints (defined by Motif 2.0) */
24 enum Cwmcc_MwmFunctions {
25     Cwmcc_MwmFunc_All      = 1 << 0, /*!< All functions */
26     Cwmcc_MwmFunc_Resize   = 1 << 1, /*!< Allow resizing */
27     Cwmcc_MwmFunc_Move     = 1 << 2, /*!< Allow moving */
28     Cwmcc_MwmFunc_Iconify  = 1 << 3, /*!< Allow to be iconfied */
29     Cwmcc_MwmFunc_Maximize = 1 << 4  /*!< Allow to be maximized */
30     /*MwmFunc_Close    = 1 << 5 /!< Allow to be closed */
31 };
32
33 /*! Possible decorations for MWM Hints (defined by Motif 2.0) */
34 enum Cwmcc_MwmDecorations {
35     Cwmcc_MwmDecor_All      = 1 << 0, /*!< All decorations */
36     Cwmcc_MwmDecor_Border   = 1 << 1, /*!< Show a border */
37     Cwmcc_MwmDecor_Handle   = 1 << 2, /*!< Show a handle (bottom) */
38     Cwmcc_MwmDecor_Title    = 1 << 3, /*!< Show a titlebar */
39     Cwmcc_MwmDecor_Menu     = 1 << 4, /*!< Show a menu */
40     Cwmcc_MwmDecor_Iconify  = 1 << 5, /*!< Show an iconify button */
41     Cwmcc_MwmDecor_Maximize = 1 << 6  /*!< Show a maximize button */
42 };
43
44 /*! The MWM Hints as retrieved from the window property
45   This structure only contains 3 elements, even though the Motif 2.0
46   structure contains 5. We only use the first 3, so that is all gets
47   defined.
48 */
49 struct Cwmcc_MwmHints {
50     /*! A bitmask of Cwmcc_MwmFlags values */
51     gulong flags;
52     /*! A bitmask of Cwmcc_MwmFunctions values */
53     gulong functions;
54     /*! A bitmask of Cwmcc_MwmDecorations values */
55     gulong decorations;
56 };
57
58 void cwmcc_client_get_mwmhints(Window win, struct Cwmcc_MwmHints *hints);
59
60 void cwmcc_client_get_desktop(Window win, gulong *desk);
61 void cwmcc_client_set_desktop(Window win, gulong desk);
62
63 void cwmcc_client_get_type(Window win, gulong **types);
64 void cwmcc_client_set_type(Window win, gulong *types);
65
66 void cwmcc_client_get_state(Window win, gulong **states);
67 void cwmcc_client_set_state(Window win, gulong *states);
68
69 void cwmcc_client_get_strut(Window win, int *l, int *t, int *r, int *b);
70
71 /*! Holds an icon in ARGB format */
72 struct Cwmcc_Icon {
73     gulong width, height;
74     gulong *data;
75 };
76
77 /* Returns an array of Cwms_Icons. The array is terminated by a Cwmcc_Icon with
78    its data member set to NULL */
79 void cwmcc_client_get_icon(Window win, struct Cwmcc_Icon **icons);
80
81 void cwmcc_client_get_premax(Window win, int *x, int *y, int *w, int *h);
82 void cwmcc_client_set_premax(Window win, int x, int y, int w, int h);
83
84 #endif