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 xcb_visualid_t overlay_visual;
25 struct timeval next_repaint;
26 gboolean need_repaint;
29 struct d_list *stacking;
30 struct d_list *plugin_data;
32 /* don't read this directly, use screen_get_root_pixmap() */
33 xcb_pixmap_t root_pixmap;
34 gboolean root_pixmap_waiting;
35 xcb_get_property_cookie_t root_pixmap_ck[3];
37 void (*screen_paint)(struct d_screen *sc);
38 void (*window_show)(struct d_window *w);
39 void (*window_hide)(struct d_window *w);
40 void (*window_become_zombie)(struct d_window *w);
41 void (*window_zombie_dead)(struct d_window *w);
42 void (*window_move)(struct d_window *w);
43 void (*window_resize)(struct d_window *w);
44 void (*window_reshape)(struct d_window *w);
45 void (*window_opacity_change)(struct d_window *w);
46 void (*window_damage)(struct d_window *w);
47 void (*window_restack)(struct d_window *w, struct d_window *above);
48 void (*screen_root_pixmap_change)(struct d_screen *sc);
51 d_screen_t* screen_new(struct d_display *dpy, int num, xcb_screen_t *xcb);
53 void screen_ref(d_screen_t *sc);
54 void screen_unref(d_screen_t *sc);
56 /*! Tries to register on the screen given by @sc. If it succeeds, it fills
57 in @sc and returns TRUE, otherwise it returns FALSE.
59 gboolean screen_register(d_screen_t *sc);
61 struct d_window* screen_add_window(d_screen_t *sc, xcb_window_t wid);
62 void screen_remove_window(d_screen_t *sc, struct d_window *w);
64 struct d_window* screen_find_window(d_screen_t *sc, xcb_window_t id);
66 void screen_stacking_add(d_screen_t *sc, struct d_window *w);
67 void screen_stacking_remove(d_screen_t *sc, struct d_window *w);
68 void screen_stacking_move_above(d_screen_t *sc, struct d_window *w,
69 struct d_window *above);
70 void screen_stacking_move_to_top(d_screen_t *sc, struct d_window *w);
71 void screen_stacking_move_to_bottom(d_screen_t *sc, struct d_window *w);
73 void screen_setup_default_functions(d_screen_t *sc);
75 void screen_add_plugin_data(d_screen_t *sc, int id, void *data);
76 void* screen_find_plugin_data(d_screen_t *sc, int id);
77 void screen_remove_plugin_data(d_screen_t *sc, int id);
79 void screen_refresh(d_screen_t *sc);
81 void screen_update_root_pixmap(d_screen_t *sc);
82 xcb_pixmap_t screen_get_root_pixmap(d_screen_t *sc);