aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-04-05 13:58:01 -0400
committerGitHub <noreply@github.com>2018-04-05 13:58:01 -0400
commitda73b4f60b2f08ae057f921c45ad616c11e6c66d (patch)
treeb0be72d66e5b2e5c35ba4d30f39aede576696bda /include
parentb6482bacf469326b8634bb1e78a96bb91556617f (diff)
parentabfe7923c45c2a1bdb155279b922b112111f3124 (diff)
Merge pull request #830 from swaywm/xdg-output
Add wlr_xdg_output_manager
Diffstat (limited to 'include')
-rw-r--r--include/wlr/types/wlr_output_layout.h5
-rw-r--r--include/wlr/types/wlr_xdg_output.h32
2 files changed, 37 insertions, 0 deletions
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h
index 91456bc0..ccb2cd61 100644
--- a/include/wlr/types/wlr_output_layout.h
+++ b/include/wlr/types/wlr_output_layout.h
@@ -34,6 +34,11 @@ struct wlr_output_layout_output {
} events;
};
+/**
+ * Creates a wlr_output_layout, which can be used to describing outputs in
+ * physical space relative to one another, and perform various useful operations
+ * on that state.
+ */
struct wlr_output_layout *wlr_output_layout_create();
void wlr_output_layout_destroy(struct wlr_output_layout *layout);
diff --git a/include/wlr/types/wlr_xdg_output.h b/include/wlr/types/wlr_xdg_output.h
new file mode 100644
index 00000000..27dad2b8
--- /dev/null
+++ b/include/wlr/types/wlr_xdg_output.h
@@ -0,0 +1,32 @@
+#ifndef WLR_TYPES_WLR_XDG_OUTPUT_H
+#define WLR_TYPES_WLR_XDG_OUTPUT_H
+#include <wayland-server.h>
+#include <wlr/types/wlr_output_layout.h>
+
+struct wlr_xdg_output {
+ struct wl_list link;
+ struct wl_list resources;
+
+ struct wlr_xdg_output_manager *manager;
+ struct wlr_output_layout_output *layout_output;
+
+ struct wl_listener destroy;
+};
+
+struct wlr_xdg_output_manager {
+ struct wl_global *global;
+
+ struct wlr_output_layout *layout;
+
+ struct wl_list outputs;
+
+ struct wl_listener layout_add;
+ struct wl_listener layout_change;
+ struct wl_listener layout_destroy;
+};
+
+struct wlr_xdg_output_manager *wlr_xdg_output_manager_create(
+ struct wl_display *display, struct wlr_output_layout *layout);
+void wlr_xdg_output_manager_destroy(struct wlr_xdg_output_manager *manager);
+
+#endif