]> Dogcows Code - chaz/tint2/blob - server.h
da11b1de2e20e87430101d0d4e24fe0ea706d26c
[chaz/tint2] / server.h
1 /**************************************************************************
2 * server :
3 * -
4 *
5 * Check COPYING file for Copyright
6 *
7 **************************************************************************/
8
9 #ifndef SERVER_H
10 #define SERVER_H
11
12 #include <X11/Xlib.h>
13 #include <X11/Xatom.h>
14 #include <X11/extensions/Xinerama.h>
15
16
17 typedef struct Global_atom
18 {
19 Atom _XROOTPMAP_ID;
20 Atom _XROOTMAP_ID;
21 Atom _NET_CURRENT_DESKTOP;
22 Atom _NET_NUMBER_OF_DESKTOPS;
23 Atom _NET_DESKTOP_NAMES;
24 Atom _NET_DESKTOP_GEOMETRY;
25 Atom _NET_DESKTOP_VIEWPORT;
26 Atom _NET_ACTIVE_WINDOW;
27 Atom _NET_WM_WINDOW_TYPE;
28 Atom _NET_WM_STATE_SKIP_PAGER;
29 Atom _NET_WM_STATE_SKIP_TASKBAR;
30 Atom _NET_WM_STATE_STICKY;
31 Atom _NET_WM_STATE_DEMANDS_ATTENTION;
32 Atom _NET_WM_WINDOW_TYPE_DOCK;
33 Atom _NET_WM_WINDOW_TYPE_DESKTOP;
34 Atom _NET_WM_WINDOW_TYPE_TOOLBAR;
35 Atom _NET_WM_WINDOW_TYPE_MENU;
36 Atom _NET_WM_WINDOW_TYPE_SPLASH;
37 Atom _NET_WM_WINDOW_TYPE_DIALOG;
38 Atom _NET_WM_WINDOW_TYPE_NORMAL;
39 Atom _NET_WM_DESKTOP;
40 Atom WM_STATE;
41 Atom _NET_WM_STATE;
42 Atom _NET_WM_STATE_MAXIMIZED_VERT;
43 Atom _NET_WM_STATE_MAXIMIZED_HORZ;
44 Atom _NET_WM_STATE_SHADED;
45 Atom _NET_WM_STATE_HIDDEN;
46 Atom _NET_WM_STATE_BELOW;
47 Atom _NET_WM_STATE_ABOVE;
48 Atom _NET_WM_STATE_MODAL;
49 Atom _NET_CLIENT_LIST;
50 Atom _NET_WM_NAME;
51 Atom _NET_WM_VISIBLE_NAME;
52 Atom _NET_WM_STRUT;
53 Atom _NET_WM_ICON;
54 Atom _NET_WM_ICON_GEOMETRY;
55 Atom _NET_CLOSE_WINDOW;
56 Atom UTF8_STRING;
57 Atom _NET_SUPPORTING_WM_CHECK;
58 Atom _NET_WM_CM_S0;
59 Atom _NET_WM_STRUT_PARTIAL;
60 Atom WM_NAME;
61 Atom __SWM_VROOT;
62 Atom _MOTIF_WM_HINTS;
63 Atom WM_HINTS;
64 Atom _NET_SYSTEM_TRAY_SCREEN;
65 Atom _NET_SYSTEM_TRAY_OPCODE;
66 Atom MANAGER;
67 Atom _NET_SYSTEM_TRAY_MESSAGE_DATA;
68 Atom _NET_SYSTEM_TRAY_ORIENTATION;
69 Atom _XEMBED;
70 Atom _XEMBED_INFO;
71 Atom _XSETTINGS_SCREEN;
72 Atom _XSETTINGS_SETTINGS;
73 Atom XdndAware;
74 Atom XdndPosition;
75 Atom XdndStatus;
76 Atom XdndLeave;
77 } Global_atom;
78
79
80
81 typedef struct Monitor
82 {
83 int x;
84 int y;
85 int width;
86 int height;
87 char** names;
88 } Monitor;
89
90
91 typedef struct
92 {
93 Display *dsp;
94 Window root_win;
95 Window composite_manager;
96 int real_transparency;
97 // current desktop
98 int desktop;
99 int screen;
100 int depth;
101 int nb_desktop;
102 // number of monitor (without monitor included into another one)
103 int nb_monitor;
104 Monitor *monitor;
105 int got_root_win;
106 Visual *visual;
107 Visual *visual32;
108 // root background
109 Pixmap root_pmap;
110 GC gc;
111 Colormap colormap;
112 Colormap colormap32;
113 Global_atom atom;
114 } Server_global;
115
116
117 Server_global server;
118
119
120 // freed memory
121 void cleanup_server();
122
123 void send_event32 (Window win, Atom at, long data1, long data2, long data3);
124 int get_property32 (Window win, Atom at, Atom type);
125 void *server_get_property (Window win, Atom at, Atom type, int *num_results);
126 Atom server_get_atom (char *atom_name);
127 void server_catch_error (Display *d, XErrorEvent *ev);
128 void server_init_atoms ();
129 void server_init_visual();
130
131 // detect root background
132 void get_root_pixmap();
133
134 // detect monitors and desktops
135 void get_monitors();
136 void get_desktops();
137
138
139 #endif
This page took 0.036351 seconds and 3 git commands to generate.