summaryrefslogtreecommitdiff
path: root/overlay/overlay.h
diff options
context:
space:
mode:
Diffstat (limited to 'overlay/overlay.h')
-rw-r--r--overlay/overlay.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/overlay/overlay.h b/overlay/overlay.h
new file mode 100644
index 00000000..7c5b2d86
--- /dev/null
+++ b/overlay/overlay.h
@@ -0,0 +1,37 @@
+#include <cairo.h>
+
+enum position {
+ POS_UNSET = -1,
+
+ POS_LEFT = 0,
+ POS_CENTRE = 1,
+ POS_RIGHT = 2,
+
+ POS_TOP = 0 << 4,
+ POS_MIDDLE = 1 << 4,
+ POS_BOTTOM = 2 << 4,
+
+ POS_TOP_LEFT = POS_TOP | POS_LEFT,
+ POS_TOP_CENTRE = POS_TOP | POS_CENTRE,
+ POS_TOP_RIGHT = POS_TOP | POS_RIGHT,
+
+ POS_MIDDLE_LEFT = POS_MIDDLE | POS_LEFT,
+ POS_MIDDLE_CENTRE = POS_MIDDLE | POS_CENTRE,
+ POS_MIDDLE_RIGHT = POS_MIDDLE | POS_RIGHT,
+
+ POS_BOTTOM_LEFT = POS_BOTTOM | POS_LEFT,
+ POS_BOTTOM_CENTRE = POS_BOTTOM | POS_CENTRE,
+ POS_BOTTOM_RIGHT = POS_BOTTOM | POS_RIGHT,
+};
+
+struct overlay {
+ cairo_surface_t *surface;
+ void (*show)(struct overlay *);
+ void (*position)(struct overlay *, enum position);
+ void (*hide)(struct overlay *);
+};
+
+extern const cairo_user_data_key_t overlay_key;
+
+cairo_surface_t *x11_overlay_create(enum position pos, int max_width, int max_height);
+void x11_overlay_stop(void);