7 #include <xcb/render.h>
9 #define PLUGIN_NAME "render"
12 void (*screen_paint)(d_screen_t *sc);
15 static void render_paint_screen(d_screen_t *sc);
16 static void paint_root(d_screen_t *sc);
17 static void paint_window(d_window_t *window);
20 render_init(d_screen_t *sc)
22 data_t *d = malloc(sizeof(data_t));
23 d->screen_paint = sc->screen_paint;
24 screen_add_plugin_data(sc, PLUGIN_NAME, d);
26 sc->screen_paint = render_paint_screen;
30 render_free(d_screen_t *sc)
32 data_t *d = screen_find_plugin_data(sc, PLUGIN_NAME);
37 render_paint_screen(d_screen_t *sc)
39 data_t *d = screen_find_plugin_data(sc, PLUGIN_NAME);
42 printf("-- painting --\n");
44 for (it = list_bottom(sc->stacking); it; it = it->prev)
45 paint_window(it->data);
47 /* call the function we replaced in the chain */
52 paint_root(d_screen_t *sc)
56 w = sc->super.width_in_pixels;
57 h = sc->super.height_in_pixels;
59 //printf("-- paint root 0x%x --\n", sc->super.root);
63 paint_window(d_window_t *w)
65 //printf("-- paint window 0x%x --\n", w->id);