diff options
author | okan <okan> | 2013-07-16 14:30:48 +0000 |
---|---|---|
committer | okan <okan> | 2013-07-16 14:30:48 +0000 |
commit | 0dec9e849d3ed5dc19882ca4184d01cff5843779 (patch) | |
tree | 8593a8f4d664f05dcc771ea0c310038e86342e3b /calmwm.h | |
parent | 93bfc4a5c14db580a426571b8be6011998189ad2 (diff) | |
parent | a439012b5806997e60df870faad87a5fec20d4e8 (diff) | |
download | cwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.tar.gz cwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.tar.xz cwm-0dec9e849d3ed5dc19882ca4184d01cff5843779.zip |
cvsimport
Diffstat (limited to 'calmwm.h')
-rw-r--r-- | calmwm.h | 109 |
1 files changed, 51 insertions, 58 deletions
diff --git a/calmwm.h b/calmwm.h index 0e6ee91..d02b915 100644 --- a/calmwm.h +++ b/calmwm.h @@ -115,7 +115,7 @@ enum color { CWM_COLOR_MENU_BG, CWM_COLOR_MENU_FONT, CWM_COLOR_MENU_FONT_SEL, - CWM_COLOR_MAX + CWM_COLOR_NITEMS }; struct geom { @@ -235,7 +235,7 @@ struct screen_ctx { struct geom work; /* workable area, gap-applied */ struct gap gap; struct cycle_entry_q mruq; - XftColor xftcolor[CWM_COLOR_MAX]; + XftColor xftcolor[CWM_COLOR_NITEMS]; XftDraw *xftdraw; XftFont *xftfont; int xinerama_no; @@ -309,7 +309,7 @@ struct conf { #define CONF_SNAPDIST 0 int snapdist; struct gap gap; - char *color[CWM_COLOR_MAX]; + char *color[CWM_COLOR_NITEMS]; char termpath[MAXPATHLEN]; char lockpath[MAXPATHLEN]; char known_hosts[MAXPATHLEN]; @@ -330,6 +330,53 @@ struct mwm_hints { #define MWM_DECOR_ALL (1<<0) #define MWM_DECOR_BORDER (1<<1) +extern Display *X_Dpy; +extern struct screen_ctx_q Screenq; +extern struct client_ctx_q Clientq; +extern struct conf Conf; +extern char *homedir; +extern int HasRandr, Randr_ev; + +enum { + WM_STATE, + WM_DELETE_WINDOW, + WM_TAKE_FOCUS, + WM_PROTOCOLS, + _MOTIF_WM_HINTS, + UTF8_STRING, + WM_CHANGE_STATE, + CWMH_NITEMS +}; +enum { + _NET_SUPPORTED, + _NET_SUPPORTING_WM_CHECK, + _NET_ACTIVE_WINDOW, + _NET_CLIENT_LIST, + _NET_NUMBER_OF_DESKTOPS, + _NET_CURRENT_DESKTOP, + _NET_DESKTOP_VIEWPORT, + _NET_DESKTOP_GEOMETRY, + _NET_VIRTUAL_ROOTS, + _NET_SHOWING_DESKTOP, + _NET_DESKTOP_NAMES, + _NET_WORKAREA, + _NET_WM_NAME, + _NET_WM_DESKTOP, + _NET_CLOSE_WINDOW, + _NET_WM_STATE, +#define _NET_WM_STATES_NITEMS 2 + _NET_WM_STATE_MAXIMIZED_VERT, + _NET_WM_STATE_MAXIMIZED_HORZ, + EWMH_NITEMS +}; +enum { + _NET_WM_STATE_REMOVE, + _NET_WM_STATE_ADD, + _NET_WM_STATE_TOGGLE +}; +extern Atom cwmh[CWMH_NITEMS]; +extern Atom ewmh[EWMH_NITEMS]; + __dead void usage(void); void client_applysizehints(struct client_ctx *); @@ -459,6 +506,7 @@ void menuq_clear(struct menu_q *); int parse_config(const char *, struct conf *); +void conf_atoms(void); void conf_autogroup(struct conf *, int, char *); void conf_bind_kbd(struct conf *, char *, char *); int conf_bind_mouse(struct conf *, char *, char *); @@ -476,7 +524,6 @@ void xev_loop(void); void xu_btn_grab(Window, int, u_int); void xu_btn_ungrab(Window, int, u_int); -void xu_getatoms(void); int xu_getprop(Window, Atom, Atom, long, u_char **); int xu_get_wm_state(Window, int *); int xu_getstrprop(Window, Atom, char **); @@ -523,58 +570,4 @@ int xasprintf(char **, const char *, ...) __attribute__((__format__ (printf, 2, 3))) __attribute__((__nonnull__ (2))); -/* Externs */ -extern Display *X_Dpy; - -extern struct screen_ctx_q Screenq; -extern struct client_ctx_q Clientq; -extern struct conf Conf; -extern char *homedir; - -extern int HasRandr, Randr_ev; - -enum { - WM_STATE, - WM_DELETE_WINDOW, - WM_TAKE_FOCUS, - WM_PROTOCOLS, - _MOTIF_WM_HINTS, - UTF8_STRING, - WM_CHANGE_STATE, - CWMH_NITEMS -}; -enum { - _NET_SUPPORTED, - _NET_SUPPORTING_WM_CHECK, - _NET_ACTIVE_WINDOW, - _NET_CLIENT_LIST, - _NET_NUMBER_OF_DESKTOPS, - _NET_CURRENT_DESKTOP, - _NET_DESKTOP_VIEWPORT, - _NET_DESKTOP_GEOMETRY, - _NET_VIRTUAL_ROOTS, - _NET_SHOWING_DESKTOP, - _NET_DESKTOP_NAMES, - _NET_WORKAREA, - _NET_WM_NAME, - _NET_WM_DESKTOP, - _NET_CLOSE_WINDOW, - _NET_WM_STATE, -#define _NET_WM_STATES_NITEMS 2 - _NET_WM_STATE_MAXIMIZED_VERT, - _NET_WM_STATE_MAXIMIZED_HORZ, - EWMH_NITEMS -}; -enum { - _NET_WM_STATE_REMOVE, - _NET_WM_STATE_ADD, - _NET_WM_STATE_TOGGLE -}; -struct atom_ctx { - char *name; - Atom atom; -}; -extern struct atom_ctx cwmh[CWMH_NITEMS]; -extern struct atom_ctx ewmh[EWMH_NITEMS]; - #endif /* _CALMWM_H_ */ |