Add XComposite extension to wayland
[profile/ivi/qtwayland.git] / src / qt-compositor / hardware_integration / xcomposite_share / xcompositehandler.h
1 #ifndef XCOMPOSITEHANDLER_H
2 #define XCOMPOSITEHANDLER_H
3
4 #include "wayland_wrapper/wlcompositor.h"
5
6 #include "xlibinclude.h"
7
8 class XCompositeHandler : public Wayland::Object<struct wl_object>
9 {
10 public:
11     XCompositeHandler(Wayland::Compositor *compositor, Display *display, QWidget *topLevelWidget);
12     void createBuffer(struct wl_client *client, uint32_t id, Window window, const QSize &size, struct wl_visual *visual);
13
14     static void send_root_information(struct wl_client *client, struct wl_object *global);
15     static struct wl_xcomposite_interface xcomposite_interface;
16
17 private:
18     Wayland::Compositor *mCompositor;
19     QWidget *mTopLevelWidget;
20     QWidget *mFakeRootWidget;
21     Display *mDisplay;
22
23     static void create_buffer(struct wl_client *client,
24                           struct wl_xcomposite *xcomposite,
25                           uint32_t id,
26                           uint32_t x_window,
27                           int width,
28                           int height,
29                           struct wl_visual *visual);
30
31 };
32
33 #endif // XCOMPOSITEHANDLER_H