From 9e68ed21599661f75f3b73e3e698ab8828341a18 Mon Sep 17 00:00:00 2001
From: Simon Ser <contact@emersion.fr>
Date: Tue, 31 Mar 2020 15:19:08 +0200
Subject: viewporter: new protocol implementation

Closes: https://github.com/swaywm/wlroots/issues/633
---
 include/wlr/types/wlr_viewporter.h | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 include/wlr/types/wlr_viewporter.h

(limited to 'include/wlr')

diff --git a/include/wlr/types/wlr_viewporter.h b/include/wlr/types/wlr_viewporter.h
new file mode 100644
index 00000000..b695420d
--- /dev/null
+++ b/include/wlr/types/wlr_viewporter.h
@@ -0,0 +1,34 @@
+/*
+ * This an unstable interface of wlroots. No guarantees are made regarding the
+ * future consistency of this API.
+ */
+#ifndef WLR_USE_UNSTABLE
+#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
+#endif
+
+#ifndef WLR_TYPES_WLR_VIEWPORTER_H
+#define WLR_TYPES_WLR_VIEWPORTER_H
+
+#include <wayland-server-core.h>
+
+struct wlr_viewporter {
+	struct wl_global *global;
+
+	struct {
+		struct wl_signal destroy;
+	} events;
+
+	struct wl_listener display_destroy;
+};
+
+struct wlr_viewport {
+	struct wl_resource *resource;
+	struct wlr_surface *surface;
+
+	struct wl_listener surface_destroy;
+	struct wl_listener surface_commit;
+};
+
+struct wlr_viewporter *wlr_viewporter_create(struct wl_display *display);
+
+#endif
-- 
cgit v1.2.3