From 1cc8f21d8e19df2d1cc43864ae5715fbb5fbbe21 Mon Sep 17 00:00:00 2001 From: emersion Date: Sun, 22 Oct 2017 12:30:45 +0200 Subject: Cleanup wlr_gamma_control --- include/wlr/interfaces/wlr_output.h | 4 ++-- include/wlr/types/wlr_gamma_control.h | 16 +++++++++++++--- include/wlr/types/wlr_output.h | 4 ++-- 3 files changed, 17 insertions(+), 7 deletions(-) (limited to 'include/wlr') diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h index 338d3375..636cc06c 100644 --- a/include/wlr/interfaces/wlr_output.h +++ b/include/wlr/interfaces/wlr_output.h @@ -18,8 +18,8 @@ struct wlr_output_impl { void (*make_current)(struct wlr_output *output); void (*swap_buffers)(struct wlr_output *output); void (*set_gamma)(struct wlr_output *output, - uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b); - uint16_t (*get_gamma_size)(struct wlr_output *output); + uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b); + uint32_t (*get_gamma_size)(struct wlr_output *output); }; void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend, diff --git a/include/wlr/types/wlr_gamma_control.h b/include/wlr/types/wlr_gamma_control.h index 96c9f545..59f18494 100644 --- a/include/wlr/types/wlr_gamma_control.h +++ b/include/wlr/types/wlr_gamma_control.h @@ -5,18 +5,28 @@ struct wlr_gamma_control_manager { struct wl_global *wl_global; + struct wl_list controls; // list of wlr_gamma_control void *data; }; struct wlr_gamma_control { struct wl_resource *resource; - struct wl_resource *output; + struct wlr_output *output; + struct wl_list link; + + struct wl_listener output_destroy_listener; + + struct { + struct wl_signal destroy; + } events; void* data; }; -struct wlr_gamma_control_manager *wlr_gamma_control_manager_create(struct wl_display *display); -void wlr_gamma_control_manager_destroy(struct wlr_gamma_control_manager *gamma_control_manager); +struct wlr_gamma_control_manager *wlr_gamma_control_manager_create( + struct wl_display *display); +void wlr_gamma_control_manager_destroy( + struct wlr_gamma_control_manager *gamma_control_manager); #endif diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h index d8649bbb..74eb15ed 100644 --- a/include/wlr/types/wlr_output.h +++ b/include/wlr/types/wlr_output.h @@ -84,7 +84,7 @@ void wlr_output_effective_resolution(struct wlr_output *output, void wlr_output_make_current(struct wlr_output *output); void wlr_output_swap_buffers(struct wlr_output *output); void wlr_output_set_gamma(struct wlr_output *output, - uint16_t size, uint16_t *r, uint16_t *g, uint16_t *b); -uint16_t wlr_output_get_gamma_size(struct wlr_output *output); + uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b); +uint32_t wlr_output_get_gamma_size(struct wlr_output *output); #endif -- cgit v1.2.3