12 /* inherits from xcb_screen_t */
13 typedef struct d_screen {
16 struct d_display *dpy;
19 xcb_window_t selwin; /* for the selection */
20 xcb_atom_t selatom; /* ditto.. */
23 struct d_window *root;
25 struct timeval next_repaint;
26 gboolean need_repaint;
29 struct d_list *stacking;
30 GHashTable *plugin_data;
32 void (*screen_paint)(struct d_screen *sc);
33 void (*window_show)(struct d_window *w);
34 void (*window_hide)(struct d_window *w);
35 void (*window_become_zombie)(struct d_window *w);
36 void (*window_configure)(struct d_window *w, int x, int y,
37 int width, int height, int border_width);
40 d_screen_t* screen_new(struct d_display *dpy, int num, xcb_screen_t *xcb);
42 void screen_ref(d_screen_t *sc);
43 void screen_unref(d_screen_t *sc);
45 /*! Tries to register on the screen given by @sc. If it succeeds, it fills
46 in @sc and returns TRUE, otherwise it returns FALSE.
48 gboolean screen_register(d_screen_t *sc);
50 struct d_window* screen_add_window(d_screen_t *sc, xcb_window_t wid);
51 void screen_remove_window(d_screen_t *sc, struct d_window *w);
53 struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
55 void screen_stacking_add(d_screen_t *sc, struct d_window *w);
56 void screen_stacking_remove(d_screen_t *sc, struct d_window *w);
57 void screen_stacking_move_above(d_screen_t *sc, struct d_window *w,
58 struct d_window *above);
60 void screen_setup_default_functions(d_screen_t *sc);
62 void screen_add_plugin_data(d_screen_t *sc, const char *key, void *data);
63 void* screen_find_plugin_data(d_screen_t *sc, const char *key);
64 void screen_remove_plugin_data(d_screen_t *sc, const char *key);
66 void screen_refresh(d_screen_t *sc);