summaryrefslogtreecommitdiffstats
path: root/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-12-05 17:09:02 +0100
committerLaszlo Agocs <laszlo.p.agocs@nokia.com>2011-12-07 09:58:35 +0100
commit4c89518228012ddc3602eab405e4b5fb8108fcdf (patch)
tree615d4fdc38999e408d52998c39760064d223b652 /src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
parent542eca71e074b5110df2aaf822449bf7d6ec2b91 (diff)
Make wayland actually a module
Also fix so that QtCompositor can be built as shared object. + fix so that the default QT_WAYLAND_GL_CONFIG is wayland_egl Change-Id: I02b72e99286584426bd37ab2d00bbc84af11efdc Reviewed-by: Laszlo Agocs <laszlo.p.agocs@nokia.com>
Diffstat (limited to 'src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h')
-rw-r--r--src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
new file mode 100644
index 000000000..52154d406
--- /dev/null
+++ b/src/compositor/hardware_integration/xcomposite_share/xcompositebuffer.h
@@ -0,0 +1,43 @@
+#ifndef XCOMPOSITEBUFFER_H
+#define XCOMPOSITEBUFFER_H
+
+#include "waylandobject.h"
+#include "wayland_wrapper/wlcompositor.h"
+
+#include <QtCore/QSize>
+
+#include <QtCore/QTextStream>
+#include <QtCore/QDataStream>
+#include <QtCore/QMetaType>
+#include <QtCore/QVariant>
+#include <QtWidgets/QWidget>
+
+#include <X11/X.h>
+
+class XCompositeBuffer : public Wayland::Object<struct wl_buffer>
+{
+public:
+ XCompositeBuffer(Wayland::Compositor *compositor, Window window, const QSize &size);
+
+ Window window();
+
+ static struct wl_buffer_interface buffer_interface;
+ static void delete_resource(struct wl_resource *resource);
+
+ bool isYInverted() const { return mInvertedY; }
+ void setInvertedY(bool inverted) { mInvertedY = inverted; }
+private:
+ Window mWindow;
+ bool mInvertedY;
+
+ static void buffer_interface_destroy(struct wl_client *client,
+ struct wl_resource *buffer);
+ static void buffer_interface_damage(struct wl_client *client,
+ struct wl_resource *buffer,
+ int x,
+ int y,
+ int width,
+ int height);
+};
+
+#endif // XCOMPOSITORBUFFER_H