diff options
Diffstat (limited to 'include/wlr')
-rw-r--r-- | include/wlr/types/meson.build | 1 | ||||
-rw-r--r-- | include/wlr/types/wlr_output_management_v1.h | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/include/wlr/types/meson.build b/include/wlr/types/meson.build index fe39db36..fe82aeb5 100644 --- a/include/wlr/types/meson.build +++ b/include/wlr/types/meson.build @@ -23,6 +23,7 @@ install_headers( 'wlr_matrix.h', 'wlr_output_damage.h', 'wlr_output_layout.h', + 'wlr_output_management_v1.h', 'wlr_output.h', 'wlr_pointer_constraints_v1.h', 'wlr_pointer_gestures_v1.h', diff --git a/include/wlr/types/wlr_output_management_v1.h b/include/wlr/types/wlr_output_management_v1.h new file mode 100644 index 00000000..7f0ad4f9 --- /dev/null +++ b/include/wlr/types/wlr_output_management_v1.h @@ -0,0 +1,66 @@ +/* + * 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_OUTPUT_MANAGEMENT_V1_H +#define WLR_TYPES_WLR_OUTPUT_MANAGEMENT_V1_H + +#include <wayland-server.h> +#include <wlr/types/wlr_output.h> + +struct wlr_output_configuration_v1; + +struct wlr_output_manager_v1 { + struct wl_display *display; + struct wl_global *global; + struct wl_list resources; + + struct wlr_output_configuration_v1 *current; + + struct { + struct wl_signal destroy; + } events; + + struct wl_listener display_destroy; + + void *data; +}; + +// TODO: split this into multiple structs (state + output_head + output_configuration_head) +struct wlr_output_configuration_head_v1 { + struct wlr_output_configuration_v1 *config; + struct wlr_output *output; + struct wl_list link; + + // for current config only + struct wl_list resources; + + bool enabled; + + struct wl_listener output_destroy; +}; + +struct wlr_output_configuration_v1 { + struct wl_list heads; + uint32_t serial; +}; + +struct wlr_output_manager_v1 *wlr_output_manager_v1_create( + struct wl_display *display); +void wlr_output_manager_v1_set_configuration( + struct wlr_output_manager_v1 *manager, + struct wlr_output_configuration_v1 *config); + +struct wlr_output_configuration_v1 *wlr_output_configuration_v1_create(void); +void wlr_output_configuration_v1_destroy( + struct wlr_output_configuration_v1 *config); + +struct wlr_output_configuration_head_v1 * + wlr_output_configuration_head_v1_create( + struct wlr_output_configuration_v1 *config, struct wlr_output *output); + +#endif |