Skip to content

Commit 8439204

Browse files
committed
DisplayServer (Linux): upgrades kde-output-device-v2 wayland protocol files (again)
1 parent 710df0b commit 8439204

File tree

3 files changed

+27
-3
lines changed

3 files changed

+27
-3
lines changed

src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ enum kde_output_device_v2_capability {
244244
* @since 18
245245
*/
246246
KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES = 0x2000,
247+
/**
248+
* @since 19
249+
*/
250+
KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_BRIGHTNESS = 0x4000,
247251
};
248252
/**
249253
* @ingroup iface_kde_output_device_v2
@@ -289,6 +293,10 @@ enum kde_output_device_v2_capability {
289293
* @ingroup iface_kde_output_device_v2
290294
*/
291295
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_CUSTOM_MODES_SINCE_VERSION 18
296+
/**
297+
* @ingroup iface_kde_output_device_v2
298+
*/
299+
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_AUTO_BRIGHTNESS_SINCE_VERSION 19
292300
#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
293301

294302
#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
@@ -820,6 +828,16 @@ struct kde_output_device_v2_listener {
820828
void (*priority)(void *data,
821829
struct kde_output_device_v2 *kde_output_device_v2,
822830
uint32_t priority);
831+
/**
832+
* whether or not automatic brightness is enabled
833+
*
834+
*
835+
* @param enabled 1 for enabled, 0 for disabled
836+
* @since 20
837+
*/
838+
void (*auto_brightness)(void *data,
839+
struct kde_output_device_v2 *kde_output_device_v2,
840+
uint32_t enabled);
823841
};
824842

825843
/**
@@ -973,6 +991,10 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device
973991
* @ingroup iface_kde_output_device_v2
974992
*/
975993
#define KDE_OUTPUT_DEVICE_V2_PRIORITY_SINCE_VERSION 18
994+
/**
995+
* @ingroup iface_kde_output_device_v2
996+
*/
997+
#define KDE_OUTPUT_DEVICE_V2_AUTO_BRIGHTNESS_SINCE_VERSION 20
976998

977999

9781000
/** @ingroup iface_kde_output_device_v2 */

src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,13 @@ static const struct wl_message kde_output_device_v2_events[] = {
6868
{ "edr_policy", "16u", kde_output_device_v2_types + 0 },
6969
{ "sharpness", "17u", kde_output_device_v2_types + 0 },
7070
{ "priority", "18u", kde_output_device_v2_types + 0 },
71+
{ "auto_brightness", "20u", kde_output_device_v2_types + 0 },
7172
};
7273

7374
WL_EXPORT const struct wl_interface kde_output_device_v2_interface = {
74-
"kde_output_device_v2", 19,
75+
"kde_output_device_v2", 20,
7576
0, NULL,
76-
35, kde_output_device_v2_events,
77+
36, kde_output_device_v2_events,
7778
};
7879

7980
static const struct wl_message kde_output_device_mode_v2_events[] = {
@@ -85,7 +86,7 @@ static const struct wl_message kde_output_device_mode_v2_events[] = {
8586
};
8687

8788
WL_EXPORT const struct wl_interface kde_output_device_mode_v2_interface = {
88-
"kde_output_device_mode_v2", 19,
89+
"kde_output_device_mode_v2", 20,
8990
0, NULL,
9091
5, kde_output_device_mode_v2_events,
9192
};

src/detection/displayserver/linux/wayland/kde-output.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ static struct kde_output_device_v2_listener outputListener = {
179179
.edr_policy = (void*) stubListener,
180180
.sharpness = (void*) stubListener,
181181
.priority = (void*) stubListener,
182+
.auto_brightness = (void*) stubListener,
182183
};
183184

184185
const char* ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)

0 commit comments

Comments
 (0)