redirect rendering and get the composite overlay window
[dana/dcompmgr.git] / display.h
1 #ifndef dc__display_h
2 #define dc__display_h
3
4 #include <xcb/xcb.h>
5
6 #include <glib.h>
7
8 typedef struct d_display_ext {
9     gboolean          present;
10     int               error;
11     int               event;
12     int               opcode;
13     int               major_version;
14     int               minor_version;
15 } d_display_ext_t;
16
17 typedef struct d_display {
18     xcb_connection_t *conn;
19     int               ref;
20     struct d_screen  *screens;
21     int               nscreens;
22
23     d_display_ext_t xfixes;
24     d_display_ext_t render;
25     d_display_ext_t composite;
26     d_display_ext_t damage;
27
28     struct {
29         /* types */
30         xcb_atom_t atom;
31         xcb_atom_t cardinal;
32         xcb_atom_t utf8_string;
33         xcb_atom_t string;
34         xcb_atom_t pixmap;
35         /* properties */
36         xcb_atom_t net_wm_window_type;
37         xcb_atom_t net_wm_window_type_desktop;
38         xcb_atom_t net_wm_window_type_dock;
39         xcb_atom_t net_wm_window_type_normal;
40         xcb_atom_t net_wm_window_type_dialog;
41         xcb_atom_t net_wm_window_type_toolbar;
42         xcb_atom_t net_wm_window_type_menu;
43         xcb_atom_t net_wm_window_type_utility;
44         xcb_atom_t net_wm_window_type_splash;
45         xcb_atom_t net_wm_window_type_dropdown_menu;
46         xcb_atom_t net_wm_window_type_popup_menu;
47         xcb_atom_t net_wm_window_type_tooltip;
48         xcb_atom_t net_wm_window_type_notification;
49         xcb_atom_t net_wm_window_type_combo;
50         xcb_atom_t net_wm_window_type_dnd;
51     } a;
52 } d_display_t;
53
54 d_display_t* display_open(const char *name);
55
56 void display_ref(d_display_t *dpy);
57 void display_unref(d_display_t *dpy);
58
59 int display_claim_screens(d_display_t *dpy);
60
61 struct d_screen* display_screen_from_root(d_display_t *dpy, xcb_window_t root);
62
63 void display_error(d_display_t *dpy, xcb_generic_error_t *ev);
64
65 #endif