]> Dogcows Code - chaz/tint2/blob - src/server.h
*fix* allow minimizing omnipresent windows also on desktop 2-n
[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_BELOW;
44 Atom _NET_WM_STATE_MODAL;
45 Atom _NET_CLIENT_LIST;
46 Atom _NET_WM_NAME;
47 Atom _NET_WM_VISIBLE_NAME;
48 Atom _NET_WM_STRUT;
49 Atom _NET_WM_ICON;
50 Atom _NET_CLOSE_WINDOW;
51 Atom UTF8_STRING;
52 Atom _NET_SUPPORTING_WM_CHECK;
53 Atom _NET_WM_STRUT_PARTIAL;
54 Atom WM_NAME;
55 Atom __SWM_VROOT;
56 Atom _MOTIF_WM_HINTS;
57 Atom WM_HINTS;
58 Atom _NET_SYSTEM_TRAY_SCREEN;
59 Atom _NET_SYSTEM_TRAY_OPCODE;
60 Atom MANAGER;
61 Atom _NET_SYSTEM_TRAY_MESSAGE_DATA;
62 Atom _NET_SYSTEM_TRAY_ORIENTATION;
63 Atom _XEMBED;
64 Atom _XEMBED_INFO;
65 Atom XdndAware;
66 Atom XdndPosition;
67 Atom XdndStatus;
68 } Global_atom;
69
70
71
72 typedef struct Monitor
73 {
74 int x;
75 int y;
76 int width;
77 int height;
78 } Monitor;
79
80
81 typedef struct
82 {
83 Display *dsp;
84 Window root_win;
85 // current desktop
86 int desktop;
87 int screen;
88 int depth;
89 int nb_desktop;
90 // number of monitor (without monitor included into another one)
91 int nb_monitor;
92 Monitor *monitor;
93 int got_root_win;
94 Visual *visual;
95 // root background
96 Pixmap root_pmap;
97 GC gc;
98 Global_atom atom;
99 } Server_global;
100
101
102 Server_global server;
103
104
105 void send_event32 (Window win, Atom at, long data1, long data2, long data3);
106 int get_property32 (Window win, Atom at, Atom type);
107 void *server_get_property (Window win, Atom at, Atom type, int *num_results);
108 Atom server_get_atom (char *atom_name);
109 void server_refresh_root_pixmap ();
110 void server_refresh_main_pixmap ();
111 void server_catch_error (Display *d, XErrorEvent *ev);
112 void server_init_atoms ();
113
114 // detect root background
115 void get_root_pixmap();
116
117 // detect monitors and desktops
118 void get_monitors();
119 void get_desktops();
120
121
122 #endif
This page took 0.037536 seconds and 4 git commands to generate.