]> icculus.org git repositories - mikachu/rspanel.git/blob - xprop.h
only show normal,dialog, and utility windows
[mikachu/rspanel.git] / xprop.h
1 #ifndef rs_prop_h
2 #define rs_prop_h
3
4 struct screen;
5
6 #include <X11/Xlib.h>
7 #include <X11/Xatom.h>
8
9 typedef enum {
10     /* types */
11     UTF8_STRING,
12     /* client properties */
13     KWM_WIN_ICON,
14     WM_STATE,
15     WM_NAME,
16     _MOTIF_WM_HINTS,
17     _NET_WM_STATE,
18     _NET_WM_STATE_SKIP_TASKBAR,
19     _NET_WM_STATE_SHADED,
20     _NET_WM_STATE_BELOW,
21     _NET_WM_STATE_HIDDEN,
22     _NET_WM_DESKTOP,
23     _NET_WM_WINDOW_TYPE,
24     _NET_WM_WINDOW_TYPE_DESKTOP,
25     _NET_WM_WINDOW_TYPE_DOCK,
26     _NET_WM_WINDOW_TYPE_TOOLBAR,
27     _NET_WM_WINDOW_TYPE_MENU,
28     _NET_WM_WINDOW_TYPE_UTILITY,
29     _NET_WM_WINDOW_TYPE_SPLASH,
30     _NET_WM_WINDOW_TYPE_DIALOG,
31     _NET_WM_WINDOW_TYPE_NORMAL,
32     _NET_WM_STRUT,
33     _NET_WM_ICON_GEOMETRY,
34     _NET_WM_ICON,
35     _WIN_HINTS,
36     /* root properties */
37     _NET_CLIENT_LIST,
38     _NET_CLIENT_LIST_STACKING,
39     _NET_NUMBER_OF_DESKTOPS,
40     _NET_CURRENT_DESKTOP,
41     _OB_WM_ACTION,
42     _NET_WM_NAME,
43     _NET_ACTIVE_WINDOW,
44     _NET_RESTACK_WINDOW,
45     _OB_FOCUS,
46     _OB_THEME,
47     XPROP_COUNT,
48 } xprop_t;
49
50 enum {
51     XPROP_REMOVE = 0,
52     XPROP_ADD,
53     XPROP_TOGGLE
54 };
55
56 void  xprop_init(struct screen *sc);
57
58 void* xprop_get_data(struct screen *sc, Window win, xprop_t prop,
59                      Atom type, int *items);
60
61 int   xprop_get_num(struct screen *sc, Window win, xprop_t p);
62 char* xprop_get_utf8(struct screen *sc, Window win, xprop_t p);
63 char* xprop_get_string(struct screen *sc, Window win, xprop_t p);
64
65 void xprop_set_num(struct screen *sc, Window win, xprop_t p, long val);
66 void xprop_set_atom(struct screen *sc, Window win, xprop_t p, xprop_t at);
67
68 void xprop_set_array(struct screen *sc, Window win, xprop_t p,
69                      const long *vals, int num);
70
71 void xprop_set_string(struct screen *sc, Window win, xprop_t p, const char *s);
72
73 #endif