diff options
| author | Anselm R. Garbe <arg@10kloc.org> | 2006-08-23 10:21:57 +0200 |
|---|---|---|
| committer | Anselm R. Garbe <arg@10kloc.org> | 2006-08-23 10:21:57 +0200 |
| commit | b5159dfd2f552696b049b95e0d368a2c33a1002a (patch) | |
| tree | 111ed79d6fb06ad84b1930a27f555915fba29ed6 /dwm.h | |
| parent | updated man page (diff) | |
| download | dwm-b5159dfd2f552696b049b95e0d368a2c33a1002a.tar.gz dwm-b5159dfd2f552696b049b95e0d368a2c33a1002a.zip | |
separated setup stuff into main.c:setup() - this makes main() more readable
Diffstat (limited to '')
| -rw-r--r-- | dwm.h | 20 |
1 files changed, 8 insertions, 12 deletions
| @@ -11,15 +11,10 @@ | |||
| 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 }; |
| @@ -28,18 +23,18 @@ enum { WMProtocols, WMDelete, WMLast }; | |||
| 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; |
| @@ -47,8 +42,9 @@ struct DC { /* draw context */ | |||
| 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; |
