Skip to content

Commit

Permalink
Update protocol files
Browse files Browse the repository at this point in the history
  • Loading branch information
flacjacket committed Aug 25, 2024
1 parent 192a955 commit ebafb5a
Show file tree
Hide file tree
Showing 5 changed files with 483 additions and 5 deletions.
2 changes: 1 addition & 1 deletion wlroots/include/idle-inhibit-unstable-v1-protocol.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.0 */

#ifndef IDLE_INHIBIT_UNSTABLE_V1_SERVER_PROTOCOL_H
#define IDLE_INHIBIT_UNSTABLE_V1_SERVER_PROTOCOL_H
Expand Down
36 changes: 35 additions & 1 deletion wlroots/include/pointer-constraints-unstable-v1-protocol.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.0 */

#ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H
#define POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H
Expand Down Expand Up @@ -241,6 +241,22 @@ enum zwp_pointer_constraints_v1_error {
*/
ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1,
};
/**
* @ingroup iface_zwp_pointer_constraints_v1
* Validate a zwp_pointer_constraints_v1 error value.
*
* @return true on success, false on error.
* @ref zwp_pointer_constraints_v1_error
*/
static inline bool
zwp_pointer_constraints_v1_error_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED:
return version >= 1;
default:
return false;
}
}
#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */

#ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
Expand Down Expand Up @@ -273,6 +289,24 @@ enum zwp_pointer_constraints_v1_lifetime {
*/
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2,
};
/**
* @ingroup iface_zwp_pointer_constraints_v1
* Validate a zwp_pointer_constraints_v1 lifetime value.
*
* @return true on success, false on error.
* @ref zwp_pointer_constraints_v1_lifetime
*/
static inline bool
zwp_pointer_constraints_v1_lifetime_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT:
return version >= 1;
case ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT:
return version >= 1;
default:
return false;
}
}
#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */

/**
Expand Down
108 changes: 107 additions & 1 deletion wlroots/include/wlr-layer-shell-unstable-v1-protocol.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.0 */

#ifndef WLR_LAYER_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H
#define WLR_LAYER_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H
Expand Down Expand Up @@ -143,6 +143,26 @@ enum zwlr_layer_shell_v1_error {
*/
ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED = 2,
};
/**
* @ingroup iface_zwlr_layer_shell_v1
* Validate a zwlr_layer_shell_v1 error value.
*
* @return true on success, false on error.
* @ref zwlr_layer_shell_v1_error
*/
static inline bool
zwlr_layer_shell_v1_error_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_LAYER_SHELL_V1_ERROR_ROLE:
return version >= 1;
case ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER:
return version >= 1;
case ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_LAYER_SHELL_V1_ERROR_ENUM */

#ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM
Expand All @@ -164,6 +184,28 @@ enum zwlr_layer_shell_v1_layer {
ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
};
/**
* @ingroup iface_zwlr_layer_shell_v1
* Validate a zwlr_layer_shell_v1 layer value.
*
* @return true on success, false on error.
* @ref zwlr_layer_shell_v1_layer
*/
static inline bool
zwlr_layer_shell_v1_layer_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND:
return version >= 1;
case ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM:
return version >= 1;
case ZWLR_LAYER_SHELL_V1_LAYER_TOP:
return version >= 1;
case ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_LAYER_SHELL_V1_LAYER_ENUM */

/**
Expand Down Expand Up @@ -305,6 +347,26 @@ enum zwlr_layer_surface_v1_keyboard_interactivity {
* @ingroup iface_zwlr_layer_surface_v1
*/
#define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND_SINCE_VERSION 4
/**
* @ingroup iface_zwlr_layer_surface_v1
* Validate a zwlr_layer_surface_v1 keyboard_interactivity value.
*
* @return true on success, false on error.
* @ref zwlr_layer_surface_v1_keyboard_interactivity
*/
static inline bool
zwlr_layer_surface_v1_keyboard_interactivity_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND:
return version >= 4;
default:
return false;
}
}
#endif /* ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM */

#ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
Expand All @@ -327,6 +389,28 @@ enum zwlr_layer_surface_v1_error {
*/
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_KEYBOARD_INTERACTIVITY = 3,
};
/**
* @ingroup iface_zwlr_layer_surface_v1
* Validate a zwlr_layer_surface_v1 error value.
*
* @return true on success, false on error.
* @ref zwlr_layer_surface_v1_error
*/
static inline bool
zwlr_layer_surface_v1_error_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_KEYBOARD_INTERACTIVITY:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_LAYER_SURFACE_V1_ERROR_ENUM */

#ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
Expand All @@ -349,6 +433,28 @@ enum zwlr_layer_surface_v1_anchor {
*/
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
};
/**
* @ingroup iface_zwlr_layer_surface_v1
* Validate a zwlr_layer_surface_v1 anchor value.
*
* @return true on success, false on error.
* @ref zwlr_layer_surface_v1_anchor
*/
static inline bool
zwlr_layer_surface_v1_anchor_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT:
return version >= 1;
case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.0 */

#ifndef WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H
#define WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H
Expand Down Expand Up @@ -155,6 +155,24 @@ enum zwlr_output_power_v1_mode {
*/
ZWLR_OUTPUT_POWER_V1_MODE_ON = 1,
};
/**
* @ingroup iface_zwlr_output_power_v1
* Validate a zwlr_output_power_v1 mode value.
*
* @return true on success, false on error.
* @ref zwlr_output_power_v1_mode
*/
static inline bool
zwlr_output_power_v1_mode_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_OUTPUT_POWER_V1_MODE_OFF:
return version >= 1;
case ZWLR_OUTPUT_POWER_V1_MODE_ON:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_OUTPUT_POWER_V1_MODE_ENUM */

#ifndef ZWLR_OUTPUT_POWER_V1_ERROR_ENUM
Expand All @@ -165,6 +183,22 @@ enum zwlr_output_power_v1_error {
*/
ZWLR_OUTPUT_POWER_V1_ERROR_INVALID_MODE = 1,
};
/**
* @ingroup iface_zwlr_output_power_v1
* Validate a zwlr_output_power_v1 error value.
*
* @return true on success, false on error.
* @ref zwlr_output_power_v1_error
*/
static inline bool
zwlr_output_power_v1_error_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_OUTPUT_POWER_V1_ERROR_INVALID_MODE:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_OUTPUT_POWER_V1_ERROR_ENUM */

/**
Expand Down
Loading

0 comments on commit ebafb5a

Please sign in to comment.