aboutsummaryrefslogtreecommitdiffstats
path: root/src/window-xlib.h
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-04-20 22:57:28 -0400
committerJesse Luehrs <doy@tozt.net>2014-04-20 22:58:22 -0400
commitd6f244f7d9f52462bafb608f23494707eeb24751 (patch)
tree8b2cab0559f4fce36b20896b24b38b54b6267400 /src/window-xlib.h
parent29f45358ccc638f7c2ce951e03d91bbd02d6a109 (diff)
downloadrunes-d6f244f7d9f52462bafb608f23494707eeb24751.tar.gz
runes-d6f244f7d9f52462bafb608f23494707eeb24751.zip
clean up the directory structure a bit
Diffstat (limited to 'src/window-xlib.h')
-rw-r--r--src/window-xlib.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/window-xlib.h b/src/window-xlib.h
new file mode 100644
index 0000000..c7b8960
--- /dev/null
+++ b/src/window-xlib.h
@@ -0,0 +1,46 @@
+#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_ATOM_WM_PROTOCOLS,
+ RUNES_ATOM_RUNES_FLUSH,
+ RUNES_ATOM_RUNES_VISUAL_BELL,
+ RUNES_ATOM_RUNES_AUDIBLE_BELL,
+ RUNES_NUM_ATOMS
+};
+
+struct runes_window {
+ Display *dpy;
+ Window w;
+ XIC ic;
+
+ Atom atoms[RUNES_NUM_ATOMS];
+};
+
+typedef struct {
+ RunesLoopData data;
+ XEvent e;
+} RunesXlibLoopData;
+
+void runes_window_backend_create_window(RunesTerm *t, int argc, char *argv[]);
+void runes_window_backend_start_loop(RunesTerm *t);
+void runes_window_backend_request_flush(RunesTerm *t);
+void runes_window_backend_request_visual_bell(RunesTerm *t);
+void runes_window_backend_request_audible_bell(RunesTerm *t);
+void runes_window_backend_request_close(RunesTerm *t);
+void runes_window_backend_get_size(RunesTerm *t, int *xpixel, int *ypixel);
+void runes_window_backend_set_icon_name(RunesTerm *t, char *name, size_t len);
+void runes_window_backend_set_window_title(
+ RunesTerm *t, char *name, size_t len);
+void runes_window_backend_cleanup(RunesTerm *t);
+
+#endif