531759972729e8f1576d2e6c94ce8788d4d9a91b
[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 struct d_display;
9
10 /* inherits from xcb_screen_t */
11 typedef struct d_screen {
12     xcb_screen_t      super;
13     struct d_display *dpy;
14     int               num;
15
16     xcb_window_t      selwin;  /* for the selection */
17     xcb_atom_t        selatom; /* ditto.. */
18
19     xcb_window_t      overlay;
20
21     GHashTable       *winhash;
22 } d_screen_t;
23
24 /*! Tries to register on the screen given by @sc.  If it succeeds, it fills
25     in @sc and returns TRUE, otherwise it returns FALSE.
26 */
27 gboolean screen_register(struct d_display *dpy, int num, d_screen_t *sc);
28
29 void screen_add_window(d_screen_t *sc, xcb_window_t wid);
30 void screen_remove_window(d_screen_t *sc, struct d_window *w);
31
32 struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
33
34 #endif