From abfe7923c45c2a1bdb155279b922b112111f3124 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Thu, 5 Apr 2018 12:22:19 -0400 Subject: Add wlr_xdg_output_manager --- include/wlr/types/wlr_output_layout.h | 5 +++++ include/wlr/types/wlr_xdg_output.h | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 include/wlr/types/wlr_xdg_output.h (limited to 'include/wlr') diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h index 3c150fc0..f2f6e44b 100644 --- a/include/wlr/types/wlr_output_layout.h +++ b/include/wlr/types/wlr_output_layout.h @@ -32,6 +32,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 +#include + +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 -- cgit v1.2.3