55
66#include <stdint.h>
77#include <stddef.h>
8- #include <wayland-util .h>
8+ #include <wayland-client .h>
99
1010#ifdef __cplusplus
1111extern "C" {
@@ -214,6 +214,26 @@ enum kde_output_device_v2_capability {
214214 * @since 9
215215 */
216216 KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS = 0x80 ,
217+ /**
218+ * if this outputdevice supports the built-in color profile
219+ * @since 12
220+ */
221+ KDE_OUTPUT_DEVICE_V2_CAPABILITY_BUILT_IN_COLOR = 0x100 ,
222+ /**
223+ * if this outputdevice supports DDC/CI
224+ * @since 14
225+ */
226+ KDE_OUTPUT_DEVICE_V2_CAPABILITY_DDC_CI = 0x200 ,
227+ /**
228+ * if this outputdevice supports setting max bpc
229+ * @since 15
230+ */
231+ KDE_OUTPUT_DEVICE_V2_CAPABILITY_MAX_BITS_PER_COLOR = 0x400 ,
232+ /**
233+ * if this outputdevice supports EDR
234+ * @since 16
235+ */
236+ KDE_OUTPUT_DEVICE_V2_CAPABILITY_EDR = 0x800 ,
217237};
218238/**
219239 * @ingroup iface_kde_output_device_v2
@@ -235,6 +255,22 @@ enum kde_output_device_v2_capability {
235255 * @ingroup iface_kde_output_device_v2
236256 */
237257#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS_SINCE_VERSION 9
258+ /**
259+ * @ingroup iface_kde_output_device_v2
260+ */
261+ #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BUILT_IN_COLOR_SINCE_VERSION 12
262+ /**
263+ * @ingroup iface_kde_output_device_v2
264+ */
265+ #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_DDC_CI_SINCE_VERSION 14
266+ /**
267+ * @ingroup iface_kde_output_device_v2
268+ */
269+ #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_MAX_BITS_PER_COLOR_SINCE_VERSION 15
270+ /**
271+ * @ingroup iface_kde_output_device_v2
272+ */
273+ #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_EDR_SINCE_VERSION 16
238274#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
239275
240276#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
@@ -316,6 +352,18 @@ enum kde_output_device_v2_color_power_tradeoff {
316352};
317353#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM */
318354
355+ #ifndef KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM
356+ #define KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM
357+ /**
358+ * @ingroup iface_kde_output_device_v2
359+ * when the compositor may make use of EDR
360+ */
361+ enum kde_output_device_v2_edr_policy {
362+ KDE_OUTPUT_DEVICE_V2_EDR_POLICY_NEVER = 0 ,
363+ KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ALWAYS = 1 ,
364+ };
365+ #endif /* KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM */
366+
319367/**
320368 * @ingroup iface_kde_output_device_v2
321369 * @struct kde_output_device_v2_listener
@@ -658,6 +706,74 @@ struct kde_output_device_v2_listener {
658706 void (* dimming )(void * data ,
659707 struct kde_output_device_v2 * kde_output_device_v2 ,
660708 uint32_t multiplier );
709+ /**
710+ * source output for mirroring
711+ *
712+ *
713+ * @param source uuid of the source output
714+ * @since 13
715+ */
716+ void (* replication_source )(void * data ,
717+ struct kde_output_device_v2 * kde_output_device_v2 ,
718+ const char * source );
719+ /**
720+ * if DDC/CI should be used to control brightness etc.
721+ *
722+ * If the ddc_ci capability is present, this determines if
723+ * settings such as brightness, contrast or others should be set
724+ * using DDC/CI.
725+ * @param allowed 1 if allowed, 0 if disabled
726+ * @since 14
727+ */
728+ void (* ddc_ci_allowed )(void * data ,
729+ struct kde_output_device_v2 * kde_output_device_v2 ,
730+ uint32_t allowed );
731+ /**
732+ * override max bpc
733+ *
734+ * This limits the amount of bits per color that are sent to the
735+ * display.
736+ * @param max_bpc 0 for the default / automatic
737+ * @since 15
738+ */
739+ void (* max_bits_per_color )(void * data ,
740+ struct kde_output_device_v2 * kde_output_device_v2 ,
741+ uint32_t max_bpc );
742+ /**
743+ * range of max bits per color value
744+ *
745+ *
746+ * @param min_value the minimum supported by the driver
747+ * @param max_value the maximum supported by the driver
748+ * @since 15
749+ */
750+ void (* max_bits_per_color_range )(void * data ,
751+ struct kde_output_device_v2 * kde_output_device_v2 ,
752+ uint32_t min_value ,
753+ uint32_t max_value );
754+ /**
755+ * if and to what value automatic max bpc is limited
756+ *
757+ *
758+ * @param max_bpc_limit which value automatic bpc gets limited to. 0 if not limited
759+ * @since 15
760+ */
761+ void (* automatic_max_bits_per_color_limit )(void * data ,
762+ struct kde_output_device_v2 * kde_output_device_v2 ,
763+ uint32_t max_bpc_limit );
764+ /**
765+ * when the compositor may apply EDR
766+ *
767+ * When EDR is enabled, the compositor may increase the backlight
768+ * beyond the user-specified setting, in order to present HDR
769+ * content on displays without native HDR support. This will
770+ * usually result in better visuals, but also increases battery
771+ * usage.
772+ * @since 16
773+ */
774+ void (* edr_policy )(void * data ,
775+ struct kde_output_device_v2 * kde_output_device_v2 ,
776+ uint32_t policy );
661777};
662778
663779/**
@@ -779,6 +895,30 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device
779895 * @ingroup iface_kde_output_device_v2
780896 */
781897#define KDE_OUTPUT_DEVICE_V2_DIMMING_SINCE_VERSION 11
898+ /**
899+ * @ingroup iface_kde_output_device_v2
900+ */
901+ #define KDE_OUTPUT_DEVICE_V2_REPLICATION_SOURCE_SINCE_VERSION 13
902+ /**
903+ * @ingroup iface_kde_output_device_v2
904+ */
905+ #define KDE_OUTPUT_DEVICE_V2_DDC_CI_ALLOWED_SINCE_VERSION 14
906+ /**
907+ * @ingroup iface_kde_output_device_v2
908+ */
909+ #define KDE_OUTPUT_DEVICE_V2_MAX_BITS_PER_COLOR_SINCE_VERSION 15
910+ /**
911+ * @ingroup iface_kde_output_device_v2
912+ */
913+ #define KDE_OUTPUT_DEVICE_V2_MAX_BITS_PER_COLOR_RANGE_SINCE_VERSION 15
914+ /**
915+ * @ingroup iface_kde_output_device_v2
916+ */
917+ #define KDE_OUTPUT_DEVICE_V2_AUTOMATIC_MAX_BITS_PER_COLOR_LIMIT_SINCE_VERSION 15
918+ /**
919+ * @ingroup iface_kde_output_device_v2
920+ */
921+ #define KDE_OUTPUT_DEVICE_V2_EDR_POLICY_SINCE_VERSION 16
782922
783923
784924/** @ingroup iface_kde_output_device_v2 */
0 commit comments