JWM Source Documentation
client.h
Go to the documentation of this file.
1 
10 #ifndef CLIENT_H
11 #define CLIENT_H
12 
13 #include "main.h"
14 #include "border.h"
15 #include "hint.h"
16 
17 struct TimeType;
18 
23 typedef unsigned short BorderFlags;
24 #define BORDER_NONE 0
25 #define BORDER_OUTLINE (1 << 0)
26 #define BORDER_TITLE (1 << 1)
27 #define BORDER_MIN (1 << 2)
28 #define BORDER_MAX (1 << 3)
29 #define BORDER_CLOSE (1 << 4)
30 #define BORDER_RESIZE (1 << 5)
31 #define BORDER_MOVE (1 << 6)
32 #define BORDER_MAX_V (1 << 7)
33 #define BORDER_MAX_H (1 << 8)
34 #define BORDER_SHADE (1 << 9)
35 #define BORDER_CONSTRAIN (1 << 10)
36 #define BORDER_FULLSCREEN (1 << 11)
39 #define BORDER_DEFAULT ( \
40  BORDER_OUTLINE \
41  | BORDER_TITLE \
42  | BORDER_MIN \
43  | BORDER_MAX \
44  | BORDER_CLOSE \
45  | BORDER_RESIZE \
46  | BORDER_MOVE \
47  | BORDER_MAX_V \
48  | BORDER_MAX_H \
49  | BORDER_SHADE \
50  | BORDER_FULLSCREEN )
51 
56 typedef unsigned int StatusFlags;
57 #define STAT_NONE 0
58 #define STAT_ACTIVE (1 << 0)
59 #define STAT_MAPPED (1 << 1)
60 #define STAT_HIDDEN (1 << 2)
61 #define STAT_STICKY (1 << 3)
62 #define STAT_NOLIST (1 << 4)
63 #define STAT_MINIMIZED (1 << 5)
64 #define STAT_SHADED (1 << 6)
65 #define STAT_WMDIALOG (1 << 7)
66 #define STAT_PIGNORE (1 << 8)
67 #define STAT_SDESKTOP (1 << 9)
68 #define STAT_FULLSCREEN (1 << 10)
69 #define STAT_OPACITY (1 << 11)
70 #define STAT_NOFOCUS (1 << 12)
71 #define STAT_CANFOCUS (1 << 13)
72 #define STAT_DELETE (1 << 14)
73 #define STAT_TAKEFOCUS (1 << 15)
74 #define STAT_URGENT (1 << 16)
75 #define STAT_NOTURGENT (1 << 17)
76 #define STAT_CENTERED (1 << 18)
77 #define STAT_TILED (1 << 19)
78 #define STAT_IIGNORE (1 << 20)
79 #define STAT_NOPAGER (1 << 21)
80 #define STAT_SHAPED (1 << 22)
81 #define STAT_FLASH (1 << 23)
82 #define STAT_DRAG (1 << 24)
83 #define STAT_ILIST (1 << 25)
84 #define STAT_IPAGER (1 << 26)
85 #define STAT_FIXED (1 << 27)
86 #define STAT_AEROSNAP (1 << 28)
87 #define STAT_NODRAG (1 << 29)
90 typedef unsigned char MaxFlags;
91 #define MAX_NONE 0
92 #define MAX_HORIZ (1 << 0)
93 #define MAX_VERT (1 << 1)
94 #define MAX_LEFT (1 << 2)
95 #define MAX_RIGHT (1 << 3)
96 #define MAX_TOP (1 << 4)
97 #define MAX_BOTTOM (1 << 5)
100 typedef struct ColormapNode {
101  Window window;
102  struct ColormapNode *next;
103 } ColormapNode;
104 
106 typedef struct AspectRatio {
107  int minx;
108  int miny;
109  int maxx;
110  int maxy;
111 } AspectRatio;
112 
114 typedef struct ClientNode {
115 
116  Window window;
117  Window parent;
119  Window owner;
121  int x, y;
122  int width;
123  int height;
124  int oldx;
125  int oldy;
126  int oldWidth;
127  int oldHeight;
129  long sizeFlags;
130  int baseWidth;
132  int minWidth;
133  int minHeight;
134  int maxWidth;
135  int maxHeight;
136  int xinc;
137  int yinc;
139  int gravity;
141  Colormap cmap;
144  char *name;
145  char *instanceName;
146  char *className;
151 
152  struct IconNode *icon;
155  void (*controller)(int wasDestroyed);
156 
157  struct ClientNode *prev;
158  struct ClientNode *next;
160 } ClientNode;
161 
163 extern unsigned int clientCount;
164 
169 ClientNode *FindClient(Window w);
170 
175 ClientNode *FindClientByWindow(Window w);
176 
181 ClientNode *FindClientByParent(Window p);
182 
187 
189 #define InitializeClients() (void)(0)
190 void StartupClients(void);
191 void ShutdownClients(void);
192 #define DestroyClients() (void)(0)
193 
201 ClientNode *AddClientWindow(Window w, char alreadyMapped, char notOwner);
202 
206 void RemoveClient(ClientNode *np);
207 
212 void MinimizeClient(ClientNode *np, char lower);
213 
217 void ShadeClient(ClientNode *np);
218 
222 void UnshadeClient(ClientNode *np);
223 
231 
236 void RestoreClient(ClientNode *np, char raise);
237 
242 void MaximizeClient(ClientNode *np, MaxFlags flags);
243 
248 
253 void SetClientFullScreen(ClientNode *np, char fullScreen);
254 
258 void FocusClient(ClientNode *np);
259 
261 void RefocusClient(void);
262 
266 void DeleteClient(ClientNode *np);
267 
271 void KillClient(ClientNode *np);
272 
276 void RaiseClient(ClientNode *np);
277 
283 void RestackClient(ClientNode *np, Window above, int detail);
284 
289 void RestackClients(void);
290 
295 void SetClientLayer(ClientNode *np, unsigned int layer);
296 
301 void SetClientDesktop(ClientNode *np, unsigned int desktop);
302 
308 void SetClientSticky(ClientNode *np, char isSticky);
309 
314 void HideClient(ClientNode *np);
315 
320 void ShowClient(ClientNode *np);
321 
326 
332 void ReparentClient(ClientNode *np);
333 
339 
345 void SendClientMessage(Window w, AtomType type, AtomType message);
346 
348 void SignalUrgent(const struct TimeType *now, int x, int y, Window w,
349  void *data);
350 
351 #endif /* CLIENT_H */
352 

joewing.net / Projects / JWM