diff options
author | emersion <contact@emersion.fr> | 2019-03-08 12:33:18 +0100 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2019-04-11 09:19:57 -0600 |
commit | 0b64ecc162539907e60f6f3c4494e9853a02d74f (patch) | |
tree | 9cd7d707a69db4ef0854ec771dda50380c5098a6 /include | |
parent | 3a233b3fccee189d77878c66cdc0961951b53739 (diff) |
Split wlr_output_configuration_head_v1
Diffstat (limited to 'include')
-rw-r--r-- | include/wlr/types/wlr_output_management_v1.h | 35 |
1 files changed, 23 insertions, 12 deletions
diff --git a/include/wlr/types/wlr_output_management_v1.h b/include/wlr/types/wlr_output_management_v1.h index 7f0ad4f9..55d15528 100644 --- a/include/wlr/types/wlr_output_management_v1.h +++ b/include/wlr/types/wlr_output_management_v1.h @@ -12,14 +12,13 @@ #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 wl_list resources; // wl_resource_get_link - struct wlr_output_configuration_v1 *current; + struct wl_list heads; // wlr_output_head_v1::link + uint32_t serial; struct { struct wl_signal destroy; @@ -30,25 +29,37 @@ struct wlr_output_manager_v1 { 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_head_v1_state { struct wlr_output *output; - struct wl_list link; - - // for current config only - struct wl_list resources; bool enabled; +}; + +struct wlr_output_head_v1 { + struct wlr_output_head_v1_state state; + struct wlr_output_manager_v1 *manager; + struct wl_list link; // wlr_output_manager_v1::heads + + struct wl_list resources; // wl_resource_get_link struct wl_listener output_destroy; }; struct wlr_output_configuration_v1 { - struct wl_list heads; + struct wl_list heads; // wlr_output_configuration_head_v1::link uint32_t serial; }; +struct wlr_output_configuration_head_v1 { + struct wlr_output_head_v1_state state; + struct wlr_output_configuration_v1 *config; + struct wl_list link; // wlr_output_configuration_v1::heads + + struct wl_resource *resource; // can be NULL + + struct wl_listener output_destroy; +}; + struct wlr_output_manager_v1 *wlr_output_manager_v1_create( struct wl_display *display); void wlr_output_manager_v1_set_configuration( |