aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2017-09-07 10:18:28 +0900
committerGitHub <noreply@github.com>2017-09-07 10:18:28 +0900
commitc59ccbde518ac173fffe8aba16ad9c5b703f7e2a (patch)
tree56634ac125808cc53f3de76950a7a480b96095d9 /include
parent586ae674ae65c64bf57653afae5378ca76ba40a7 (diff)
parent7d43d662f5cb54c13cbc4c791d97bfee30c10124 (diff)
Merge pull request #137 from emersion/gamma_control
Add gamma_control interface
Diffstat (limited to 'include')
-rw-r--r--include/wlr/interfaces/wlr_output.h3
-rw-r--r--include/wlr/types/wlr_gamma_control.h21
-rw-r--r--include/wlr/types/wlr_output.h3
3 files changed, 27 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index efc8ef43..a95fe588 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -14,6 +14,9 @@ struct wlr_output_impl {
void (*destroy)(struct wlr_output *output);
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);
};
void wlr_output_init(struct wlr_output *output, const struct wlr_output_impl *impl);
diff --git a/include/wlr/types/wlr_gamma_control.h b/include/wlr/types/wlr_gamma_control.h
new file mode 100644
index 00000000..259c6474
--- /dev/null
+++ b/include/wlr/types/wlr_gamma_control.h
@@ -0,0 +1,21 @@
+#ifndef _WLR_GAMMA_CONTROL_H
+#define _WLR_GAMMA_CONTROL_H
+#include <wayland-server.h>
+
+struct wlr_gamma_control_manager {
+ struct wl_global *wl_global;
+
+ void *data;
+};
+
+struct wlr_gamma_control {
+ struct wl_resource *resource;
+ struct wl_resource *output;
+
+ 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);
+
+#endif
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 3371dcb5..b70bd19e 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -64,5 +64,8 @@ void wlr_output_effective_resolution(struct wlr_output *output,
int *width, int *height);
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);
#endif