Cleanup wlr_gamma_control

This commit is contained in:
emersion 2017-10-22 12:30:45 +02:00
parent 86be449a3f
commit 1cc8f21d8e
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
6 changed files with 111 additions and 42 deletions

View file

@ -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,

View file

@ -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

View file

@ -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