summaryrefslogtreecommitdiff
path: root/src/screen.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@gnugeneration.com>2016-08-28 00:36:53 -0700
committerVito Caputo <vcaputo@gnugeneration.com>2016-09-09 14:14:31 -0700
commit4642216f70dd98134a79f9299b7ca4bc876649c7 (patch)
treebdf9fd892bc54a2f2a678a9828c6af9d9fc8bed2 /src/screen.h
parente99f5ac1293a0ae1f498bc4c73c4c04e4edb8665 (diff)
*: refactor all the things
Long overdue house cleaning. The addition of compositing/monitoring overlays in vwm3 pushed vwm well past what is a reasonable size for a simple thousand line file. This is a first step towards restoring sanity in the code, but no behavioral differences are intended, this is mostly just shuffling around and organizing code. I expect some performance regressions initially, follow-on commits will make more improvements to that end as the dust settles.
Diffstat (limited to 'src/screen.h')
-rw-r--r--src/screen.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/screen.h b/src/screen.h
new file mode 100644
index 0000000..c8b7531
--- /dev/null
+++ b/src/screen.h
@@ -0,0 +1,19 @@
+#ifndef _SCREEN_H
+#define _SCREEN_H
+
+#include <X11/extensions/Xinerama.h> /* XINERAMA extension, facilitates easy multihead awareness */
+
+typedef struct _vwm_t vwm_t;
+
+typedef XineramaScreenInfo vwm_screen_t; /* conveniently reuse the xinerama type for describing screens */
+
+typedef enum _vwm_screen_rel_t {
+ VWM_SCREEN_REL_XWIN, /* return the screen the supplied window most resides in */
+ VWM_SCREEN_REL_POINTER, /* return the screen the pointer resides in */
+ VWM_SCREEN_REL_TOTAL, /* return the bounding rectangle of all screens as one */
+} vwm_screen_rel_t;
+
+const vwm_screen_t * vwm_screen_find(vwm_t *vwm, vwm_screen_rel_t rel, ...);
+int vwm_screen_is_empty(vwm_t *vwm, const vwm_screen_t *scr);
+
+#endif
© All Rights Reserved