read all the available events at once
[dana/dcompmgr.git] / screen.h
index 5aed2af..bfa93ed 100644 (file)
--- a/screen.h
+++ b/screen.h
@@ -4,18 +4,39 @@
 #include <xcb/xcb.h>
 #include <glib.h>
 
+struct d_window;
+struct d_display;
+struct d_list;
+
 /* 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;
+    struct d_list    *stacking;
+
+    void (*paint)(struct d_screen *sc);
 } d_screen_t;
 
 /*! Tries to register on the screen given by @sc.  If it succeeds, it fills
-  out the selwin in @sc and returns TRUE, otherwise it returns FALSE.
+    in @sc and returns TRUE, otherwise it returns FALSE.
 */
-gboolean screen_register(xcb_connection_t *conn, d_screen_t *sc);
+gboolean screen_register(struct d_display *dpy, int num, d_screen_t *sc);
+void screen_free(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);
 
-void screen_listen(xcb_connection_t *conn, d_screen_t *sc);
+void screen_stacking_add(d_screen_t *sc, struct d_window *w);
+void screen_stacking_remove(d_screen_t *sc, struct d_window *w);
 
 #endif