aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorManuel Stoeckl <code@mstoeckl.com>2023-07-17 21:40:28 -0400
committerSimon Ser <contact@emersion.fr>2024-06-07 19:01:49 +0200
commit40ca4150b27a5b94938b6c3d744f74bb26d347f7 (patch)
treea162451f9508eed3a0f7935d6b2e3615e20f03d2 /include
parent2e9139df664f1e2dbe14b5df4a9646411b924c66 (diff)
sway/commands/output: Add command to set color profile
This makes it possible to render output buffers in a different color space, by specifying an ICC profile for the output.
Diffstat (limited to 'include')
-rw-r--r--include/sway/commands.h1
-rw-r--r--include/sway/config.h3
-rw-r--r--include/sway/output.h2
3 files changed, 6 insertions, 0 deletions
diff --git a/include/sway/commands.h b/include/sway/commands.h
index 27058587..0a9fdc70 100644
--- a/include/sway/commands.h
+++ b/include/sway/commands.h
@@ -283,6 +283,7 @@ sway_cmd input_cmd_xkb_variant;
sway_cmd output_cmd_adaptive_sync;
sway_cmd output_cmd_background;
+sway_cmd output_cmd_color_profile;
sway_cmd output_cmd_disable;
sway_cmd output_cmd_dpms;
sway_cmd output_cmd_enable;
diff --git a/include/sway/config.h b/include/sway/config.h
index 5ccc3e77..3e3a104e 100644
--- a/include/sway/config.h
+++ b/include/sway/config.h
@@ -7,6 +7,7 @@
#include <wlr/interfaces/wlr_switch.h>
#include <wlr/types/wlr_tablet_tool.h>
#include <wlr/util/box.h>
+#include <wlr/render/color.h>
#include <xkbcommon/xkbcommon.h>
#include <xf86drmMode.h>
#include "../include/config.h"
@@ -285,6 +286,8 @@ struct output_config {
int max_render_time; // In milliseconds
int adaptive_sync;
enum render_bit_depth render_bit_depth;
+ bool set_color_transform;
+ struct wlr_color_transform *color_transform;
char *background;
char *background_option;
diff --git a/include/sway/output.h b/include/sway/output.h
index d546d488..2189c6e8 100644
--- a/include/sway/output.h
+++ b/include/sway/output.h
@@ -66,6 +66,8 @@ struct sway_output {
struct wl_signal disable;
} events;
+ struct wlr_color_transform *color_transform;
+
struct timespec last_presentation;
uint32_t refresh_nsec;
int max_render_time; // In milliseconds