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