redirect rendering and get the composite overlay window
[dana/dcompmgr.git] / screen.h
index 8bf0902..5317599 100644 (file)
--- a/screen.h
+++ b/screen.h
@@ -4,13 +4,31 @@
 #include <xcb/xcb.h>
 #include <glib.h>
 
+struct d_window;
+struct d_display;
+
 /* inherits from xcb_screen_t */
-typedef struct {
-    xcb_screen_t super;
-    int          num;
-    xcb_window_t selwin; /* for the selection */
+typedef struct d_screen {
+    xcb_screen_t      super;
+    struct d_display *dpy;
+    int               num;
+
+    xcb_window_t      selwin;  /* for the selection */
+    xcb_atom_t        selatom; /* ditto.. */
+
+    xcb_window_t      overlay;
+
+    GHashTable       *winhash;
 } d_screen_t;
 
-gboolean screen_register(xcb_connection_t *conn, d_screen_t *sc);
+/*! Tries to register on the screen given by @sc.  If it succeeds, it fills
+    in @sc and returns TRUE, otherwise it returns FALSE.
+*/
+gboolean screen_register(struct d_display *dpy, int num, d_screen_t *sc);
+
+void screen_add_window(d_screen_t *sc, xcb_window_t wid);
+void screen_remove_window(d_screen_t *sc, struct d_window *w);
+
+struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
 
 #endif