summaryrefslogtreecommitdiffstats
path: root/src/qt-compositor/hardware_integration/xpixmap_egl/xpixmapbuffer.h
blob: 96aeba4321b0b6b5c56cba9eb77f532f36b76575 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef XPIXMAPBUFFER_H
#define XPIXMAPBUFFER_H

#include "waylandobject.h"
#include "wayland_wrapper/wlcompositor.h"

#include <QtCore/QSize>

#include <X11/Xlib.h>

class XPixmapBuffer : public Wayland::Object<struct wl_buffer>
{
public:
    XPixmapBuffer(Pixmap pixmap, const QSize &size,
                  wl_visual *visual, Wayland::Compositor *compositor);

    ~XPixmapBuffer();

    Pixmap pixmap() const;
private:
    Pixmap m_pixmap;
};

void xPixmapBufferDestroy(struct wl_client *client, struct wl_buffer *buffer);

const static struct wl_buffer_interface xpixmap_buffer_interface = {
    xPixmapBufferDestroy
};


#endif // XPIXMAPBUFFER_H