Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h

Issue 2350593002: third_party: Update wayland-protocols to 1.7. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
diff --git a/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h b/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
index 688585157daee8a35eee3227738ada7b7881a276..d04054fb74d75770a664fd4677002d3b07f6b6be 100644
--- a/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
+++ b/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
@@ -1,17 +1,37 @@
-/*
+/* Generated by wayland-scanner 1.11.0 */
+
+#ifndef GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
+#define GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
+
+#include <stdint.h>
+#include <stddef.h>
+#include "wayland-client.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/**
+ * @page page_gaming_input_unstable_v1 The gaming_input_unstable_v1 protocol
+ * @section page_ifaces_gaming_input_unstable_v1 Interfaces
+ * - @subpage page_iface_zwp_gaming_input_v1 - extends wl_seat with gaming input devices
+ * - @subpage page_iface_zwp_gamepad_v1 - gamepad input device
+ * @section page_copyright_gaming_input_unstable_v1 Copyright
+ * <pre>
+ *
* Copyright 2016 The Chromium Authors.
- *
+ *
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
- *
+ *
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
- *
+ *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
@@ -19,48 +39,106 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
+ * </pre>
*/
-
-#ifndef GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
-#define GAMING_INPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-#include <stddef.h>
-#include "wayland-client.h"
-
-struct wl_client;
-struct wl_resource;
-
-struct zwp_gaming_input_v1;
+struct wl_seat;
struct zwp_gamepad_v1;
+struct zwp_gaming_input_v1;
+/**
+ * @page page_iface_zwp_gaming_input_v1 zwp_gaming_input_v1
+ * @section page_iface_zwp_gaming_input_v1_desc Description
+ *
+ * A global interface to provide gaming input devices for a given seat.
+ *
+ * Currently only gamepad devices are supported.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding uinterface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and uinterface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ * @section page_iface_zwp_gaming_input_v1_api API
+ * See @ref iface_zwp_gaming_input_v1.
+ */
+/**
+ * @defgroup iface_zwp_gaming_input_v1 The zwp_gaming_input_v1 interface
+ *
+ * A global interface to provide gaming input devices for a given seat.
+ *
+ * Currently only gamepad devices are supported.
+ *
+ * Warning! The protocol described in this file is experimental and
+ * backward incompatible changes may be made. Backward compatible changes
+ * may be added together with the corresponding uinterface version bump.
+ * Backward incompatible changes are done by bumping the version number in
+ * the protocol and uinterface names and resetting the interface version.
+ * Once the protocol is to be declared stable, the 'z' prefix and the
+ * version number in the protocol and interface names are removed and the
+ * interface version number is reset.
+ */
extern const struct wl_interface zwp_gaming_input_v1_interface;
+/**
+ * @page page_iface_zwp_gamepad_v1 zwp_gamepad_v1
+ * @section page_iface_zwp_gamepad_v1_desc Description
+ *
+ * The zwp_gamepad_v1 interface represents one or more gamepad input devices,
+ * which are reported as a normalized 'Standard Gamepad' as it is specified
+ * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping
+ * @section page_iface_zwp_gamepad_v1_api API
+ * See @ref iface_zwp_gamepad_v1.
+ */
+/**
+ * @defgroup iface_zwp_gamepad_v1 The zwp_gamepad_v1 interface
+ *
+ * The zwp_gamepad_v1 interface represents one or more gamepad input devices,
+ * which are reported as a normalized 'Standard Gamepad' as it is specified
+ * by the W3C Gamepad API at: https://w3c.github.io/gamepad/#remapping
+ */
extern const struct wl_interface zwp_gamepad_v1_interface;
#define ZWP_GAMING_INPUT_V1_GET_GAMEPAD 0
+/**
+ * @ingroup iface_zwp_gaming_input_v1
+ */
+#define ZWP_GAMING_INPUT_V1_GET_GAMEPAD_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_gaming_input_v1 */
static inline void
zwp_gaming_input_v1_set_user_data(struct zwp_gaming_input_v1 *zwp_gaming_input_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_gaming_input_v1, user_data);
}
+/** @ingroup iface_zwp_gaming_input_v1 */
static inline void *
zwp_gaming_input_v1_get_user_data(struct zwp_gaming_input_v1 *zwp_gaming_input_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_gaming_input_v1);
}
+static inline uint32_t
+zwp_gaming_input_v1_get_version(struct zwp_gaming_input_v1 *zwp_gaming_input_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_gaming_input_v1);
+}
+
+/** @ingroup iface_zwp_gaming_input_v1 */
static inline void
zwp_gaming_input_v1_destroy(struct zwp_gaming_input_v1 *zwp_gaming_input_v1)
{
wl_proxy_destroy((struct wl_proxy *) zwp_gaming_input_v1);
}
+/**
+ * @ingroup iface_zwp_gaming_input_v1
+ *
+ * Create gamepad object. See zwp_gamepad_v1 interface for details.
+ */
static inline struct zwp_gamepad_v1 *
zwp_gaming_input_v1_get_gamepad(struct zwp_gaming_input_v1 *zwp_gaming_input_v1, struct wl_seat *seat)
{
@@ -75,14 +153,17 @@ zwp_gaming_input_v1_get_gamepad(struct zwp_gaming_input_v1 *zwp_gaming_input_v1,
#ifndef ZWP_GAMEPAD_V1_GAMEPAD_STATE_ENUM
#define ZWP_GAMEPAD_V1_GAMEPAD_STATE_ENUM
/**
- * zwp_gamepad_v1_gamepad_state - connection state
- * @ZWP_GAMEPAD_V1_GAMEPAD_STATE_OFF: no gamepads are connected or on.
- * @ZWP_GAMEPAD_V1_GAMEPAD_STATE_ON: at least one gamepad is connected.
- *
- *
+ * @ingroup iface_zwp_gamepad_v1
+ * connection state
*/
enum zwp_gamepad_v1_gamepad_state {
+ /**
+ * no gamepads are connected or on.
+ */
ZWP_GAMEPAD_V1_GAMEPAD_STATE_OFF = 0,
+ /**
+ * at least one gamepad is connected.
+ */
ZWP_GAMEPAD_V1_GAMEPAD_STATE_ON = 1,
};
#endif /* ZWP_GAMEPAD_V1_GAMEPAD_STATE_ENUM */
@@ -90,46 +171,40 @@ enum zwp_gamepad_v1_gamepad_state {
#ifndef ZWP_GAMEPAD_V1_BUTTON_STATE_ENUM
#define ZWP_GAMEPAD_V1_BUTTON_STATE_ENUM
/**
- * zwp_gamepad_v1_button_state - physical button state
- * @ZWP_GAMEPAD_V1_BUTTON_STATE_RELEASED: the button is not pressed
- * @ZWP_GAMEPAD_V1_BUTTON_STATE_PRESSED: the button is pressed
+ * @ingroup iface_zwp_gamepad_v1
+ * physical button state
*
* Describes the physical state of a button that produced the button
* event.
*/
enum zwp_gamepad_v1_button_state {
+ /**
+ * the button is not pressed
+ */
ZWP_GAMEPAD_V1_BUTTON_STATE_RELEASED = 0,
+ /**
+ * the button is pressed
+ */
ZWP_GAMEPAD_V1_BUTTON_STATE_PRESSED = 1,
};
#endif /* ZWP_GAMEPAD_V1_BUTTON_STATE_ENUM */
/**
- * zwp_gamepad_v1 - gamepad input device
- * @state_change: state change event
- * @axis: axis change event
- * @button: Gamepad button changed
- * @frame: Notifies end of a series of gamepad changes.
- *
- * The zwp_gamepad_v1 interface represents one or more gamepad input
- * devices, which are reported as a normalized 'Standard Gamepad' as it is
- * specified by the W3C Gamepad API at:
- * https://w3c.github.io/gamepad/#remapping
+ * @ingroup iface_zwp_gamepad_v1
+ * @struct zwp_gamepad_v1_listener
*/
struct zwp_gamepad_v1_listener {
/**
- * state_change - state change event
- * @state: new state
+ * state change event
*
* Notification that this seat's connection state has changed.
+ * @param state new state
*/
void (*state_change)(void *data,
struct zwp_gamepad_v1 *zwp_gamepad_v1,
uint32_t state);
/**
- * axis - axis change event
- * @time: timestamp with millisecond granularity
- * @axis: axis that produced this event
- * @value: new value of axis
+ * axis change event
*
* Notification of axis change.
*
@@ -137,6 +212,9 @@ struct zwp_gamepad_v1_listener {
* W3C 'Standard Gamepad'.
*
* The value is calibrated and normalized to the -1 to 1 range.
+ * @param time timestamp with millisecond granularity
+ * @param axis axis that produced this event
+ * @param value new value of axis
*/
void (*axis)(void *data,
struct zwp_gamepad_v1 *zwp_gamepad_v1,
@@ -144,11 +222,7 @@ struct zwp_gamepad_v1_listener {
uint32_t axis,
wl_fixed_t value);
/**
- * button - Gamepad button changed
- * @time: timestamp with millisecond granularity
- * @button: id of button
- * @state: digital state of the button
- * @analog: analog value of the button
+ * Gamepad button changed
*
* Notification of button change.
*
@@ -159,6 +233,10 @@ struct zwp_gamepad_v1_listener {
* value is normalized to a 0 to 1 range. If a button does not
* provide an analog value, it will be derived from the digital
* state.
+ * @param time timestamp with millisecond granularity
+ * @param button id of button
+ * @param state digital state of the button
+ * @param analog analog value of the button
*/
void (*button)(void *data,
struct zwp_gamepad_v1 *zwp_gamepad_v1,
@@ -167,18 +245,21 @@ struct zwp_gamepad_v1_listener {
uint32_t state,
wl_fixed_t analog);
/**
- * frame - Notifies end of a series of gamepad changes.
- * @time: timestamp with millisecond granularity
+ * Notifies end of a series of gamepad changes.
*
* Indicates the end of a set of events that logically belong
* together. A client is expected to accumulate the data in all
* events within the frame before proceeding.
+ * @param time timestamp with millisecond granularity
*/
void (*frame)(void *data,
struct zwp_gamepad_v1 *zwp_gamepad_v1,
uint32_t time);
};
+/**
+ * @ingroup zwp_gamepad_v1_iface
+ */
static inline int
zwp_gamepad_v1_add_listener(struct zwp_gamepad_v1 *zwp_gamepad_v1,
const struct zwp_gamepad_v1_listener *listener, void *data)
@@ -189,18 +270,34 @@ zwp_gamepad_v1_add_listener(struct zwp_gamepad_v1 *zwp_gamepad_v1,
#define ZWP_GAMEPAD_V1_DESTROY 0
+/**
+ * @ingroup iface_zwp_gamepad_v1
+ */
+#define ZWP_GAMEPAD_V1_DESTROY_SINCE_VERSION 1
+
+/** @ingroup iface_zwp_gamepad_v1 */
static inline void
zwp_gamepad_v1_set_user_data(struct zwp_gamepad_v1 *zwp_gamepad_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_gamepad_v1, user_data);
}
+/** @ingroup iface_zwp_gamepad_v1 */
static inline void *
zwp_gamepad_v1_get_user_data(struct zwp_gamepad_v1 *zwp_gamepad_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_gamepad_v1);
}
+static inline uint32_t
+zwp_gamepad_v1_get_version(struct zwp_gamepad_v1 *zwp_gamepad_v1)
+{
+ return wl_proxy_get_version((struct wl_proxy *) zwp_gamepad_v1);
+}
+
+/**
+ * @ingroup iface_zwp_gamepad_v1
+ */
static inline void
zwp_gamepad_v1_destroy(struct zwp_gamepad_v1 *zwp_gamepad_v1)
{

Powered by Google App Engine
This is Rietveld 408576698