diff options
Diffstat (limited to 'window-xlib.h')
-rw-r--r-- | window-xlib.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/window-xlib.h b/window-xlib.h new file mode 100644 index 0000000..b611cfb --- /dev/null +++ b/window-xlib.h @@ -0,0 +1,36 @@ +#ifndef _RUNES_WINDOW_XLIB_H +#define _RUNES_XLIB_H + +#include <X11/Xlib.h> + +enum runes_atoms { + RUNES_ATOM_WM_DELETE_WINDOW, + RUNES_ATOM_NET_WM_PING, + RUNES_NUM_PROTOCOL_ATOMS, + RUNES_ATOM_NET_WM_PID = 2, + RUNES_ATOM_NET_WM_ICON_NAME, + RUNES_ATOM_NET_WM_NAME, + RUNES_ATOM_UTF8_STRING, + RUNES_NUM_ATOMS +}; + +struct runes_window { + Display *dpy; + Window w; + GC gc; + XIC ic; + + Atom atoms[RUNES_NUM_ATOMS]; +}; + +typedef struct { + RunesLoopData data; + XEvent e; +} RunesXlibLoopData; + +void runes_window_backend_init(RunesTerm *t, int argc, char *argv[]); +cairo_surface_t *runes_window_backend_surface_create(RunesTerm *t); +void runes_window_backend_loop_init(RunesTerm *t, uv_loop_t *loop); +void runes_window_backend_cleanup(RunesTerm *t); + +#endif |