windows are added and created on create/destroy/reparent
[dana/dcompmgr.git] / screen.h
1 #ifndef dc__screen_h
2 #define dc__screen_h
3
4 #include <xcb/xcb.h>
5 #include <glib.h>
6
7 struct d_window;
8
9 /* inherits from xcb_screen_t */
10 typedef struct d_screen {
11     xcb_screen_t      super;
12     xcb_connection_t *conn;
13     int               num;
14
15     xcb_window_t      selwin;  /* for the selection */
16     xcb_atom_t        selatom; /* ditto.. */
17
18     GHashTable       *winhash;
19 } d_screen_t;
20
21 /*! Tries to register on the screen given by @sc.  If it succeeds, it fills
22     in @sc and returns TRUE, otherwise it returns FALSE.
23 */
24 gboolean screen_register(d_screen_t *sc);
25
26 void screen_add_window(d_screen_t *sc, xcb_window_t wid);
27 void screen_remove_window(d_screen_t *sc, struct d_window *w);
28
29 struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
30
31 #endif