9 /* mask shorthands, used in event.c and client.c */ |
9 /* mask shorthands, used in event.c and client.c */ |
10 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) |
10 #define BUTTONMASK (ButtonPressMask | ButtonReleaseMask) |
11 #define MOUSEMASK (BUTTONMASK | PointerMotionMask) |
11 #define MOUSEMASK (BUTTONMASK | PointerMotionMask) |
12 #define PROTODELWIN 1 |
12 #define PROTODELWIN 1 |
13 |
13 |
14 typedef union Arg Arg; |
14 typedef union { |
15 typedef struct Client Client; |
|
16 typedef struct DC DC; |
|
17 typedef struct Fnt Fnt; |
|
18 |
|
19 union Arg { |
|
20 const char *cmd; |
15 const char *cmd; |
21 int i; |
16 int i; |
22 }; |
17 } Arg; |
23 |
18 |
24 /* atoms */ |
19 /* atoms */ |
25 enum { NetSupported, NetWMName, NetLast }; |
20 enum { NetSupported, NetWMName, NetLast }; |
26 enum { WMProtocols, WMDelete, WMLast }; |
21 enum { WMProtocols, WMDelete, WMLast }; |
27 |
22 |
28 /* cursor */ |
23 /* cursor */ |
29 enum { CurNormal, CurResize, CurMove, CurLast }; |
24 enum { CurNormal, CurResize, CurMove, CurLast }; |
30 |
25 |
31 /* windowcorners */ |
26 /* window corners */ |
32 typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner; |
27 typedef enum { TopLeft, TopRight, BotLeft, BotRight } Corner; |
33 |
28 |
34 struct Fnt { |
29 typedef struct { |
35 int ascent; |
30 int ascent; |
36 int descent; |
31 int descent; |
37 int height; |
32 int height; |
38 XFontSet set; |
33 XFontSet set; |
39 XFontStruct *xfont; |
34 XFontStruct *xfont; |
40 }; |
35 } Fnt; |
41 |
36 |
42 struct DC { /* draw context */ |
37 typedef struct { /* draw context */ |
43 int x, y, w, h; |
38 int x, y, w, h; |
44 unsigned long bg; |
39 unsigned long bg; |
45 unsigned long fg; |
40 unsigned long fg; |
46 unsigned long border; |
41 unsigned long border; |
47 Drawable drawable; |
42 Drawable drawable; |
48 Fnt font; |
43 Fnt font; |
49 GC gc; |
44 GC gc; |
50 }; |
45 } DC; |
51 |
46 |
|
47 typedef struct Client Client; |
52 struct Client { |
48 struct Client { |
53 char name[256]; |
49 char name[256]; |
54 int proto; |
50 int proto; |
55 int x, y, w, h; |
51 int x, y, w, h; |
56 int tx, ty, tw, th; /* title */ |
52 int tx, ty, tw, th; /* title */ |