ohmu
·
2026-10-15
1/* Generated by wayland-scanner 1.24.0 */
2
3#ifndef KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
4#define KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
5
6#include <stdint.h>
7#include <stddef.h>
8#include <wayland-client.h>
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/**
15 * @page page_kde_output_device_v2 The kde_output_device_v2 protocol
16 * @section page_ifaces_kde_output_device_v2 Interfaces
17 * - @subpage page_iface_kde_output_device_registry_v2 - output devices
18 * - @subpage page_iface_kde_output_device_v2 - output configuration representation
19 * - @subpage page_iface_kde_output_device_mode_v2 - output mode
20 * @section page_copyright_kde_output_device_v2 Copyright
21 * <pre>
22 *
23 * SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
24 * SPDX-FileCopyrightText: 2010-2011 Intel Corporation
25 * SPDX-FileCopyrightText: 2012-2013 Collabora, Ltd.
26 * SPDX-FileCopyrightText: 2015 Sebastian Kügler <sebas@kde.org>
27 * SPDX-FileCopyrightText: 2021 Méven Car <meven.car@enioka.com>
28 *
29 * SPDX-License-Identifier: MIT-CMU
30 * </pre>
31 */
32struct kde_output_device_mode_v2;
33struct kde_output_device_registry_v2;
34struct kde_output_device_v2;
35
36#ifndef KDE_OUTPUT_DEVICE_REGISTRY_V2_INTERFACE
37 #define KDE_OUTPUT_DEVICE_REGISTRY_V2_INTERFACE
38/**
39 * @page page_iface_kde_output_device_registry_v2 kde_output_device_registry_v2
40 * @section page_iface_kde_output_device_registry_v2_desc Description
41 *
42 * This interface can be used to list output devices.
43 *
44 * If this global is bound with a version less than 21, the unsupported_version
45 * protocol error will be posted.
46 * @section page_iface_kde_output_device_registry_v2_api API
47 * See @ref iface_kde_output_device_registry_v2.
48 */
49/**
50 * @defgroup iface_kde_output_device_registry_v2 The kde_output_device_registry_v2 interface
51 *
52 * This interface can be used to list output devices.
53 *
54 * If this global is bound with a version less than 21, the unsupported_version
55 * protocol error will be posted.
56 */
57extern const struct wl_interface kde_output_device_registry_v2_interface;
58#endif
59#ifndef KDE_OUTPUT_DEVICE_V2_INTERFACE
60 #define KDE_OUTPUT_DEVICE_V2_INTERFACE
61/**
62 * @page page_iface_kde_output_device_v2 kde_output_device_v2
63 * @section page_iface_kde_output_device_v2_desc Description
64 *
65 * An output device describes a display device available to the compositor.
66 * output_device is similar to wl_output, but focuses on output
67 * configuration management.
68 *
69 * A client can query all global output_device objects to enlist all
70 * available display devices, even those that may currently not be
71 * represented by the compositor as a wl_output.
72 *
73 * The client sends configuration changes to the server through the
74 * outputconfiguration interface, and the server applies the configuration
75 * changes to the hardware and signals changes to the output devices
76 * accordingly.
77 *
78 * This object is published as global during start up for every available
79 * display devices, or when one later becomes available, for example by
80 * being hotplugged via a physical connector.
81 *
82 * Warning! The protocol described in this file is a desktop environment
83 * implementation detail. Regular clients must not use this protocol.
84 * Backward incompatible changes may be added without bumping the major
85 * version of the extension.
86 * @section page_iface_kde_output_device_v2_api API
87 * See @ref iface_kde_output_device_v2.
88 */
89/**
90 * @defgroup iface_kde_output_device_v2 The kde_output_device_v2 interface
91 *
92 * An output device describes a display device available to the compositor.
93 * output_device is similar to wl_output, but focuses on output
94 * configuration management.
95 *
96 * A client can query all global output_device objects to enlist all
97 * available display devices, even those that may currently not be
98 * represented by the compositor as a wl_output.
99 *
100 * The client sends configuration changes to the server through the
101 * outputconfiguration interface, and the server applies the configuration
102 * changes to the hardware and signals changes to the output devices
103 * accordingly.
104 *
105 * This object is published as global during start up for every available
106 * display devices, or when one later becomes available, for example by
107 * being hotplugged via a physical connector.
108 *
109 * Warning! The protocol described in this file is a desktop environment
110 * implementation detail. Regular clients must not use this protocol.
111 * Backward incompatible changes may be added without bumping the major
112 * version of the extension.
113 */
114extern const struct wl_interface kde_output_device_v2_interface;
115#endif
116#ifndef KDE_OUTPUT_DEVICE_MODE_V2_INTERFACE
117 #define KDE_OUTPUT_DEVICE_MODE_V2_INTERFACE
118/**
119 * @page page_iface_kde_output_device_mode_v2 kde_output_device_mode_v2
120 * @section page_iface_kde_output_device_mode_v2_desc Description
121 *
122 * This object describes an output mode.
123 *
124 * Some heads don't support output modes, in which case modes won't be
125 * advertised.
126 *
127 * Properties sent via this interface are applied atomically via the
128 * kde_output_device.done event. No guarantees are made regarding the order
129 * in which properties are sent.
130 * @section page_iface_kde_output_device_mode_v2_api API
131 * See @ref iface_kde_output_device_mode_v2.
132 */
133/**
134 * @defgroup iface_kde_output_device_mode_v2 The kde_output_device_mode_v2 interface
135 *
136 * This object describes an output mode.
137 *
138 * Some heads don't support output modes, in which case modes won't be
139 * advertised.
140 *
141 * Properties sent via this interface are applied atomically via the
142 * kde_output_device.done event. No guarantees are made regarding the order
143 * in which properties are sent.
144 */
145extern const struct wl_interface kde_output_device_mode_v2_interface;
146#endif
147
148#ifndef KDE_OUTPUT_DEVICE_REGISTRY_V2_ERROR_ENUM
149 #define KDE_OUTPUT_DEVICE_REGISTRY_V2_ERROR_ENUM
150/**
151 * @ingroup iface_kde_output_device_registry_v2
152 * kde_output_device_registry_v2 error values
153 *
154 * These errors can be emitted in response to some requests.
155 */
156enum kde_output_device_registry_v2_error {
157 /**
158 * the registry was bound with an unsupported version
159 */
160 KDE_OUTPUT_DEVICE_REGISTRY_V2_ERROR_UNSUPPORTED_VERSION = 0,
161};
162#endif /* KDE_OUTPUT_DEVICE_REGISTRY_V2_ERROR_ENUM */
163
164/**
165 * @ingroup iface_kde_output_device_registry_v2
166 * @struct kde_output_device_registry_v2_listener
167 */
168struct kde_output_device_registry_v2_listener {
169 /**
170 * no new output announcements
171 *
172 * This event is sent in response to the stop request. The
173 * compositor will immediately destroy the object after sending
174 * this event.
175 * @since 21
176 */
177 void (*finished)(void* data,
178 struct kde_output_device_registry_v2* kde_output_device_registry_v2);
179 /**
180 * new available output
181 *
182 * This event is sent when a new output is connected or after
183 * binding this global to list all available outputs.
184 * @since 21
185 */
186 void (*output)(void* data,
187 struct kde_output_device_registry_v2* kde_output_device_registry_v2,
188 struct kde_output_device_v2* output);
189};
190
191/**
192 * @ingroup iface_kde_output_device_registry_v2
193 */
194static inline int
195kde_output_device_registry_v2_add_listener(struct kde_output_device_registry_v2* kde_output_device_registry_v2,
196 const struct kde_output_device_registry_v2_listener* listener,
197 void* data) {
198 return wl_proxy_add_listener((struct wl_proxy*) kde_output_device_registry_v2,
199 (void (**)(void)) listener,
200 data);
201}
202
203#define KDE_OUTPUT_DEVICE_REGISTRY_V2_STOP 0
204
205/**
206 * @ingroup iface_kde_output_device_registry_v2
207 */
208#define KDE_OUTPUT_DEVICE_REGISTRY_V2_FINISHED_SINCE_VERSION 21
209/**
210 * @ingroup iface_kde_output_device_registry_v2
211 */
212#define KDE_OUTPUT_DEVICE_REGISTRY_V2_OUTPUT_SINCE_VERSION 21
213
214/**
215 * @ingroup iface_kde_output_device_registry_v2
216 */
217#define KDE_OUTPUT_DEVICE_REGISTRY_V2_STOP_SINCE_VERSION 21
218
219/** @ingroup iface_kde_output_device_registry_v2 */
220static inline void
221kde_output_device_registry_v2_set_user_data(struct kde_output_device_registry_v2* kde_output_device_registry_v2, void* user_data) {
222 wl_proxy_set_user_data((struct wl_proxy*) kde_output_device_registry_v2, user_data);
223}
224
225/** @ingroup iface_kde_output_device_registry_v2 */
226static inline void*
227kde_output_device_registry_v2_get_user_data(struct kde_output_device_registry_v2* kde_output_device_registry_v2) {
228 return wl_proxy_get_user_data((struct wl_proxy*) kde_output_device_registry_v2);
229}
230
231static inline uint32_t
232kde_output_device_registry_v2_get_version(struct kde_output_device_registry_v2* kde_output_device_registry_v2) {
233 return wl_proxy_get_version((struct wl_proxy*) kde_output_device_registry_v2);
234}
235
236/** @ingroup iface_kde_output_device_registry_v2 */
237static inline void
238kde_output_device_registry_v2_destroy(struct kde_output_device_registry_v2* kde_output_device_registry_v2) {
239 wl_proxy_destroy((struct wl_proxy*) kde_output_device_registry_v2);
240}
241
242/**
243 * @ingroup iface_kde_output_device_registry_v2
244 *
245 * This request indicates that the client no longer wants to receive new
246 * output announcements. The compositor will send the
247 * kde_output_device_registry_v2.finished event in response to this request.
248 * The compositor may still send new output announcements after calling this
249 * request until the kde_output_device_registry_v2.finished event is sent.
250 */
251// static inline void
252// kde_output_device_registry_v2_stop(struct kde_output_device_registry_v2* kde_output_device_registry_v2) {
253// wl_proxy_marshal_flags((struct wl_proxy*) kde_output_device_registry_v2,
254// KDE_OUTPUT_DEVICE_REGISTRY_V2_STOP,
255// nullptr,
256// wl_proxy_get_version((struct wl_proxy*) kde_output_device_registry_v2),
257// 0);
258// }
259
260#ifndef KDE_OUTPUT_DEVICE_V2_SUBPIXEL_ENUM
261 #define KDE_OUTPUT_DEVICE_V2_SUBPIXEL_ENUM
262/**
263 * @ingroup iface_kde_output_device_v2
264 * subpixel geometry information
265 *
266 * This enumeration describes how the physical pixels on an output are
267 * laid out.
268 */
269enum kde_output_device_v2_subpixel {
270 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_UNKNOWN = 0,
271 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_NONE = 1,
272 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_HORIZONTAL_RGB = 2,
273 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_HORIZONTAL_BGR = 3,
274 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_VERTICAL_RGB = 4,
275 KDE_OUTPUT_DEVICE_V2_SUBPIXEL_VERTICAL_BGR = 5,
276};
277#endif /* KDE_OUTPUT_DEVICE_V2_SUBPIXEL_ENUM */
278
279#ifndef KDE_OUTPUT_DEVICE_V2_TRANSFORM_ENUM
280 #define KDE_OUTPUT_DEVICE_V2_TRANSFORM_ENUM
281/**
282 * @ingroup iface_kde_output_device_v2
283 * transform from framebuffer to output
284 *
285 * This describes the transform, that a compositor will apply to a
286 * surface to compensate for the rotation or mirroring of an
287 * output device.
288 *
289 * The flipped values correspond to an initial flip around a
290 * vertical axis followed by rotation.
291 *
292 * The purpose is mainly to allow clients to render accordingly and
293 * tell the compositor, so that for fullscreen surfaces, the
294 * compositor is still able to scan out directly client surfaces.
295 */
296enum kde_output_device_v2_transform {
297 KDE_OUTPUT_DEVICE_V2_TRANSFORM_NORMAL = 0,
298 KDE_OUTPUT_DEVICE_V2_TRANSFORM_90 = 1,
299 KDE_OUTPUT_DEVICE_V2_TRANSFORM_180 = 2,
300 KDE_OUTPUT_DEVICE_V2_TRANSFORM_270 = 3,
301 KDE_OUTPUT_DEVICE_V2_TRANSFORM_FLIPPED = 4,
302 KDE_OUTPUT_DEVICE_V2_TRANSFORM_FLIPPED_90 = 5,
303 KDE_OUTPUT_DEVICE_V2_TRANSFORM_FLIPPED_180 = 6,
304 KDE_OUTPUT_DEVICE_V2_TRANSFORM_FLIPPED_270 = 7,
305};
306#endif /* KDE_OUTPUT_DEVICE_V2_TRANSFORM_ENUM */
307
308#ifndef KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM
309 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM
310/**
311 * @ingroup iface_kde_output_device_v2
312 * describes capabilities of the outputdevice
313 *
314 * Describes what capabilities this device has.
315 */
316enum kde_output_device_v2_capability {
317 /**
318 * if this output_device can use overscan
319 */
320 KDE_OUTPUT_DEVICE_V2_CAPABILITY_OVERSCAN = 0x1,
321 /**
322 * if this outputdevice supports variable refresh rate
323 */
324 KDE_OUTPUT_DEVICE_V2_CAPABILITY_VRR = 0x2,
325 /**
326 * if setting the rgb range is possible
327 */
328 KDE_OUTPUT_DEVICE_V2_CAPABILITY_RGB_RANGE = 0x4,
329 /**
330 * if this outputdevice supports high dynamic range
331 * @since 3
332 */
333 KDE_OUTPUT_DEVICE_V2_CAPABILITY_HIGH_DYNAMIC_RANGE = 0x8,
334 /**
335 * if this outputdevice supports a wide color gamut
336 * @since 3
337 */
338 KDE_OUTPUT_DEVICE_V2_CAPABILITY_WIDE_COLOR_GAMUT = 0x10,
339 /**
340 * if this outputdevice supports autorotation
341 * @since 4
342 */
343 KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_ROTATE = 0x20,
344 /**
345 * if this outputdevice supports icc profiles
346 * @since 5
347 */
348 KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE = 0x40,
349 /**
350 * if this outputdevice supports the brightness setting
351 * @since 9
352 */
353 KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS = 0x80,
354 /**
355 * if this outputdevice supports the built-in color profile
356 * @since 12
357 */
358 KDE_OUTPUT_DEVICE_V2_CAPABILITY_BUILT_IN_COLOR = 0x100,
359 /**
360 * if this outputdevice supports DDC/CI
361 * @since 14
362 */
363 KDE_OUTPUT_DEVICE_V2_CAPABILITY_DDC_CI = 0x200,
364 /**
365 * if this outputdevice supports setting max bpc
366 * @since 15
367 */
368 KDE_OUTPUT_DEVICE_V2_CAPABILITY_MAX_BITS_PER_COLOR = 0x400,
369 /**
370 * if this outputdevice supports EDR
371 * @since 16
372 */
373 KDE_OUTPUT_DEVICE_V2_CAPABILITY_EDR = 0x800,
374 /**
375 * if this outputdevice supports the sharpness setting
376 * @since 17
377 */
378 KDE_OUTPUT_DEVICE_V2_CAPABILITY_SHARPNESS = 0x1000,
379 /**
380 * if this outputdevice supports custom modes
381 * @since 18
382 */
383 KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES = 0x2000,
384 /**
385 * @since 19
386 */
387 KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_BRIGHTNESS = 0x4000,
388 /**
389 * if this outputdevice supports HDR ICC profiles
390 * @since 22
391 */
392 KDE_OUTPUT_DEVICE_V2_CAPABILITY_HDR_ICC_PROFILE = 0x8000,
393 /**
394 * if this outputdevice supports the abm level setting
395 * @since 23
396 */
397 KDE_OUTPUT_DEVICE_V2_CAPABILITY_ABM_LEVEL = 0x10000,
398};
399 /**
400 * @ingroup iface_kde_output_device_v2
401 */
402 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_HIGH_DYNAMIC_RANGE_SINCE_VERSION 3
403 /**
404 * @ingroup iface_kde_output_device_v2
405 */
406 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_WIDE_COLOR_GAMUT_SINCE_VERSION 3
407 /**
408 * @ingroup iface_kde_output_device_v2
409 */
410 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_ROTATE_SINCE_VERSION 4
411 /**
412 * @ingroup iface_kde_output_device_v2
413 */
414 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE_SINCE_VERSION 5
415 /**
416 * @ingroup iface_kde_output_device_v2
417 */
418 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS_SINCE_VERSION 9
419 /**
420 * @ingroup iface_kde_output_device_v2
421 */
422 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BUILT_IN_COLOR_SINCE_VERSION 12
423 /**
424 * @ingroup iface_kde_output_device_v2
425 */
426 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_DDC_CI_SINCE_VERSION 14
427 /**
428 * @ingroup iface_kde_output_device_v2
429 */
430 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_MAX_BITS_PER_COLOR_SINCE_VERSION 15
431 /**
432 * @ingroup iface_kde_output_device_v2
433 */
434 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_EDR_SINCE_VERSION 16
435 /**
436 * @ingroup iface_kde_output_device_v2
437 */
438 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_SHARPNESS_SINCE_VERSION 17
439 /**
440 * @ingroup iface_kde_output_device_v2
441 */
442 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES_SINCE_VERSION 18
443 /**
444 * @ingroup iface_kde_output_device_v2
445 */
446 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_BRIGHTNESS_SINCE_VERSION 19
447 /**
448 * @ingroup iface_kde_output_device_v2
449 */
450 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_HDR_ICC_PROFILE_SINCE_VERSION 22
451 /**
452 * @ingroup iface_kde_output_device_v2
453 */
454 #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ABM_LEVEL_SINCE_VERSION 23
455#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
456
457#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
458 #define KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
459/**
460 * @ingroup iface_kde_output_device_v2
461 * describes vrr policy
462 *
463 * Describes when the compositor may employ variable refresh rate
464 */
465enum kde_output_device_v2_vrr_policy {
466 KDE_OUTPUT_DEVICE_V2_VRR_POLICY_NEVER = 0,
467 KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ALWAYS = 1,
468 KDE_OUTPUT_DEVICE_V2_VRR_POLICY_AUTOMATIC = 2,
469};
470#endif /* KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM */
471
472#ifndef KDE_OUTPUT_DEVICE_V2_RGB_RANGE_ENUM
473 #define KDE_OUTPUT_DEVICE_V2_RGB_RANGE_ENUM
474/**
475 * @ingroup iface_kde_output_device_v2
476 * describes RGB range policy
477 *
478 * Whether full or limited color range should be used
479 */
480enum kde_output_device_v2_rgb_range {
481 KDE_OUTPUT_DEVICE_V2_RGB_RANGE_AUTOMATIC = 0,
482 KDE_OUTPUT_DEVICE_V2_RGB_RANGE_FULL = 1,
483 KDE_OUTPUT_DEVICE_V2_RGB_RANGE_LIMITED = 2,
484};
485#endif /* KDE_OUTPUT_DEVICE_V2_RGB_RANGE_ENUM */
486
487#ifndef KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_ENUM
488 #define KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_ENUM
489/**
490 * @ingroup iface_kde_output_device_v2
491 * describes when auto rotate should be used
492 */
493enum kde_output_device_v2_auto_rotate_policy {
494 KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_NEVER = 0,
495 KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_IN_TABLET_MODE = 1,
496 KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_ALWAYS = 2,
497};
498#endif /* KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_ENUM */
499
500#ifndef KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM
501 #define KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM
502/**
503 * @ingroup iface_kde_output_device_v2
504 * which source the compositor should use for the color profile on an output
505 */
506enum kde_output_device_v2_color_profile_source {
507 KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_SRGB = 0,
508 KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ICC = 1,
509 KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_EDID = 2,
510};
511#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM */
512
513#ifndef KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
514 #define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
515/**
516 * @ingroup iface_kde_output_device_v2
517 * tradeoff between power and accuracy
518 *
519 * The compositor can do a lot of things that trade between
520 * performance, power and color accuracy. This setting describes
521 * a high level preference from the user about in which direction
522 * that tradeoff should be made.
523 */
524enum kde_output_device_v2_color_power_tradeoff {
525 /**
526 * prefer efficiency and performance
527 */
528 KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_EFFICIENCY = 0,
529 /**
530 * prefer accuracy
531 */
532 KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ACCURACY = 1,
533};
534#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM */
535
536#ifndef KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM
537 #define KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM
538/**
539 * @ingroup iface_kde_output_device_v2
540 * when the compositor may make use of EDR
541 */
542enum kde_output_device_v2_edr_policy {
543 KDE_OUTPUT_DEVICE_V2_EDR_POLICY_NEVER = 0,
544 KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ALWAYS = 1,
545};
546#endif /* KDE_OUTPUT_DEVICE_V2_EDR_POLICY_ENUM */
547
548/**
549 * @ingroup iface_kde_output_device_v2
550 * @struct kde_output_device_v2_listener
551 */
552struct kde_output_device_v2_listener {
553 /**
554 * geometric properties of the output
555 *
556 * The geometry event describes geometric properties of the
557 * output. The event is sent when binding to the output object and
558 * whenever any of the properties change.
559 * @param x x position within the global compositor space
560 * @param y y position within the global compositor space
561 * @param physical_width width in millimeters of the output
562 * @param physical_height height in millimeters of the output
563 * @param subpixel subpixel orientation of the output
564 * @param make textual description of the manufacturer
565 * @param model textual description of the model
566 * @param transform transform that maps framebuffer to output
567 */
568 void (*geometry)(void* data,
569 struct kde_output_device_v2* kde_output_device_v2,
570 int32_t x,
571 int32_t y,
572 int32_t physical_width,
573 int32_t physical_height,
574 int32_t subpixel,
575 const char* make,
576 const char* model,
577 int32_t transform);
578 /**
579 * current mode
580 *
581 * This event describes the mode currently in use for this head.
582 * It is only sent if the output is enabled.
583 */
584 void (*current_mode)(void* data,
585 struct kde_output_device_v2* kde_output_device_v2,
586 struct kde_output_device_mode_v2* mode);
587 /**
588 * advertise available output modes and current one
589 *
590 * The mode event describes an available mode for the output.
591 *
592 * When the client binds to the output_device object, the server
593 * sends this event once for every available mode the output_device
594 * can be operated by.
595 *
596 * There will always be at least one event sent out on initial
597 * binding, which represents the current mode.
598 *
599 * Later if an output changes, its mode event is sent again for the
600 * eventual added modes and lastly the current mode. In other
601 * words, the current mode is always represented by the latest
602 * event sent with the current flag set.
603 *
604 * The size of a mode is given in physical hardware units of the
605 * output device. This is not necessarily the same as the output
606 * size in the global compositor space. For instance, the output
607 * may be scaled, as described in kde_output_device_v2.scale, or
608 * transformed, as described in kde_output_device_v2.transform.
609 */
610 void (*mode)(void* data,
611 struct kde_output_device_v2* kde_output_device_v2,
612 struct kde_output_device_mode_v2* mode);
613 /**
614 * sent all information about output
615 *
616 * This event is sent after all other properties have been sent
617 * on binding to the output object as well as after any other
618 * output property change have been applied later on. This allows
619 * to see changes to the output properties as atomic, even if
620 * multiple events successively announce them.
621 */
622 void (*done)(void* data,
623 struct kde_output_device_v2* kde_output_device_v2);
624 /**
625 * output scaling properties
626 *
627 * This event contains scaling geometry information that is not
628 * in the geometry event. It may be sent after binding the output
629 * object or if the output scale changes later. If it is not sent,
630 * the client should assume a scale of 1.
631 *
632 * A scale larger than 1 means that the compositor will
633 * automatically scale surface buffers by this amount when
634 * rendering. This is used for high resolution displays where
635 * applications rendering at the native resolution would be too
636 * small to be legible.
637 *
638 * It is intended that scaling aware clients track the current
639 * output of a surface, and if it is on a scaled output it should
640 * use wl_surface.set_buffer_scale with the scale of the output.
641 * That way the compositor can avoid scaling the surface, and the
642 * client can supply a higher detail image.
643 * @param factor scaling factor of output
644 */
645 void (*scale)(void* data,
646 struct kde_output_device_v2* kde_output_device_v2,
647 wl_fixed_t factor);
648 /**
649 * advertise EDID data for the output
650 *
651 * The edid event encapsulates the EDID data for the
652 * outputdevice.
653 *
654 * The event is sent when binding to the output object. The EDID
655 * data may be empty, in which case this event is sent anyway. If
656 * the EDID information is empty, you can fall back to the name et
657 * al. properties of the outputdevice.
658 * @param raw base64-encoded EDID string
659 */
660 void (*edid)(void* data,
661 struct kde_output_device_v2* kde_output_device_v2,
662 const char* raw);
663 /**
664 * output is enabled or disabled
665 *
666 * The enabled event notifies whether this output is currently
667 * enabled and used for displaying content by the server. The event
668 * is sent when binding to the output object and whenever later on
669 * an output changes its state by becoming enabled or disabled.
670 * @param enabled output enabled state
671 */
672 void (*enabled)(void* data,
673 struct kde_output_device_v2* kde_output_device_v2,
674 int32_t enabled);
675 /**
676 * A unique id for this outputdevice
677 *
678 * The uuid can be used to identify the output. It's controlled
679 * by the server entirely. The server should make sure the uuid is
680 * persistent across restarts. An empty uuid is considered invalid.
681 * @param uuid output devices ID
682 */
683 void (*uuid)(void* data,
684 struct kde_output_device_v2* kde_output_device_v2,
685 const char* uuid);
686 /**
687 * Serial Number
688 *
689 * Serial ID of the monitor, sent on startup before the first
690 * done event.
691 * @param serialNumber textual representation of serial number
692 */
693 void (*serial_number)(void* data,
694 struct kde_output_device_v2* kde_output_device_v2,
695 const char* serialNumber);
696 /**
697 * EISA ID
698 *
699 * EISA ID of the monitor, sent on startup before the first done
700 * event.
701 * @param eisaId textual representation of EISA identifier
702 */
703 void (*eisa_id)(void* data,
704 struct kde_output_device_v2* kde_output_device_v2,
705 const char* eisaId);
706 /**
707 * capability flags
708 *
709 * What capabilities this device has, sent on startup before the
710 * first done event.
711 */
712 void (*capabilities)(void* data,
713 struct kde_output_device_v2* kde_output_device_v2,
714 uint32_t flags);
715 /**
716 * overscan
717 *
718 * Overscan value of the monitor in percent, sent on startup
719 * before the first done event.
720 * @param overscan amount of overscan of the monitor
721 */
722 void (*overscan)(void* data,
723 struct kde_output_device_v2* kde_output_device_v2,
724 uint32_t overscan);
725 /**
726 * Variable Refresh Rate Policy
727 *
728 * What policy the compositor will employ regarding its use of
729 * variable refresh rate.
730 */
731 void (*vrr_policy)(void* data,
732 struct kde_output_device_v2* kde_output_device_v2,
733 uint32_t vrr_policy);
734 /**
735 * RGB range
736 *
737 * What rgb range the compositor is using for this output
738 */
739 void (*rgb_range)(void* data,
740 struct kde_output_device_v2* kde_output_device_v2,
741 uint32_t rgb_range);
742 /**
743 * Output's name
744 *
745 * Name of the output, it's useful to cross-reference to an
746 * zxdg_output_v1 and ultimately QScreen
747 * @since 2
748 */
749 void (*name)(void* data,
750 struct kde_output_device_v2* kde_output_device_v2,
751 const char* name);
752 /**
753 * if HDR is enabled
754 *
755 * Whether or not high dynamic range is enabled for this output
756 * @param hdr_enabled 1 if enabled, 0 if disabled
757 * @since 3
758 */
759 void (*high_dynamic_range)(void* data,
760 struct kde_output_device_v2* kde_output_device_v2,
761 uint32_t hdr_enabled);
762 /**
763 * the brightness of sdr if hdr is enabled
764 *
765 * If high dynamic range is used, this value defines the
766 * brightness in nits for content that's in standard dynamic range
767 * format. Note that while the value is in nits, that doesn't
768 * necessarily translate to the same brightness on the screen.
769 * @since 3
770 */
771 void (*sdr_brightness)(void* data,
772 struct kde_output_device_v2* kde_output_device_v2,
773 uint32_t sdr_brightness);
774 /**
775 * if WCG is enabled
776 *
777 * Whether or not the use of a wide color gamut is enabled for
778 * this output
779 * @param wcg_enabled 1 if enabled, 0 if disabled
780 * @since 3
781 */
782 void (*wide_color_gamut)(void* data,
783 struct kde_output_device_v2* kde_output_device_v2,
784 uint32_t wcg_enabled);
785 /**
786 * describes when auto rotate is used
787 *
788 *
789 * @since 4
790 */
791 void (*auto_rotate_policy)(void* data,
792 struct kde_output_device_v2* kde_output_device_v2,
793 uint32_t policy);
794 /**
795 * describes the path to the ICC profile used in SDR mode
796 *
797 *
798 * @since 5
799 */
800 void (*icc_profile_path)(void* data,
801 struct kde_output_device_v2* kde_output_device_v2,
802 const char* profile_path);
803 /**
804 * metadata about the screen's brightness limits
805 *
806 *
807 * @param max_peak_brightness in nits
808 * @param max_frame_average_brightness in nits
809 * @param min_brightness in 0.0001 nits
810 * @since 6
811 */
812 void (*brightness_metadata)(void* data,
813 struct kde_output_device_v2* kde_output_device_v2,
814 uint32_t max_peak_brightness,
815 uint32_t max_frame_average_brightness,
816 uint32_t min_brightness);
817 /**
818 * overrides for the screen's brightness limits
819 *
820 *
821 * @param max_peak_brightness -1 for no override, positive values are the brightness in nits
822 * @param max_average_brightness -1 for no override, positive values are the brightness in nits
823 * @param min_brightness -1 for no override, positive values are the brightness in 0.0001 nits
824 * @since 6
825 */
826 void (*brightness_overrides)(void* data,
827 struct kde_output_device_v2* kde_output_device_v2,
828 int32_t max_peak_brightness,
829 int32_t max_average_brightness,
830 int32_t min_brightness);
831 /**
832 * describes which gamut is assumed for sRGB applications
833 *
834 * This can be used to provide the colors users assume sRGB
835 * applications should have based on the default experience on many
836 * modern sRGB screens.
837 * @param gamut_wideness 0 means rec.709 primaries, 10000 means native primaries
838 * @since 6
839 */
840 void (*sdr_gamut_wideness)(void* data,
841 struct kde_output_device_v2* kde_output_device_v2,
842 uint32_t gamut_wideness);
843 /**
844 * describes which source the compositor uses for the color profile on an output in SDR mode
845 *
846 *
847 * @since 7
848 */
849 void (*color_profile_source)(void* data,
850 struct kde_output_device_v2* kde_output_device_v2,
851 uint32_t source);
852 /**
853 * brightness multiplier
854 *
855 * This is the brightness modifier of the output. It doesn't
856 * specify any absolute values, but is merely a multiplier on top
857 * of other brightness values, like sdr_brightness and
858 * brightness_metadata. 0 is the minimum brightness (not completely
859 * dark) and 10000 is the maximum brightness. This is currently
860 * only supported / meaningful while HDR is active.
861 * @param brightness brightness in 0-10000
862 * @since 8
863 */
864 void (*brightness)(void* data,
865 struct kde_output_device_v2* kde_output_device_v2,
866 uint32_t brightness);
867 /**
868 * the preferred color/power tradeoff
869 *
870 *
871 * @since 10
872 */
873 void (*color_power_tradeoff)(void* data,
874 struct kde_output_device_v2* kde_output_device_v2,
875 uint32_t preference);
876 /**
877 * dimming multiplier
878 *
879 * This is the dimming multiplier of the output. This is similar
880 * to the brightness setting, except it's meant to be a temporary
881 * setting only, not persistent and may be implemented differently
882 * depending on the display. 0 is the minimum dimming factor (not
883 * completely dark) and 10000 means the output is not dimmed.
884 * @param multiplier multiplier in 0-10000
885 * @since 11
886 */
887 void (*dimming)(void* data,
888 struct kde_output_device_v2* kde_output_device_v2,
889 uint32_t multiplier);
890 /**
891 * source output for mirroring
892 *
893 *
894 * @param source uuid of the source output
895 * @since 13
896 */
897 void (*replication_source)(void* data,
898 struct kde_output_device_v2* kde_output_device_v2,
899 const char* source);
900 /**
901 * if DDC/CI should be used to control brightness etc.
902 *
903 * If the ddc_ci capability is present, this determines if
904 * settings such as brightness, contrast or others should be set
905 * using DDC/CI.
906 * @param allowed 1 if allowed, 0 if disabled
907 * @since 14
908 */
909 void (*ddc_ci_allowed)(void* data,
910 struct kde_output_device_v2* kde_output_device_v2,
911 uint32_t allowed);
912 /**
913 * override max bpc
914 *
915 * This limits the amount of bits per color that are sent to the
916 * display.
917 * @param max_bpc 0 for the default / automatic
918 * @since 15
919 */
920 void (*max_bits_per_color)(void* data,
921 struct kde_output_device_v2* kde_output_device_v2,
922 uint32_t max_bpc);
923 /**
924 * range of max bits per color value
925 *
926 *
927 * @param min_value the minimum supported by the driver
928 * @param max_value the maximum supported by the driver
929 * @since 15
930 */
931 void (*max_bits_per_color_range)(void* data,
932 struct kde_output_device_v2* kde_output_device_v2,
933 uint32_t min_value,
934 uint32_t max_value);
935 /**
936 * if and to what value automatic max bpc is limited
937 *
938 *
939 * @param max_bpc_limit which value automatic bpc gets limited to. 0 if not limited
940 * @since 15
941 */
942 void (*automatic_max_bits_per_color_limit)(void* data,
943 struct kde_output_device_v2* kde_output_device_v2,
944 uint32_t max_bpc_limit);
945 /**
946 * when the compositor may apply EDR
947 *
948 * When EDR is enabled, the compositor may increase the backlight
949 * beyond the user-specified setting, in order to present HDR
950 * content on displays without native HDR support. This will
951 * usually result in better visuals, but also increases battery
952 * usage.
953 * @since 16
954 */
955 void (*edr_policy)(void* data,
956 struct kde_output_device_v2* kde_output_device_v2,
957 uint32_t policy);
958 /**
959 * sharpness strength
960 *
961 * This is the sharpness modifier of the output. 0 is sharpness
962 * disabled and 10000 is the maximum sharpness
963 * @param sharpness sharpness in 0-10000
964 * @since 17
965 */
966 void (*sharpness)(void* data,
967 struct kde_output_device_v2* kde_output_device_v2,
968 uint32_t sharpness);
969 /**
970 * output priority
971 *
972 * Describes the position of the output in the output order list,
973 * with lower values being earlier in the list. There's no specific
974 * value the list has to start at, this value is only used in
975 * sorting outputs.
976 *
977 * Note that the output order protocol is not sufficient for this,
978 * as an output may not be in the output order if it's disabled or
979 * mirroring another screen.
980 * @param priority priority
981 * @since 18
982 */
983 void (*priority)(void* data,
984 struct kde_output_device_v2* kde_output_device_v2,
985 uint32_t priority);
986 /**
987 * whether or not automatic brightness is enabled
988 *
989 *
990 * @param enabled 1 for enabled, 0 for disabled
991 * @since 20
992 */
993 void (*auto_brightness)(void* data,
994 struct kde_output_device_v2* kde_output_device_v2,
995 uint32_t enabled);
996 /**
997 * the output has been removed
998 *
999 * This event is sent when the output device is disconnected and
1000 * no new updates will be sent. The client should call the
1001 * kde_output_device_v2.release request after receiving this event.
1002 * @since 21
1003 */
1004 void (*removed)(void* data,
1005 struct kde_output_device_v2* kde_output_device_v2);
1006 /**
1007 * describes the path to the ICC profile used in HDR mode
1008 *
1009 *
1010 * @since 22
1011 */
1012 void (*hdr_icc_profile_path)(void* data,
1013 struct kde_output_device_v2* kde_output_device_v2,
1014 const char* profile_path);
1015 /**
1016 * describes which source the compositor uses for the color profile on an output in HDR mode
1017 *
1018 *
1019 * @since 22
1020 */
1021 void (*hdr_color_profile_source)(void* data,
1022 struct kde_output_device_v2* kde_output_device_v2,
1023 uint32_t source);
1024 /**
1025 * allowed level of adaptive backlight modulation
1026 *
1027 * Adaptive backlight modulation is a feature that reduces the
1028 * backlight and increases contrast of colors on the screen to
1029 * improve power usage.
1030 * @param level 0 is off, 4 is the maximum level
1031 * @since 23
1032 */
1033 void (*abm_level)(void* data,
1034 struct kde_output_device_v2* kde_output_device_v2,
1035 uint32_t level);
1036};
1037
1038/**
1039 * @ingroup iface_kde_output_device_v2
1040 */
1041static inline int
1042kde_output_device_v2_add_listener(struct kde_output_device_v2* kde_output_device_v2,
1043 const struct kde_output_device_v2_listener* listener,
1044 void* data) {
1045 return wl_proxy_add_listener((struct wl_proxy*) kde_output_device_v2,
1046 (void (**)(void)) listener,
1047 data);
1048}
1049
1050#define KDE_OUTPUT_DEVICE_V2_RELEASE 0
1051
1052/**
1053 * @ingroup iface_kde_output_device_v2
1054 */
1055#define KDE_OUTPUT_DEVICE_V2_GEOMETRY_SINCE_VERSION 1
1056/**
1057 * @ingroup iface_kde_output_device_v2
1058 */
1059#define KDE_OUTPUT_DEVICE_V2_CURRENT_MODE_SINCE_VERSION 1
1060/**
1061 * @ingroup iface_kde_output_device_v2
1062 */
1063#define KDE_OUTPUT_DEVICE_V2_MODE_SINCE_VERSION 1
1064/**
1065 * @ingroup iface_kde_output_device_v2
1066 */
1067#define KDE_OUTPUT_DEVICE_V2_DONE_SINCE_VERSION 1
1068/**
1069 * @ingroup iface_kde_output_device_v2
1070 */
1071#define KDE_OUTPUT_DEVICE_V2_SCALE_SINCE_VERSION 1
1072/**
1073 * @ingroup iface_kde_output_device_v2
1074 */
1075#define KDE_OUTPUT_DEVICE_V2_EDID_SINCE_VERSION 1
1076/**
1077 * @ingroup iface_kde_output_device_v2
1078 */
1079#define KDE_OUTPUT_DEVICE_V2_ENABLED_SINCE_VERSION 1
1080/**
1081 * @ingroup iface_kde_output_device_v2
1082 */
1083#define KDE_OUTPUT_DEVICE_V2_UUID_SINCE_VERSION 1
1084/**
1085 * @ingroup iface_kde_output_device_v2
1086 */
1087#define KDE_OUTPUT_DEVICE_V2_SERIAL_NUMBER_SINCE_VERSION 1
1088/**
1089 * @ingroup iface_kde_output_device_v2
1090 */
1091#define KDE_OUTPUT_DEVICE_V2_EISA_ID_SINCE_VERSION 1
1092/**
1093 * @ingroup iface_kde_output_device_v2
1094 */
1095#define KDE_OUTPUT_DEVICE_V2_CAPABILITIES_SINCE_VERSION 1
1096/**
1097 * @ingroup iface_kde_output_device_v2
1098 */
1099#define KDE_OUTPUT_DEVICE_V2_OVERSCAN_SINCE_VERSION 1
1100/**
1101 * @ingroup iface_kde_output_device_v2
1102 */
1103#define KDE_OUTPUT_DEVICE_V2_VRR_POLICY_SINCE_VERSION 1
1104/**
1105 * @ingroup iface_kde_output_device_v2
1106 */
1107#define KDE_OUTPUT_DEVICE_V2_RGB_RANGE_SINCE_VERSION 1
1108/**
1109 * @ingroup iface_kde_output_device_v2
1110 */
1111#define KDE_OUTPUT_DEVICE_V2_NAME_SINCE_VERSION 2
1112/**
1113 * @ingroup iface_kde_output_device_v2
1114 */
1115#define KDE_OUTPUT_DEVICE_V2_HIGH_DYNAMIC_RANGE_SINCE_VERSION 3
1116/**
1117 * @ingroup iface_kde_output_device_v2
1118 */
1119#define KDE_OUTPUT_DEVICE_V2_SDR_BRIGHTNESS_SINCE_VERSION 3
1120/**
1121 * @ingroup iface_kde_output_device_v2
1122 */
1123#define KDE_OUTPUT_DEVICE_V2_WIDE_COLOR_GAMUT_SINCE_VERSION 3
1124/**
1125 * @ingroup iface_kde_output_device_v2
1126 */
1127#define KDE_OUTPUT_DEVICE_V2_AUTO_ROTATE_POLICY_SINCE_VERSION 4
1128/**
1129 * @ingroup iface_kde_output_device_v2
1130 */
1131#define KDE_OUTPUT_DEVICE_V2_ICC_PROFILE_PATH_SINCE_VERSION 5
1132/**
1133 * @ingroup iface_kde_output_device_v2
1134 */
1135#define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_METADATA_SINCE_VERSION 6
1136/**
1137 * @ingroup iface_kde_output_device_v2
1138 */
1139#define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_OVERRIDES_SINCE_VERSION 6
1140/**
1141 * @ingroup iface_kde_output_device_v2
1142 */
1143#define KDE_OUTPUT_DEVICE_V2_SDR_GAMUT_WIDENESS_SINCE_VERSION 6
1144/**
1145 * @ingroup iface_kde_output_device_v2
1146 */
1147#define KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_SINCE_VERSION 7
1148/**
1149 * @ingroup iface_kde_output_device_v2
1150 */
1151#define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_SINCE_VERSION 8
1152/**
1153 * @ingroup iface_kde_output_device_v2
1154 */
1155#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_SINCE_VERSION 10
1156/**
1157 * @ingroup iface_kde_output_device_v2
1158 */
1159#define KDE_OUTPUT_DEVICE_V2_DIMMING_SINCE_VERSION 11
1160/**
1161 * @ingroup iface_kde_output_device_v2
1162 */
1163#define KDE_OUTPUT_DEVICE_V2_REPLICATION_SOURCE_SINCE_VERSION 13
1164/**
1165 * @ingroup iface_kde_output_device_v2
1166 */
1167#define KDE_OUTPUT_DEVICE_V2_DDC_CI_ALLOWED_SINCE_VERSION 14
1168/**
1169 * @ingroup iface_kde_output_device_v2
1170 */
1171#define KDE_OUTPUT_DEVICE_V2_MAX_BITS_PER_COLOR_SINCE_VERSION 15
1172/**
1173 * @ingroup iface_kde_output_device_v2
1174 */
1175#define KDE_OUTPUT_DEVICE_V2_MAX_BITS_PER_COLOR_RANGE_SINCE_VERSION 15
1176/**
1177 * @ingroup iface_kde_output_device_v2
1178 */
1179#define KDE_OUTPUT_DEVICE_V2_AUTOMATIC_MAX_BITS_PER_COLOR_LIMIT_SINCE_VERSION 15
1180/**
1181 * @ingroup iface_kde_output_device_v2
1182 */
1183#define KDE_OUTPUT_DEVICE_V2_EDR_POLICY_SINCE_VERSION 16
1184/**
1185 * @ingroup iface_kde_output_device_v2
1186 */
1187#define KDE_OUTPUT_DEVICE_V2_SHARPNESS_SINCE_VERSION 17
1188/**
1189 * @ingroup iface_kde_output_device_v2
1190 */
1191#define KDE_OUTPUT_DEVICE_V2_PRIORITY_SINCE_VERSION 18
1192/**
1193 * @ingroup iface_kde_output_device_v2
1194 */
1195#define KDE_OUTPUT_DEVICE_V2_AUTO_BRIGHTNESS_SINCE_VERSION 20
1196/**
1197 * @ingroup iface_kde_output_device_v2
1198 */
1199#define KDE_OUTPUT_DEVICE_V2_REMOVED_SINCE_VERSION 21
1200/**
1201 * @ingroup iface_kde_output_device_v2
1202 */
1203#define KDE_OUTPUT_DEVICE_V2_HDR_ICC_PROFILE_PATH_SINCE_VERSION 22
1204/**
1205 * @ingroup iface_kde_output_device_v2
1206 */
1207#define KDE_OUTPUT_DEVICE_V2_HDR_COLOR_PROFILE_SOURCE_SINCE_VERSION 22
1208/**
1209 * @ingroup iface_kde_output_device_v2
1210 */
1211#define KDE_OUTPUT_DEVICE_V2_ABM_LEVEL_SINCE_VERSION 23
1212
1213/**
1214 * @ingroup iface_kde_output_device_v2
1215 */
1216#define KDE_OUTPUT_DEVICE_V2_RELEASE_SINCE_VERSION 21
1217
1218/** @ingroup iface_kde_output_device_v2 */
1219static inline void
1220kde_output_device_v2_set_user_data(struct kde_output_device_v2* kde_output_device_v2, void* user_data) {
1221 wl_proxy_set_user_data((struct wl_proxy*) kde_output_device_v2, user_data);
1222}
1223
1224/** @ingroup iface_kde_output_device_v2 */
1225static inline void*
1226kde_output_device_v2_get_user_data(struct kde_output_device_v2* kde_output_device_v2) {
1227 return wl_proxy_get_user_data((struct wl_proxy*) kde_output_device_v2);
1228}
1229
1230static inline uint32_t
1231kde_output_device_v2_get_version(struct kde_output_device_v2* kde_output_device_v2) {
1232 return wl_proxy_get_version((struct wl_proxy*) kde_output_device_v2);
1233}
1234
1235/** @ingroup iface_kde_output_device_v2 */
1236static inline void
1237kde_output_device_v2_destroy(struct kde_output_device_v2* kde_output_device_v2) {
1238 wl_proxy_destroy((struct wl_proxy*) kde_output_device_v2);
1239}
1240
1241/**
1242 * @ingroup iface_kde_output_device_v2
1243 *
1244 * This notifies the compositor that the client no longer wishes to use
1245 * the kde_output_device_v2 object.
1246 */
1247// static inline void
1248// kde_output_device_v2_release(struct kde_output_device_v2* kde_output_device_v2) {
1249// wl_proxy_marshal_flags((struct wl_proxy*) kde_output_device_v2,
1250// KDE_OUTPUT_DEVICE_V2_RELEASE,
1251// nullptr,
1252// wl_proxy_get_version((struct wl_proxy*) kde_output_device_v2),
1253// WL_MARSHAL_FLAG_DESTROY);
1254// }
1255
1256#ifndef KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM
1257 #define KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM
1258/**
1259 * @ingroup iface_kde_output_device_mode_v2
1260 * mode flags
1261 */
1262enum kde_output_device_mode_v2_flags {
1263 KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_CUSTOM = 0x1,
1264 KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_REDUCED_BLANKING = 0x2,
1265};
1266#endif /* KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_ENUM */
1267
1268/**
1269 * @ingroup iface_kde_output_device_mode_v2
1270 * @struct kde_output_device_mode_v2_listener
1271 */
1272struct kde_output_device_mode_v2_listener {
1273 /**
1274 * mode size
1275 *
1276 * This event describes the mode size. The size is given in
1277 * physical hardware units of the output device. This is not
1278 * necessarily the same as the output size in the global compositor
1279 * space. For instance, the output may be scaled or transformed.
1280 * @param width width of the mode in hardware units
1281 * @param height height of the mode in hardware units
1282 */
1283 void (*size)(void* data,
1284 struct kde_output_device_mode_v2* kde_output_device_mode_v2,
1285 int32_t width,
1286 int32_t height);
1287 /**
1288 * mode refresh rate
1289 *
1290 * This event describes the mode's fixed vertical refresh rate.
1291 * It is only sent if the mode has a fixed refresh rate.
1292 * @param refresh vertical refresh rate in mHz
1293 */
1294 void (*refresh)(void* data,
1295 struct kde_output_device_mode_v2* kde_output_device_mode_v2,
1296 int32_t refresh);
1297 /**
1298 * mode is preferred
1299 *
1300 * This event advertises this mode as preferred.
1301 */
1302 void (*preferred)(void* data,
1303 struct kde_output_device_mode_v2* kde_output_device_mode_v2);
1304 /**
1305 * the mode has been destroyed
1306 *
1307 * The compositor will destroy the object immediately after
1308 * sending this event, so it will become invalid and the client
1309 * should release any resources associated with it.
1310 */
1311 void (*removed)(void* data,
1312 struct kde_output_device_mode_v2* kde_output_device_mode_v2);
1313 /**
1314 * mode flags
1315 *
1316 * This event describes the mode's flags.
1317 * @since 19
1318 */
1319 void (*flags)(void* data,
1320 struct kde_output_device_mode_v2* kde_output_device_mode_v2,
1321 uint32_t flags);
1322};
1323
1324/**
1325 * @ingroup iface_kde_output_device_mode_v2
1326 */
1327static inline int
1328kde_output_device_mode_v2_add_listener(struct kde_output_device_mode_v2* kde_output_device_mode_v2,
1329 const struct kde_output_device_mode_v2_listener* listener,
1330 void* data) {
1331 return wl_proxy_add_listener((struct wl_proxy*) kde_output_device_mode_v2,
1332 (void (**)(void)) listener,
1333 data);
1334}
1335
1336/**
1337 * @ingroup iface_kde_output_device_mode_v2
1338 */
1339#define KDE_OUTPUT_DEVICE_MODE_V2_SIZE_SINCE_VERSION 1
1340/**
1341 * @ingroup iface_kde_output_device_mode_v2
1342 */
1343#define KDE_OUTPUT_DEVICE_MODE_V2_REFRESH_SINCE_VERSION 1
1344/**
1345 * @ingroup iface_kde_output_device_mode_v2
1346 */
1347#define KDE_OUTPUT_DEVICE_MODE_V2_PREFERRED_SINCE_VERSION 1
1348/**
1349 * @ingroup iface_kde_output_device_mode_v2
1350 */
1351#define KDE_OUTPUT_DEVICE_MODE_V2_REMOVED_SINCE_VERSION 1
1352/**
1353 * @ingroup iface_kde_output_device_mode_v2
1354 */
1355#define KDE_OUTPUT_DEVICE_MODE_V2_FLAGS_SINCE_VERSION 19
1356
1357/** @ingroup iface_kde_output_device_mode_v2 */
1358static inline void
1359kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2* kde_output_device_mode_v2, void* user_data) {
1360 wl_proxy_set_user_data((struct wl_proxy*) kde_output_device_mode_v2, user_data);
1361}
1362
1363/** @ingroup iface_kde_output_device_mode_v2 */
1364static inline void*
1365kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2* kde_output_device_mode_v2) {
1366 return wl_proxy_get_user_data((struct wl_proxy*) kde_output_device_mode_v2);
1367}
1368
1369static inline uint32_t
1370kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2* kde_output_device_mode_v2) {
1371 return wl_proxy_get_version((struct wl_proxy*) kde_output_device_mode_v2);
1372}
1373
1374/** @ingroup iface_kde_output_device_mode_v2 */
1375static inline void
1376kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2* kde_output_device_mode_v2) {
1377 wl_proxy_destroy((struct wl_proxy*) kde_output_device_mode_v2);
1378}
1379
1380#ifdef __cplusplus
1381}
1382#endif
1383
1384#endif