diff options
Diffstat (limited to 'src/xserver.h')
-rw-r--r-- | src/xserver.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/xserver.h b/src/xserver.h new file mode 100644 index 0000000..694513a --- /dev/null +++ b/src/xserver.h @@ -0,0 +1,21 @@ +#ifndef _XSERVER_H +#define _XSERVER_H + +#include <X11/Xlib.h> + +#define XSERVER_XROOT(_xserver) RootWindow((_xserver)->display, (_xserver)->screen_num) +#define XSERVER_XVISUAL(_xserver) DefaultVisual((_xserver)->display, (_xserver)->screen_num) +#define XSERVER_XDEPTH(_xserver) DefaultDepth((_xserver)->display, (_xserver)->screen_num) + +/* bare xserver context, split out for vmon's shared monitoring overlay use sake */ +typedef struct vwm_xserver_t { + Display *display; + Colormap cmap; + int screen_num; + GC gc; +} vwm_xserver_t; + +vwm_xserver_t * vwm_xserver_open(void); +void vwm_xserver_close(vwm_xserver_t *); + +#endif |