diff options
Diffstat (limited to 'chromium/third_party/wayland-protocols/include/protocol')
36 files changed, 0 insertions, 18067 deletions
diff --git a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h deleted file mode 100644 index ed191fc7615..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-client-protocol.h +++ /dev/null @@ -1,308 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define ALPHA_COMPOSITING_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_alpha_compositing_unstable_v1 The alpha_compositing_unstable_v1 protocol - * Protocol for more advanced compositing and blending - * - * @section page_desc_alpha_compositing_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the alpha - * compositing and blending of contents. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_alpha_compositing_unstable_v1 Interfaces - * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing - * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface - * @section page_copyright_alpha_compositing_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_alpha_compositing_v1; -struct zcr_blending_v1; - -/** - * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 - * @section page_iface_zcr_alpha_compositing_v1_desc Description - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - * @section page_iface_zcr_alpha_compositing_v1_api API - * See @ref iface_zcr_alpha_compositing_v1. - */ -/** - * @defgroup iface_zcr_alpha_compositing_v1 The zcr_alpha_compositing_v1 interface - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - */ -extern const struct wl_interface zcr_alpha_compositing_v1_interface; -/** - * @page page_iface_zcr_blending_v1 zcr_blending_v1 - * @section page_iface_zcr_blending_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_blending_v1_api API - * See @ref iface_zcr_blending_v1. - */ -/** - * @defgroup iface_zcr_blending_v1 The zcr_blending_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_blending_v1_interface; - -#ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -#define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -enum zcr_alpha_compositing_v1_error { - /** - * the surface already has a blending object associated - */ - ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, -}; -#endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ - -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY 0 -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING 1 - - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1 - -/** @ingroup iface_zcr_alpha_compositing_v1 */ -static inline void -zcr_alpha_compositing_v1_set_user_data(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_alpha_compositing_v1, user_data); -} - -/** @ingroup iface_zcr_alpha_compositing_v1 */ -static inline void * -zcr_alpha_compositing_v1_get_user_data(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -static inline uint32_t -zcr_alpha_compositing_v1_get_version(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * blending objects included. - */ -static inline void -zcr_alpha_compositing_v1_destroy(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_alpha_compositing_v1, - ZCR_ALPHA_COMPOSITING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_alpha_compositing_v1); -} - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide surface blending. If the given wl_surface already has - * a blending object associated, the blending_exists protocol error - * is raised. - */ -static inline struct zcr_blending_v1 * -zcr_alpha_compositing_v1_get_blending(struct zcr_alpha_compositing_v1 *zcr_alpha_compositing_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_alpha_compositing_v1, - ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING, &zcr_blending_v1_interface, NULL, surface); - - return (struct zcr_blending_v1 *) id; -} - -#ifndef ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -#define ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -/** - * @ingroup iface_zcr_blending_v1 - * different blending equations for compositing - * - * Blending equations that can be used when compositing a surface. - */ -enum zcr_blending_v1_blending_equation { - /** - * no blending - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_NONE = 0, - /** - * one / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1, - /** - * src_alpha / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2, -}; -#endif /* ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM */ - -#define ZCR_BLENDING_V1_DESTROY 0 -#define ZCR_BLENDING_V1_SET_BLENDING 1 -#define ZCR_BLENDING_V1_SET_ALPHA 2 - - -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1 - -/** @ingroup iface_zcr_blending_v1 */ -static inline void -zcr_blending_v1_set_user_data(struct zcr_blending_v1 *zcr_blending_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_blending_v1, user_data); -} - -/** @ingroup iface_zcr_blending_v1 */ -static inline void * -zcr_blending_v1_get_user_data(struct zcr_blending_v1 *zcr_blending_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_blending_v1); -} - -static inline uint32_t -zcr_blending_v1_get_version(struct zcr_blending_v1 *zcr_blending_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_blending_v1); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * The associated wl_surface's blending state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_destroy(struct zcr_blending_v1 *zcr_blending_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_blending_v1); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * Set the blending equation for compositing the wl_surface. - * See wp_alpha_compositing for the description. - * - * The blending equation state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_set_blending(struct zcr_blending_v1 *zcr_blending_v1, uint32_t equation) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_SET_BLENDING, equation); -} - -/** - * @ingroup iface_zcr_blending_v1 - * - * Set the alpha value applied to the whole surface for compositing. - * See wp_alpha_compositing for the description. - * - * The alpha value state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_blending_v1_set_alpha(struct zcr_blending_v1 *zcr_blending_v1, wl_fixed_t value) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_blending_v1, - ZCR_BLENDING_V1_SET_ALPHA, value); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h deleted file mode 100644 index 0a3d24bf4d3..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/alpha-compositing-unstable-v1-server-protocol.h +++ /dev/null @@ -1,253 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef ALPHA_COMPOSITING_UNSTABLE_V1_SERVER_PROTOCOL_H -#define ALPHA_COMPOSITING_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_alpha_compositing_unstable_v1 The alpha_compositing_unstable_v1 protocol - * Protocol for more advanced compositing and blending - * - * @section page_desc_alpha_compositing_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the alpha - * compositing and blending of contents. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_alpha_compositing_unstable_v1 Interfaces - * - @subpage page_iface_zcr_alpha_compositing_v1 - alpha_compositing - * - @subpage page_iface_zcr_blending_v1 - blending interface to a wl_surface - * @section page_copyright_alpha_compositing_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_alpha_compositing_v1; -struct zcr_blending_v1; - -/** - * @page page_iface_zcr_alpha_compositing_v1 zcr_alpha_compositing_v1 - * @section page_iface_zcr_alpha_compositing_v1_desc Description - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - * @section page_iface_zcr_alpha_compositing_v1_api API - * See @ref iface_zcr_alpha_compositing_v1. - */ -/** - * @defgroup iface_zcr_alpha_compositing_v1 The zcr_alpha_compositing_v1 interface - * - * The global interface exposing compositing and blending capabilities is - * used to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow the client to specify the - * blending equation and alpha value used for compositing the wl_surface. - */ -extern const struct wl_interface zcr_alpha_compositing_v1_interface; -/** - * @page page_iface_zcr_blending_v1 zcr_blending_v1 - * @section page_iface_zcr_blending_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_blending_v1_api API - * See @ref iface_zcr_blending_v1. - */ -/** - * @defgroup iface_zcr_blending_v1 The zcr_blending_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the blending equation used for compositing and - * an alpha value applied to the whole surface. - * - * If the wl_surface associated with the bledning object is destroyed, - * the blending object becomes inert. - * - * If the blending object is destroyed, the blending state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_blending_v1_interface; - -#ifndef ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -#define ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM -enum zcr_alpha_compositing_v1_error { - /** - * the surface already has a blending object associated - */ - ZCR_ALPHA_COMPOSITING_V1_ERROR_BLENDING_EXISTS = 0, -}; -#endif /* ZCR_ALPHA_COMPOSITING_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - * @struct zcr_alpha_compositing_v1_interface - */ -struct zcr_alpha_compositing_v1_interface { - /** - * unbind from the blending interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * blending objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for blending - * - * Instantiate an interface extension for the given wl_surface to - * provide surface blending. If the given wl_surface already has a - * blending object associated, the blending_exists protocol error - * is raised. - * @param id the new blending interface id - * @param surface the surface - */ - void (*get_blending)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_alpha_compositing_v1 - */ -#define ZCR_ALPHA_COMPOSITING_V1_GET_BLENDING_SINCE_VERSION 1 - -#ifndef ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -#define ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM -/** - * @ingroup iface_zcr_blending_v1 - * different blending equations for compositing - * - * Blending equations that can be used when compositing a surface. - */ -enum zcr_blending_v1_blending_equation { - /** - * no blending - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_NONE = 0, - /** - * one / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_PREMULT = 1, - /** - * src_alpha / one_minus_src_alpha - */ - ZCR_BLENDING_V1_BLENDING_EQUATION_COVERAGE = 2, -}; -#endif /* ZCR_BLENDING_V1_BLENDING_EQUATION_ENUM */ - -/** - * @ingroup iface_zcr_blending_v1 - * @struct zcr_blending_v1_interface - */ -struct zcr_blending_v1_interface { - /** - * remove blending from the surface - * - * The associated wl_surface's blending state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the blending equation - * - * Set the blending equation for compositing the wl_surface. See - * wp_alpha_compositing for the description. - * - * The blending equation state is double-buffered state, and will - * be applied on the next wl_surface.commit. - * @param equation the new blending equation - */ - void (*set_blending)(struct wl_client *client, - struct wl_resource *resource, - uint32_t equation); - /** - * set the alpha value - * - * Set the alpha value applied to the whole surface for - * compositing. See wp_alpha_compositing for the description. - * - * The alpha value state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param value the new alpha value - */ - void (*set_alpha)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t value); -}; - - -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_BLENDING_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_blending_v1 - */ -#define ZCR_BLENDING_V1_SET_ALPHA_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h deleted file mode 100644 index 4f91836bd8b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-client-protocol.h +++ /dev/null @@ -1,213 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H -#define CURSOR_SHAPES_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_cursor_shapes_v1 The cursor_shapes_v1 protocol - * @section page_ifaces_cursor_shapes_v1 Interfaces - * - @subpage page_iface_zcr_cursor_shapes_v1 - Allows to set the cursor shape - * @section page_copyright_cursor_shapes_v1 Copyright - * <pre> - * - * Copyright 2018 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_pointer; -struct zcr_cursor_shapes_v1; - -/** - * @page page_iface_zcr_cursor_shapes_v1 zcr_cursor_shapes_v1 - * @section page_iface_zcr_cursor_shapes_v1_desc Description - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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_zcr_cursor_shapes_v1_api API - * See @ref iface_zcr_cursor_shapes_v1. - */ -/** - * @defgroup iface_zcr_cursor_shapes_v1 The zcr_cursor_shapes_v1 interface - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 zcr_cursor_shapes_v1_interface; - -#ifndef ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -#define ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -enum zcr_cursor_shapes_v1_error { - /** - * the specified shape value is invalid - */ - ZCR_CURSOR_SHAPES_V1_ERROR_INVALID_SHAPE = 0, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_ERROR_ENUM */ - -#ifndef ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -#define ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * the type of cursor shape - */ -enum zcr_cursor_shapes_v1_cursor_shape_type { - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_POINTER = 0, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CROSS = 1, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HAND = 2, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_IBEAM = 3, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WAIT = 4, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HELP = 5, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_RESIZE = 6, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_RESIZE = 7, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_RESIZE = 8, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_RESIZE = 9, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_RESIZE = 10, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_RESIZE = 11, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_RESIZE = 12, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_RESIZE = 13, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_SOUTH_RESIZE = 14, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_WEST_RESIZE = 15, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_SOUTH_WEST_RESIZE = 16, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_SOUTH_EAST_RESIZE = 17, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COLUMN_RESIZE = 18, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ROW_RESIZE = 19, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MIDDLE_PANNING = 20, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_PANNING = 21, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_PANNING = 22, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_PANNING = 23, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_PANNING = 24, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_PANNING = 25, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_PANNING = 26, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_PANNING = 27, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_PANNING = 28, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MOVE = 29, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_VERTICAL_TEXT = 30, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CELL = 31, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CONTEXT_MENU = 32, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ALIAS = 33, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_PROGRESS = 34, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NO_DROP = 35, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COPY = 36, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NONE = 37, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NOT_ALLOWED = 38, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_IN = 39, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_OUT = 40, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRAB = 41, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRABBING = 42, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_NONE = 43, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_MOVE = 44, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY = 45, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK = 46, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM */ - -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE 0 - - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - */ -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE_SINCE_VERSION 1 - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void -zcr_cursor_shapes_v1_set_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_cursor_shapes_v1, user_data); -} - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void * -zcr_cursor_shapes_v1_get_user_data(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -static inline uint32_t -zcr_cursor_shapes_v1_get_version(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -/** @ingroup iface_zcr_cursor_shapes_v1 */ -static inline void -zcr_cursor_shapes_v1_destroy(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_cursor_shapes_v1); -} - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * - * Sets the pointer cursor to the specified shape. The server will change - * the cursor graphics based on the specified shape and its graphic assets - * and system condition. - * - * The "shape" argument needs to be one of the values in cursor_shape_type - * enum. Otherwise invalid_shape error is raised. - * - * This is similar to wl_pointer::set_cursor request, but this accepts a - * shape instead of contents in the form of a surface. - * - * The client which do not know this protocol should work as-is, so - * wl_pointer::set_cursor will change the cursor graphics even when it's - * combined with this request; and another invocation of set_cursor_shape - * will change the cursor shape again. This means the last invoked one will - * be used for the actual cursor. - */ -static inline void -zcr_cursor_shapes_v1_set_cursor_shape(struct zcr_cursor_shapes_v1 *zcr_cursor_shapes_v1, struct wl_pointer *pointer, int32_t shape) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_cursor_shapes_v1, - ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE, pointer, shape); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h deleted file mode 100644 index acea5255812..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/cursor-shapes-unstable-v1-server-protocol.h +++ /dev/null @@ -1,191 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef CURSOR_SHAPES_V1_SERVER_PROTOCOL_H -#define CURSOR_SHAPES_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_cursor_shapes_v1 The cursor_shapes_v1 protocol - * @section page_ifaces_cursor_shapes_v1 Interfaces - * - @subpage page_iface_zcr_cursor_shapes_v1 - Allows to set the cursor shape - * @section page_copyright_cursor_shapes_v1 Copyright - * <pre> - * - * Copyright 2018 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_pointer; -struct zcr_cursor_shapes_v1; - -/** - * @page page_iface_zcr_cursor_shapes_v1 zcr_cursor_shapes_v1 - * @section page_iface_zcr_cursor_shapes_v1_desc Description - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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_zcr_cursor_shapes_v1_api API - * See @ref iface_zcr_cursor_shapes_v1. - */ -/** - * @defgroup iface_zcr_cursor_shapes_v1 The zcr_cursor_shapes_v1 interface - * - * Allows to set the semantic cursor shape rather than a surface for a - * pointer cursor. - * - * 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 zcr_cursor_shapes_v1_interface; - -#ifndef ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -#define ZCR_CURSOR_SHAPES_V1_ERROR_ENUM -enum zcr_cursor_shapes_v1_error { - /** - * the specified shape value is invalid - */ - ZCR_CURSOR_SHAPES_V1_ERROR_INVALID_SHAPE = 0, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_ERROR_ENUM */ - -#ifndef ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -#define ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * the type of cursor shape - */ -enum zcr_cursor_shapes_v1_cursor_shape_type { - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_POINTER = 0, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CROSS = 1, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HAND = 2, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_IBEAM = 3, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WAIT = 4, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_HELP = 5, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_RESIZE = 6, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_RESIZE = 7, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_RESIZE = 8, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_RESIZE = 9, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_RESIZE = 10, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_RESIZE = 11, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_RESIZE = 12, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_RESIZE = 13, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_SOUTH_RESIZE = 14, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_WEST_RESIZE = 15, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_SOUTH_WEST_RESIZE = 16, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_SOUTH_EAST_RESIZE = 17, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COLUMN_RESIZE = 18, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ROW_RESIZE = 19, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MIDDLE_PANNING = 20, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_EAST_PANNING = 21, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_PANNING = 22, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_EAST_PANNING = 23, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NORTH_WEST_PANNING = 24, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_PANNING = 25, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_EAST_PANNING = 26, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_SOUTH_WEST_PANNING = 27, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_WEST_PANNING = 28, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_MOVE = 29, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_VERTICAL_TEXT = 30, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CELL = 31, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_CONTEXT_MENU = 32, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ALIAS = 33, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_PROGRESS = 34, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NO_DROP = 35, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_COPY = 36, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NONE = 37, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_NOT_ALLOWED = 38, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_IN = 39, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ZOOM_OUT = 40, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRAB = 41, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_GRABBING = 42, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_NONE = 43, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_MOVE = 44, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_COPY = 45, - ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_DND_LINK = 46, -}; -#endif /* ZCR_CURSOR_SHAPES_V1_CURSOR_SHAPE_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - * @struct zcr_cursor_shapes_v1_interface - */ -struct zcr_cursor_shapes_v1_interface { - /** - * set pointer cursor to the shape - * - * Sets the pointer cursor to the specified shape. The server - * will change the cursor graphics based on the specified shape and - * its graphic assets and system condition. - * - * The "shape" argument needs to be one of the values in - * cursor_shape_type enum. Otherwise invalid_shape error is raised. - * - * This is similar to wl_pointer::set_cursor request, but this - * accepts a shape instead of contents in the form of a surface. - * - * The client which do not know this protocol should work as-is, so - * wl_pointer::set_cursor will change the cursor graphics even when - * it's combined with this request; and another invocation of - * set_cursor_shape will change the cursor shape again. This means - * the last invoked one will be used for the actual cursor. - */ - void (*set_cursor_shape)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *pointer, - int32_t shape); -}; - - -/** - * @ingroup iface_zcr_cursor_shapes_v1 - */ -#define ZCR_CURSOR_SHAPES_V1_SET_CURSOR_SHAPE_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h deleted file mode 100644 index 66301bd626e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h +++ /dev/null @@ -1,332 +0,0 @@ -/* Generated by wayland-scanner 1.13.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_zcr_gaming_input_v1 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_seat; -struct zcr_gamepad_v1; -struct zcr_gaming_input_v1; - -/** - * @page page_iface_zcr_gaming_input_v1 zcr_gaming_input_v1 - * @section page_iface_zcr_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_zcr_gaming_input_v1_api API - * See @ref iface_zcr_gaming_input_v1. - */ -/** - * @defgroup iface_zcr_gaming_input_v1 The zcr_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 zcr_gaming_input_v1_interface; -/** - * @page page_iface_zcr_gamepad_v1 zcr_gamepad_v1 - * @section page_iface_zcr_gamepad_v1_desc Description - * - * The zcr_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_zcr_gamepad_v1_api API - * See @ref iface_zcr_gamepad_v1. - */ -/** - * @defgroup iface_zcr_gamepad_v1 The zcr_gamepad_v1 interface - * - * The zcr_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 zcr_gamepad_v1_interface; - -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD 0 - - -/** - * @ingroup iface_zcr_gaming_input_v1 - */ -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void -zcr_gaming_input_v1_set_user_data(struct zcr_gaming_input_v1 *zcr_gaming_input_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_input_v1, user_data); -} - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void * -zcr_gaming_input_v1_get_user_data(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_input_v1); -} - -static inline uint32_t -zcr_gaming_input_v1_get_version(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_input_v1); -} - -/** @ingroup iface_zcr_gaming_input_v1 */ -static inline void -zcr_gaming_input_v1_destroy(struct zcr_gaming_input_v1 *zcr_gaming_input_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_input_v1); -} - -/** - * @ingroup iface_zcr_gaming_input_v1 - * - * Create gamepad object. See zcr_gamepad_v1 interface for details. - */ -static inline struct zcr_gamepad_v1 * -zcr_gaming_input_v1_get_gamepad(struct zcr_gaming_input_v1 *zcr_gaming_input_v1, struct wl_seat *seat) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_gaming_input_v1, - ZCR_GAMING_INPUT_V1_GET_GAMEPAD, &zcr_gamepad_v1_interface, NULL, seat); - - return (struct zcr_gamepad_v1 *) id; -} - -#ifndef ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -#define ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * connection state - */ -enum zcr_gamepad_v1_gamepad_state { - /** - * no gamepads are connected or on. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_OFF = 0, - /** - * at least one gamepad is connected. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_ON = 1, -}; -#endif /* ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM */ - -#ifndef ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v1_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v1 - * @struct zcr_gamepad_v1_listener - */ -struct zcr_gamepad_v1_listener { - /** - * state change event - * - * Notification that this seat's connection state has changed. - * @param state new state - */ - void (*state_change)(void *data, - struct zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t state); - /** - * axis change event - * - * Notification of axis change. - * - * The axis id specifies which axis has changed as defined by the - * 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 zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * Gamepad button changed - * - * Notification of button change. - * - * The button id specifies which button has changed as defined by - * the W3C 'Standard Gamepad'. - * - * A button can have a digital and an analog value. The analog - * 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 zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time, - uint32_t button, - uint32_t state, - wl_fixed_t analog); - /** - * 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 zcr_gamepad_v1 *zcr_gamepad_v1, - uint32_t time); -}; - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -static inline int -zcr_gamepad_v1_add_listener(struct zcr_gamepad_v1 *zcr_gamepad_v1, - const struct zcr_gamepad_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gamepad_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMEPAD_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_STATE_CHANGE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gamepad_v1 */ -static inline void -zcr_gamepad_v1_set_user_data(struct zcr_gamepad_v1 *zcr_gamepad_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gamepad_v1, user_data); -} - -/** @ingroup iface_zcr_gamepad_v1 */ -static inline void * -zcr_gamepad_v1_get_user_data(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gamepad_v1); -} - -static inline uint32_t -zcr_gamepad_v1_get_version(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gamepad_v1); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -static inline void -zcr_gamepad_v1_destroy(struct zcr_gamepad_v1 *zcr_gamepad_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gamepad_v1, - ZCR_GAMEPAD_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gamepad_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h deleted file mode 100644 index 7d065e017f2..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h +++ /dev/null @@ -1,266 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V1_SERVER_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_gaming_input_unstable_v1 The gaming_input_unstable_v1 protocol - * @section page_ifaces_gaming_input_unstable_v1 Interfaces - * - @subpage page_iface_zcr_gaming_input_v1 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_seat; -struct zcr_gamepad_v1; -struct zcr_gaming_input_v1; - -/** - * @page page_iface_zcr_gaming_input_v1 zcr_gaming_input_v1 - * @section page_iface_zcr_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_zcr_gaming_input_v1_api API - * See @ref iface_zcr_gaming_input_v1. - */ -/** - * @defgroup iface_zcr_gaming_input_v1 The zcr_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 zcr_gaming_input_v1_interface; -/** - * @page page_iface_zcr_gamepad_v1 zcr_gamepad_v1 - * @section page_iface_zcr_gamepad_v1_desc Description - * - * The zcr_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_zcr_gamepad_v1_api API - * See @ref iface_zcr_gamepad_v1. - */ -/** - * @defgroup iface_zcr_gamepad_v1 The zcr_gamepad_v1 interface - * - * The zcr_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 zcr_gamepad_v1_interface; - -/** - * @ingroup iface_zcr_gaming_input_v1 - * @struct zcr_gaming_input_v1_interface - */ -struct zcr_gaming_input_v1_interface { - /** - * get gamepad device assigned to seat - * - * Create gamepad object. See zcr_gamepad_v1 interface for - * details. - */ - void (*get_gamepad)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *seat); -}; - - -/** - * @ingroup iface_zcr_gaming_input_v1 - */ -#define ZCR_GAMING_INPUT_V1_GET_GAMEPAD_SINCE_VERSION 1 - -#ifndef ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -#define ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * connection state - */ -enum zcr_gamepad_v1_gamepad_state { - /** - * no gamepads are connected or on. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_OFF = 0, - /** - * at least one gamepad is connected. - */ - ZCR_GAMEPAD_V1_GAMEPAD_STATE_ON = 1, -}; -#endif /* ZCR_GAMEPAD_V1_GAMEPAD_STATE_ENUM */ - -#ifndef ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v1 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v1_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V1_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V1_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v1 - * @struct zcr_gamepad_v1_interface - */ -struct zcr_gamepad_v1_interface { - /** - * destroy gamepad object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMEPAD_V1_STATE_CHANGE 0 -#define ZCR_GAMEPAD_V1_AXIS 1 -#define ZCR_GAMEPAD_V1_BUTTON 2 -#define ZCR_GAMEPAD_V1_FRAME 3 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_STATE_CHANGE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - */ -#define ZCR_GAMEPAD_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an state_change event to the client owning the resource. - * @param resource_ The client's resource - * @param state new state - */ -static inline void -zcr_gamepad_v1_send_state_change(struct wl_resource *resource_, uint32_t state) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_STATE_CHANGE, state); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ -static inline void -zcr_gamepad_v1_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_AXIS, time, axis, value); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @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 - */ -static inline void -zcr_gamepad_v1_send_button(struct wl_resource *resource_, uint32_t time, uint32_t button, uint32_t state, wl_fixed_t analog) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_BUTTON, time, button, state, analog); -} - -/** - * @ingroup iface_zcr_gamepad_v1 - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - */ -static inline void -zcr_gamepad_v1_send_frame(struct wl_resource *resource_, uint32_t time) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V1_FRAME, time); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h deleted file mode 100644 index 1c74e341141..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-client-protocol.h +++ /dev/null @@ -1,422 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V2_CLIENT_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V2_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_gaming_input_unstable_v2 The gaming_input_unstable_v2 protocol - * @section page_ifaces_gaming_input_unstable_v2 Interfaces - * - @subpage page_iface_zcr_gaming_input_v2 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gaming_seat_v2 - controller object for all gaming devices of a seat - * - @subpage page_iface_zcr_gamepad_v2 - gamepad input device - * @section page_copyright_gaming_input_unstable_v2 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_seat; -struct zcr_gamepad_v2; -struct zcr_gaming_input_v2; -struct zcr_gaming_seat_v2; - -/** - * @page page_iface_zcr_gaming_input_v2 zcr_gaming_input_v2 - * @section page_iface_zcr_gaming_input_v2_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_zcr_gaming_input_v2_api API - * See @ref iface_zcr_gaming_input_v2. - */ -/** - * @defgroup iface_zcr_gaming_input_v2 The zcr_gaming_input_v2 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 zcr_gaming_input_v2_interface; -/** - * @page page_iface_zcr_gaming_seat_v2 zcr_gaming_seat_v2 - * @section page_iface_zcr_gaming_seat_v2_desc Description - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - * @section page_iface_zcr_gaming_seat_v2_api API - * See @ref iface_zcr_gaming_seat_v2. - */ -/** - * @defgroup iface_zcr_gaming_seat_v2 The zcr_gaming_seat_v2 interface - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - */ -extern const struct wl_interface zcr_gaming_seat_v2_interface; -/** - * @page page_iface_zcr_gamepad_v2 zcr_gamepad_v2 - * @section page_iface_zcr_gamepad_v2_desc Description - * - * The zcr_gamepad_v2 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_zcr_gamepad_v2_api API - * See @ref iface_zcr_gamepad_v2. - */ -/** - * @defgroup iface_zcr_gamepad_v2 The zcr_gamepad_v2 interface - * - * The zcr_gamepad_v2 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 zcr_gamepad_v2_interface; - -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT 0 -#define ZCR_GAMING_INPUT_V2_DESTROY 1 - - -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_input_v2 */ -static inline void -zcr_gaming_input_v2_set_user_data(struct zcr_gaming_input_v2 *zcr_gaming_input_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_input_v2, user_data); -} - -/** @ingroup iface_zcr_gaming_input_v2 */ -static inline void * -zcr_gaming_input_v2_get_user_data(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_input_v2); -} - -static inline uint32_t -zcr_gaming_input_v2_get_version(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_input_v2); -} - -/** - * @ingroup iface_zcr_gaming_input_v2 - * - * Get a gaming seat object for a given seat. Gaming seat provides access - * to gaming devices - */ -static inline struct zcr_gaming_seat_v2 * -zcr_gaming_input_v2_get_gaming_seat(struct zcr_gaming_input_v2 *zcr_gaming_input_v2, struct wl_seat *seat) -{ - struct wl_proxy *gaming_seat; - - gaming_seat = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_gaming_input_v2, - ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT, &zcr_gaming_seat_v2_interface, NULL, seat); - - return (struct zcr_gaming_seat_v2 *) gaming_seat; -} - -/** - * @ingroup iface_zcr_gaming_input_v2 - * - * Destroy gaming_input object. Objects created from this object are - * unaffected and should be destroyed separately. - */ -static inline void -zcr_gaming_input_v2_destroy(struct zcr_gaming_input_v2 *zcr_gaming_input_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gaming_input_v2, - ZCR_GAMING_INPUT_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_input_v2); -} - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * @struct zcr_gaming_seat_v2_listener - */ -struct zcr_gaming_seat_v2_listener { - /** - * gamepad added event - * - * Notification that there is gamepad connected at this seat. - * @param gamepad new connected gamepad - */ - void (*gamepad_added)(void *data, - struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, - struct zcr_gamepad_v2 *gamepad); -}; - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -static inline int -zcr_gaming_seat_v2_add_listener(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, - const struct zcr_gaming_seat_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gaming_seat_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMING_SEAT_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gaming_seat_v2 */ -static inline void -zcr_gaming_seat_v2_set_user_data(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gaming_seat_v2, user_data); -} - -/** @ingroup iface_zcr_gaming_seat_v2 */ -static inline void * -zcr_gaming_seat_v2_get_user_data(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gaming_seat_v2); -} - -static inline uint32_t -zcr_gaming_seat_v2_get_version(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gaming_seat_v2); -} - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * - * Destroy gaming_seat object. Objects created from this object are - * unaffected and should be destroyed separately. - */ -static inline void -zcr_gaming_seat_v2_destroy(struct zcr_gaming_seat_v2 *zcr_gaming_seat_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gaming_seat_v2, - ZCR_GAMING_SEAT_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gaming_seat_v2); -} - -#ifndef ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v2 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v2_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v2 - * @struct zcr_gamepad_v2_listener - */ -struct zcr_gamepad_v2_listener { - /** - * gamepad removed - * - * Removed event is send when the gamepad is disconnected. The - * client should expect no more event and call destroy. - * - * This event cannot be used as destructor as requests (e.g. - * vibration) might be added to this interface. - */ - void (*removed)(void *data, - struct zcr_gamepad_v2 *zcr_gamepad_v2); - /** - * axis change event - * - * Notification of axis change. - * - * The axis id specifies which axis has changed as defined by the - * 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 zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time, - uint32_t axis, - wl_fixed_t value); - /** - * Gamepad button changed - * - * Notification of button change. - * - * The button id specifies which button has changed as defined by - * the W3C 'Standard Gamepad'. - * - * A button can have a digital and an analog value. The analog - * 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 zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time, - uint32_t button, - uint32_t state, - wl_fixed_t analog); - /** - * 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 zcr_gamepad_v2 *zcr_gamepad_v2, - uint32_t time); -}; - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -static inline int -zcr_gamepad_v2_add_listener(struct zcr_gamepad_v2 *zcr_gamepad_v2, - const struct zcr_gamepad_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_gamepad_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_GAMEPAD_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_REMOVED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_gamepad_v2 */ -static inline void -zcr_gamepad_v2_set_user_data(struct zcr_gamepad_v2 *zcr_gamepad_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_gamepad_v2, user_data); -} - -/** @ingroup iface_zcr_gamepad_v2 */ -static inline void * -zcr_gamepad_v2_get_user_data(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_gamepad_v2); -} - -static inline uint32_t -zcr_gamepad_v2_get_version(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_gamepad_v2); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -static inline void -zcr_gamepad_v2_destroy(struct zcr_gamepad_v2 *zcr_gamepad_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_gamepad_v2, - ZCR_GAMEPAD_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_gamepad_v2); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h deleted file mode 100644 index eeba3aeb93b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v2-server-protocol.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef GAMING_INPUT_UNSTABLE_V2_SERVER_PROTOCOL_H -#define GAMING_INPUT_UNSTABLE_V2_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_gaming_input_unstable_v2 The gaming_input_unstable_v2 protocol - * @section page_ifaces_gaming_input_unstable_v2 Interfaces - * - @subpage page_iface_zcr_gaming_input_v2 - extends wl_seat with gaming input devices - * - @subpage page_iface_zcr_gaming_seat_v2 - controller object for all gaming devices of a seat - * - @subpage page_iface_zcr_gamepad_v2 - gamepad input device - * @section page_copyright_gaming_input_unstable_v2 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_seat; -struct zcr_gamepad_v2; -struct zcr_gaming_input_v2; -struct zcr_gaming_seat_v2; - -/** - * @page page_iface_zcr_gaming_input_v2 zcr_gaming_input_v2 - * @section page_iface_zcr_gaming_input_v2_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_zcr_gaming_input_v2_api API - * See @ref iface_zcr_gaming_input_v2. - */ -/** - * @defgroup iface_zcr_gaming_input_v2 The zcr_gaming_input_v2 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 zcr_gaming_input_v2_interface; -/** - * @page page_iface_zcr_gaming_seat_v2 zcr_gaming_seat_v2 - * @section page_iface_zcr_gaming_seat_v2_desc Description - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - * @section page_iface_zcr_gaming_seat_v2_api API - * See @ref iface_zcr_gaming_seat_v2. - */ -/** - * @defgroup iface_zcr_gaming_seat_v2 The zcr_gaming_seat_v2 interface - * - * An object that provides access to all the gaming devices of a seat. - * When a gamepad is connected, the compositor will send gamepad_added event. - */ -extern const struct wl_interface zcr_gaming_seat_v2_interface; -/** - * @page page_iface_zcr_gamepad_v2 zcr_gamepad_v2 - * @section page_iface_zcr_gamepad_v2_desc Description - * - * The zcr_gamepad_v2 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_zcr_gamepad_v2_api API - * See @ref iface_zcr_gamepad_v2. - */ -/** - * @defgroup iface_zcr_gamepad_v2 The zcr_gamepad_v2 interface - * - * The zcr_gamepad_v2 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 zcr_gamepad_v2_interface; - -/** - * @ingroup iface_zcr_gaming_input_v2 - * @struct zcr_gaming_input_v2_interface - */ -struct zcr_gaming_input_v2_interface { - /** - * get a gaming seat - * - * Get a gaming seat object for a given seat. Gaming seat - * provides access to gaming devices - */ - void (*get_gaming_seat)(struct wl_client *client, - struct wl_resource *resource, - uint32_t gaming_seat, - struct wl_resource *seat); - /** - * release the memory for the gaming input object - * - * Destroy gaming_input object. Objects created from this object - * are unaffected and should be destroyed separately. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_GET_GAMING_SEAT_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gaming_input_v2 - */ -#define ZCR_GAMING_INPUT_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * @struct zcr_gaming_seat_v2_interface - */ -struct zcr_gaming_seat_v2_interface { - /** - * release the memory for the gaming seat object - * - * Destroy gaming_seat object. Objects created from this object - * are unaffected and should be destroyed separately. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED 0 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - */ -#define ZCR_GAMING_SEAT_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gaming_seat_v2 - * Sends an gamepad_added event to the client owning the resource. - * @param resource_ The client's resource - * @param gamepad new connected gamepad - */ -static inline void -zcr_gaming_seat_v2_send_gamepad_added(struct wl_resource *resource_, struct wl_resource *gamepad) -{ - wl_resource_post_event(resource_, ZCR_GAMING_SEAT_V2_GAMEPAD_ADDED, gamepad); -} - -#ifndef ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -#define ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM -/** - * @ingroup iface_zcr_gamepad_v2 - * physical button state - * - * Describes the physical state of a button that produced the button - * event. - */ -enum zcr_gamepad_v2_button_state { - /** - * the button is not pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_RELEASED = 0, - /** - * the button is pressed - */ - ZCR_GAMEPAD_V2_BUTTON_STATE_PRESSED = 1, -}; -#endif /* ZCR_GAMEPAD_V2_BUTTON_STATE_ENUM */ - -/** - * @ingroup iface_zcr_gamepad_v2 - * @struct zcr_gamepad_v2_interface - */ -struct zcr_gamepad_v2_interface { - /** - * destroy gamepad object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_GAMEPAD_V2_REMOVED 0 -#define ZCR_GAMEPAD_V2_AXIS 1 -#define ZCR_GAMEPAD_V2_BUTTON 2 -#define ZCR_GAMEPAD_V2_FRAME 3 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_REMOVED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_AXIS_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_BUTTON_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_FRAME_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - */ -#define ZCR_GAMEPAD_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an removed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_gamepad_v2_send_removed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_REMOVED); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an axis event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param axis axis that produced this event - * @param value new value of axis - */ -static inline void -zcr_gamepad_v2_send_axis(struct wl_resource *resource_, uint32_t time, uint32_t axis, wl_fixed_t value) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_AXIS, time, axis, value); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an button event to the client owning the resource. - * @param resource_ The client's resource - * @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 - */ -static inline void -zcr_gamepad_v2_send_button(struct wl_resource *resource_, uint32_t time, uint32_t button, uint32_t state, wl_fixed_t analog) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_BUTTON, time, button, state, analog); -} - -/** - * @ingroup iface_zcr_gamepad_v2 - * Sends an frame event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - */ -static inline void -zcr_gamepad_v2_send_frame(struct wl_resource *resource_, uint32_t time) -{ - wl_resource_post_event(resource_, ZCR_GAMEPAD_V2_FRAME, time); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h deleted file mode 100644 index bef0d500930..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-client-protocol.h +++ /dev/null @@ -1,326 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef INPUT_TIMESTAMPS_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define INPUT_TIMESTAMPS_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_input_timestamps_unstable_v1 The input_timestamps_unstable_v1 protocol - * High-resolution timestamps for input events - * - * @section page_desc_input_timestamps_unstable_v1 Description - * - * This protocol specifies a way for a client to request and receive - * high-resolution timestamps for input events. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_ifaces_input_timestamps_unstable_v1 Interfaces - * - @subpage page_iface_zwp_input_timestamps_manager_v1 - context object for high-resolution input timestamps - * - @subpage page_iface_zwp_input_timestamps_v1 - context object for input timestamps - * @section page_copyright_input_timestamps_unstable_v1 Copyright - * <pre> - * - * Copyright © 2017 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct wl_pointer; -struct wl_touch; -struct zwp_input_timestamps_manager_v1; -struct zwp_input_timestamps_v1; - -/** - * @page page_iface_zwp_input_timestamps_manager_v1 zwp_input_timestamps_manager_v1 - * @section page_iface_zwp_input_timestamps_manager_v1_desc Description - * - * A global interface used for requesting high-resolution timestamps - * for input events. - * @section page_iface_zwp_input_timestamps_manager_v1_api API - * See @ref iface_zwp_input_timestamps_manager_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_manager_v1 The zwp_input_timestamps_manager_v1 interface - * - * A global interface used for requesting high-resolution timestamps - * for input events. - */ -extern const struct wl_interface zwp_input_timestamps_manager_v1_interface; -/** - * @page page_iface_zwp_input_timestamps_v1 zwp_input_timestamps_v1 - * @section page_iface_zwp_input_timestamps_v1_desc Description - * - * Provides high-resolution timestamp events for a set of subscribed input - * events. The set of subscribed input events is determined by the - * zwp_input_timestamps_manager_v1 request used to create this object. - * @section page_iface_zwp_input_timestamps_v1_api API - * See @ref iface_zwp_input_timestamps_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_v1 The zwp_input_timestamps_v1 interface - * - * Provides high-resolution timestamp events for a set of subscribed input - * events. The set of subscribed input events is determined by the - * zwp_input_timestamps_manager_v1 request used to create this object. - */ -extern const struct wl_interface zwp_input_timestamps_v1_interface; - -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY 0 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS 1 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS 2 -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS 3 - - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS_SINCE_VERSION 1 - -/** @ingroup iface_zwp_input_timestamps_manager_v1 */ -static inline void -zwp_input_timestamps_manager_v1_set_user_data(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_input_timestamps_manager_v1, user_data); -} - -/** @ingroup iface_zwp_input_timestamps_manager_v1 */ -static inline void * -zwp_input_timestamps_manager_v1_get_user_data(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -static inline uint32_t -zwp_input_timestamps_manager_v1_get_version(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * Informs the server that the client will no longer be using this - * protocol object. Existing objects created by this object are not - * affected. - */ -static inline void -zwp_input_timestamps_manager_v1_destroy(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_input_timestamps_manager_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * Creates a new input timestamps object that represents a subscription - * to high-resolution timestamp events for all wl_keyboard events that - * carry a timestamp. - * - * If the associated wl_keyboard object is invalidated, either through - * client action (e.g. release) or server-side changes, the input - * timestamps object becomes inert and the client should destroy it - * by calling zwp_input_timestamps_v1.destroy. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_keyboard_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, keyboard); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * Creates a new input timestamps object that represents a subscription - * to high-resolution timestamp events for all wl_pointer events that - * carry a timestamp. - * - * If the associated wl_pointer object is invalidated, either through - * client action (e.g. release) or server-side changes, the input - * timestamps object becomes inert and the client should destroy it - * by calling zwp_input_timestamps_v1.destroy. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_pointer_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, pointer); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * - * Creates a new input timestamps object that represents a subscription - * to high-resolution timestamp events for all wl_touch events that - * carry a timestamp. - * - * If the associated wl_touch object becomes invalid, either through - * client action (e.g. release) or server-side changes, the input - * timestamps object becomes inert and the client should destroy it - * by calling zwp_input_timestamps_v1.destroy. - */ -static inline struct zwp_input_timestamps_v1 * -zwp_input_timestamps_manager_v1_get_touch_timestamps(struct zwp_input_timestamps_manager_v1 *zwp_input_timestamps_manager_v1, struct wl_touch *touch) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_input_timestamps_manager_v1, - ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS, &zwp_input_timestamps_v1_interface, NULL, touch); - - return (struct zwp_input_timestamps_v1 *) id; -} - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * @struct zwp_input_timestamps_v1_listener - */ -struct zwp_input_timestamps_v1_listener { - /** - * high-resolution timestamp event - * - * The timestamp event is associated with the first subsequent - * input event carrying a timestamp which belongs to the set of - * input events this object is subscribed to. - * - * The timestamp provided by this event is a high-resolution - * version of the timestamp argument of the associated input event. - * The provided timestamp is in the same clock domain and is at - * least as accurate as the associated input event timestamp. - * - * The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec - * triples, each component being an unsigned 32-bit value. Whole - * seconds are in tv_sec which is a 64-bit value combined from - * tv_sec_hi and tv_sec_lo, and the additional fractional part in - * tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must - * be in [0, 999999999]. - * @param tv_sec_hi high 32 bits of the seconds part of the timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the timestamp - * @param tv_nsec nanoseconds part of the timestamp - */ - void (*timestamp)(void *data, - struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, - uint32_t tv_sec_hi, - uint32_t tv_sec_lo, - uint32_t tv_nsec); -}; - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -static inline int -zwp_input_timestamps_v1_add_listener(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, - const struct zwp_input_timestamps_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_input_timestamps_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_input_timestamps_v1 */ -static inline void -zwp_input_timestamps_v1_set_user_data(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_input_timestamps_v1, user_data); -} - -/** @ingroup iface_zwp_input_timestamps_v1 */ -static inline void * -zwp_input_timestamps_v1_get_user_data(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_input_timestamps_v1); -} - -static inline uint32_t -zwp_input_timestamps_v1_get_version(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_v1); -} - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * - * Informs the server that the client will no longer be using this - * protocol object. After the server processes the request, no more - * timestamp events will be emitted. - */ -static inline void -zwp_input_timestamps_v1_destroy(struct zwp_input_timestamps_v1 *zwp_input_timestamps_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_input_timestamps_v1, - ZWP_INPUT_TIMESTAMPS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_input_timestamps_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h deleted file mode 100644 index 65d9ceea040..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/input-timestamps-unstable-v1-server-protocol.h +++ /dev/null @@ -1,235 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef INPUT_TIMESTAMPS_UNSTABLE_V1_SERVER_PROTOCOL_H -#define INPUT_TIMESTAMPS_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_input_timestamps_unstable_v1 The input_timestamps_unstable_v1 protocol - * High-resolution timestamps for input events - * - * @section page_desc_input_timestamps_unstable_v1 Description - * - * This protocol specifies a way for a client to request and receive - * high-resolution timestamps for input events. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_ifaces_input_timestamps_unstable_v1 Interfaces - * - @subpage page_iface_zwp_input_timestamps_manager_v1 - context object for high-resolution input timestamps - * - @subpage page_iface_zwp_input_timestamps_v1 - context object for input timestamps - * @section page_copyright_input_timestamps_unstable_v1 Copyright - * <pre> - * - * Copyright © 2017 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct wl_pointer; -struct wl_touch; -struct zwp_input_timestamps_manager_v1; -struct zwp_input_timestamps_v1; - -/** - * @page page_iface_zwp_input_timestamps_manager_v1 zwp_input_timestamps_manager_v1 - * @section page_iface_zwp_input_timestamps_manager_v1_desc Description - * - * A global interface used for requesting high-resolution timestamps - * for input events. - * @section page_iface_zwp_input_timestamps_manager_v1_api API - * See @ref iface_zwp_input_timestamps_manager_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_manager_v1 The zwp_input_timestamps_manager_v1 interface - * - * A global interface used for requesting high-resolution timestamps - * for input events. - */ -extern const struct wl_interface zwp_input_timestamps_manager_v1_interface; -/** - * @page page_iface_zwp_input_timestamps_v1 zwp_input_timestamps_v1 - * @section page_iface_zwp_input_timestamps_v1_desc Description - * - * Provides high-resolution timestamp events for a set of subscribed input - * events. The set of subscribed input events is determined by the - * zwp_input_timestamps_manager_v1 request used to create this object. - * @section page_iface_zwp_input_timestamps_v1_api API - * See @ref iface_zwp_input_timestamps_v1. - */ -/** - * @defgroup iface_zwp_input_timestamps_v1 The zwp_input_timestamps_v1 interface - * - * Provides high-resolution timestamp events for a set of subscribed input - * events. The set of subscribed input events is determined by the - * zwp_input_timestamps_manager_v1 request used to create this object. - */ -extern const struct wl_interface zwp_input_timestamps_v1_interface; - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - * @struct zwp_input_timestamps_manager_v1_interface - */ -struct zwp_input_timestamps_manager_v1_interface { - /** - * destroy the input timestamps manager object - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * subscribe to high-resolution keyboard timestamp events - * - * Creates a new input timestamps object that represents a - * subscription to high-resolution timestamp events for all - * wl_keyboard events that carry a timestamp. - * - * If the associated wl_keyboard object is invalidated, either - * through client action (e.g. release) or server-side changes, the - * input timestamps object becomes inert and the client should - * destroy it by calling zwp_input_timestamps_v1.destroy. - * @param keyboard the wl_keyboard object for which to get timestamp events - */ - void (*get_keyboard_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); - /** - * subscribe to high-resolution pointer timestamp events - * - * Creates a new input timestamps object that represents a - * subscription to high-resolution timestamp events for all - * wl_pointer events that carry a timestamp. - * - * If the associated wl_pointer object is invalidated, either - * through client action (e.g. release) or server-side changes, the - * input timestamps object becomes inert and the client should - * destroy it by calling zwp_input_timestamps_v1.destroy. - * @param pointer the wl_pointer object for which to get timestamp events - */ - void (*get_pointer_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); - /** - * subscribe to high-resolution touch timestamp events - * - * Creates a new input timestamps object that represents a - * subscription to high-resolution timestamp events for all - * wl_touch events that carry a timestamp. - * - * If the associated wl_touch object becomes invalid, either - * through client action (e.g. release) or server-side changes, the - * input timestamps object becomes inert and the client should - * destroy it by calling zwp_input_timestamps_v1.destroy. - * @param touch the wl_touch object for which to get timestamp events - */ - void (*get_touch_timestamps)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *touch); -}; - - -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_input_timestamps_manager_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * @struct zwp_input_timestamps_v1_interface - */ -struct zwp_input_timestamps_v1_interface { - /** - * destroy the input timestamps object - * - * Informs the server that the client will no longer be using - * this protocol object. After the server processes the request, no - * more timestamp events will be emitted. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP 0 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - */ -#define ZWP_INPUT_TIMESTAMPS_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_input_timestamps_v1 - * Sends an timestamp event to the client owning the resource. - * @param resource_ The client's resource - * @param tv_sec_hi high 32 bits of the seconds part of the timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the timestamp - * @param tv_nsec nanoseconds part of the timestamp - */ -static inline void -zwp_input_timestamps_v1_send_timestamp(struct wl_resource *resource_, uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec) -{ - wl_resource_post_event(resource_, ZWP_INPUT_TIMESTAMPS_V1_TIMESTAMP, tv_sec_hi, tv_sec_lo, tv_nsec); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h deleted file mode 100644 index 5087c849a09..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-client-protocol.h +++ /dev/null @@ -1,260 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_CONFIGURATION_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define KEYBOARD_CONFIGURATION_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_keyboard_configuration_unstable_v1 The keyboard_configuration_unstable_v1 protocol - * @section page_ifaces_keyboard_configuration_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_configuration_v1 - extends wl_keyboard with events for device configuration change - * - @subpage page_iface_zcr_keyboard_device_configuration_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_configuration_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct zcr_keyboard_configuration_v1; -struct zcr_keyboard_device_configuration_v1; - -/** - * @page page_iface_zcr_keyboard_configuration_v1 zcr_keyboard_configuration_v1 - * @section page_iface_zcr_keyboard_configuration_v1_desc Description - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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_zcr_keyboard_configuration_v1_api API - * See @ref iface_zcr_keyboard_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_configuration_v1 The zcr_keyboard_configuration_v1 interface - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 zcr_keyboard_configuration_v1_interface; -/** - * @page page_iface_zcr_keyboard_device_configuration_v1 zcr_keyboard_device_configuration_v1 - * @section page_iface_zcr_keyboard_device_configuration_v1_desc Description - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - * @section page_iface_zcr_keyboard_device_configuration_v1_api API - * See @ref iface_zcr_keyboard_device_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_device_configuration_v1 The zcr_keyboard_device_configuration_v1 interface - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - */ -extern const struct wl_interface zcr_keyboard_device_configuration_v1_interface; - -#ifndef ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -enum zcr_keyboard_configuration_v1_error { - /** - * the keyboard already has a device configuration object associated - */ - ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_DEVICE_CONFIGURATION_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM */ - -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION 0 - - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - */ -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void -zcr_keyboard_configuration_v1_set_user_data(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_configuration_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void * -zcr_keyboard_configuration_v1_get_user_data(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -static inline uint32_t -zcr_keyboard_configuration_v1_get_version(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -/** @ingroup iface_zcr_keyboard_configuration_v1 */ -static inline void -zcr_keyboard_configuration_v1_destroy(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_configuration_v1); -} - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - * - * Create keyboard_device_configuration object. - * See zcr_keyboard_device_configuration interface for details. - * If the given wl_keyboard object already has a device configuration - * object associated, the keyboard_device_configuration_exists protocol - * error is raised. - */ -static inline struct zcr_keyboard_device_configuration_v1 * -zcr_keyboard_configuration_v1_get_keyboard_device_configuration(struct zcr_keyboard_configuration_v1 *zcr_keyboard_configuration_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_keyboard_configuration_v1, - ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION, &zcr_keyboard_device_configuration_v1_interface, NULL, keyboard); - - return (struct zcr_keyboard_device_configuration_v1 *) id; -} - -#ifndef ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * keyboard types - */ -enum zcr_keyboard_device_configuration_v1_keyboard_type { - /** - * Physical keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_PHYSICAL = 0, - /** - * Virtual keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_VIRTUAL = 1, -}; -#endif /* ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * @struct zcr_keyboard_device_configuration_v1_listener - */ -struct zcr_keyboard_device_configuration_v1_listener { - /** - * keyboard type changed - * - * Notification that the user is switching to new keyboard type. - * - * If this event is not received, the cleint has to assume a - * physical keyboard is in use. - * @param type new device type - */ - void (*type_change)(void *data, - struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, - uint32_t type); -}; - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -static inline int -zcr_keyboard_device_configuration_v1_add_listener(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, - const struct zcr_keyboard_device_configuration_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_keyboard_device_configuration_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_device_configuration_v1 */ -static inline void -zcr_keyboard_device_configuration_v1_set_user_data(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_device_configuration_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_device_configuration_v1 */ -static inline void * -zcr_keyboard_device_configuration_v1_get_user_data(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -static inline uint32_t -zcr_keyboard_device_configuration_v1_get_version(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -static inline void -zcr_keyboard_device_configuration_v1_destroy(struct zcr_keyboard_device_configuration_v1 *zcr_keyboard_device_configuration_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_keyboard_device_configuration_v1, - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_device_configuration_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h deleted file mode 100644 index bf17f5efd0e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-configuration-unstable-v1-server-protocol.h +++ /dev/null @@ -1,198 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_CONFIGURATION_UNSTABLE_V1_SERVER_PROTOCOL_H -#define KEYBOARD_CONFIGURATION_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_keyboard_configuration_unstable_v1 The keyboard_configuration_unstable_v1 protocol - * @section page_ifaces_keyboard_configuration_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_configuration_v1 - extends wl_keyboard with events for device configuration change - * - @subpage page_iface_zcr_keyboard_device_configuration_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_configuration_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct zcr_keyboard_configuration_v1; -struct zcr_keyboard_device_configuration_v1; - -/** - * @page page_iface_zcr_keyboard_configuration_v1 zcr_keyboard_configuration_v1 - * @section page_iface_zcr_keyboard_configuration_v1_desc Description - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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_zcr_keyboard_configuration_v1_api API - * See @ref iface_zcr_keyboard_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_configuration_v1 The zcr_keyboard_configuration_v1 interface - * - * Allows a wl_keyboard to notify device configuration change events of - * the keyboard to the client. - * - * 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 zcr_keyboard_configuration_v1_interface; -/** - * @page page_iface_zcr_keyboard_device_configuration_v1 zcr_keyboard_device_configuration_v1 - * @section page_iface_zcr_keyboard_device_configuration_v1_desc Description - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - * @section page_iface_zcr_keyboard_device_configuration_v1_api API - * See @ref iface_zcr_keyboard_device_configuration_v1. - */ -/** - * @defgroup iface_zcr_keyboard_device_configuration_v1 The zcr_keyboard_device_configuration_v1 interface - * - * The zcr_keyboard_device_configuration_v1 interface extends the wl_keyboard - * interface with events to describe device configuration of a keyboard. - */ -extern const struct wl_interface zcr_keyboard_device_configuration_v1_interface; - -#ifndef ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM -enum zcr_keyboard_configuration_v1_error { - /** - * the keyboard already has a device configuration object associated - */ - ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_DEVICE_CONFIGURATION_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_CONFIGURATION_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - * @struct zcr_keyboard_configuration_v1_interface - */ -struct zcr_keyboard_configuration_v1_interface { - /** - * get keyboard_device_configuration interface for a keyboard - * - * Create keyboard_device_configuration object. See - * zcr_keyboard_device_configuration interface for details. If the - * given wl_keyboard object already has a device configuration - * object associated, the keyboard_device_configuration_exists - * protocol error is raised. - */ - void (*get_keyboard_device_configuration)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); -}; - - -/** - * @ingroup iface_zcr_keyboard_configuration_v1 - */ -#define ZCR_KEYBOARD_CONFIGURATION_V1_GET_KEYBOARD_DEVICE_CONFIGURATION_SINCE_VERSION 1 - -#ifndef ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * keyboard types - */ -enum zcr_keyboard_device_configuration_v1_keyboard_type { - /** - * Physical keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_PHYSICAL = 0, - /** - * Virtual keyboard - */ - ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_VIRTUAL = 1, -}; -#endif /* ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_KEYBOARD_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * @struct zcr_keyboard_device_configuration_v1_interface - */ -struct zcr_keyboard_device_configuration_v1_interface { - /** - * destroy keyboard_device_configuration object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE 0 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - */ -#define ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_keyboard_device_configuration_v1 - * Sends an type_change event to the client owning the resource. - * @param resource_ The client's resource - * @param type new device type - */ -static inline void -zcr_keyboard_device_configuration_v1_send_type_change(struct wl_resource *resource_, uint32_t type) -{ - wl_resource_post_event(resource_, ZCR_KEYBOARD_DEVICE_CONFIGURATION_V1_TYPE_CHANGE, type); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h deleted file mode 100644 index ce8571f9d29..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-client-protocol.h +++ /dev/null @@ -1,236 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define KEYBOARD_EXTENSION_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_keyboard_extension_unstable_v1 The keyboard_extension_unstable_v1 protocol - * @section page_ifaces_keyboard_extension_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_extension_v1 - extends wl_keyboard with ack_key events - * - @subpage page_iface_zcr_extended_keyboard_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_extension_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct zcr_extended_keyboard_v1; -struct zcr_keyboard_extension_v1; - -/** - * @page page_iface_zcr_keyboard_extension_v1 zcr_keyboard_extension_v1 - * @section page_iface_zcr_keyboard_extension_v1_desc Description - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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_zcr_keyboard_extension_v1_api API - * See @ref iface_zcr_keyboard_extension_v1. - */ -/** - * @defgroup iface_zcr_keyboard_extension_v1 The zcr_keyboard_extension_v1 interface - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 zcr_keyboard_extension_v1_interface; -/** - * @page page_iface_zcr_extended_keyboard_v1 zcr_extended_keyboard_v1 - * @section page_iface_zcr_extended_keyboard_v1_desc Description - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - * @section page_iface_zcr_extended_keyboard_v1_api API - * See @ref iface_zcr_extended_keyboard_v1. - */ -/** - * @defgroup iface_zcr_extended_keyboard_v1 The zcr_extended_keyboard_v1 interface - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - */ -extern const struct wl_interface zcr_extended_keyboard_v1_interface; - -#ifndef ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -enum zcr_keyboard_extension_v1_error { - /** - * the keyboard already has an extended_keyboard object associated - */ - ZCR_KEYBOARD_EXTENSION_V1_ERROR_EXTENDED_KEYBOARD_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM */ - -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD 0 - - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - */ -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD_SINCE_VERSION 1 - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void -zcr_keyboard_extension_v1_set_user_data(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_keyboard_extension_v1, user_data); -} - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void * -zcr_keyboard_extension_v1_get_user_data(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -static inline uint32_t -zcr_keyboard_extension_v1_get_version(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -/** @ingroup iface_zcr_keyboard_extension_v1 */ -static inline void -zcr_keyboard_extension_v1_destroy(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_keyboard_extension_v1); -} - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - * - * Create extended_keyboard object. - * See zcr_extended_keyboard interface for details. - * If the given wl_keyboard object already has a extended_keyboard object - * associated, the extended_keyboard_exists protocol error is raised. - */ -static inline struct zcr_extended_keyboard_v1 * -zcr_keyboard_extension_v1_get_extended_keyboard(struct zcr_keyboard_extension_v1 *zcr_keyboard_extension_v1, struct wl_keyboard *keyboard) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_keyboard_extension_v1, - ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD, &zcr_extended_keyboard_v1_interface, NULL, keyboard); - - return (struct zcr_extended_keyboard_v1 *) id; -} - -#ifndef ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -#define ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * whether a key event is handled by client or not - */ -enum zcr_extended_keyboard_v1_handled_state { - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_NOT_HANDLED = 0, - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_HANDLED = 1, -}; -#endif /* ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM */ - -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY 0 -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY 1 - - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_extended_keyboard_v1 */ -static inline void -zcr_extended_keyboard_v1_set_user_data(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_extended_keyboard_v1, user_data); -} - -/** @ingroup iface_zcr_extended_keyboard_v1 */ -static inline void * -zcr_extended_keyboard_v1_get_user_data(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -static inline uint32_t -zcr_extended_keyboard_v1_get_version(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -static inline void -zcr_extended_keyboard_v1_destroy(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_extended_keyboard_v1, - ZCR_EXTENDED_KEYBOARD_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_extended_keyboard_v1); -} - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -static inline void -zcr_extended_keyboard_v1_ack_key(struct zcr_extended_keyboard_v1 *zcr_extended_keyboard_v1, uint32_t serial, uint32_t handled) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_extended_keyboard_v1, - ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY, serial, handled); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h deleted file mode 100644 index 9eb8c2bae32..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/keyboard-extension-unstable-v1-server-protocol.h +++ /dev/null @@ -1,188 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef KEYBOARD_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H -#define KEYBOARD_EXTENSION_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_keyboard_extension_unstable_v1 The keyboard_extension_unstable_v1 protocol - * @section page_ifaces_keyboard_extension_unstable_v1 Interfaces - * - @subpage page_iface_zcr_keyboard_extension_v1 - extends wl_keyboard with ack_key events - * - @subpage page_iface_zcr_extended_keyboard_v1 - extension of wl_keyboard protocol - * @section page_copyright_keyboard_extension_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_keyboard; -struct zcr_extended_keyboard_v1; -struct zcr_keyboard_extension_v1; - -/** - * @page page_iface_zcr_keyboard_extension_v1 zcr_keyboard_extension_v1 - * @section page_iface_zcr_keyboard_extension_v1_desc Description - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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_zcr_keyboard_extension_v1_api API - * See @ref iface_zcr_keyboard_extension_v1. - */ -/** - * @defgroup iface_zcr_keyboard_extension_v1 The zcr_keyboard_extension_v1 interface - * - * Allows a wl_keyboard to send ack_key requests for each key event of - * the keyboard to the server. - * - * 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 zcr_keyboard_extension_v1_interface; -/** - * @page page_iface_zcr_extended_keyboard_v1 zcr_extended_keyboard_v1 - * @section page_iface_zcr_extended_keyboard_v1_desc Description - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - * @section page_iface_zcr_extended_keyboard_v1_api API - * See @ref iface_zcr_extended_keyboard_v1. - */ -/** - * @defgroup iface_zcr_extended_keyboard_v1 The zcr_extended_keyboard_v1 interface - * - * The zcr_extended_keyboard_v1 interface extends the wl_keyboard interface - * with requests to notify whether sent key events are handled or not by - * the client. - */ -extern const struct wl_interface zcr_extended_keyboard_v1_interface; - -#ifndef ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -#define ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM -enum zcr_keyboard_extension_v1_error { - /** - * the keyboard already has an extended_keyboard object associated - */ - ZCR_KEYBOARD_EXTENSION_V1_ERROR_EXTENDED_KEYBOARD_EXISTS = 0, -}; -#endif /* ZCR_KEYBOARD_EXTENSION_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - * @struct zcr_keyboard_extension_v1_interface - */ -struct zcr_keyboard_extension_v1_interface { - /** - * get extended_keyboard for a keyboard - * - * Create extended_keyboard object. See zcr_extended_keyboard - * interface for details. If the given wl_keyboard object already - * has a extended_keyboard object associated, the - * extended_keyboard_exists protocol error is raised. - */ - void (*get_extended_keyboard)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *keyboard); -}; - - -/** - * @ingroup iface_zcr_keyboard_extension_v1 - */ -#define ZCR_KEYBOARD_EXTENSION_V1_GET_EXTENDED_KEYBOARD_SINCE_VERSION 1 - -#ifndef ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -#define ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * whether a key event is handled by client or not - */ -enum zcr_extended_keyboard_v1_handled_state { - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_NOT_HANDLED = 0, - ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_HANDLED = 1, -}; -#endif /* ZCR_EXTENDED_KEYBOARD_V1_HANDLED_STATE_ENUM */ - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - * @struct zcr_extended_keyboard_v1_interface - */ -struct zcr_extended_keyboard_v1_interface { - /** - * destroy extended_keyboard object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * acknowledge a key event - * - * - */ - void (*ack_key)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial, - uint32_t handled); -}; - - -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_extended_keyboard_v1 - */ -#define ZCR_EXTENDED_KEYBOARD_V1_ACK_KEY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h deleted file mode 100644 index 95e6f0a0b0c..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-client-protocol.h +++ /dev/null @@ -1,652 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef LINUX_DMABUF_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define LINUX_DMABUF_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_linux_dmabuf_unstable_v1 The linux_dmabuf_unstable_v1 protocol - * @section page_ifaces_linux_dmabuf_unstable_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * @section page_copyright_linux_dmabuf_unstable_v1 Copyright - * <pre> - * - * Copyright © 2014, 2015 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_buffer; -struct zwp_linux_buffer_params_v1; -struct zwp_linux_dmabuf_v1; - -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_linux_dmabuf_v1_interface; -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can be set only once. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can be set only once. - */ -extern const struct wl_interface zwp_linux_buffer_params_v1_interface; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_listener - */ -struct zwp_linux_dmabuf_v1_listener { - /** - * supported buffer format - * - * This event advertises one buffer format that the server - * supports. All the supported formats are advertised once when the - * client binds to this interface. A roundtrip after binding - * guarantees that the client has received all supported formats. - * - * For the definition of the format codes, see the - * zwp_linux_buffer_params_v1::create request. - * - * Warning: the 'format' event is likely to be deprecated and - * replaced with the 'modifier' event introduced in - * zwp_linux_dmabuf_v1 version 3, described below. Please refrain - * from using the information received from this event. - * @param format DRM_FORMAT code - */ - void (*format)(void *data, - struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - uint32_t format); - /** - * supported buffer format modifier - * - * This event advertises the formats that the server supports, - * along with the modifiers supported for each format. All the - * supported modifiers for all the supported formats are advertised - * once when the client binds to this interface. A roundtrip after - * binding guarantees that the client has received all supported - * format-modifier pairs. - * - * For the definition of the format and modifier codes, see the - * zwp_linux_buffer_params_v1::create request. - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - * @since 3 - */ - void (*modifier)(void *data, - struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - uint32_t format, - uint32_t modifier_hi, - uint32_t modifier_lo); -}; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -static inline int -zwp_linux_dmabuf_v1_add_listener(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, - const struct zwp_linux_dmabuf_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_linux_dmabuf_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_LINUX_DMABUF_V1_DESTROY 0 -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 - -/** @ingroup iface_zwp_linux_dmabuf_v1 */ -static inline void -zwp_linux_dmabuf_v1_set_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_dmabuf_v1, user_data); -} - -/** @ingroup iface_zwp_linux_dmabuf_v1 */ -static inline void * -zwp_linux_dmabuf_v1_get_user_data(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -static inline uint32_t -zwp_linux_dmabuf_v1_get_version(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * Objects created through this interface, especially wl_buffers, will - * remain valid. - */ -static inline void -zwp_linux_dmabuf_v1_destroy(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_dmabuf_v1, - ZWP_LINUX_DMABUF_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_linux_dmabuf_v1); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * - * This temporary object is used to collect multiple dmabuf handles into - * a single batch to create a wl_buffer. It can only be used once and - * should be destroyed after a 'created' or 'failed' event has been - * received. - */ -static inline struct zwp_linux_buffer_params_v1 * -zwp_linux_dmabuf_v1_create_params(struct zwp_linux_dmabuf_v1 *zwp_linux_dmabuf_v1) -{ - struct wl_proxy *params_id; - - params_id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_linux_dmabuf_v1, - ZWP_LINUX_DMABUF_V1_CREATE_PARAMS, &zwp_linux_buffer_params_v1_interface, NULL); - - return (struct zwp_linux_buffer_params_v1 *) params_id; -} - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -enum zwp_linux_buffer_params_v1_error { - /** - * the dmabuf_batch object has already been used to create a wl_buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_listener - */ -struct zwp_linux_buffer_params_v1_listener { - /** - * buffer creation succeeded - * - * This event indicates that the attempted buffer creation was - * successful. It provides the new wl_buffer referencing the - * dmabuf(s). - * - * Upon receiving this event, the client should destroy the - * zlinux_dmabuf_params object. - * @param buffer the newly created wl_buffer - */ - void (*created)(void *data, - struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, - struct wl_buffer *buffer); - /** - * buffer creation failed - * - * This event indicates that the attempted buffer creation has - * failed. It usually means that one of the dmabuf constraints has - * not been fulfilled. - * - * Upon receiving this event, the client should destroy the - * zlinux_buffer_params object. - */ - void (*failed)(void *data, - struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1); -}; - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -static inline int -zwp_linux_buffer_params_v1_add_listener(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, - const struct zwp_linux_buffer_params_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_linux_buffer_params_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY 0 -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD 1 -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE 2 -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED 3 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 - -/** @ingroup iface_zwp_linux_buffer_params_v1 */ -static inline void -zwp_linux_buffer_params_v1_set_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_linux_buffer_params_v1, user_data); -} - -/** @ingroup iface_zwp_linux_buffer_params_v1 */ -static inline void * -zwp_linux_buffer_params_v1_get_user_data(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -static inline uint32_t -zwp_linux_buffer_params_v1_get_version(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * Cleans up the temporary data sent to the server for dmabuf-based - * wl_buffer creation. - */ -static inline void -zwp_linux_buffer_params_v1_destroy(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_linux_buffer_params_v1); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This request adds one dmabuf to the set in this - * zwp_linux_buffer_params_v1. - * - * The 64-bit unsigned value combined from modifier_hi and modifier_lo - * is the dmabuf layout modifier. DRM AddFB2 ioctl calls this the - * fb modifier, which is defined in drm_mode.h of Linux UAPI. - * This is an opaque token. Drivers use this token to express tiling, - * compression, etc. driver-specific modifications to the base format - * defined by the DRM fourcc code. - * - * This request raises the PLANE_IDX error if plane_idx is too large. - * The error PLANE_SET is raised if attempting to set a plane that - * was already set. - */ -static inline void -zwp_linux_buffer_params_v1_add(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t fd, uint32_t plane_idx, uint32_t offset, uint32_t stride, uint32_t modifier_hi, uint32_t modifier_lo) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_ADD, fd, plane_idx, offset, stride, modifier_hi, modifier_lo); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This asks for creation of a wl_buffer from the added dmabuf - * buffers. The wl_buffer is not created immediately but returned via - * the 'created' event if the dmabuf sharing succeeds. The sharing - * may fail at runtime for reasons a client cannot predict, in - * which case the 'failed' event is triggered. - * - * The 'format' argument is a DRM_FORMAT code, as defined by the - * libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the - * authoritative source on how the format codes should work. - * - * The 'flags' is a bitfield of the flags defined in enum "flags". - * 'y_invert' means the that the image needs to be y-flipped. - * - * Flag 'interlaced' means that the frame in the buffer is not - * progressive as usual, but interlaced. An interlaced buffer as - * supported here must always contain both top and bottom fields. - * The top field always begins on the first pixel row. The temporal - * ordering between the two fields is top field first, unless - * 'bottom_first' is specified. It is undefined whether 'bottom_first' - * is ignored if 'interlaced' is not set. - * - * This protocol does not convey any information about field rate, - * duration, or timing, other than the relative ordering between the - * two fields in one buffer. A compositor may have to estimate the - * intended field rate from the incoming buffer rate. It is undefined - * whether the time of receiving wl_surface.commit with a new buffer - * attached, applying the wl_surface state, wl_surface.frame callback - * trigger, presentation, or any other point in the compositor cycle - * is used to measure the frame or field times. There is no support - * for detecting missed or late frames/fields/buffers either, and - * there is no support whatsoever for cooperating with interlaced - * compositor output. - * - * The composited image quality resulting from the use of interlaced - * buffers is explicitly undefined. A compositor may use elaborate - * hardware features or software to deinterlace and create progressive - * output frames from a sequence of interlaced input buffers, or it - * may produce substandard image quality. However, compositors that - * cannot guarantee reasonable image quality in all cases are recommended - * to just reject all interlaced buffers. - * - * Any argument errors, including non-positive width or height, - * mismatch between the number of planes and the format, bad - * format, bad offset or stride, may be indicated by fatal protocol - * errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, - * OUT_OF_BOUNDS. - * - * Dmabuf import errors in the server that are not obvious client - * bugs are returned via the 'failed' event as non-fatal. This - * allows attempting dmabuf sharing and falling back in the client - * if it fails. - * - * This request can be sent only once in the object's lifetime, after - * which the only legal request is destroy. This object should be - * destroyed after issuing a 'create' request. Attempting to use this - * object after issuing 'create' raises ALREADY_USED protocol error. - * - * It is not mandatory to issue 'create'. If a client wants to - * cancel the buffer creation, it can just destroy this object. - */ -static inline void -zwp_linux_buffer_params_v1_create(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_CREATE, width, height, format, flags); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * - * This asks for immediate creation of a wl_buffer by importing the - * added dmabufs. - * - * In case of import success, no event is sent from the server, and the - * wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen fit - * by the implementation: - * - the client is terminated with one of the following fatal protocol - * errors: - * - INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, - * in case of argument errors such as mismatch between the number - * of planes and the format, bad format, non-positive width or - * height, or bad offset or stride. - * - INVALID_WL_BUFFER, in case the cause for failure is unknown or - * plaform specific. - * - the server creates an invalid wl_buffer, marks it as failed and - * sends a 'failed' event to the client. The result of using this - * invalid wl_buffer as an argument in any request by the client is - * defined by the compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys the - * same restrictions. - */ -static inline struct wl_buffer * -zwp_linux_buffer_params_v1_create_immed(struct zwp_linux_buffer_params_v1 *zwp_linux_buffer_params_v1, int32_t width, int32_t height, uint32_t format, uint32_t flags) -{ - struct wl_proxy *buffer_id; - - buffer_id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_linux_buffer_params_v1, - ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED, &wl_buffer_interface, NULL, width, height, format, flags); - - return (struct wl_buffer *) buffer_id; -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h deleted file mode 100644 index 775b18cdab3..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/linux-dmabuf-unstable-v1-server-protocol.h +++ /dev/null @@ -1,563 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef LINUX_DMABUF_UNSTABLE_V1_SERVER_PROTOCOL_H -#define LINUX_DMABUF_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_linux_dmabuf_unstable_v1 The linux_dmabuf_unstable_v1 protocol - * @section page_ifaces_linux_dmabuf_unstable_v1 Interfaces - * - @subpage page_iface_zwp_linux_dmabuf_v1 - factory for creating dmabuf-based wl_buffers - * - @subpage page_iface_zwp_linux_buffer_params_v1 - parameters for creating a dmabuf-based wl_buffer - * @section page_copyright_linux_dmabuf_unstable_v1 Copyright - * <pre> - * - * Copyright © 2014, 2015 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_buffer; -struct zwp_linux_buffer_params_v1; -struct zwp_linux_dmabuf_v1; - -/** - * @page page_iface_zwp_linux_dmabuf_v1 zwp_linux_dmabuf_v1 - * @section page_iface_zwp_linux_dmabuf_v1_desc Description - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_linux_dmabuf_v1_api API - * See @ref iface_zwp_linux_dmabuf_v1. - */ -/** - * @defgroup iface_zwp_linux_dmabuf_v1 The zwp_linux_dmabuf_v1 interface - * - * Following the interfaces from: - * https://www.khronos.org/registry/egl/extensions/EXT/EGL_EXT_image_dma_buf_import.txt - * and the Linux DRM sub-system's AddFb2 ioctl. - * - * This interface offers ways to create generic dmabuf-based - * wl_buffers. Immediately after a client binds to this interface, - * the set of supported formats and format modifiers is sent with - * 'format' and 'modifier' events. - * - * The following are required from clients: - * - * - Clients must ensure that either all data in the dma-buf is - * coherent for all subsequent read access or that coherency is - * correctly handled by the underlying kernel-side dma-buf - * implementation. - * - * - Don't make any more attachments after sending the buffer to the - * compositor. Making more attachments later increases the risk of - * the compositor not being able to use (re-import) an existing - * dmabuf-based wl_buffer. - * - * The underlying graphics stack must ensure the following: - * - * - The dmabuf file descriptors relayed to the server will stay valid - * for the whole lifetime of the wl_buffer. This means the server may - * at any time use those fds to import the dmabuf into any kernel - * sub-system that might accept it. - * - * To create a wl_buffer from one or more dmabufs, a client creates a - * zwp_linux_dmabuf_params_v1 object with a zwp_linux_dmabuf_v1.create_params - * request. All planes required by the intended format are added with - * the 'add' request. Finally, a 'create' or 'create_immed' request is - * issued, which has the following outcome depending on the import success. - * - * The 'create' request, - * - on success, triggers a 'created' event which provides the final - * wl_buffer to the client. - * - on failure, triggers a 'failed' event to convey that the server - * cannot use the dmabufs received from the client. - * - * For the 'create_immed' request, - * - on success, the server immediately imports the added dmabufs to - * create a wl_buffer. No event is sent from the server in this case. - * - on failure, the server can choose to either: - * - terminate the client by raising a fatal error. - * - mark the wl_buffer as failed, and send a 'failed' event to the - * client. If the client uses a failed wl_buffer as an argument to any - * request, the behaviour is compositor implementation-defined. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_linux_dmabuf_v1_interface; -/** - * @page page_iface_zwp_linux_buffer_params_v1 zwp_linux_buffer_params_v1 - * @section page_iface_zwp_linux_buffer_params_v1_desc Description - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can be set only once. - * @section page_iface_zwp_linux_buffer_params_v1_api API - * See @ref iface_zwp_linux_buffer_params_v1. - */ -/** - * @defgroup iface_zwp_linux_buffer_params_v1 The zwp_linux_buffer_params_v1 interface - * - * This temporary object is a collection of dmabufs and other - * parameters that together form a single logical buffer. The temporary - * object may eventually create one wl_buffer unless cancelled by - * destroying it before requesting 'create'. - * - * Single-planar formats only require one dmabuf, however - * multi-planar formats may require more than one dmabuf. For all - * formats, an 'add' request must be called once per plane (even if the - * underlying dmabuf fd is identical). - * - * You must use consecutive plane indices ('plane_idx' argument for 'add') - * from zero to the number of planes used by the drm_fourcc format code. - * All planes required by the format must be given exactly once, but can - * be given in any order. Each plane index can be set only once. - */ -extern const struct wl_interface zwp_linux_buffer_params_v1_interface; - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * @struct zwp_linux_dmabuf_v1_interface - */ -struct zwp_linux_dmabuf_v1_interface { - /** - * unbind the factory - * - * Objects created through this interface, especially wl_buffers, - * will remain valid. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a temporary object for buffer parameters - * - * This temporary object is used to collect multiple dmabuf - * handles into a single batch to create a wl_buffer. It can only - * be used once and should be destroyed after a 'created' or - * 'failed' event has been received. - * @param params_id the new temporary - */ - void (*create_params)(struct wl_client *client, - struct wl_resource *resource, - uint32_t params_id); -}; - -#define ZWP_LINUX_DMABUF_V1_FORMAT 0 -#define ZWP_LINUX_DMABUF_V1_MODIFIER 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_FORMAT_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_MODIFIER_SINCE_VERSION 3 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - */ -#define ZWP_LINUX_DMABUF_V1_CREATE_PARAMS_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an format event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - */ -static inline void -zwp_linux_dmabuf_v1_send_format(struct wl_resource *resource_, uint32_t format) -{ - wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_V1_FORMAT, format); -} - -/** - * @ingroup iface_zwp_linux_dmabuf_v1 - * Sends an modifier event to the client owning the resource. - * @param resource_ The client's resource - * @param format DRM_FORMAT code - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ -static inline void -zwp_linux_dmabuf_v1_send_modifier(struct wl_resource *resource_, uint32_t format, uint32_t modifier_hi, uint32_t modifier_lo) -{ - wl_resource_post_event(resource_, ZWP_LINUX_DMABUF_V1_MODIFIER, format, modifier_hi, modifier_lo); -} - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM -enum zwp_linux_buffer_params_v1_error { - /** - * the dmabuf_batch object has already been used to create a wl_buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ALREADY_USED = 0, - /** - * plane index out of bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_IDX = 1, - /** - * the plane index was already set - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_PLANE_SET = 2, - /** - * missing or too many planes to create a buffer - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INCOMPLETE = 3, - /** - * format not supported - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_FORMAT = 4, - /** - * invalid width or height - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_DIMENSIONS = 5, - /** - * offset + stride * height goes out of dmabuf bounds - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_OUT_OF_BOUNDS = 6, - /** - * invalid wl_buffer resulted from importing dmabufs via the create_immed request on given buffer_params - */ - ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_INVALID_WL_BUFFER = 7, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_ERROR_ENUM */ - -#ifndef ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -#define ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM -enum zwp_linux_buffer_params_v1_flags { - /** - * contents are y-inverted - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_Y_INVERT = 1, - /** - * content is interlaced - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_INTERLACED = 2, - /** - * bottom field first - */ - ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_BOTTOM_FIRST = 4, -}; -#endif /* ZWP_LINUX_BUFFER_PARAMS_V1_FLAGS_ENUM */ - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * @struct zwp_linux_buffer_params_v1_interface - */ -struct zwp_linux_buffer_params_v1_interface { - /** - * delete this object, used or not - * - * Cleans up the temporary data sent to the server for - * dmabuf-based wl_buffer creation. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * add a dmabuf to the temporary set - * - * This request adds one dmabuf to the set in this - * zwp_linux_buffer_params_v1. - * - * The 64-bit unsigned value combined from modifier_hi and - * modifier_lo is the dmabuf layout modifier. DRM AddFB2 ioctl - * calls this the fb modifier, which is defined in drm_mode.h of - * Linux UAPI. This is an opaque token. Drivers use this token to - * express tiling, compression, etc. driver-specific modifications - * to the base format defined by the DRM fourcc code. - * - * This request raises the PLANE_IDX error if plane_idx is too - * large. The error PLANE_SET is raised if attempting to set a - * plane that was already set. - * @param fd dmabuf fd - * @param plane_idx plane index - * @param offset offset in bytes - * @param stride stride in bytes - * @param modifier_hi high 32 bits of layout modifier - * @param modifier_lo low 32 bits of layout modifier - */ - void (*add)(struct wl_client *client, - struct wl_resource *resource, - int32_t fd, - uint32_t plane_idx, - uint32_t offset, - uint32_t stride, - uint32_t modifier_hi, - uint32_t modifier_lo); - /** - * create a wl_buffer from the given dmabufs - * - * This asks for creation of a wl_buffer from the added dmabuf - * buffers. The wl_buffer is not created immediately but returned - * via the 'created' event if the dmabuf sharing succeeds. The - * sharing may fail at runtime for reasons a client cannot predict, - * in which case the 'failed' event is triggered. - * - * The 'format' argument is a DRM_FORMAT code, as defined by the - * libdrm's drm_fourcc.h. The Linux kernel's DRM sub-system is the - * authoritative source on how the format codes should work. - * - * The 'flags' is a bitfield of the flags defined in enum "flags". - * 'y_invert' means the that the image needs to be y-flipped. - * - * Flag 'interlaced' means that the frame in the buffer is not - * progressive as usual, but interlaced. An interlaced buffer as - * supported here must always contain both top and bottom fields. - * The top field always begins on the first pixel row. The temporal - * ordering between the two fields is top field first, unless - * 'bottom_first' is specified. It is undefined whether - * 'bottom_first' is ignored if 'interlaced' is not set. - * - * This protocol does not convey any information about field rate, - * duration, or timing, other than the relative ordering between - * the two fields in one buffer. A compositor may have to estimate - * the intended field rate from the incoming buffer rate. It is - * undefined whether the time of receiving wl_surface.commit with a - * new buffer attached, applying the wl_surface state, - * wl_surface.frame callback trigger, presentation, or any other - * point in the compositor cycle is used to measure the frame or - * field times. There is no support for detecting missed or late - * frames/fields/buffers either, and there is no support whatsoever - * for cooperating with interlaced compositor output. - * - * The composited image quality resulting from the use of - * interlaced buffers is explicitly undefined. A compositor may use - * elaborate hardware features or software to deinterlace and - * create progressive output frames from a sequence of interlaced - * input buffers, or it may produce substandard image quality. - * However, compositors that cannot guarantee reasonable image - * quality in all cases are recommended to just reject all - * interlaced buffers. - * - * Any argument errors, including non-positive width or height, - * mismatch between the number of planes and the format, bad - * format, bad offset or stride, may be indicated by fatal protocol - * errors: INCOMPLETE, INVALID_FORMAT, INVALID_DIMENSIONS, - * OUT_OF_BOUNDS. - * - * Dmabuf import errors in the server that are not obvious client - * bugs are returned via the 'failed' event as non-fatal. This - * allows attempting dmabuf sharing and falling back in the client - * if it fails. - * - * This request can be sent only once in the object's lifetime, - * after which the only legal request is destroy. This object - * should be destroyed after issuing a 'create' request. Attempting - * to use this object after issuing 'create' raises ALREADY_USED - * protocol error. - * - * It is not mandatory to issue 'create'. If a client wants to - * cancel the buffer creation, it can just destroy this object. - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - */ - void (*create)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags); - /** - * immediately create a wl_buffer from the given dmabufs - * - * This asks for immediate creation of a wl_buffer by importing - * the added dmabufs. - * - * In case of import success, no event is sent from the server, and - * the wl_buffer is ready to be used by the client. - * - * Upon import failure, either of the following may happen, as seen - * fit by the implementation: - the client is terminated with one - * of the following fatal protocol errors: - INCOMPLETE, - * INVALID_FORMAT, INVALID_DIMENSIONS, OUT_OF_BOUNDS, in case of - * argument errors such as mismatch between the number of planes - * and the format, bad format, non-positive width or height, or bad - * offset or stride. - INVALID_WL_BUFFER, in case the cause for - * failure is unknown or plaform specific. - the server creates an - * invalid wl_buffer, marks it as failed and sends a 'failed' event - * to the client. The result of using this invalid wl_buffer as an - * argument in any request by the client is defined by the - * compositor implementation. - * - * This takes the same arguments as a 'create' request, and obeys - * the same restrictions. - * @param buffer_id id for the newly created wl_buffer - * @param width base plane width in pixels - * @param height base plane height in pixels - * @param format DRM_FORMAT code - * @param flags see enum flags - * @since 2 - */ - void (*create_immed)(struct wl_client *client, - struct wl_resource *resource, - uint32_t buffer_id, - int32_t width, - int32_t height, - uint32_t format, - uint32_t flags); -}; - -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED 0 -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATED_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_FAILED_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_ADD_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - */ -#define ZWP_LINUX_BUFFER_PARAMS_V1_CREATE_IMMED_SINCE_VERSION 2 - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an created event to the client owning the resource. - * @param resource_ The client's resource - * @param buffer the newly created wl_buffer - */ -static inline void -zwp_linux_buffer_params_v1_send_created(struct wl_resource *resource_, struct wl_resource *buffer) -{ - wl_resource_post_event(resource_, ZWP_LINUX_BUFFER_PARAMS_V1_CREATED, buffer); -} - -/** - * @ingroup iface_zwp_linux_buffer_params_v1 - * Sends an failed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zwp_linux_buffer_params_v1_send_failed(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZWP_LINUX_BUFFER_PARAMS_V1_FAILED); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h deleted file mode 100644 index 415dd83001a..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-client-protocol.h +++ /dev/null @@ -1,484 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define POINTER_GESTURES_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 protocol - * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces - * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures - * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object - * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object - */ -struct wl_pointer; -struct wl_surface; -struct zwp_pointer_gesture_pinch_v1; -struct zwp_pointer_gesture_swipe_v1; -struct zwp_pointer_gestures_v1; - -/** - * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 - * @section page_iface_zwp_pointer_gestures_v1_desc Description - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_pointer_gestures_v1_api API - * See @ref iface_zwp_pointer_gestures_v1. - */ -/** - * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_pointer_gestures_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 - * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_swipe_v1_api API - * See @ref iface_zwp_pointer_gesture_swipe_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 interface - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 - * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_pinch_v1_api API - * See @ref iface_zwp_pointer_gesture_pinch_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 interface - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; - -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0 -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1 - - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void -zwp_pointer_gestures_v1_set_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gestures_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void * -zwp_pointer_gestures_v1_get_user_data(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -static inline uint32_t -zwp_pointer_gestures_v1_get_version(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -/** @ingroup iface_zwp_pointer_gestures_v1 */ -static inline void -zwp_pointer_gestures_v1_destroy(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1) -{ - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gestures_v1); -} - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * - * Create a swipe gesture object. See the - * wl_pointer_gesture_swipe interface for details. - */ -static inline struct zwp_pointer_gesture_swipe_v1 * -zwp_pointer_gestures_v1_get_swipe_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_gestures_v1, - ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, &zwp_pointer_gesture_swipe_v1_interface, NULL, pointer); - - return (struct zwp_pointer_gesture_swipe_v1 *) id; -} - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * - * Create a pinch gesture object. See the - * wl_pointer_gesture_pinch interface for details. - */ -static inline struct zwp_pointer_gesture_pinch_v1 * -zwp_pointer_gestures_v1_get_pinch_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zwp_pointer_gestures_v1, - ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, &zwp_pointer_gesture_pinch_v1_interface, NULL, pointer); - - return (struct zwp_pointer_gesture_pinch_v1 *) id; -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * @struct zwp_pointer_gesture_swipe_v1_listener - */ -struct zwp_pointer_gesture_swipe_v1_listener { - /** - * multi-finger swipe begin - * - * This event is sent when a multi-finger swipe gesture is - * detected on the device. - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ - void (*begin)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - uint32_t fingers); - /** - * multi-finger swipe motion - * - * This event is sent when a multi-finger swipe gesture changes - * the position of the logical center. - * - * The dx and dy coordinates are relative coordinates of the - * logical center of the gesture compared to the previous event. - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - */ - void (*update)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t time, - wl_fixed_t dx, - wl_fixed_t dy); - /** - * multi-finger swipe end - * - * This event is sent when a multi-finger swipe gesture ceases to - * be valid. This may happen when one or more fingers are lifted or - * the gesture is cancelled. - * - * When a gesture is cancelled, the client should undo state - * changes caused by this gesture. What causes a gesture to be - * cancelled is implementation-dependent. - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ - void (*end)(void *data, - struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - uint32_t serial, - uint32_t time, - int32_t cancelled); -}; - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -static inline int -zwp_pointer_gesture_swipe_v1_add_listener(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, - const struct zwp_pointer_gesture_swipe_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -static inline void -zwp_pointer_gesture_swipe_v1_set_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gesture_swipe_v1 */ -static inline void * -zwp_pointer_gesture_swipe_v1_get_user_data(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -static inline uint32_t -zwp_pointer_gesture_swipe_v1_get_version(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -static inline void -zwp_pointer_gesture_swipe_v1_destroy(struct zwp_pointer_gesture_swipe_v1 *zwp_pointer_gesture_swipe_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_pointer_gesture_swipe_v1, - ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gesture_swipe_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * @struct zwp_pointer_gesture_pinch_v1_listener - */ -struct zwp_pointer_gesture_pinch_v1_listener { - /** - * multi-finger pinch begin - * - * This event is sent when a multi-finger pinch gesture is - * detected on the device. - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ - void (*begin)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t serial, - uint32_t time, - struct wl_surface *surface, - uint32_t fingers); - /** - * multi-finger pinch motion - * - * This event is sent when a multi-finger pinch gesture changes - * the position of the logical center, the rotation or the relative - * scale. - * - * The dx and dy coordinates are relative coordinates in the - * surface coordinate space of the logical center of the gesture. - * - * The scale factor is an absolute scale compared to the - * pointer_gesture_pinch.begin event, e.g. a scale of 2 means the - * fingers are now twice as far apart as on - * pointer_gesture_pinch.begin. - * - * The rotation is the relative angle in degrees clockwise compared - * to the previous pointer_gesture_pinch.begin or - * pointer_gesture_pinch.update event. - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - * @param scale scale relative to the initial finger position - * @param rotation angle in degrees cw relative to the previous event - */ - void (*update)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t time, - wl_fixed_t dx, - wl_fixed_t dy, - wl_fixed_t scale, - wl_fixed_t rotation); - /** - * multi-finger pinch end - * - * This event is sent when a multi-finger pinch gesture ceases to - * be valid. This may happen when one or more fingers are lifted or - * the gesture is cancelled. - * - * When a gesture is cancelled, the client should undo state - * changes caused by this gesture. What causes a gesture to be - * cancelled is implementation-dependent. - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ - void (*end)(void *data, - struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - uint32_t serial, - uint32_t time, - int32_t cancelled); -}; - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -static inline int -zwp_pointer_gesture_pinch_v1_add_listener(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, - const struct zwp_pointer_gesture_pinch_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, - (void (**)(void)) listener, data); -} - -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY 0 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -static inline void -zwp_pointer_gesture_pinch_v1_set_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, user_data); -} - -/** @ingroup iface_zwp_pointer_gesture_pinch_v1 */ -static inline void * -zwp_pointer_gesture_pinch_v1_get_user_data(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -static inline uint32_t -zwp_pointer_gesture_pinch_v1_get_version(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -static inline void -zwp_pointer_gesture_pinch_v1_destroy(struct zwp_pointer_gesture_pinch_v1 *zwp_pointer_gesture_pinch_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zwp_pointer_gesture_pinch_v1, - ZWP_POINTER_GESTURE_PINCH_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zwp_pointer_gesture_pinch_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h deleted file mode 100644 index 51e5e79cf67..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/pointer-gestures-unstable-v1-server-protocol.h +++ /dev/null @@ -1,352 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H -#define POINTER_GESTURES_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_pointer_gestures_unstable_v1 The pointer_gestures_unstable_v1 protocol - * @section page_ifaces_pointer_gestures_unstable_v1 Interfaces - * - @subpage page_iface_zwp_pointer_gestures_v1 - touchpad gestures - * - @subpage page_iface_zwp_pointer_gesture_swipe_v1 - a swipe gesture object - * - @subpage page_iface_zwp_pointer_gesture_pinch_v1 - a pinch gesture object - */ -struct wl_pointer; -struct wl_surface; -struct zwp_pointer_gesture_pinch_v1; -struct zwp_pointer_gesture_swipe_v1; -struct zwp_pointer_gestures_v1; - -/** - * @page page_iface_zwp_pointer_gestures_v1 zwp_pointer_gestures_v1 - * @section page_iface_zwp_pointer_gestures_v1_desc Description - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_pointer_gestures_v1_api API - * See @ref iface_zwp_pointer_gestures_v1. - */ -/** - * @defgroup iface_zwp_pointer_gestures_v1 The zwp_pointer_gestures_v1 interface - * - * A global interface to provide semantic touchpad gestures for a given - * pointer. - * - * Two gestures are currently supported: swipe and zoom/rotate. - * All gestures follow a three-stage cycle: begin, update, end and - * are identified by a unique id. - * - * 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 interface version bump. - * Backward incompatible changes are done by bumping the version number in - * the protocol and interface 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_pointer_gestures_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_swipe_v1 zwp_pointer_gesture_swipe_v1 - * @section page_iface_zwp_pointer_gesture_swipe_v1_desc Description - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_swipe_v1_api API - * See @ref iface_zwp_pointer_gesture_swipe_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_swipe_v1 The zwp_pointer_gesture_swipe_v1 interface - * - * A swipe gesture object notifies a client about a multi-finger swipe - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving in the - * same direction but once initiated the direction may change. - * The precise conditions of when such a gesture is detected are - * implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface; -/** - * @page page_iface_zwp_pointer_gesture_pinch_v1 zwp_pointer_gesture_pinch_v1 - * @section page_iface_zwp_pointer_gesture_pinch_v1_desc Description - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - * @section page_iface_zwp_pointer_gesture_pinch_v1_api API - * See @ref iface_zwp_pointer_gesture_pinch_v1. - */ -/** - * @defgroup iface_zwp_pointer_gesture_pinch_v1 The zwp_pointer_gesture_pinch_v1 interface - * - * A pinch gesture object notifies a client about a multi-finger pinch - * gesture detected on an indirect input device such as a touchpad. - * The gesture is usually initiated by multiple fingers moving towards - * each other or away from each other, or by two or more fingers rotating - * around a logical center of gravity. The precise conditions of when - * such a gesture is detected are implementation-dependent. - * - * A gesture consists of three stages: begin, update (optional) and end. - * There cannot be multiple simultaneous pinch or swipe gestures on a - * same pointer/seat, how compositors prevent these situations is - * implementation-dependent. - * - * A gesture may be cancelled by the compositor or the hardware. - * Clients should not consider performing permanent or irreversible - * actions until the end of a gesture has been received. - */ -extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface; - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - * @struct zwp_pointer_gestures_v1_interface - */ -struct zwp_pointer_gestures_v1_interface { - /** - * get swipe gesture - * - * Create a swipe gesture object. See the - * wl_pointer_gesture_swipe interface for details. - */ - void (*get_swipe_gesture)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); - /** - * get pinch gesture - * - * Create a pinch gesture object. See the - * wl_pointer_gesture_pinch interface for details. - */ - void (*get_pinch_gesture)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *pointer); -}; - - -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gestures_v1 - */ -#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * @struct zwp_pointer_gesture_swipe_v1_interface - */ -struct zwp_pointer_gesture_swipe_v1_interface { - /** - * destroy the pointer swipe gesture object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN 0 -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE 1 -#define ZWP_POINTER_GESTURE_SWIPE_V1_END 2 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - */ -#define ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an begin event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_BEGIN, serial, time, surface, fingers); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_UPDATE, time, dx, dy); -} - -/** - * @ingroup iface_zwp_pointer_gesture_swipe_v1 - * Sends an end event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ -static inline void -zwp_pointer_gesture_swipe_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_SWIPE_V1_END, serial, time, cancelled); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * @struct zwp_pointer_gesture_pinch_v1_interface - */ -struct zwp_pointer_gesture_pinch_v1_interface { - /** - * destroy the pinch gesture object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN 0 -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE 1 -#define ZWP_POINTER_GESTURE_PINCH_V1_END 2 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_BEGIN_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_UPDATE_SINCE_VERSION 1 -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_END_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - */ -#define ZWP_POINTER_GESTURE_PINCH_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an begin event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param fingers number of fingers - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_begin(struct wl_resource *resource_, uint32_t serial, uint32_t time, struct wl_resource *surface, uint32_t fingers) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_BEGIN, serial, time, surface, fingers); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param dx delta x coordinate in surface coordinate space - * @param dy delta y coordinate in surface coordinate space - * @param scale scale relative to the initial finger position - * @param rotation angle in degrees cw relative to the previous event - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_update(struct wl_resource *resource_, uint32_t time, wl_fixed_t dx, wl_fixed_t dy, wl_fixed_t scale, wl_fixed_t rotation) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_UPDATE, time, dx, dy, scale, rotation); -} - -/** - * @ingroup iface_zwp_pointer_gesture_pinch_v1 - * Sends an end event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param cancelled 1 if the gesture was cancelled, 0 otherwise - */ -static inline void -zwp_pointer_gesture_pinch_v1_send_end(struct wl_resource *resource_, uint32_t serial, uint32_t time, int32_t cancelled) -{ - wl_resource_post_event(resource_, ZWP_POINTER_GESTURE_PINCH_V1_END, serial, time, cancelled); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h deleted file mode 100644 index 23c2ae8cd4c..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-client-protocol.h +++ /dev/null @@ -1,497 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef PRESENTATION_TIME_CLIENT_PROTOCOL_H -#define PRESENTATION_TIME_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_presentation_time The presentation_time protocol - * @section page_ifaces_presentation_time Interfaces - * - @subpage page_iface_wp_presentation - timed presentation related wl_surface requests - * - @subpage page_iface_wp_presentation_feedback - presentation time feedback event - * @section page_copyright_presentation_time Copyright - * <pre> - * - * Copyright © 2013-2014 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_surface; -struct wp_presentation; -struct wp_presentation_feedback; - -/** - * @page page_iface_wp_presentation wp_presentation - * @section page_iface_wp_presentation_desc Description - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - * @section page_iface_wp_presentation_api API - * See @ref iface_wp_presentation. - */ -/** - * @defgroup iface_wp_presentation The wp_presentation interface - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - */ -extern const struct wl_interface wp_presentation_interface; -/** - * @page page_iface_wp_presentation_feedback wp_presentation_feedback - * @section page_iface_wp_presentation_feedback_desc Description - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - * @section page_iface_wp_presentation_feedback_api API - * See @ref iface_wp_presentation_feedback. - */ -/** - * @defgroup iface_wp_presentation_feedback The wp_presentation_feedback interface - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - */ -extern const struct wl_interface wp_presentation_feedback_interface; - -#ifndef WP_PRESENTATION_ERROR_ENUM -#define WP_PRESENTATION_ERROR_ENUM -/** - * @ingroup iface_wp_presentation - * fatal presentation errors - * - * These fatal protocol errors may be emitted in response to - * illegal presentation requests. - */ -enum wp_presentation_error { - /** - * invalid value in tv_nsec - */ - WP_PRESENTATION_ERROR_INVALID_TIMESTAMP = 0, - /** - * invalid flag - */ - WP_PRESENTATION_ERROR_INVALID_FLAG = 1, -}; -#endif /* WP_PRESENTATION_ERROR_ENUM */ - -/** - * @ingroup iface_wp_presentation - * @struct wp_presentation_listener - */ -struct wp_presentation_listener { - /** - * clock ID for timestamps - * - * This event tells the client in which clock domain the - * compositor interprets the timestamps used by the presentation - * extension. This clock is called the presentation clock. - * - * The compositor sends this event when the client binds to the - * presentation interface. The presentation clock does not change - * during the lifetime of the client connection. - * - * The clock identifier is platform dependent. On Linux/glibc, the - * identifier value is one of the clockid_t values accepted by - * clock_gettime(). clock_gettime() is defined by POSIX.1-2001. - * - * Timestamps in this clock domain are expressed as tv_sec_hi, - * tv_sec_lo, tv_nsec triples, each component being an unsigned - * 32-bit value. Whole seconds are in tv_sec which is a 64-bit - * value combined from tv_sec_hi and tv_sec_lo, and the additional - * fractional part in tv_nsec as nanoseconds. Hence, for valid - * timestamps tv_nsec must be in [0, 999999999]. - * - * Note that clock_id applies only to the presentation clock, and - * implies nothing about e.g. the timestamps used in the Wayland - * core protocol input events. - * - * Compositors should prefer a clock which does not jump and is not - * slewed e.g. by NTP. The absolute value of the clock is - * irrelevant. Precision of one millisecond or better is - * recommended. Clients must be able to query the current clock - * value directly, not by asking the compositor. - * @param clk_id platform clock identifier - */ - void (*clock_id)(void *data, - struct wp_presentation *wp_presentation, - uint32_t clk_id); -}; - -/** - * @ingroup iface_wp_presentation - */ -static inline int -wp_presentation_add_listener(struct wp_presentation *wp_presentation, - const struct wp_presentation_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wp_presentation, - (void (**)(void)) listener, data); -} - -#define WP_PRESENTATION_DESTROY 0 -#define WP_PRESENTATION_FEEDBACK 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_CLOCK_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_FEEDBACK_SINCE_VERSION 1 - -/** @ingroup iface_wp_presentation */ -static inline void -wp_presentation_set_user_data(struct wp_presentation *wp_presentation, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_presentation, user_data); -} - -/** @ingroup iface_wp_presentation */ -static inline void * -wp_presentation_get_user_data(struct wp_presentation *wp_presentation) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_presentation); -} - -static inline uint32_t -wp_presentation_get_version(struct wp_presentation *wp_presentation) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_presentation); -} - -/** - * @ingroup iface_wp_presentation - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ -static inline void -wp_presentation_destroy(struct wp_presentation *wp_presentation) -{ - wl_proxy_marshal((struct wl_proxy *) wp_presentation, - WP_PRESENTATION_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_presentation); -} - -/** - * @ingroup iface_wp_presentation - * - * Request presentation feedback for the current content submission - * on the given surface. This creates a new presentation_feedback - * object, which will deliver the feedback information once. If - * multiple presentation_feedback objects are created for the same - * submission, they will all deliver the same information. - * - * For details on what information is returned, see the - * presentation_feedback interface. - */ -static inline struct wp_presentation_feedback * -wp_presentation_feedback(struct wp_presentation *wp_presentation, struct wl_surface *surface) -{ - struct wl_proxy *callback; - - callback = wl_proxy_marshal_constructor((struct wl_proxy *) wp_presentation, - WP_PRESENTATION_FEEDBACK, &wp_presentation_feedback_interface, surface, NULL); - - return (struct wp_presentation_feedback *) callback; -} - -#ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM -#define WP_PRESENTATION_FEEDBACK_KIND_ENUM -/** - * @ingroup iface_wp_presentation_feedback - * bitmask of flags in presented event - * - * These flags provide information about how the presentation of - * the related content update was done. The intent is to help - * clients assess the reliability of the feedback and the visual - * quality with respect to possible tearing and timings. The - * flags are: - * - * VSYNC: - * The presentation was synchronized to the "vertical retrace" by - * the display hardware such that tearing does not happen. - * Relying on user space scheduling is not acceptable for this - * flag. If presentation is done by a copy to the active - * frontbuffer, then it must guarantee that tearing cannot - * happen. - * - * HW_CLOCK: - * The display hardware provided measurements that the hardware - * driver converted into a presentation timestamp. Sampling a - * clock in user space is not acceptable for this flag. - * - * HW_COMPLETION: - * The display hardware signalled that it started using the new - * image content. The opposite of this is e.g. a timer being used - * to guess when the display hardware has switched to the new - * image content. - * - * ZERO_COPY: - * The presentation of this update was done zero-copy. This means - * the buffer from the client was given to display hardware as - * is, without copying it. Compositing with OpenGL counts as - * copying, even if textured directly from the client buffer. - * Possible zero-copy cases include direct scanout of a - * fullscreen surface and a surface on a hardware overlay. - */ -enum wp_presentation_feedback_kind { - /** - * presentation was vsync'd - */ - WP_PRESENTATION_FEEDBACK_KIND_VSYNC = 0x1, - /** - * hardware provided the presentation timestamp - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK = 0x2, - /** - * hardware signalled the start of the presentation - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION = 0x4, - /** - * presentation was done zero-copy - */ - WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY = 0x8, -}; -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM */ - -/** - * @ingroup iface_wp_presentation_feedback - * @struct wp_presentation_feedback_listener - */ -struct wp_presentation_feedback_listener { - /** - * presentation synchronized to this output - * - * As presentation can be synchronized to only one output at a - * time, this event tells which output it was. This event is only - * sent prior to the presented event. - * - * As clients may bind to the same global wl_output multiple times, - * this event is sent for each bound instance that matches the - * synchronized output. If a client has not bound to the right - * wl_output global at all, this event is not sent. - * @param output presentation output - */ - void (*sync_output)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback, - struct wl_output *output); - /** - * the content update was displayed - * - * The associated content update was displayed to the user at the - * indicated time (tv_sec_hi/lo, tv_nsec). For the interpretation - * of the timestamp, see presentation.clock_id event. - * - * The timestamp corresponds to the time when the content update - * turned into light the first time on the surface's main output. - * Compositors may approximate this from the framebuffer flip - * completion events from the system, and the latency of the - * physical display path if known. - * - * This event is preceded by all related sync_output events telling - * which output's refresh cycle the feedback corresponds to, i.e. - * the main output for the surface. Compositors are recommended to - * choose the output containing the largest part of the wl_surface, - * or keeping the output they previously chose. Having a stable - * presentation output association helps clients predict future - * output refreshes (vblank). - * - * The 'refresh' argument gives the compositor's prediction of how - * many nanoseconds after tv_sec, tv_nsec the very next output - * refresh may occur. This is to further aid clients in predicting - * future refreshes, i.e., estimating the timestamps targeting the - * next few vblanks. If such prediction cannot usefully be done, - * the argument is zero. - * - * If the output does not have a constant refresh rate, explicit - * video mode switches excluded, then the refresh argument must be - * zero. - * - * The 64-bit value combined from seq_hi and seq_lo is the value of - * the output's vertical retrace counter when the content update - * was first scanned out to the display. This value must be - * compatible with the definition of MSC in GLX_OML_sync_control - * specification. Note, that if the display path has a non-zero - * latency, the time instant specified by this counter may differ - * from the timestamp's. - * - * If the output does not have a concept of vertical retrace or a - * refresh cycle, or the output device is self-refreshing without a - * way to query the refresh count, then the arguments seq_hi and - * seq_lo must be zero. - * @param tv_sec_hi high 32 bits of the seconds part of the presentation timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the presentation timestamp - * @param tv_nsec nanoseconds part of the presentation timestamp - * @param refresh nanoseconds till next refresh - * @param seq_hi high 32 bits of refresh counter - * @param seq_lo low 32 bits of refresh counter - * @param flags combination of 'kind' values - */ - void (*presented)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback, - uint32_t tv_sec_hi, - uint32_t tv_sec_lo, - uint32_t tv_nsec, - uint32_t refresh, - uint32_t seq_hi, - uint32_t seq_lo, - uint32_t flags); - /** - * the content update was not displayed - * - * The content update was never displayed to the user. - */ - void (*discarded)(void *data, - struct wp_presentation_feedback *wp_presentation_feedback); -}; - -/** - * @ingroup iface_wp_presentation_feedback - */ -static inline int -wp_presentation_feedback_add_listener(struct wp_presentation_feedback *wp_presentation_feedback, - const struct wp_presentation_feedback_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) wp_presentation_feedback, - (void (**)(void)) listener, data); -} - -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_PRESENTED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_DISCARDED_SINCE_VERSION 1 - - -/** @ingroup iface_wp_presentation_feedback */ -static inline void -wp_presentation_feedback_set_user_data(struct wp_presentation_feedback *wp_presentation_feedback, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_presentation_feedback, user_data); -} - -/** @ingroup iface_wp_presentation_feedback */ -static inline void * -wp_presentation_feedback_get_user_data(struct wp_presentation_feedback *wp_presentation_feedback) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_presentation_feedback); -} - -static inline uint32_t -wp_presentation_feedback_get_version(struct wp_presentation_feedback *wp_presentation_feedback) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_presentation_feedback); -} - -/** @ingroup iface_wp_presentation_feedback */ -static inline void -wp_presentation_feedback_destroy(struct wp_presentation_feedback *wp_presentation_feedback) -{ - wl_proxy_destroy((struct wl_proxy *) wp_presentation_feedback); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h deleted file mode 100644 index d2e24ddf07d..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/presentation-time-server-protocol.h +++ /dev/null @@ -1,349 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef PRESENTATION_TIME_SERVER_PROTOCOL_H -#define PRESENTATION_TIME_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_presentation_time The presentation_time protocol - * @section page_ifaces_presentation_time Interfaces - * - @subpage page_iface_wp_presentation - timed presentation related wl_surface requests - * - @subpage page_iface_wp_presentation_feedback - presentation time feedback event - * @section page_copyright_presentation_time Copyright - * <pre> - * - * Copyright © 2013-2014 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_surface; -struct wp_presentation; -struct wp_presentation_feedback; - -/** - * @page page_iface_wp_presentation wp_presentation - * @section page_iface_wp_presentation_desc Description - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - * @section page_iface_wp_presentation_api API - * See @ref iface_wp_presentation. - */ -/** - * @defgroup iface_wp_presentation The wp_presentation interface - * - * - * - * - * The main feature of this interface is accurate presentation - * timing feedback to ensure smooth video playback while maintaining - * audio/video synchronization. Some features use the concept of a - * presentation clock, which is defined in the - * presentation.clock_id event. - * - * A content update for a wl_surface is submitted by a - * wl_surface.commit request. Request 'feedback' associates with - * the wl_surface.commit and provides feedback on the content - * update, particularly the final realized presentation time. - * - * - * - * When the final realized presentation time is available, e.g. - * after a framebuffer flip completes, the requested - * presentation_feedback.presented events are sent. The final - * presentation time can differ from the compositor's predicted - * display update time and the update's target time, especially - * when the compositor misses its target vertical blanking period. - */ -extern const struct wl_interface wp_presentation_interface; -/** - * @page page_iface_wp_presentation_feedback wp_presentation_feedback - * @section page_iface_wp_presentation_feedback_desc Description - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - * @section page_iface_wp_presentation_feedback_api API - * See @ref iface_wp_presentation_feedback. - */ -/** - * @defgroup iface_wp_presentation_feedback The wp_presentation_feedback interface - * - * A presentation_feedback object returns an indication that a - * wl_surface content update has become visible to the user. - * One object corresponds to one content update submission - * (wl_surface.commit). There are two possible outcomes: the - * content update is presented to the user, and a presentation - * timestamp delivered; or, the user did not see the content - * update because it was superseded or its surface destroyed, - * and the content update is discarded. - * - * Once a presentation_feedback object has delivered a 'presented' - * or 'discarded' event it is automatically destroyed. - */ -extern const struct wl_interface wp_presentation_feedback_interface; - -#ifndef WP_PRESENTATION_ERROR_ENUM -#define WP_PRESENTATION_ERROR_ENUM -/** - * @ingroup iface_wp_presentation - * fatal presentation errors - * - * These fatal protocol errors may be emitted in response to - * illegal presentation requests. - */ -enum wp_presentation_error { - /** - * invalid value in tv_nsec - */ - WP_PRESENTATION_ERROR_INVALID_TIMESTAMP = 0, - /** - * invalid flag - */ - WP_PRESENTATION_ERROR_INVALID_FLAG = 1, -}; -#endif /* WP_PRESENTATION_ERROR_ENUM */ - -/** - * @ingroup iface_wp_presentation - * @struct wp_presentation_interface - */ -struct wp_presentation_interface { - /** - * unbind from the presentation interface - * - * Informs the server that the client will no longer be using - * this protocol object. Existing objects created by this object - * are not affected. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * request presentation feedback information - * - * Request presentation feedback for the current content - * submission on the given surface. This creates a new - * presentation_feedback object, which will deliver the feedback - * information once. If multiple presentation_feedback objects are - * created for the same submission, they will all deliver the same - * information. - * - * For details on what information is returned, see the - * presentation_feedback interface. - * @param surface target surface - * @param callback new feedback object - */ - void (*feedback)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *surface, - uint32_t callback); -}; - -#define WP_PRESENTATION_CLOCK_ID 0 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_CLOCK_ID_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation - */ -#define WP_PRESENTATION_FEEDBACK_SINCE_VERSION 1 - -/** - * @ingroup iface_wp_presentation - * Sends an clock_id event to the client owning the resource. - * @param resource_ The client's resource - * @param clk_id platform clock identifier - */ -static inline void -wp_presentation_send_clock_id(struct wl_resource *resource_, uint32_t clk_id) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_CLOCK_ID, clk_id); -} - -#ifndef WP_PRESENTATION_FEEDBACK_KIND_ENUM -#define WP_PRESENTATION_FEEDBACK_KIND_ENUM -/** - * @ingroup iface_wp_presentation_feedback - * bitmask of flags in presented event - * - * These flags provide information about how the presentation of - * the related content update was done. The intent is to help - * clients assess the reliability of the feedback and the visual - * quality with respect to possible tearing and timings. The - * flags are: - * - * VSYNC: - * The presentation was synchronized to the "vertical retrace" by - * the display hardware such that tearing does not happen. - * Relying on user space scheduling is not acceptable for this - * flag. If presentation is done by a copy to the active - * frontbuffer, then it must guarantee that tearing cannot - * happen. - * - * HW_CLOCK: - * The display hardware provided measurements that the hardware - * driver converted into a presentation timestamp. Sampling a - * clock in user space is not acceptable for this flag. - * - * HW_COMPLETION: - * The display hardware signalled that it started using the new - * image content. The opposite of this is e.g. a timer being used - * to guess when the display hardware has switched to the new - * image content. - * - * ZERO_COPY: - * The presentation of this update was done zero-copy. This means - * the buffer from the client was given to display hardware as - * is, without copying it. Compositing with OpenGL counts as - * copying, even if textured directly from the client buffer. - * Possible zero-copy cases include direct scanout of a - * fullscreen surface and a surface on a hardware overlay. - */ -enum wp_presentation_feedback_kind { - /** - * presentation was vsync'd - */ - WP_PRESENTATION_FEEDBACK_KIND_VSYNC = 0x1, - /** - * hardware provided the presentation timestamp - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_CLOCK = 0x2, - /** - * hardware signalled the start of the presentation - */ - WP_PRESENTATION_FEEDBACK_KIND_HW_COMPLETION = 0x4, - /** - * presentation was done zero-copy - */ - WP_PRESENTATION_FEEDBACK_KIND_ZERO_COPY = 0x8, -}; -#endif /* WP_PRESENTATION_FEEDBACK_KIND_ENUM */ - -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT 0 -#define WP_PRESENTATION_FEEDBACK_PRESENTED 1 -#define WP_PRESENTATION_FEEDBACK_DISCARDED 2 - -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_PRESENTED_SINCE_VERSION 1 -/** - * @ingroup iface_wp_presentation_feedback - */ -#define WP_PRESENTATION_FEEDBACK_DISCARDED_SINCE_VERSION 1 - - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an sync_output event to the client owning the resource. - * @param resource_ The client's resource - * @param output presentation output - */ -static inline void -wp_presentation_feedback_send_sync_output(struct wl_resource *resource_, struct wl_resource *output) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_SYNC_OUTPUT, output); -} - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an presented event to the client owning the resource. - * @param resource_ The client's resource - * @param tv_sec_hi high 32 bits of the seconds part of the presentation timestamp - * @param tv_sec_lo low 32 bits of the seconds part of the presentation timestamp - * @param tv_nsec nanoseconds part of the presentation timestamp - * @param refresh nanoseconds till next refresh - * @param seq_hi high 32 bits of refresh counter - * @param seq_lo low 32 bits of refresh counter - * @param flags combination of 'kind' values - */ -static inline void -wp_presentation_feedback_send_presented(struct wl_resource *resource_, uint32_t tv_sec_hi, uint32_t tv_sec_lo, uint32_t tv_nsec, uint32_t refresh, uint32_t seq_hi, uint32_t seq_lo, uint32_t flags) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_PRESENTED, tv_sec_hi, tv_sec_lo, tv_nsec, refresh, seq_hi, seq_lo, flags); -} - -/** - * @ingroup iface_wp_presentation_feedback - * Sends an discarded event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -wp_presentation_feedback_send_discarded(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, WP_PRESENTATION_FEEDBACK_DISCARDED); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h deleted file mode 100644 index fd17c6e9ea7..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-client-protocol.h +++ /dev/null @@ -1,1923 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef REMOTE_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define REMOTE_SHELL_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_remote_shell_unstable_v1 The remote_shell_unstable_v1 protocol - * Create remote desktop-style surfaces - * - * @section page_desc_remote_shell_unstable_v1 Description - * - * remote_shell allows clients to turn a wl_surface into a "real window" - * which can be stacked and activated by the user. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_remote_shell_unstable_v1 Interfaces - * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell - * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window - * - @subpage page_iface_zcr_notification_surface_v1 - A notification window - * - @subpage page_iface_zcr_input_method_surface_v1 - An input method window - * @section page_copyright_remote_shell_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_input_method_surface_v1; -struct zcr_notification_surface_v1; -struct zcr_remote_shell_v1; -struct zcr_remote_surface_v1; - -/** - * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 - * @section page_iface_zcr_remote_shell_v1_desc Description - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - * @section page_iface_zcr_remote_shell_v1_api API - * See @ref iface_zcr_remote_shell_v1. - */ -/** - * @defgroup iface_zcr_remote_shell_v1 The zcr_remote_shell_v1 interface - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - */ -extern const struct wl_interface zcr_remote_shell_v1_interface; -/** - * @page page_iface_zcr_remote_surface_v1 zcr_remote_surface_v1 - * @section page_iface_zcr_remote_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - * @section page_iface_zcr_remote_surface_v1_api API - * See @ref iface_zcr_remote_surface_v1. - */ -/** - * @defgroup iface_zcr_remote_surface_v1 The zcr_remote_surface_v1 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - */ -extern const struct wl_interface zcr_remote_surface_v1_interface; -/** - * @page page_iface_zcr_notification_surface_v1 zcr_notification_surface_v1 - * @section page_iface_zcr_notification_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - * @section page_iface_zcr_notification_surface_v1_api API - * See @ref iface_zcr_notification_surface_v1. - */ -/** - * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - */ -extern const struct wl_interface zcr_notification_surface_v1_interface; -/** - * @page page_iface_zcr_input_method_surface_v1 zcr_input_method_surface_v1 - * @section page_iface_zcr_input_method_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host IME contents. - * @section page_iface_zcr_input_method_surface_v1_api API - * See @ref iface_zcr_input_method_surface_v1. - */ -/** - * @defgroup iface_zcr_input_method_surface_v1 The zcr_input_method_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host IME contents. - */ -extern const struct wl_interface zcr_input_method_surface_v1_interface; - -#ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -#define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * containers for remote surfaces - * - * Determine how a remote surface should be stacked relative to other - * shell surfaces. - */ -enum zcr_remote_shell_v1_container { - /** - * default container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1, - /** - * system modal container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -#define ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * state types for remote surfaces - * - * Defines common show states for shell surfaces. - */ -enum zcr_remote_shell_v1_state_type { - /** - * normal window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1, - /** - * minimized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2, - /** - * maximized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3, - /** - * fullscreen window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4, - /** - * pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5, - /** - * trusted pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6, - /** - * moving window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MOVING = 7, - /** - * resizing window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RESIZING = 8, - /** - * left snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_LEFT_SNAPPED = 9, - /** - * right snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RIGHT_SNAPPED = 10, - /** - * pip window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PIP = 11, -}; -#endif /* ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_ERROR_ENUM -#define ZCR_REMOTE_SHELL_V1_ERROR_ENUM -enum zcr_remote_shell_v1_error { - /** - * given wl_surface has another role - */ - ZCR_REMOTE_SHELL_V1_ERROR_ROLE = 0, - /** - * invalid notification key - */ - ZCR_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1, -}; -#endif /* ZCR_REMOTE_SHELL_V1_ERROR_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -#define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * the layout mode - * - * Determine how a client should layout surfaces. - */ -enum zcr_remote_shell_v1_layout_mode { - /** - * multiple windows - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1, - /** - * restricted mode for tablet - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */ - -/** - * @ingroup iface_zcr_remote_shell_v1 - * @struct zcr_remote_shell_v1_listener - */ -struct zcr_remote_shell_v1_listener { - /** - * activated surface changed - * - * Notifies client that the activated surface changed. - */ - void (*activated)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - struct wl_surface *gained_active, - struct wl_surface *lost_active); - /** - * suggests a re-configuration of remote shell - * - * [Deprecated] Suggests a re-configuration of remote shell. - */ - void (*configuration_changed)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - int32_t width, - int32_t height, - int32_t transform, - wl_fixed_t scale_factor, - int32_t work_area_inset_left, - int32_t work_area_inset_top, - int32_t work_area_inset_right, - int32_t work_area_inset_bottom, - uint32_t layout_mode); - /** - * area of remote shell - * - * Defines an area of the remote shell used for layout. Each - * series of "workspace" events must be terminated by a "configure" - * event. - * @param is_internal 1 if screen is built-in - * @since 5 - */ - void (*workspace)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - uint32_t id_hi, - uint32_t id_lo, - int32_t x, - int32_t y, - int32_t width, - int32_t height, - int32_t inset_left, - int32_t inset_top, - int32_t inset_right, - int32_t inset_bottom, - int32_t transform, - wl_fixed_t scale_factor, - uint32_t is_internal); - /** - * suggests configuration of remote shell - * - * Suggests a new configuration of the remote shell. Preceded by - * a series of "workspace" events. - * @since 5 - */ - void (*configure)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - uint32_t layout_mode); - /** - * initialize scale configuration - * - * Sends the default device scale factor. - * @param scale DP to pixels ratio, in 8.24 fixed point format - * @since 8 - */ - void (*default_device_scale_factor)(void *data, - struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - int32_t scale); -}; - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -static inline int -zcr_remote_shell_v1_add_listener(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, - const struct zcr_remote_shell_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_shell_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_REMOTE_SHELL_V1_DESTROY 0 -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE 1 -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE 2 -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE 3 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_WORKSPACE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR_SINCE_VERSION 8 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE_SINCE_VERSION 17 - -/** @ingroup iface_zcr_remote_shell_v1 */ -static inline void -zcr_remote_shell_v1_set_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_shell_v1, user_data); -} - -/** @ingroup iface_zcr_remote_shell_v1 */ -static inline void * -zcr_remote_shell_v1_get_user_data(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_shell_v1); -} - -static inline uint32_t -zcr_remote_shell_v1_get_version(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_remote_shell_v1); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Destroy this remote_shell object. - * - * Destroying a bound remote_shell object while there are surfaces - * still alive created by this remote_shell object instance is illegal - * and will result in a protocol error. - */ -static inline void -zcr_remote_shell_v1_destroy(struct zcr_remote_shell_v1 *zcr_remote_shell_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_remote_shell_v1); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * This creates an remote_surface for the given surface and gives it the - * remote_surface role. A wl_surface can only be given a remote_surface - * role once. If get_remote_surface is called with a wl_surface that - * already has an active remote_surface associated with it, or if it had - * any other role, an error is raised. - * - * See the documentation of remote_surface for more details about what an - * remote_surface is and how it is used. - */ -static inline struct zcr_remote_surface_v1 * -zcr_remote_shell_v1_get_remote_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, uint32_t container) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE, &zcr_remote_surface_v1_interface, NULL, surface, container); - - return (struct zcr_remote_surface_v1 *) id; -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Creates a notification_surface for the given surface, gives it the - * notification_surface role and associated it with a notification id. - */ -static inline struct zcr_notification_surface_v1 * -zcr_remote_shell_v1_get_notification_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface, const char *notification_key) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE, &zcr_notification_surface_v1_interface, NULL, surface, notification_key); - - return (struct zcr_notification_surface_v1 *) id; -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * - * Creates an input_method_surface for the given surface, gives it - * the input_method_surface role. - */ -static inline struct zcr_input_method_surface_v1 * -zcr_remote_shell_v1_get_input_method_surface(struct zcr_remote_shell_v1 *zcr_remote_shell_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_remote_shell_v1, - ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE, &zcr_input_method_surface_v1_interface, NULL, surface); - - return (struct zcr_input_method_surface_v1 *) id; -} - -#ifndef ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -#define ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * systemui visibility behavior - * - * Determine the visibility behavior of the system UI. - */ -enum zcr_remote_surface_v1_systemui_visibility_state { - /** - * system ui is visible - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_VISIBLE = 1, - /** - * system ui autohides and is not sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY = 2, - /** - * system ui autohides and is sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_STICKY = 3, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window orientation - * - * The orientation of the window. - */ -enum zcr_remote_surface_v1_orientation { - /** - * portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_PORTRAIT = 1, - /** - * landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LANDSCAPE = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window type - * - * The type of the window. - */ -enum zcr_remote_surface_v1_window_type { - /** - * normal app window - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_NORMAL = 1, - /** - * window is treated as systemui - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_SYSTEM_UI = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * bounds_change_reason - * - * Specifies the cause of the window bounds change event. - */ -enum zcr_remote_surface_v1_bounds_change_reason { - /** - * the window is being moved by drag operation - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_MOVE = 1, - /** - * the window is being resized by drag operation. - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE = 2, - /** - * the window is resized to left snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_LEFT = 3, - /** - * the window is resized to right snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_RIGHT = 4, - /** - * the window bounds is moved due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE = 5, - /** - * the window bounds is reiszed due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE = 6, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -#define ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * resize direction - * - * The resize direction for drag operation - */ -enum zcr_remote_surface_v1_resize_direction { - /** - * move only, no resize - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_NONE = 0, - /** - * resize to the left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_LEFT = 1, - /** - * resize to the top left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPLEFT = 2, - /** - * resize to the top - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOP = 3, - /** - * resize to the top right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPRIGHT = 4, - /** - * resize to the right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_RIGHT = 5, - /** - * resize to the buttom right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMRIGHT = 6, - /** - * resize to the bottom - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOM = 7, - /** - * resize to the bottom left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMLEFT = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame types - * - * Frame type that can be used to decorate a surface. - */ -enum zcr_remote_surface_v1_frame_type { - /** - * no frame - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NONE = 0, - /** - * caption with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NORMAL = 1, - /** - * shadow only - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_SHADOW = 2, - /** - * autohide frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_AUTOHIDE = 3, - /** - * overlay frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_OVERLAY = 4, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame button types - * - * The mask that represents buttons on frame. - */ -enum zcr_remote_surface_v1_frame_button_type { - /** - * a button to naviate backwards - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_BACK = 1, - /** - * a button to minimize the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MINIMIZE = 2, - /** - * a button to maximize or restore - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MAXIMIZE_RESTORE = 4, - /** - * a button to activate application's menu - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MENU = 8, - /** - * a button to close the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CLOSE = 16, - /** - * a mask to turn the maximize_restore button to zoom button - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ZOOM = 32, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * orientation lock request for remote surfaces - * - * Defines orientation request when a remote surface is in foreground. - */ -enum zcr_remote_surface_v1_orientation_lock { - /** - * no orientation lock - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_NONE = 1, - /** - * primary or secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT = 2, - /** - * primary or secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE = 3, - /** - * keep current orientation - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_CURRENT = 4, - /** - * primary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_PRIMARY = 5, - /** - * primary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_PRIMARY = 6, - /** - * secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_SECONDARY = 7, - /** - * secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_SECONDARY = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM */ - -/** - * @ingroup iface_zcr_remote_surface_v1 - * @struct zcr_remote_surface_v1_listener - */ -struct zcr_remote_surface_v1_listener { - /** - * surface wants to be closed - * - * The close event is sent by the compositor when the user wants - * the surface to be closed. This should be equivalent to the user - * clicking the close button in client-side decorations, if your - * application has any... - * - * This is only a request that the user intends to close your - * window. The client may choose to ignore this request, or show a - * dialog to ask the user to save their data... - */ - void (*close)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1); - /** - * surface state type changed - * - * [Deprecated] The state_type_changed event is sent by the - * compositor when the surface state changed. - * - * This is an event to notify that the window state changed in - * compositor. The state change may be triggered by a client's - * request, or some user action directly handled by the compositor. - * The client may choose to ignore this event. - */ - void (*state_type_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t state_type); - /** - * suggest a surface change - * - * The configure event asks the client to change surface state. - * - * The client must apply the origin offset to window positions in - * set_window_geometry requests. - * - * The states listed in the event are state_type values, and might - * change due to a client request or an event directly handled by - * the compositor. - * - * Clients should arrange their surface for the new state, and then - * send an ack_configure request with the serial sent in this - * configure event at some point before committing the new surface. - * - * If the client receives multiple configure events before it can - * respond to one, it is free to discard all but the last event it - * received. - * @since 5 - */ - void (*configure)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t origin_offset_x, - int32_t origin_offset_y, - struct wl_array *states, - uint32_t serial); - /** - * announce window geometry commit - * - * Notify the client of committed window geometry. - * - * The compositor sends this event when it commits window geometry. - * The client may use this information to convert coordinates of - * input events using the latest committed geometry. - * @since 9 - */ - void (*window_geometry_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * The compositor requested to change the bounds - * - * The compositor requested to change its bounds. - * "bounds_change_reason" specifies the cause of the bounds change. - * The client may apply the different move/resize strategy - * depending on the reason. - * - * "display_id_hi", "display_id_lo" specifies in which workspace - * the surface should live in. - * - * The client responds with set_window_geometry request, with the - * bounds it is resized to (this may be different from the bounds - * requested). - * - * The client may ignore move request depending on the state, e.g, - * if it becomes resizable or other constrants. - * @since 10 - */ - void (*bounds_changed)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t workspace_id_hi, - uint32_t workspace_id_lo, - int32_t x, - int32_t y, - int32_t width, - int32_t height, - uint32_t bounds_change_reason); - /** - * Notifies that a drag to move/resize started. - * - * Notifies a client that the compositor started drag operation. - * "direction" specifies which direction it is being resized. - * "none" direction means just move but not resize. - * - * This will be followed by series of the "bounds_changed" event - * with "drag_resize" or "drag_move" reasons to update the window - * bounds druing the drag operation. - * @since 10 - */ - void (*drag_started)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - uint32_t direction); - /** - * Notifies that a drag operation has finished. - * - * Called when the drag operation is finished. "x" and "y" - * specifies the position of the pointer device used to drag. - * "canceled" is true if the drag operation is aborted during drag - * (e.g. by capture change or user action.) - * @param canceled true if the operation was canceled - * @since 10 - */ - void (*drag_finished)(void *data, - struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - int32_t x, - int32_t y, - int32_t canceled); -}; - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -static inline int -zcr_remote_surface_v1_add_listener(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, - const struct zcr_remote_surface_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_remote_surface_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_REMOTE_SURFACE_V1_DESTROY 0 -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID 1 -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY 2 -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE 3 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW 4 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY 5 -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE 6 -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET 7 -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE 8 -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE 9 -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE 10 -#define ZCR_REMOTE_SURFACE_V1_RESTORE 11 -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN 12 -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN 13 -#define ZCR_REMOTE_SURFACE_V1_PIN 14 -#define ZCR_REMOTE_SURFACE_V1_UNPIN 15 -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL 16 -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL 17 -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW 18 -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY 19 -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP 20 -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP 21 -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE 22 -#define ZCR_REMOTE_SURFACE_V1_MOVE 23 -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION 24 -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE 25 -#define ZCR_REMOTE_SURFACE_V1_RESIZE 26 -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET 27 -#define ZCR_REMOTE_SURFACE_V1_START_MOVE 28 -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE 29 -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE 30 -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE 31 -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE 32 -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT 33 -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT 34 -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE 35 -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME 36 -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS 37 -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE 38 -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK 39 -#define ZCR_REMOTE_SURFACE_V1_PIP 40 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED_SINCE_VERSION 10 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESTORE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNPIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY_SINCE_VERSION 3 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MOVE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_SINCE_VERSION 6 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE_SINCE_VERSION 7 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESIZE_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_MOVE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE_SINCE_VERSION 12 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK_SINCE_VERSION 14 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIP_SINCE_VERSION 15 - -/** @ingroup iface_zcr_remote_surface_v1 */ -static inline void -zcr_remote_surface_v1_set_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_remote_surface_v1, user_data); -} - -/** @ingroup iface_zcr_remote_surface_v1 */ -static inline void * -zcr_remote_surface_v1_get_user_data(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_remote_surface_v1); -} - -static inline uint32_t -zcr_remote_surface_v1_get_version(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_remote_surface_v1); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state will be lost. - */ -static inline void -zcr_remote_surface_v1_destroy(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_remote_surface_v1); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set an application identifier for the surface. - */ -static inline void -zcr_remote_surface_v1_set_app_id(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * The window geometry of a window is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the output. This - * updates dynamically on every commit. - * - * The arguments are given in the output coordinate space. - * - * The width and height must be greater than zero. - */ -static inline void -zcr_remote_surface_v1_set_window_geometry(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a scale factor that will be applied to surface and all descendants. - */ -static inline void -zcr_remote_surface_v1_set_scale(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t scale) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SCALE, scale); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a rectangular - * shadow. The compositor may choose to ignore this request. - * - * The arguments are given in the output coordinate space and specifies - * the inner bounds of the shadow. - * - * The arguments are given in the output coordinate space. - * Specifying zero width and height will disable the shadow. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Suggests the window's background opacity when the shadow is requested. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_shadow_background_opacity(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, wl_fixed_t opacity) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY, opacity); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -zcr_remote_surface_v1_set_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_TITLE, title); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set distance from the top of the surface to the contents. - * - * This distance typically represents the size of the window caption. - */ -static inline void -zcr_remote_surface_v1_set_top_inset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Make the surface active and bring it to the front. - */ -static inline void -zcr_remote_surface_v1_activate(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_ACTIVATE, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is maximized. The window geometry will be updated - * to whatever the compositor finds appropriate for a maximized window. - * - * This is only a request that the window should be maximized. The - * compositor may choose to ignore this request. The client should - * listen to set_maximized events to determine if the window was - * maximized or not. - */ -static inline void -zcr_remote_surface_v1_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is minimized. - * - * This is only a request that the window should be minimized. The - * compositor may choose to ignore this request. The client should - * listen to set_minimized events to determine if the window was - * minimized or not. - */ -static inline void -zcr_remote_surface_v1_minimize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MINIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is restored. This restores the window geometry - * to what it was before the window was minimized, maximized or made - * fullscreen. - * - * This is only a request that the window should be restored. The - * compositor may choose to ignore this request. The client should - * listen to unset_maximized, unset_minimize and unset_fullscreen - * events to determine if the window was restored or not. - */ -static inline void -zcr_remote_surface_v1_restore(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_RESTORE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made fullscreen. - * - * This is only a request that the window should be made fullscreen. - * The compositor may choose to ignore this request. The client should - * listen to set_fullscreen events to determine if the window was - * made fullscreen or not. - */ -static inline void -zcr_remote_surface_v1_fullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_FULLSCREEN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made unfullscreen. - * - * This is only a request that the window should be made unfullscreen. - * The compositor may choose to ignore this request. The client should - * listen to unset_fullscreen events to determine if the window was - * made unfullscreen or not. - */ -static inline void -zcr_remote_surface_v1_unfullscreen(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is pinned. - * - * This is only a request that the window should be pinned. - * The compositor may choose to ignore this request. The client should - * listen to state_changed events to determine if the window was - * pinned or not. If trusted flag is non-zero, the app can prevent users - * from exiting the pinned mode. - */ -static inline void -zcr_remote_surface_v1_pin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t trusted) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_PIN, trusted); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is unpinned. - * - * This is only a request that the window should be unpinned. - * The compositor may choose to ignore this request. The client should - * listen to unset_pinned events to determine if the window was - * unpinned or not. - */ -static inline void -zcr_remote_surface_v1_unpin(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNPIN); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Suggests a surface should become system modal. - */ -static inline void -zcr_remote_surface_v1_set_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Suggests a surface should become non system modal. - */ -static inline void -zcr_remote_surface_v1_unset_system_modal(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a rectangular - * shadow. The compositor may choose to ignore this request. - * - * The arguments are given in the remote surface coordinate space and - * specifies inner bounds of the shadow. Specifying zero width and height - * will disable the shadow. - */ -static inline void -zcr_remote_surface_v1_set_rectangular_surface_shadow(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Requests how the surface will change the visibility of the system UI when it is made active. - */ -static inline void -zcr_remote_surface_v1_set_systemui_visibility(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visibility) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY, visibility); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made to be always on top. - * - * This is only a request that the window should be always on top. - * The compositor may choose to ignore this request. - * - */ -static inline void -zcr_remote_surface_v1_set_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is made to be not always on top. - * - * This is only a request that the window should be not always on top. - * The compositor may choose to ignore this request. - */ -static inline void -zcr_remote_surface_v1_unset_always_on_top(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client - * must make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, the compositor might use this information during display - * configuration to change its coordinate space for set_window_geometry - * requests only when the client has switched to the new coordinate space. - * - * If the client receives multiple configure events before it - * can respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending - * an ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before committing, but - * only the last request sent before a commit indicates which configure - * event the client really is responding to. - */ -static inline void -zcr_remote_surface_v1_ack_configure(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Start an interactive, user-driven move of the surface. - * - * The compositor responds to this request with a configure event that - * transitions to the "moving" state. The client must only initiate motion - * after acknowledging the state change. The compositor can assume that - * subsequent set_window_geometry requests are position updates until the - * next state transition is acknowledged. - * - * The compositor may ignore move requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_MOVE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set an orientation for the surface. - */ -static inline void -zcr_remote_surface_v1_set_orientation(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t orientation) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION, orientation); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set the type of window. This is only a hint to the compositor and the - * compositor is free to ignore it. - */ -static inline void -zcr_remote_surface_v1_set_window_type(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE, type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * [Deprecated] Start an interactive, user-driven resize of the surface. - * - * The compositor responds to this request with a configure event that - * transitions to the "resizing" state. The client must only initiate - * resizing after acknowledging the state change. The compositor can assume - * that subsequent set_window_geometry requests are resizes until the next - * state transition is acknowledged. - * - * The compositor may ignore resize requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_RESIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Expand input region of surface with resize outset. - * - * The compositor clips the input region of each surface to its bounds, - * unless the client requests a resize outset. In that case, the input - * region of the root surface is expanded to allow for some leeway around - * visible bounds when starting a user-driven resize. - */ -static inline void -zcr_remote_surface_v1_set_resize_outset(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t outset) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET, outset); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request an interactive, user-driven move of the surface. "x" - * and "y" specifies the starting point of the pointer device - * that initiated the move. - * - * The compositor responds to this request with a drag_started - * event with "none" direction. Please see drag_started event - * for more details. - * - * The compositor may ignore move requests depending on the state of the - * surface, e.g. fullscreen or maximized. - */ -static inline void -zcr_remote_surface_v1_start_move(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_START_MOVE, x, y); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface can be in maximzied state. - */ -static inline void -zcr_remote_surface_v1_set_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface can not be in maximzied state. - */ -static inline void -zcr_remote_surface_v1_unset_can_maximize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a minimum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - */ -static inline void -zcr_remote_surface_v1_set_min_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Set a maximum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * Setting the same size as minimum size makes the surface - * unresizable. - */ -static inline void -zcr_remote_surface_v1_set_max_size(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is snapped to left. - */ -static inline void -zcr_remote_surface_v1_set_snapped_to_left(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is snapped to right. - */ -static inline void -zcr_remote_surface_v1_set_snapped_to_right(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request to start an interactive, user-driven resize of the surface. - * "x" and "y" specifies the starting point of the pointer device - * that initiated the reize. - * - * The compositor responds to this request with a "drag_started" - * event, followed by "bounds_changed" events, and ends the - * resize operation with a "drag_finhsed" event. The compositor - * determines the new bounds using the resize_direction and the - * pointer event location. - * - * The compositor may ignore resize requests depending on the state of the - * surface, e.g. fullscreen or maximized, or no drag event is in pregress. - */ -static inline void -zcr_remote_surface_v1_start_resize(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t resize_direction, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_START_RESIZE, resize_direction, x, y); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Enables compositor side frame decoration. |type| - * specifies the type of frame to use for the surface. - */ -static inline void -zcr_remote_surface_v1_set_frame(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t type) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_FRAME, type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Updates the frame's button state. |visible_buttons| and |enabled_buttons| - * are the union of button mask defined in |frame_button_type| enum. - * - * The mask present in |enabled_buttons| but not in |visible_buttons| will - * be ignored. - */ -static inline void -zcr_remote_surface_v1_set_frame_buttons(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t visible_buttons, uint32_t enabled_buttons) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS, visible_buttons, enabled_buttons); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * The extra informational string about the surface. This can be - * used to show the debug information in the title bar, or log - * messages. - * - * This is different from "set_title" which is used to identify - * the surface. - * - * The string must be encoded in UTF-8. - */ -static inline void -zcr_remote_surface_v1_set_extra_title(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, const char *extra_title) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE, extra_title); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request a specific orientation behavior when this surface is in foreground. - */ -static inline void -zcr_remote_surface_v1_set_orientation_lock(struct zcr_remote_surface_v1 *zcr_remote_surface_v1, uint32_t orientation_lock) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK, orientation_lock); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * - * Request that surface is set to Picture-in-Picture (PIP). - */ -static inline void -zcr_remote_surface_v1_pip(struct zcr_remote_surface_v1 *zcr_remote_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_remote_surface_v1, - ZCR_REMOTE_SURFACE_V1_PIP); -} - -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY 0 -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID 1 - - -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID_SINCE_VERSION 16 - -/** @ingroup iface_zcr_notification_surface_v1 */ -static inline void -zcr_notification_surface_v1_set_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_notification_surface_v1, user_data); -} - -/** @ingroup iface_zcr_notification_surface_v1 */ -static inline void * -zcr_notification_surface_v1_get_user_data(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_notification_surface_v1); -} - -static inline uint32_t -zcr_notification_surface_v1_get_version(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_notification_surface_v1); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * - * Unmap and destroy the notification surface. - */ -static inline void -zcr_notification_surface_v1_destroy(struct zcr_notification_surface_v1 *zcr_notification_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_notification_surface_v1, - ZCR_NOTIFICATION_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_notification_surface_v1); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * - * Set an application identifier for the notification surface. - */ -static inline void -zcr_notification_surface_v1_set_app_id(struct zcr_notification_surface_v1 *zcr_notification_surface_v1, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_notification_surface_v1, - ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID, app_id); -} - -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY 0 - - -/** - * @ingroup iface_zcr_input_method_surface_v1 - */ -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_input_method_surface_v1 */ -static inline void -zcr_input_method_surface_v1_set_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_input_method_surface_v1, user_data); -} - -/** @ingroup iface_zcr_input_method_surface_v1 */ -static inline void * -zcr_input_method_surface_v1_get_user_data(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_input_method_surface_v1); -} - -static inline uint32_t -zcr_input_method_surface_v1_get_version(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_input_method_surface_v1); -} - -/** - * @ingroup iface_zcr_input_method_surface_v1 - * - * Unmap and destroy the input mtehod surface. - */ -static inline void -zcr_input_method_surface_v1_destroy(struct zcr_input_method_surface_v1 *zcr_input_method_surface_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_input_method_surface_v1, - ZCR_INPUT_METHOD_SURFACE_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_input_method_surface_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h deleted file mode 100644 index 555b6a34ab4..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/remote-shell-unstable-v1-server-protocol.h +++ /dev/null @@ -1,1573 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H -#define REMOTE_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_remote_shell_unstable_v1 The remote_shell_unstable_v1 protocol - * Create remote desktop-style surfaces - * - * @section page_desc_remote_shell_unstable_v1 Description - * - * remote_shell allows clients to turn a wl_surface into a "real window" - * which can be stacked and activated by the user. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_remote_shell_unstable_v1 Interfaces - * - @subpage page_iface_zcr_remote_shell_v1 - remote_shell - * - @subpage page_iface_zcr_remote_surface_v1 - A desktop window - * - @subpage page_iface_zcr_notification_surface_v1 - A notification window - * - @subpage page_iface_zcr_input_method_surface_v1 - An input method window - * @section page_copyright_remote_shell_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_input_method_surface_v1; -struct zcr_notification_surface_v1; -struct zcr_remote_shell_v1; -struct zcr_remote_surface_v1; - -/** - * @page page_iface_zcr_remote_shell_v1 zcr_remote_shell_v1 - * @section page_iface_zcr_remote_shell_v1_desc Description - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - * @section page_iface_zcr_remote_shell_v1_api API - * See @ref iface_zcr_remote_shell_v1. - */ -/** - * @defgroup iface_zcr_remote_shell_v1 The zcr_remote_shell_v1 interface - * - * The global interface that allows clients to turn a wl_surface into a - * "real window" which is remotely managed but can be stacked, activated - * and made fullscreen by the user. - */ -extern const struct wl_interface zcr_remote_shell_v1_interface; -/** - * @page page_iface_zcr_remote_surface_v1 zcr_remote_surface_v1 - * @section page_iface_zcr_remote_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - * @section page_iface_zcr_remote_surface_v1_api API - * See @ref iface_zcr_remote_surface_v1. - */ -/** - * @defgroup iface_zcr_remote_surface_v1 The zcr_remote_surface_v1 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface - * and allows for remotely managed windows. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like app id and geometry. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the remote_surface state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both an remote_surface state and a buffer. - */ -extern const struct wl_interface zcr_remote_surface_v1_interface; -/** - * @page page_iface_zcr_notification_surface_v1 zcr_notification_surface_v1 - * @section page_iface_zcr_notification_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - * @section page_iface_zcr_notification_surface_v1_api API - * See @ref iface_zcr_notification_surface_v1. - */ -/** - * @defgroup iface_zcr_notification_surface_v1 The zcr_notification_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host - * notification contents. - */ -extern const struct wl_interface zcr_notification_surface_v1_interface; -/** - * @page page_iface_zcr_input_method_surface_v1 zcr_input_method_surface_v1 - * @section page_iface_zcr_input_method_surface_v1_desc Description - * - * An interface that may be implemented by a wl_surface to host IME contents. - * @section page_iface_zcr_input_method_surface_v1_api API - * See @ref iface_zcr_input_method_surface_v1. - */ -/** - * @defgroup iface_zcr_input_method_surface_v1 The zcr_input_method_surface_v1 interface - * - * An interface that may be implemented by a wl_surface to host IME contents. - */ -extern const struct wl_interface zcr_input_method_surface_v1_interface; - -#ifndef ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -#define ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * containers for remote surfaces - * - * Determine how a remote surface should be stacked relative to other - * shell surfaces. - */ -enum zcr_remote_shell_v1_container { - /** - * default container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_DEFAULT = 1, - /** - * system modal container - */ - ZCR_REMOTE_SHELL_V1_CONTAINER_OVERLAY = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_CONTAINER_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -#define ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * state types for remote surfaces - * - * Defines common show states for shell surfaces. - */ -enum zcr_remote_shell_v1_state_type { - /** - * normal window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_NORMAL = 1, - /** - * minimized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MINIMIZED = 2, - /** - * maximized window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MAXIMIZED = 3, - /** - * fullscreen window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_FULLSCREEN = 4, - /** - * pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PINNED = 5, - /** - * trusted pinned window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_TRUSTED_PINNED = 6, - /** - * moving window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_MOVING = 7, - /** - * resizing window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RESIZING = 8, - /** - * left snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_LEFT_SNAPPED = 9, - /** - * right snapped window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_RIGHT_SNAPPED = 10, - /** - * pip window state - */ - ZCR_REMOTE_SHELL_V1_STATE_TYPE_PIP = 11, -}; -#endif /* ZCR_REMOTE_SHELL_V1_STATE_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_ERROR_ENUM -#define ZCR_REMOTE_SHELL_V1_ERROR_ENUM -enum zcr_remote_shell_v1_error { - /** - * given wl_surface has another role - */ - ZCR_REMOTE_SHELL_V1_ERROR_ROLE = 0, - /** - * invalid notification key - */ - ZCR_REMOTE_SHELL_V1_ERROR_INVALID_NOTIFICATION_KEY = 1, -}; -#endif /* ZCR_REMOTE_SHELL_V1_ERROR_ENUM */ - -#ifndef ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -#define ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM -/** - * @ingroup iface_zcr_remote_shell_v1 - * the layout mode - * - * Determine how a client should layout surfaces. - */ -enum zcr_remote_shell_v1_layout_mode { - /** - * multiple windows - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_WINDOWED = 1, - /** - * restricted mode for tablet - */ - ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_TABLET = 2, -}; -#endif /* ZCR_REMOTE_SHELL_V1_LAYOUT_MODE_ENUM */ - -/** - * @ingroup iface_zcr_remote_shell_v1 - * @struct zcr_remote_shell_v1_interface - */ -struct zcr_remote_shell_v1_interface { - /** - * destroy remote_shell - * - * Destroy this remote_shell object. - * - * Destroying a bound remote_shell object while there are surfaces - * still alive created by this remote_shell object instance is - * illegal and will result in a protocol error. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a remote shell surface from a surface - * - * This creates an remote_surface for the given surface and gives - * it the remote_surface role. A wl_surface can only be given a - * remote_surface role once. If get_remote_surface is called with a - * wl_surface that already has an active remote_surface associated - * with it, or if it had any other role, an error is raised. - * - * See the documentation of remote_surface for more details about - * what an remote_surface is and how it is used. - */ - void (*get_remote_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - uint32_t container); - /** - * create a notification surface from a surface - * - * Creates a notification_surface for the given surface, gives it - * the notification_surface role and associated it with a - * notification id. - */ - void (*get_notification_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - const char *notification_key); - /** - * Create a input method surface from a surface - * - * Creates an input_method_surface for the given surface, gives - * it the input_method_surface role. - * @since 17 - */ - void (*get_input_method_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - -#define ZCR_REMOTE_SHELL_V1_ACTIVATED 0 -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED 1 -#define ZCR_REMOTE_SHELL_V1_WORKSPACE 2 -#define ZCR_REMOTE_SHELL_V1_CONFIGURE 3 -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR 4 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_ACTIVATED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_WORKSPACE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR_SINCE_VERSION 8 - -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_REMOTE_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_NOTIFICATION_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_shell_v1 - */ -#define ZCR_REMOTE_SHELL_V1_GET_INPUT_METHOD_SURFACE_SINCE_VERSION 17 - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an activated event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_activated(struct wl_resource *resource_, struct wl_resource *gained_active, struct wl_resource *lost_active) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_ACTIVATED, gained_active, lost_active); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an configuration_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_configuration_changed(struct wl_resource *resource_, int32_t width, int32_t height, int32_t transform, wl_fixed_t scale_factor, int32_t work_area_inset_left, int32_t work_area_inset_top, int32_t work_area_inset_right, int32_t work_area_inset_bottom, uint32_t layout_mode) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_CONFIGURATION_CHANGED, width, height, transform, scale_factor, work_area_inset_left, work_area_inset_top, work_area_inset_right, work_area_inset_bottom, layout_mode); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an workspace event to the client owning the resource. - * @param resource_ The client's resource - * @param is_internal 1 if screen is built-in - */ -static inline void -zcr_remote_shell_v1_send_workspace(struct wl_resource *resource_, uint32_t id_hi, uint32_t id_lo, int32_t x, int32_t y, int32_t width, int32_t height, int32_t inset_left, int32_t inset_top, int32_t inset_right, int32_t inset_bottom, int32_t transform, wl_fixed_t scale_factor, uint32_t is_internal) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_WORKSPACE, id_hi, id_lo, x, y, width, height, inset_left, inset_top, inset_right, inset_bottom, transform, scale_factor, is_internal); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_shell_v1_send_configure(struct wl_resource *resource_, uint32_t layout_mode) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_CONFIGURE, layout_mode); -} - -/** - * @ingroup iface_zcr_remote_shell_v1 - * Sends an default_device_scale_factor event to the client owning the resource. - * @param resource_ The client's resource - * @param scale DP to pixels ratio, in 8.24 fixed point format - */ -static inline void -zcr_remote_shell_v1_send_default_device_scale_factor(struct wl_resource *resource_, int32_t scale) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SHELL_V1_DEFAULT_DEVICE_SCALE_FACTOR, scale); -} - -#ifndef ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -#define ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * systemui visibility behavior - * - * Determine the visibility behavior of the system UI. - */ -enum zcr_remote_surface_v1_systemui_visibility_state { - /** - * system ui is visible - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_VISIBLE = 1, - /** - * system ui autohides and is not sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_NON_STICKY = 2, - /** - * system ui autohides and is sticky - */ - ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_AUTOHIDE_STICKY = 3, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_SYSTEMUI_VISIBILITY_STATE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window orientation - * - * The orientation of the window. - */ -enum zcr_remote_surface_v1_orientation { - /** - * portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_PORTRAIT = 1, - /** - * landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LANDSCAPE = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * window type - * - * The type of the window. - */ -enum zcr_remote_surface_v1_window_type { - /** - * normal app window - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_NORMAL = 1, - /** - * window is treated as systemui - */ - ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_SYSTEM_UI = 2, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_WINDOW_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * bounds_change_reason - * - * Specifies the cause of the window bounds change event. - */ -enum zcr_remote_surface_v1_bounds_change_reason { - /** - * the window is being moved by drag operation - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_MOVE = 1, - /** - * the window is being resized by drag operation. - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_DRAG_RESIZE = 2, - /** - * the window is resized to left snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_LEFT = 3, - /** - * the window is resized to right snapped state - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_SNAP_TO_RIGHT = 4, - /** - * the window bounds is moved due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_MOVE = 5, - /** - * the window bounds is reiszed due to other WM operations - */ - ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_RESIZE = 6, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGE_REASON_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -#define ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * resize direction - * - * The resize direction for drag operation - */ -enum zcr_remote_surface_v1_resize_direction { - /** - * move only, no resize - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_NONE = 0, - /** - * resize to the left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_LEFT = 1, - /** - * resize to the top left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPLEFT = 2, - /** - * resize to the top - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOP = 3, - /** - * resize to the top right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_TOPRIGHT = 4, - /** - * resize to the right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_RIGHT = 5, - /** - * resize to the buttom right - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMRIGHT = 6, - /** - * resize to the bottom - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOM = 7, - /** - * resize to the bottom left - */ - ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_BOTTOMLEFT = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_RESIZE_DIRECTION_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame types - * - * Frame type that can be used to decorate a surface. - */ -enum zcr_remote_surface_v1_frame_type { - /** - * no frame - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NONE = 0, - /** - * caption with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_NORMAL = 1, - /** - * shadow only - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_SHADOW = 2, - /** - * autohide frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_AUTOHIDE = 3, - /** - * overlay frame with shadow - */ - ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_OVERLAY = 4, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -#define ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * frame button types - * - * The mask that represents buttons on frame. - */ -enum zcr_remote_surface_v1_frame_button_type { - /** - * a button to naviate backwards - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_BACK = 1, - /** - * a button to minimize the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MINIMIZE = 2, - /** - * a button to maximize or restore - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MAXIMIZE_RESTORE = 4, - /** - * a button to activate application's menu - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_MENU = 8, - /** - * a button to close the window - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_CLOSE = 16, - /** - * a mask to turn the maximize_restore button to zoom button - */ - ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ZOOM = 32, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_FRAME_BUTTON_TYPE_ENUM */ - -#ifndef ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -#define ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM -/** - * @ingroup iface_zcr_remote_surface_v1 - * orientation lock request for remote surfaces - * - * Defines orientation request when a remote surface is in foreground. - */ -enum zcr_remote_surface_v1_orientation_lock { - /** - * no orientation lock - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_NONE = 1, - /** - * primary or secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT = 2, - /** - * primary or secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE = 3, - /** - * keep current orientation - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_CURRENT = 4, - /** - * primary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_PRIMARY = 5, - /** - * primary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_PRIMARY = 6, - /** - * secondary portrait - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_PORTRAIT_SECONDARY = 7, - /** - * secondary landscape - */ - ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_LANDSCAPE_SECONDARY = 8, -}; -#endif /* ZCR_REMOTE_SURFACE_V1_ORIENTATION_LOCK_ENUM */ - -/** - * @ingroup iface_zcr_remote_surface_v1 - * @struct zcr_remote_surface_v1_interface - */ -struct zcr_remote_surface_v1_interface { - /** - * Destroy the remote_surface - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state will be - * lost. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set application ID - * - * Set an application identifier for the surface. - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * set the new window geometry - * - * The window geometry of a window is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the output. This - * updates dynamically on every commit. - * - * The arguments are given in the output coordinate space. - * - * The width and height must be greater than zero. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * set scale - * - * Set a scale factor that will be applied to surface and all - * descendants. - */ - void (*set_scale)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t scale); - /** - * set a rectangular shadow - * - * [Deprecated] Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a - * rectangular shadow. The compositor may choose to ignore this - * request. - * - * The arguments are given in the output coordinate space and - * specifies the inner bounds of the shadow. - * - * The arguments are given in the output coordinate space. - * Specifying zero width and height will disable the shadow. - */ - void (*set_rectangular_shadow)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * suggests the window's background opacity - * - * [Deprecated] Suggests the window's background opacity when the - * shadow is requested. - */ - void (*set_rectangular_shadow_background_opacity)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t opacity); - /** - * set surface title - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set top inset for surface - * - * Set distance from the top of the surface to the contents. - * - * This distance typically represents the size of the window - * caption. - */ - void (*set_top_inset)(struct wl_client *client, - struct wl_resource *resource, - int32_t height); - /** - * make the surface active - * - * Make the surface active and bring it to the front. - * @param serial the serial of the user event - */ - void (*activate)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * maximize - * - * Request that surface is maximized. The window geometry will be - * updated to whatever the compositor finds appropriate for a - * maximized window. - * - * This is only a request that the window should be maximized. The - * compositor may choose to ignore this request. The client should - * listen to set_maximized events to determine if the window was - * maximized or not. - */ - void (*maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * minimize - * - * Request that surface is minimized. - * - * This is only a request that the window should be minimized. The - * compositor may choose to ignore this request. The client should - * listen to set_minimized events to determine if the window was - * minimized or not. - */ - void (*minimize)(struct wl_client *client, - struct wl_resource *resource); - /** - * restore - * - * Request that surface is restored. This restores the window - * geometry to what it was before the window was minimized, - * maximized or made fullscreen. - * - * This is only a request that the window should be restored. The - * compositor may choose to ignore this request. The client should - * listen to unset_maximized, unset_minimize and unset_fullscreen - * events to determine if the window was restored or not. - */ - void (*restore)(struct wl_client *client, - struct wl_resource *resource); - /** - * fullscreen - * - * Request that surface is made fullscreen. - * - * This is only a request that the window should be made - * fullscreen. The compositor may choose to ignore this request. - * The client should listen to set_fullscreen events to determine - * if the window was made fullscreen or not. - */ - void (*fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * unfullscreen - * - * Request that surface is made unfullscreen. - * - * This is only a request that the window should be made - * unfullscreen. The compositor may choose to ignore this request. - * The client should listen to unset_fullscreen events to determine - * if the window was made unfullscreen or not. - */ - void (*unfullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * pin - * - * Request that surface is pinned. - * - * This is only a request that the window should be pinned. The - * compositor may choose to ignore this request. The client should - * listen to state_changed events to determine if the window was - * pinned or not. If trusted flag is non-zero, the app can prevent - * users from exiting the pinned mode. - */ - void (*pin)(struct wl_client *client, - struct wl_resource *resource, - int32_t trusted); - /** - * unpin - * - * Request that surface is unpinned. - * - * This is only a request that the window should be unpinned. The - * compositor may choose to ignore this request. The client should - * listen to unset_pinned events to determine if the window was - * unpinned or not. - */ - void (*unpin)(struct wl_client *client, - struct wl_resource *resource); - /** - * suggests a re-layout of remote shell input area - * - * Suggests a surface should become system modal. - */ - void (*set_system_modal)(struct wl_client *client, - struct wl_resource *resource); - /** - * suggests a re-layout of remote shell input area - * - * Suggests a surface should become non system modal. - */ - void (*unset_system_modal)(struct wl_client *client, - struct wl_resource *resource); - /** - * set a rectangular shadow - * - * Request that surface needs a rectangular shadow. - * - * This is only a request that the surface should have a - * rectangular shadow. The compositor may choose to ignore this - * request. - * - * The arguments are given in the remote surface coordinate space - * and specifies inner bounds of the shadow. Specifying zero width - * and height will disable the shadow. - * @since 2 - */ - void (*set_rectangular_surface_shadow)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * requests the system ui visibility behavior for the surface - * - * Requests how the surface will change the visibility of the - * system UI when it is made active. - * @since 3 - */ - void (*set_systemui_visibility)(struct wl_client *client, - struct wl_resource *resource, - uint32_t visibility); - /** - * set always on top - * - * Request that surface is made to be always on top. - * - * This is only a request that the window should be always on top. - * The compositor may choose to ignore this request. - * @since 4 - */ - void (*set_always_on_top)(struct wl_client *client, - struct wl_resource *resource); - /** - * unset always on top - * - * Request that surface is made to be not always on top. - * - * This is only a request that the window should be not always on - * top. The compositor may choose to ignore this request. - * @since 4 - */ - void (*unset_always_on_top)(struct wl_client *client, - struct wl_resource *resource); - /** - * ack a configure event - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client must - * make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, the compositor might use this information during - * display configuration to change its coordinate space for - * set_window_geometry requests only when the client has switched - * to the new coordinate space. - * - * If the client receives multiple configure events before it can - * respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending an - * ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before - * committing, but only the last request sent before a commit - * indicates which configure event the client really is responding - * to. - * @param serial the serial from the configure event - * @since 5 - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * start an interactive move - * - * Start an interactive, user-driven move of the surface. - * - * The compositor responds to this request with a configure event - * that transitions to the "moving" state. The client must only - * initiate motion after acknowledging the state change. The - * compositor can assume that subsequent set_window_geometry - * requests are position updates until the next state transition is - * acknowledged. - * - * The compositor may ignore move requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 5 - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource); - /** - * set orientation - * - * Set an orientation for the surface. - * @since 6 - */ - void (*set_orientation)(struct wl_client *client, - struct wl_resource *resource, - int32_t orientation); - /** - * set the type of the window - * - * Set the type of window. This is only a hint to the compositor - * and the compositor is free to ignore it. - * @param type type of the window - * @since 7 - */ - void (*set_window_type)(struct wl_client *client, - struct wl_resource *resource, - uint32_t type); - /** - * start an interactive resize - * - * [Deprecated] Start an interactive, user-driven resize of the - * surface. - * - * The compositor responds to this request with a configure event - * that transitions to the "resizing" state. The client must only - * initiate resizing after acknowledging the state change. The - * compositor can assume that subsequent set_window_geometry - * requests are resizes until the next state transition is - * acknowledged. - * - * The compositor may ignore resize requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 9 - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource); - /** - * expand input region for resizing - * - * Expand input region of surface with resize outset. - * - * The compositor clips the input region of each surface to its - * bounds, unless the client requests a resize outset. In that - * case, the input region of the root surface is expanded to allow - * for some leeway around visible bounds when starting a - * user-driven resize. - * @since 9 - */ - void (*set_resize_outset)(struct wl_client *client, - struct wl_resource *resource, - int32_t outset); - /** - * start an interactive move - * - * Request an interactive, user-driven move of the surface. "x" - * and "y" specifies the starting point of the pointer device that - * initiated the move. - * - * The compositor responds to this request with a drag_started - * event with "none" direction. Please see drag_started event for - * more details. - * - * The compositor may ignore move requests depending on the state - * of the surface, e.g. fullscreen or maximized. - * @since 10 - */ - void (*start_move)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); - /** - * set can_maximize - * - * Request that surface can be in maximzied state. - * @since 10 - */ - void (*set_can_maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * unset can_maximize - * - * Request that surface can not be in maximzied state. - * @since 10 - */ - void (*unset_can_maximize)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the minimum size - * - * Set a minimum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * @since 10 - */ - void (*set_min_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the maximum size - * - * Set a maximum size of the surface. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * Setting the same size as minimum size makes the surface - * unresizable. - * @since 10 - */ - void (*set_max_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the surface to left snapped - * - * Request that surface is snapped to left. - * @since 11 - */ - void (*set_snapped_to_left)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the surface to right snapped - * - * Request that surface is snapped to right. - * @since 11 - */ - void (*set_snapped_to_right)(struct wl_client *client, - struct wl_resource *resource); - /** - * start an interactive resize - * - * Request to start an interactive, user-driven resize of the - * surface. "x" and "y" specifies the starting point of the pointer - * device that initiated the reize. - * - * The compositor responds to this request with a "drag_started" - * event, followed by "bounds_changed" events, and ends the resize - * operation with a "drag_finhsed" event. The compositor determines - * the new bounds using the resize_direction and the pointer event - * location. - * - * The compositor may ignore resize requests depending on the state - * of the surface, e.g. fullscreen or maximized, or no drag event - * is in pregress. - * @param resize_direction the direction of resize - * @since 12 - */ - void (*start_resize)(struct wl_client *client, - struct wl_resource *resource, - uint32_t resize_direction, - int32_t x, - int32_t y); - /** - * request a frame for surface - * - * Enables compositor side frame decoration. |type| specifies the - * type of frame to use for the surface. - * @param type the frame type - * @since 13 - */ - void (*set_frame)(struct wl_client *client, - struct wl_resource *resource, - uint32_t type); - /** - * updates buttons' state on frame - * - * Updates the frame's button state. |visible_buttons| and - * |enabled_buttons| are the union of button mask defined in - * |frame_button_type| enum. - * - * The mask present in |enabled_buttons| but not in - * |visible_buttons| will be ignored. - * @since 13 - */ - void (*set_frame_buttons)(struct wl_client *client, - struct wl_resource *resource, - uint32_t visible_buttons, - uint32_t enabled_buttons); - /** - * set extra title string - * - * The extra informational string about the surface. This can be - * used to show the debug information in the title bar, or log - * messages. - * - * This is different from "set_title" which is used to identify the - * surface. - * - * The string must be encoded in UTF-8. - * @since 13 - */ - void (*set_extra_title)(struct wl_client *client, - struct wl_resource *resource, - const char *extra_title); - /** - * set orientation lock for a remote surface - * - * Request a specific orientation behavior when this surface is - * in foreground. - * @param orientation_lock the orientation lock - * @since 14 - */ - void (*set_orientation_lock)(struct wl_client *client, - struct wl_resource *resource, - uint32_t orientation_lock); - /** - * set pip for a remote surface - * - * Request that surface is set to Picture-in-Picture (PIP). - * @since 15 - */ - void (*pip)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_REMOTE_SURFACE_V1_CLOSE 0 -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED 1 -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE 2 -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED 3 -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED 4 -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED 5 -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED 6 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CLOSE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_STARTED_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED_SINCE_VERSION 10 - -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SCALE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SHADOW_BACKGROUND_OPACITY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_TOP_INSET_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACTIVATE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MAXIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MINIMIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESTORE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNFULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNPIN_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_SYSTEM_MODAL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RECTANGULAR_SURFACE_SHADOW_SINCE_VERSION 2 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SYSTEMUI_VISIBILITY_SINCE_VERSION 3 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_ALWAYS_ON_TOP_SINCE_VERSION 4 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_ACK_CONFIGURE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_MOVE_SINCE_VERSION 5 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_SINCE_VERSION 6 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_WINDOW_TYPE_SINCE_VERSION 7 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_RESIZE_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_RESIZE_OUTSET_SINCE_VERSION 9 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_MOVE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_UNSET_CAN_MAXIMIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MIN_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_MAX_SIZE_SINCE_VERSION 10 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_LEFT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_SNAPPED_TO_RIGHT_SINCE_VERSION 11 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_START_RESIZE_SINCE_VERSION 12 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_FRAME_BUTTONS_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_EXTRA_TITLE_SINCE_VERSION 13 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_SET_ORIENTATION_LOCK_SINCE_VERSION 14 -/** - * @ingroup iface_zcr_remote_surface_v1 - */ -#define ZCR_REMOTE_SURFACE_V1_PIP_SINCE_VERSION 15 - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_CLOSE); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an state_type_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_state_type_changed(struct wl_resource *resource_, uint32_t state_type) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_STATE_TYPE_CHANGED, state_type); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_configure(struct wl_resource *resource_, int32_t origin_offset_x, int32_t origin_offset_y, struct wl_array *states, uint32_t serial) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_CONFIGURE, origin_offset_x, origin_offset_y, states, serial); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an window_geometry_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_window_geometry_changed(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_WINDOW_GEOMETRY_CHANGED, x, y, width, height); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an bounds_changed event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_bounds_changed(struct wl_resource *resource_, uint32_t workspace_id_hi, uint32_t workspace_id_lo, int32_t x, int32_t y, int32_t width, int32_t height, uint32_t bounds_change_reason) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_BOUNDS_CHANGED, workspace_id_hi, workspace_id_lo, x, y, width, height, bounds_change_reason); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an drag_started event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zcr_remote_surface_v1_send_drag_started(struct wl_resource *resource_, uint32_t direction) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_DRAG_STARTED, direction); -} - -/** - * @ingroup iface_zcr_remote_surface_v1 - * Sends an drag_finished event to the client owning the resource. - * @param resource_ The client's resource - * @param canceled true if the operation was canceled - */ -static inline void -zcr_remote_surface_v1_send_drag_finished(struct wl_resource *resource_, int32_t x, int32_t y, int32_t canceled) -{ - wl_resource_post_event(resource_, ZCR_REMOTE_SURFACE_V1_DRAG_FINISHED, x, y, canceled); -} - -/** - * @ingroup iface_zcr_notification_surface_v1 - * @struct zcr_notification_surface_v1_interface - */ -struct zcr_notification_surface_v1_interface { - /** - * Destroy the notification_surface - * - * Unmap and destroy the notification surface. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set application ID - * - * Set an application identifier for the notification surface. - * @since 16 - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); -}; - - -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_notification_surface_v1 - */ -#define ZCR_NOTIFICATION_SURFACE_V1_SET_APP_ID_SINCE_VERSION 16 - -/** - * @ingroup iface_zcr_input_method_surface_v1 - * @struct zcr_input_method_surface_v1_interface - */ -struct zcr_input_method_surface_v1_interface { - /** - * Destroy the ime_surface - * - * Unmap and destroy the input mtehod surface. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_input_method_surface_v1 - */ -#define ZCR_INPUT_METHOD_SURFACE_V1_DESTROY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h deleted file mode 100644 index 82c0a76aecd..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-client-protocol.h +++ /dev/null @@ -1,272 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define SECURE_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_secure_output_unstable_v1 The secure_output_unstable_v1 protocol - * Protocol for providing secure output - * - * @section page_desc_secure_output_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to prevent surface - * contents from appearing in screenshots or from being visible on non-secure - * outputs. - * - * In order to prevent surface contents from appearing in screenshots or from - * being visible on non-secure outputs, a client must first bind the global - * interface "wp_secure_output" which, if a compositor supports secure output, - * is exposed by the registry. Using the bound global object, the client uses - * the "get_security" request to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow surfaces - * to be marked as only visible on secure outputs. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_secure_output_unstable_v1 Interfaces - * - @subpage page_iface_zcr_secure_output_v1 - secure output - * - @subpage page_iface_zcr_security_v1 - security interface to a wl_surface - * @section page_copyright_secure_output_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_secure_output_v1; -struct zcr_security_v1; - -/** - * @page page_iface_zcr_secure_output_v1 zcr_secure_output_v1 - * @section page_iface_zcr_secure_output_v1_desc Description - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - * @section page_iface_zcr_secure_output_v1_api API - * See @ref iface_zcr_secure_output_v1. - */ -/** - * @defgroup iface_zcr_secure_output_v1 The zcr_secure_output_v1 interface - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - */ -extern const struct wl_interface zcr_secure_output_v1_interface; -/** - * @page page_iface_zcr_security_v1 zcr_security_v1 - * @section page_iface_zcr_security_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_security_v1_api API - * See @ref iface_zcr_security_v1. - */ -/** - * @defgroup iface_zcr_security_v1 The zcr_security_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_security_v1_interface; - -#ifndef ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -#define ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -enum zcr_secure_output_v1_error { - /** - * the surface already has a security object associated - */ - ZCR_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, -}; -#endif /* ZCR_SECURE_OUTPUT_V1_ERROR_ENUM */ - -#define ZCR_SECURE_OUTPUT_V1_DESTROY 0 -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY 1 - - -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_secure_output_v1 */ -static inline void -zcr_secure_output_v1_set_user_data(struct zcr_secure_output_v1 *zcr_secure_output_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_secure_output_v1, user_data); -} - -/** @ingroup iface_zcr_secure_output_v1 */ -static inline void * -zcr_secure_output_v1_get_user_data(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_secure_output_v1); -} - -static inline uint32_t -zcr_secure_output_v1_get_version(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_secure_output_v1); -} - -/** - * @ingroup iface_zcr_secure_output_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * security objects included. - */ -static inline void -zcr_secure_output_v1_destroy(struct zcr_secure_output_v1 *zcr_secure_output_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_secure_output_v1, - ZCR_SECURE_OUTPUT_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_secure_output_v1); -} - -/** - * @ingroup iface_zcr_secure_output_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide surface security. If the given wl_surface already has - * a security object associated, the security_exists protocol error - * is raised. - */ -static inline struct zcr_security_v1 * -zcr_secure_output_v1_get_security(struct zcr_secure_output_v1 *zcr_secure_output_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_secure_output_v1, - ZCR_SECURE_OUTPUT_V1_GET_SECURITY, &zcr_security_v1_interface, NULL, surface); - - return (struct zcr_security_v1 *) id; -} - -#define ZCR_SECURITY_V1_DESTROY 0 -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT 1 - - -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1 - -/** @ingroup iface_zcr_security_v1 */ -static inline void -zcr_security_v1_set_user_data(struct zcr_security_v1 *zcr_security_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_security_v1, user_data); -} - -/** @ingroup iface_zcr_security_v1 */ -static inline void * -zcr_security_v1_get_user_data(struct zcr_security_v1 *zcr_security_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_security_v1); -} - -static inline uint32_t -zcr_security_v1_get_version(struct zcr_security_v1 *zcr_security_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_security_v1); -} - -/** - * @ingroup iface_zcr_security_v1 - * - * The associated wl_surface's security state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_security_v1_destroy(struct zcr_security_v1 *zcr_security_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_security_v1, - ZCR_SECURITY_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_security_v1); -} - -/** - * @ingroup iface_zcr_security_v1 - * - * Constrain visibility of wl_surface contents to secure outputs. - * See wp_secure_output for the description. - * - * The only visible on secure output state is double-buffered state, - * and will be applied on the next wl_surface.commit. - */ -static inline void -zcr_security_v1_only_visible_on_secure_output(struct zcr_security_v1 *zcr_security_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_security_v1, - ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h deleted file mode 100644 index 27c7d90ecdc..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/secure-output-unstable-v1-server-protocol.h +++ /dev/null @@ -1,219 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef SECURE_OUTPUT_UNSTABLE_V1_SERVER_PROTOCOL_H -#define SECURE_OUTPUT_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_secure_output_unstable_v1 The secure_output_unstable_v1 protocol - * Protocol for providing secure output - * - * @section page_desc_secure_output_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to prevent surface - * contents from appearing in screenshots or from being visible on non-secure - * outputs. - * - * In order to prevent surface contents from appearing in screenshots or from - * being visible on non-secure outputs, a client must first bind the global - * interface "wp_secure_output" which, if a compositor supports secure output, - * is exposed by the registry. Using the bound global object, the client uses - * the "get_security" request to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow surfaces - * to be marked as only visible on secure outputs. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_secure_output_unstable_v1 Interfaces - * - @subpage page_iface_zcr_secure_output_v1 - secure output - * - @subpage page_iface_zcr_security_v1 - security interface to a wl_surface - * @section page_copyright_secure_output_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_secure_output_v1; -struct zcr_security_v1; - -/** - * @page page_iface_zcr_secure_output_v1 zcr_secure_output_v1 - * @section page_iface_zcr_secure_output_v1_desc Description - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - * @section page_iface_zcr_secure_output_v1_api API - * See @ref iface_zcr_secure_output_v1. - */ -/** - * @defgroup iface_zcr_secure_output_v1 The zcr_secure_output_v1 interface - * - * The global interface exposing secure output capabilities is used - * to instantiate an interface extension for a wl_surface object. - * This extended interface will then allow surfaces to be marked as - * as only visible on secure outputs. - */ -extern const struct wl_interface zcr_secure_output_v1_interface; -/** - * @page page_iface_zcr_security_v1 zcr_security_v1 - * @section page_iface_zcr_security_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_security_v1_api API - * See @ref iface_zcr_security_v1. - */ -/** - * @defgroup iface_zcr_security_v1 The zcr_security_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify that a surface should not appear in screenshots - * or be visible on non-secure outputs. - * - * If the wl_surface associated with the security object is destroyed, - * the security object becomes inert. - * - * If the security object is destroyed, the security state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_security_v1_interface; - -#ifndef ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -#define ZCR_SECURE_OUTPUT_V1_ERROR_ENUM -enum zcr_secure_output_v1_error { - /** - * the surface already has a security object associated - */ - ZCR_SECURE_OUTPUT_V1_ERROR_SECURITY_EXISTS = 0, -}; -#endif /* ZCR_SECURE_OUTPUT_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_secure_output_v1 - * @struct zcr_secure_output_v1_interface - */ -struct zcr_secure_output_v1_interface { - /** - * unbind from the secure output interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * security objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for security - * - * Instantiate an interface extension for the given wl_surface to - * provide surface security. If the given wl_surface already has a - * security object associated, the security_exists protocol error - * is raised. - * @param id the new security interface id - * @param surface the surface - */ - void (*get_security)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_secure_output_v1 - */ -#define ZCR_SECURE_OUTPUT_V1_GET_SECURITY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_security_v1 - * @struct zcr_security_v1_interface - */ -struct zcr_security_v1_interface { - /** - * remove security from the surface - * - * The associated wl_surface's security state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the only visible on secure output state - * - * Constrain visibility of wl_surface contents to secure outputs. - * See wp_secure_output for the description. - * - * The only visible on secure output state is double-buffered - * state, and will be applied on the next wl_surface.commit. - */ - void (*only_visible_on_secure_output)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_security_v1 - */ -#define ZCR_SECURITY_V1_ONLY_VISIBLE_ON_SECURE_OUTPUT_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h deleted file mode 100644 index 1e1eb25dc5a..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-client-protocol.h +++ /dev/null @@ -1,258 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define STYLUS_TOOLS_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_stylus_tools_unstable_v1 The stylus_tools_unstable_v1 protocol - * Protocol for the stylus tools - * - * @section page_desc_stylus_tools_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the behavior - * of stylus tools. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_stylus_tools_unstable_v1 Interfaces - * - @subpage page_iface_zcr_stylus_tools_v1 - stylus_tools - * - @subpage page_iface_zcr_stylus_tool_v1 - stylus_tool interface to a wl_surface - * @section page_copyright_stylus_tools_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_stylus_tool_v1; -struct zcr_stylus_tools_v1; - -/** - * @page page_iface_zcr_stylus_tools_v1 zcr_stylus_tools_v1 - * @section page_iface_zcr_stylus_tools_v1_desc Description - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - * @section page_iface_zcr_stylus_tools_v1_api API - * See @ref iface_zcr_stylus_tools_v1. - */ -/** - * @defgroup iface_zcr_stylus_tools_v1 The zcr_stylus_tools_v1 interface - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - */ -extern const struct wl_interface zcr_stylus_tools_v1_interface; -/** - * @page page_iface_zcr_stylus_tool_v1 zcr_stylus_tool_v1 - * @section page_iface_zcr_stylus_tool_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_stylus_tool_v1_api API - * See @ref iface_zcr_stylus_tool_v1. - */ -/** - * @defgroup iface_zcr_stylus_tool_v1 The zcr_stylus_tool_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_stylus_tool_v1_interface; - -#ifndef ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -#define ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -enum zcr_stylus_tools_v1_error { - /** - * the surface already has a stylus_tool object associated - */ - ZCR_STYLUS_TOOLS_V1_ERROR_STYLUS_TOOL_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_TOOLS_V1_ERROR_ENUM */ - -#define ZCR_STYLUS_TOOLS_V1_DESTROY 0 -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL 1 - - -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_tools_v1 */ -static inline void -zcr_stylus_tools_v1_set_user_data(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_tools_v1, user_data); -} - -/** @ingroup iface_zcr_stylus_tools_v1 */ -static inline void * -zcr_stylus_tools_v1_get_user_data(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_tools_v1); -} - -static inline uint32_t -zcr_stylus_tools_v1_get_version(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_tools_v1); -} - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * stylus_tool objects included. - */ -static inline void -zcr_stylus_tools_v1_destroy(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tools_v1, - ZCR_STYLUS_TOOLS_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_tools_v1); -} - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * - * Instantiate an interface extension for the given wl_surface to - * provide access to the stylus tools features. If the given - * wl_surface already has an stylus_tool object associated, - * the stylus_tool_exists protocol protocol error is raised. - */ -static inline struct zcr_stylus_tool_v1 * -zcr_stylus_tools_v1_get_stylus_tool(struct zcr_stylus_tools_v1 *zcr_stylus_tools_v1, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_stylus_tools_v1, - ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL, &zcr_stylus_tool_v1_interface, NULL, surface); - - return (struct zcr_stylus_tool_v1 *) id; -} - -#define ZCR_STYLUS_TOOL_V1_DESTROY 0 -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY 1 - - -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_tool_v1 */ -static inline void -zcr_stylus_tool_v1_set_user_data(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_tool_v1, user_data); -} - -/** @ingroup iface_zcr_stylus_tool_v1 */ -static inline void * -zcr_stylus_tool_v1_get_user_data(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_tool_v1); -} - -static inline uint32_t -zcr_stylus_tool_v1_get_version(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_tool_v1); -} - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * - * The associated wl_surface's stylus_tool state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -zcr_stylus_tool_v1_destroy(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tool_v1, - ZCR_STYLUS_TOOL_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_tool_v1); -} - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * - * Enables the "stylus-only" mode for input device event processing - * related to wl_surface. - */ -static inline void -zcr_stylus_tool_v1_set_stylus_only(struct zcr_stylus_tool_v1 *zcr_stylus_tool_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_stylus_tool_v1, - ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h deleted file mode 100644 index b1b117e206e..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-tools-unstable-v1-server-protocol.h +++ /dev/null @@ -1,205 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_TOOLS_UNSTABLE_V1_SERVER_PROTOCOL_H -#define STYLUS_TOOLS_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_stylus_tools_unstable_v1 The stylus_tools_unstable_v1 protocol - * Protocol for the stylus tools - * - * @section page_desc_stylus_tools_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to control the behavior - * of stylus tools. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface 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_ifaces_stylus_tools_unstable_v1 Interfaces - * - @subpage page_iface_zcr_stylus_tools_v1 - stylus_tools - * - @subpage page_iface_zcr_stylus_tool_v1 - stylus_tool interface to a wl_surface - * @section page_copyright_stylus_tools_unstable_v1 Copyright - * <pre> - * - * Copyright 2017 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct zcr_stylus_tool_v1; -struct zcr_stylus_tools_v1; - -/** - * @page page_iface_zcr_stylus_tools_v1 zcr_stylus_tools_v1 - * @section page_iface_zcr_stylus_tools_v1_desc Description - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - * @section page_iface_zcr_stylus_tools_v1_api API - * See @ref iface_zcr_stylus_tools_v1. - */ -/** - * @defgroup iface_zcr_stylus_tools_v1 The zcr_stylus_tools_v1 interface - * - * The global interface is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow the client to - * control the stylus-related behavior for input device event processing - * related to wl_surface. - */ -extern const struct wl_interface zcr_stylus_tools_v1_interface; -/** - * @page page_iface_zcr_stylus_tool_v1 zcr_stylus_tool_v1 - * @section page_iface_zcr_stylus_tool_v1_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - * @section page_iface_zcr_stylus_tool_v1_api API - * See @ref iface_zcr_stylus_tool_v1. - */ -/** - * @defgroup iface_zcr_stylus_tool_v1 The zcr_stylus_tool_v1 interface - * - * An additional interface to a wl_surface object, which allows the - * client to control the behavior of stylus tools. - * - * If the wl_surface associated with the stylus_tool object is destroyed, - * the stylus_tool object becomes inert. - * - * If the stylus_tool object is destroyed, the stylus_tool state is removed - * from the wl_surface. The change will be applied on the next - * wl_surface.commit. - */ -extern const struct wl_interface zcr_stylus_tool_v1_interface; - -#ifndef ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -#define ZCR_STYLUS_TOOLS_V1_ERROR_ENUM -enum zcr_stylus_tools_v1_error { - /** - * the surface already has a stylus_tool object associated - */ - ZCR_STYLUS_TOOLS_V1_ERROR_STYLUS_TOOL_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_TOOLS_V1_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_stylus_tools_v1 - * @struct zcr_stylus_tools_v1_interface - */ -struct zcr_stylus_tools_v1_interface { - /** - * unbind from the stylus_tools interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * stylus_tool objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for stylus_tool - * - * Instantiate an interface extension for the given wl_surface to - * provide access to the stylus tools features. If the given - * wl_surface already has an stylus_tool object associated, the - * stylus_tool_exists protocol protocol error is raised. - * @param id the new stylus_tool interface id - * @param surface the surface - */ - void (*get_stylus_tool)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tools_v1 - */ -#define ZCR_STYLUS_TOOLS_V1_GET_STYLUS_TOOL_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_stylus_tool_v1 - * @struct zcr_stylus_tool_v1_interface - */ -struct zcr_stylus_tool_v1_interface { - /** - * remove stylus_tool from the surface - * - * The associated wl_surface's stylus_tool state is removed. The - * change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * Set the stylus-only mode - * - * Enables the "stylus-only" mode for input device event - * processing related to wl_surface. - */ - void (*set_stylus_only)(struct wl_client *client, - struct wl_resource *resource); -}; - - -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_stylus_tool_v1 - */ -#define ZCR_STYLUS_TOOL_V1_SET_STYLUS_ONLY_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h deleted file mode 100644 index 0de3255e25b..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-client-protocol.h +++ /dev/null @@ -1,316 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_UNSTABLE_V2_CLIENT_PROTOCOL_H -#define STYLUS_UNSTABLE_V2_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_stylus_unstable_v2 The stylus_unstable_v2 protocol - * @section page_ifaces_stylus_unstable_v2 Interfaces - * - @subpage page_iface_zcr_stylus_v2 - extends wl_touch with events for on-screen stylus - * - @subpage page_iface_zcr_touch_stylus_v2 - stylus extension for touch - * @section page_copyright_stylus_unstable_v2 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_touch; -struct zcr_stylus_v2; -struct zcr_touch_stylus_v2; - -/** - * @page page_iface_zcr_stylus_v2 zcr_stylus_v2 - * @section page_iface_zcr_stylus_v2_desc Description - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch events. - * - * 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_zcr_stylus_v2_api API - * See @ref iface_zcr_stylus_v2. - */ -/** - * @defgroup iface_zcr_stylus_v2 The zcr_stylus_v2 interface - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch events. - * - * 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 zcr_stylus_v2_interface; -/** - * @page page_iface_zcr_touch_stylus_v2 zcr_touch_stylus_v2 - * @section page_iface_zcr_touch_stylus_v2_desc Description - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - * @section page_iface_zcr_touch_stylus_v2_api API - * See @ref iface_zcr_touch_stylus_v2. - */ -/** - * @defgroup iface_zcr_touch_stylus_v2 The zcr_touch_stylus_v2 interface - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - */ -extern const struct wl_interface zcr_touch_stylus_v2_interface; - -#ifndef ZCR_STYLUS_V2_ERROR_ENUM -#define ZCR_STYLUS_V2_ERROR_ENUM -enum zcr_stylus_v2_error { - /** - * the touch already has a touch_stylus object associated - */ - ZCR_STYLUS_V2_ERROR_TOUCH_STYLUS_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_V2_ERROR_ENUM */ - -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS 0 - - -/** - * @ingroup iface_zcr_stylus_v2 - */ -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS_SINCE_VERSION 1 - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void -zcr_stylus_v2_set_user_data(struct zcr_stylus_v2 *zcr_stylus_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_stylus_v2, user_data); -} - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void * -zcr_stylus_v2_get_user_data(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_stylus_v2); -} - -static inline uint32_t -zcr_stylus_v2_get_version(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_stylus_v2); -} - -/** @ingroup iface_zcr_stylus_v2 */ -static inline void -zcr_stylus_v2_destroy(struct zcr_stylus_v2 *zcr_stylus_v2) -{ - wl_proxy_destroy((struct wl_proxy *) zcr_stylus_v2); -} - -/** - * @ingroup iface_zcr_stylus_v2 - * - * Create touch_stylus object. See zcr_touch_stylus_v1 interface for - * details. If the given wl_touch already has a touch_stylus object - * associated, the touch_stylus_exists protocol error is raised. - */ -static inline struct zcr_touch_stylus_v2 * -zcr_stylus_v2_get_touch_stylus(struct zcr_stylus_v2 *zcr_stylus_v2, struct wl_touch *touch) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_stylus_v2, - ZCR_STYLUS_V2_GET_TOUCH_STYLUS, &zcr_touch_stylus_v2_interface, NULL, touch); - - return (struct zcr_touch_stylus_v2 *) id; -} - -#ifndef ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -#define ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -/** - * @ingroup iface_zcr_touch_stylus_v2 - * tool type of device. - */ -enum zcr_touch_stylus_v2_tool_type { - /** - * Touch - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_TOUCH = 1, - /** - * Pen - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_PEN = 2, - /** - * Eraser - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ERASER = 3, -}; -#endif /* ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * @struct zcr_touch_stylus_v2_listener - */ -struct zcr_touch_stylus_v2_listener { - /** - * sets tool type of touch - * - * Notification that the user is using a tool type other than - * touch. There can only be one tool in use at a time. This event - * is sent in the same frame as the wl_touch.down event. The tool - * type cannot change while a touch is being reported. - * @param id touch id - * @param type type of tool in use - */ - void (*tool)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t id, - uint32_t type); - /** - * force change event - * - * Notification of a change in physical force on the surface of - * the screen. The force is calibrated and normalized to the 0 to 1 - * range. - * @param time timestamp with millisecond granularity - * @param id touch id - * @param force new value of force - */ - void (*force)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t time, - uint32_t id, - wl_fixed_t force); - /** - * tilt change event - * - * Notification of a change in tilt of a stylus. - * - * Measured from surface normal as plane angle in degrees, values - * lie in [-90,90]. A positive x is to the right and a positive y - * is towards the user. - * @param time timestamp with millisecond granularity - * @param id touch id - * @param tilt_x tilt in x direction - * @param tilt_y tilt in y direction - */ - void (*tilt)(void *data, - struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - uint32_t time, - uint32_t id, - wl_fixed_t tilt_x, - wl_fixed_t tilt_y); -}; - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -static inline int -zcr_touch_stylus_v2_add_listener(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, - const struct zcr_touch_stylus_v2_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_touch_stylus_v2, - (void (**)(void)) listener, data); -} - -#define ZCR_TOUCH_STYLUS_V2_DESTROY 0 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TOOL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_FORCE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TILT_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_touch_stylus_v2 */ -static inline void -zcr_touch_stylus_v2_set_user_data(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_touch_stylus_v2, user_data); -} - -/** @ingroup iface_zcr_touch_stylus_v2 */ -static inline void * -zcr_touch_stylus_v2_get_user_data(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_touch_stylus_v2); -} - -static inline uint32_t -zcr_touch_stylus_v2_get_version(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_touch_stylus_v2); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -static inline void -zcr_touch_stylus_v2_destroy(struct zcr_touch_stylus_v2 *zcr_touch_stylus_v2) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_touch_stylus_v2, - ZCR_TOUCH_STYLUS_V2_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_touch_stylus_v2); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h deleted file mode 100644 index bd951b66b09..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/stylus-unstable-v2-server-protocol.h +++ /dev/null @@ -1,251 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef STYLUS_UNSTABLE_V2_SERVER_PROTOCOL_H -#define STYLUS_UNSTABLE_V2_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_stylus_unstable_v2 The stylus_unstable_v2 protocol - * @section page_ifaces_stylus_unstable_v2 Interfaces - * - @subpage page_iface_zcr_stylus_v2 - extends wl_touch with events for on-screen stylus - * - @subpage page_iface_zcr_touch_stylus_v2 - stylus extension for touch - * @section page_copyright_stylus_unstable_v2 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_touch; -struct zcr_stylus_v2; -struct zcr_touch_stylus_v2; - -/** - * @page page_iface_zcr_stylus_v2 zcr_stylus_v2 - * @section page_iface_zcr_stylus_v2_desc Description - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch events. - * - * 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_zcr_stylus_v2_api API - * See @ref iface_zcr_stylus_v2. - */ -/** - * @defgroup iface_zcr_stylus_v2 The zcr_stylus_v2 interface - * - * Allows a wl_touch to report stylus specific information. The client can - * interpret the on-screen stylus like any other touch event, and use - * this protocol to obtain detail information about the type of stylus, - * as well as the force and tilt of the tool. - * - * These events are to be fired by the server within the same frame as other - * wl_touch events. - * - * 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 zcr_stylus_v2_interface; -/** - * @page page_iface_zcr_touch_stylus_v2 zcr_touch_stylus_v2 - * @section page_iface_zcr_touch_stylus_v2_desc Description - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - * @section page_iface_zcr_touch_stylus_v2_api API - * See @ref iface_zcr_touch_stylus_v2. - */ -/** - * @defgroup iface_zcr_touch_stylus_v2 The zcr_touch_stylus_v2 interface - * - * The zcr_touch_stylus_v1 interface extends the wl_touch interface with - * events to describe details about a stylus. - */ -extern const struct wl_interface zcr_touch_stylus_v2_interface; - -#ifndef ZCR_STYLUS_V2_ERROR_ENUM -#define ZCR_STYLUS_V2_ERROR_ENUM -enum zcr_stylus_v2_error { - /** - * the touch already has a touch_stylus object associated - */ - ZCR_STYLUS_V2_ERROR_TOUCH_STYLUS_EXISTS = 0, -}; -#endif /* ZCR_STYLUS_V2_ERROR_ENUM */ - -/** - * @ingroup iface_zcr_stylus_v2 - * @struct zcr_stylus_v2_interface - */ -struct zcr_stylus_v2_interface { - /** - * get stylus interface for touch - * - * Create touch_stylus object. See zcr_touch_stylus_v1 interface - * for details. If the given wl_touch already has a touch_stylus - * object associated, the touch_stylus_exists protocol error is - * raised. - */ - void (*get_touch_stylus)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *touch); -}; - - -/** - * @ingroup iface_zcr_stylus_v2 - */ -#define ZCR_STYLUS_V2_GET_TOUCH_STYLUS_SINCE_VERSION 1 - -#ifndef ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -#define ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM -/** - * @ingroup iface_zcr_touch_stylus_v2 - * tool type of device. - */ -enum zcr_touch_stylus_v2_tool_type { - /** - * Touch - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_TOUCH = 1, - /** - * Pen - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_PEN = 2, - /** - * Eraser - */ - ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ERASER = 3, -}; -#endif /* ZCR_TOUCH_STYLUS_V2_TOOL_TYPE_ENUM */ - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * @struct zcr_touch_stylus_v2_interface - */ -struct zcr_touch_stylus_v2_interface { - /** - * destroy stylus object - * - * - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_TOUCH_STYLUS_V2_TOOL 0 -#define ZCR_TOUCH_STYLUS_V2_FORCE 1 -#define ZCR_TOUCH_STYLUS_V2_TILT 2 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TOOL_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_FORCE_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_TILT_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - */ -#define ZCR_TOUCH_STYLUS_V2_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an tool event to the client owning the resource. - * @param resource_ The client's resource - * @param id touch id - * @param type type of tool in use - */ -static inline void -zcr_touch_stylus_v2_send_tool(struct wl_resource *resource_, uint32_t id, uint32_t type) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_TOOL, id, type); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an force event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id touch id - * @param force new value of force - */ -static inline void -zcr_touch_stylus_v2_send_force(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t force) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_FORCE, time, id, force); -} - -/** - * @ingroup iface_zcr_touch_stylus_v2 - * Sends an tilt event to the client owning the resource. - * @param resource_ The client's resource - * @param time timestamp with millisecond granularity - * @param id touch id - * @param tilt_x tilt in x direction - * @param tilt_y tilt in y direction - */ -static inline void -zcr_touch_stylus_v2_send_tilt(struct wl_resource *resource_, uint32_t time, uint32_t id, wl_fixed_t tilt_x, wl_fixed_t tilt_y) -{ - wl_resource_post_event(resource_, ZCR_TOUCH_STYLUS_V2_TILT, time, id, tilt_x, tilt_y); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h deleted file mode 100644 index 76af3603f89..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/viewporter-client-protocol.h +++ /dev/null @@ -1,408 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VIEWPORTER_CLIENT_PROTOCOL_H -#define VIEWPORTER_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_viewporter The viewporter protocol - * @section page_ifaces_viewporter Interfaces - * - @subpage page_iface_wp_viewporter - surface cropping and scaling - * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface - * @section page_copyright_viewporter Copyright - * <pre> - * - * Copyright © 2013-2016 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct wp_viewport; -struct wp_viewporter; - -/** - * @page page_iface_wp_viewporter wp_viewporter - * @section page_iface_wp_viewporter_desc Description - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - * @section page_iface_wp_viewporter_api API - * See @ref iface_wp_viewporter. - */ -/** - * @defgroup iface_wp_viewporter The wp_viewporter interface - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - */ -extern const struct wl_interface wp_viewporter_interface; -/** - * @page page_iface_wp_viewport wp_viewport - * @section page_iface_wp_viewport_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - * @section page_iface_wp_viewport_api API - * See @ref iface_wp_viewport. - */ -/** - * @defgroup iface_wp_viewport The wp_viewport interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - */ -extern const struct wl_interface wp_viewport_interface; - -#ifndef WP_VIEWPORTER_ERROR_ENUM -#define WP_VIEWPORTER_ERROR_ENUM -enum wp_viewporter_error { - /** - * the surface already has a viewport object associated - */ - WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0, -}; -#endif /* WP_VIEWPORTER_ERROR_ENUM */ - -#define WP_VIEWPORTER_DESTROY 0 -#define WP_VIEWPORTER_GET_VIEWPORT 1 - - -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1 - -/** @ingroup iface_wp_viewporter */ -static inline void -wp_viewporter_set_user_data(struct wp_viewporter *wp_viewporter, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_viewporter, user_data); -} - -/** @ingroup iface_wp_viewporter */ -static inline void * -wp_viewporter_get_user_data(struct wp_viewporter *wp_viewporter) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_viewporter); -} - -static inline uint32_t -wp_viewporter_get_version(struct wp_viewporter *wp_viewporter) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_viewporter); -} - -/** - * @ingroup iface_wp_viewporter - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wp_viewport objects included. - */ -static inline void -wp_viewporter_destroy(struct wp_viewporter *wp_viewporter) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewporter, - WP_VIEWPORTER_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_viewporter); -} - -/** - * @ingroup iface_wp_viewporter - * - * Instantiate an interface extension for the given wl_surface to - * crop and scale its content. If the given wl_surface already has - * a wp_viewport object associated, the viewport_exists - * protocol error is raised. - */ -static inline struct wp_viewport * -wp_viewporter_get_viewport(struct wp_viewporter *wp_viewporter, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) wp_viewporter, - WP_VIEWPORTER_GET_VIEWPORT, &wp_viewport_interface, NULL, surface); - - return (struct wp_viewport *) id; -} - -#ifndef WP_VIEWPORT_ERROR_ENUM -#define WP_VIEWPORT_ERROR_ENUM -enum wp_viewport_error { - /** - * negative or zero values in width or height - */ - WP_VIEWPORT_ERROR_BAD_VALUE = 0, - /** - * destination size is not integer - */ - WP_VIEWPORT_ERROR_BAD_SIZE = 1, - /** - * source rectangle extends outside of the content area - */ - WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2, - /** - * the wl_surface was destroyed - */ - WP_VIEWPORT_ERROR_NO_SURFACE = 3, -}; -#endif /* WP_VIEWPORT_ERROR_ENUM */ - -#define WP_VIEWPORT_DESTROY 0 -#define WP_VIEWPORT_SET_SOURCE 1 -#define WP_VIEWPORT_SET_DESTINATION 2 - - -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1 - -/** @ingroup iface_wp_viewport */ -static inline void -wp_viewport_set_user_data(struct wp_viewport *wp_viewport, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) wp_viewport, user_data); -} - -/** @ingroup iface_wp_viewport */ -static inline void * -wp_viewport_get_user_data(struct wp_viewport *wp_viewport) -{ - return wl_proxy_get_user_data((struct wl_proxy *) wp_viewport); -} - -static inline uint32_t -wp_viewport_get_version(struct wp_viewport *wp_viewport) -{ - return wl_proxy_get_version((struct wl_proxy *) wp_viewport); -} - -/** - * @ingroup iface_wp_viewport - * - * The associated wl_surface's crop and scale state is removed. - * The change is applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_destroy(struct wp_viewport *wp_viewport) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) wp_viewport); -} - -/** - * @ingroup iface_wp_viewport - * - * Set the source rectangle of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If all of x, y, width and height are -1.0, the source rectangle is - * unset instead. Any other set of values where width or height are zero - * or negative, or x or y are negative, raise the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_set_source(struct wp_viewport *wp_viewport, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_SET_SOURCE, x, y, width, height); -} - -/** - * @ingroup iface_wp_viewport - * - * Set the destination size of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If width is -1 and height is -1, the destination size is unset - * instead. Any other pair of values for width and height that - * contains zero or negative values raises the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - */ -static inline void -wp_viewport_set_destination(struct wp_viewport *wp_viewport, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) wp_viewport, - WP_VIEWPORT_SET_DESTINATION, width, height); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h deleted file mode 100644 index 0bdb53a6755..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/viewporter-server-protocol.h +++ /dev/null @@ -1,361 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VIEWPORTER_SERVER_PROTOCOL_H -#define VIEWPORTER_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_viewporter The viewporter protocol - * @section page_ifaces_viewporter Interfaces - * - @subpage page_iface_wp_viewporter - surface cropping and scaling - * - @subpage page_iface_wp_viewport - crop and scale interface to a wl_surface - * @section page_copyright_viewporter Copyright - * <pre> - * - * Copyright © 2013-2016 Collabora, Ltd. - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_surface; -struct wp_viewport; -struct wp_viewporter; - -/** - * @page page_iface_wp_viewporter wp_viewporter - * @section page_iface_wp_viewporter_desc Description - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - * @section page_iface_wp_viewporter_api API - * See @ref iface_wp_viewporter. - */ -/** - * @defgroup iface_wp_viewporter The wp_viewporter interface - * - * The global interface exposing surface cropping and scaling - * capabilities is used to instantiate an interface extension for a - * wl_surface object. This extended interface will then allow - * cropping and scaling the surface contents, effectively - * disconnecting the direct relationship between the buffer and the - * surface size. - */ -extern const struct wl_interface wp_viewporter_interface; -/** - * @page page_iface_wp_viewport wp_viewport - * @section page_iface_wp_viewport_desc Description - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - * @section page_iface_wp_viewport_api API - * See @ref iface_wp_viewport. - */ -/** - * @defgroup iface_wp_viewport The wp_viewport interface - * - * An additional interface to a wl_surface object, which allows the - * client to specify the cropping and scaling of the surface - * contents. - * - * This interface works with two concepts: the source rectangle (src_x, - * src_y, src_width, src_height), and the destination size (dst_width, - * dst_height). The contents of the source rectangle are scaled to the - * destination size, and content outside the source rectangle is ignored. - * This state is double-buffered, and is applied on the next - * wl_surface.commit. - * - * The two parts of crop and scale state are independent: the source - * rectangle, and the destination size. Initially both are unset, that - * is, no scaling is applied. The whole of the current wl_buffer is - * used as the source, and the surface size is as defined in - * wl_surface.attach. - * - * If the destination size is set, it causes the surface size to become - * dst_width, dst_height. The source (rectangle) is scaled to exactly - * this size. This overrides whatever the attached wl_buffer size is, - * unless the wl_buffer is NULL. If the wl_buffer is NULL, the surface - * has no content and therefore no size. Otherwise, the size is always - * at least 1x1 in surface local coordinates. - * - * If the source rectangle is set, it defines what area of the wl_buffer is - * taken as the source. If the source rectangle is set and the destination - * size is not set, then src_width and src_height must be integers, and the - * surface size becomes the source rectangle size. This results in cropping - * without scaling. If src_width or src_height are not integers and - * destination size is not set, the bad_size protocol error is raised when - * the surface state is applied. - * - * The coordinate transformations from buffer pixel coordinates up to - * the surface-local coordinates happen in the following order: - * 1. buffer_transform (wl_surface.set_buffer_transform) - * 2. buffer_scale (wl_surface.set_buffer_scale) - * 3. crop and scale (wp_viewport.set*) - * This means, that the source rectangle coordinates of crop and scale - * are given in the coordinates after the buffer transform and scale, - * i.e. in the coordinates that would be the surface-local coordinates - * if the crop and scale was not applied. - * - * If src_x or src_y are negative, the bad_value protocol error is raised. - * Otherwise, if the source rectangle is partially or completely outside of - * the non-NULL wl_buffer, then the out_of_buffer protocol error is raised - * when the surface state is applied. A NULL wl_buffer does not raise the - * out_of_buffer error. - * - * The x, y arguments of wl_surface.attach are applied as normal to - * the surface. They indicate how many pixels to remove from the - * surface size from the left and the top. In other words, they are - * still in the surface-local coordinate system, just like dst_width - * and dst_height are. - * - * If the wl_surface associated with the wp_viewport is destroyed, - * all wp_viewport requests except 'destroy' raise the protocol error - * no_surface. - * - * If the wp_viewport object is destroyed, the crop and scale - * state is removed from the wl_surface. The change will be applied - * on the next wl_surface.commit. - */ -extern const struct wl_interface wp_viewport_interface; - -#ifndef WP_VIEWPORTER_ERROR_ENUM -#define WP_VIEWPORTER_ERROR_ENUM -enum wp_viewporter_error { - /** - * the surface already has a viewport object associated - */ - WP_VIEWPORTER_ERROR_VIEWPORT_EXISTS = 0, -}; -#endif /* WP_VIEWPORTER_ERROR_ENUM */ - -/** - * @ingroup iface_wp_viewporter - * @struct wp_viewporter_interface - */ -struct wp_viewporter_interface { - /** - * unbind from the cropping and scaling interface - * - * Informs the server that the client will not be using this - * protocol object anymore. This does not affect any other objects, - * wp_viewport objects included. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * extend surface interface for crop and scale - * - * Instantiate an interface extension for the given wl_surface to - * crop and scale its content. If the given wl_surface already has - * a wp_viewport object associated, the viewport_exists protocol - * error is raised. - * @param id the new viewport interface id - * @param surface the surface - */ - void (*get_viewport)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); -}; - - -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewporter - */ -#define WP_VIEWPORTER_GET_VIEWPORT_SINCE_VERSION 1 - -#ifndef WP_VIEWPORT_ERROR_ENUM -#define WP_VIEWPORT_ERROR_ENUM -enum wp_viewport_error { - /** - * negative or zero values in width or height - */ - WP_VIEWPORT_ERROR_BAD_VALUE = 0, - /** - * destination size is not integer - */ - WP_VIEWPORT_ERROR_BAD_SIZE = 1, - /** - * source rectangle extends outside of the content area - */ - WP_VIEWPORT_ERROR_OUT_OF_BUFFER = 2, - /** - * the wl_surface was destroyed - */ - WP_VIEWPORT_ERROR_NO_SURFACE = 3, -}; -#endif /* WP_VIEWPORT_ERROR_ENUM */ - -/** - * @ingroup iface_wp_viewport - * @struct wp_viewport_interface - */ -struct wp_viewport_interface { - /** - * remove scaling and cropping from the surface - * - * The associated wl_surface's crop and scale state is removed. - * The change is applied on the next wl_surface.commit. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the source rectangle for cropping - * - * Set the source rectangle of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If all of x, y, width and height are -1.0, the source rectangle - * is unset instead. Any other set of values where width or height - * are zero or negative, or x or y are negative, raise the - * bad_value protocol error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param x source rectangle x - * @param y source rectangle y - * @param width source rectangle width - * @param height source rectangle height - */ - void (*set_source)(struct wl_client *client, - struct wl_resource *resource, - wl_fixed_t x, - wl_fixed_t y, - wl_fixed_t width, - wl_fixed_t height); - /** - * set the surface size for scaling - * - * Set the destination size of the associated wl_surface. See - * wp_viewport for the description, and relation to the wl_buffer - * size. - * - * If width is -1 and height is -1, the destination size is unset - * instead. Any other pair of values for width and height that - * contains zero or negative values raises the bad_value protocol - * error. - * - * The crop and scale state is double-buffered state, and will be - * applied on the next wl_surface.commit. - * @param width surface width - * @param height surface height - */ - void (*set_destination)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); -}; - - -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_SOURCE_SINCE_VERSION 1 -/** - * @ingroup iface_wp_viewport - */ -#define WP_VIEWPORT_SET_DESTINATION_SINCE_VERSION 1 - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h deleted file mode 100644 index 5a37d0007c6..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-client-protocol.h +++ /dev/null @@ -1,257 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H -#define VSYNC_FEEDBACK_UNSTABLE_V1_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_vsync_feedback_unstable_v1 The vsync_feedback_unstable_v1 protocol - * Protocol for providing vertical synchronization timing - * - * @section page_desc_vsync_feedback_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to inform the client about - * vertical synchronization timing in a precise way and without unnecessary - * overhead. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the version number in the protocol is removed and - * the interface version number is reset. - * - * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces - * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing - * - @subpage page_iface_zcr_vsync_timing_v1 - - * @section page_copyright_vsync_feedback_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct zcr_vsync_feedback_v1; -struct zcr_vsync_timing_v1; - -/** - * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1 - * @section page_iface_zcr_vsync_feedback_v1_desc Description - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - * @section page_iface_zcr_vsync_feedback_v1_api API - * See @ref iface_zcr_vsync_feedback_v1. - */ -/** - * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - */ -extern const struct wl_interface zcr_vsync_feedback_v1_interface; -/** - * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1 - * @section page_iface_zcr_vsync_timing_v1_api API - * See @ref iface_zcr_vsync_timing_v1. - */ -/** - * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface - */ -extern const struct wl_interface zcr_vsync_timing_v1_interface; - -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY 0 -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING 1 - - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1 - -/** @ingroup iface_zcr_vsync_feedback_v1 */ -static inline void -zcr_vsync_feedback_v1_set_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_feedback_v1, user_data); -} - -/** @ingroup iface_zcr_vsync_feedback_v1 */ -static inline void * -zcr_vsync_feedback_v1_get_user_data(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -static inline uint32_t -zcr_vsync_feedback_v1_get_version(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * - * Destroy this vsync feedback object. Existing vsync timing objects shall - * not be affected by this request. - */ -static inline void -zcr_vsync_feedback_v1_destroy(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_vsync_feedback_v1, - ZCR_VSYNC_FEEDBACK_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_vsync_feedback_v1); -} - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * - * Create a new vsync timing object that represents a subscription to - * vertical synchronization timing updates of given wl_output object. - * - * The newly created object will immediately signal an update to notify - * the subscriber of initial timing parameters. - */ -static inline struct zcr_vsync_timing_v1 * -zcr_vsync_feedback_v1_get_vsync_timing(struct zcr_vsync_feedback_v1 *zcr_vsync_feedback_v1, struct wl_output *output) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zcr_vsync_feedback_v1, - ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING, &zcr_vsync_timing_v1_interface, NULL, output); - - return (struct zcr_vsync_timing_v1 *) id; -} - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * @struct zcr_vsync_timing_v1_listener - */ -struct zcr_vsync_timing_v1_listener { - /** - * vsync timing updated - * - * Notifies client that vertical synchronization timing of given - * wl_output has changed. - * - * Timing information consists of two data, timebase and interval. - * Timebase is an absolute timestamp of the vsync event that caused - * the timing to change. Interval is a period of time between - * subsequent vsync events. - * - * The unit of all above mentioned time values shall be - * microseconds and absolute timestamps should match the realm of - * the primary system monotonic counter, i.e. the POSIX - * clock_gettime(CLOCK_MONOTONIC). Data type of both values is - * defined to be a 64-bit unsigned integer, but since the biggest - * unsigned integer datatype defined by the Wayland protocol is the - * 32-bit uint, both timebase and interval are split into most - * significant and least significant part, suffixed by "_h" and - * "_l" respectively. - * @param timebase_l new vsync timebase (lower 32 bits) - * @param timebase_h new vsync timebase (upper 32 bits) - * @param interval_l new vsync interval (lower 32 bits) - * @param interval_h new vsync interval (upper 32 bits) - */ - void (*update)(void *data, - struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, - uint32_t timebase_l, - uint32_t timebase_h, - uint32_t interval_l, - uint32_t interval_h); -}; - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -static inline int -zcr_vsync_timing_v1_add_listener(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, - const struct zcr_vsync_timing_v1_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zcr_vsync_timing_v1, - (void (**)(void)) listener, data); -} - -#define ZCR_VSYNC_TIMING_V1_DESTROY 0 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_UPDATE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_zcr_vsync_timing_v1 */ -static inline void -zcr_vsync_timing_v1_set_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zcr_vsync_timing_v1, user_data); -} - -/** @ingroup iface_zcr_vsync_timing_v1 */ -static inline void * -zcr_vsync_timing_v1_get_user_data(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zcr_vsync_timing_v1); -} - -static inline uint32_t -zcr_vsync_timing_v1_get_version(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - return wl_proxy_get_version((struct wl_proxy *) zcr_vsync_timing_v1); -} - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * - * Destroy this vsync timing object. - */ -static inline void -zcr_vsync_timing_v1_destroy(struct zcr_vsync_timing_v1 *zcr_vsync_timing_v1) -{ - wl_proxy_marshal((struct wl_proxy *) zcr_vsync_timing_v1, - ZCR_VSYNC_TIMING_V1_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zcr_vsync_timing_v1); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h deleted file mode 100644 index 67c1f8da480..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/vsync-feedback-unstable-v1-server-protocol.h +++ /dev/null @@ -1,179 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef VSYNC_FEEDBACK_UNSTABLE_V1_SERVER_PROTOCOL_H -#define VSYNC_FEEDBACK_UNSTABLE_V1_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_vsync_feedback_unstable_v1 The vsync_feedback_unstable_v1 protocol - * Protocol for providing vertical synchronization timing - * - * @section page_desc_vsync_feedback_unstable_v1 Description - * - * This protocol specifies a set of interfaces used to inform the client about - * vertical synchronization timing in a precise way and without unnecessary - * overhead. - * - * 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 interface version bump. Backward - * incompatible changes are done by bumping the version number in the protocol - * and interface names and resetting the interface version. Once the protocol - * is to be declared stable, the version number in the protocol is removed and - * the interface version number is reset. - * - * @section page_ifaces_vsync_feedback_unstable_v1 Interfaces - * - @subpage page_iface_zcr_vsync_feedback_v1 - Protocol for providing vertical synchronization timing - * - @subpage page_iface_zcr_vsync_timing_v1 - - * @section page_copyright_vsync_feedback_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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct zcr_vsync_feedback_v1; -struct zcr_vsync_timing_v1; - -/** - * @page page_iface_zcr_vsync_feedback_v1 zcr_vsync_feedback_v1 - * @section page_iface_zcr_vsync_feedback_v1_desc Description - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - * @section page_iface_zcr_vsync_feedback_v1_api API - * See @ref iface_zcr_vsync_feedback_v1. - */ -/** - * @defgroup iface_zcr_vsync_feedback_v1 The zcr_vsync_feedback_v1 interface - * - * The global interface that allows clients to subscribe for vertical - * synchronization timing data for given wl_output. - */ -extern const struct wl_interface zcr_vsync_feedback_v1_interface; -/** - * @page page_iface_zcr_vsync_timing_v1 zcr_vsync_timing_v1 - * @section page_iface_zcr_vsync_timing_v1_api API - * See @ref iface_zcr_vsync_timing_v1. - */ -/** - * @defgroup iface_zcr_vsync_timing_v1 The zcr_vsync_timing_v1 interface - */ -extern const struct wl_interface zcr_vsync_timing_v1_interface; - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - * @struct zcr_vsync_feedback_v1_interface - */ -struct zcr_vsync_feedback_v1_interface { - /** - * destroy vsync feedback object - * - * Destroy this vsync feedback object. Existing vsync timing - * objects shall not be affected by this request. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * get vsync timing object for given wl_output - * - * Create a new vsync timing object that represents a - * subscription to vertical synchronization timing updates of given - * wl_output object. - * - * The newly created object will immediately signal an update to - * notify the subscriber of initial timing parameters. - * @param id the new vsync timing interface id - * @param output the wl_output object to subscribe for timings of - */ - void (*get_vsync_timing)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *output); -}; - - -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zcr_vsync_feedback_v1 - */ -#define ZCR_VSYNC_FEEDBACK_V1_GET_VSYNC_TIMING_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * @struct zcr_vsync_timing_v1_interface - */ -struct zcr_vsync_timing_v1_interface { - /** - * destroy vsync timing object - * - * Destroy this vsync timing object. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZCR_VSYNC_TIMING_V1_UPDATE 0 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_UPDATE_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - */ -#define ZCR_VSYNC_TIMING_V1_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_zcr_vsync_timing_v1 - * Sends an update event to the client owning the resource. - * @param resource_ The client's resource - * @param timebase_l new vsync timebase (lower 32 bits) - * @param timebase_h new vsync timebase (upper 32 bits) - * @param interval_l new vsync interval (lower 32 bits) - * @param interval_h new vsync interval (upper 32 bits) - */ -static inline void -zcr_vsync_timing_v1_send_update(struct wl_resource *resource_, uint32_t timebase_l, uint32_t timebase_h, uint32_t interval_l, uint32_t interval_h) -{ - wl_resource_post_event(resource_, ZCR_VSYNC_TIMING_V1_UPDATE, timebase_l, timebase_h, interval_l, interval_h); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h deleted file mode 100644 index 95d708514bb..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-client-protocol.h +++ /dev/null @@ -1,1110 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V5_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_xdg_shell_unstable_v5 The xdg_shell_unstable_v5 protocol - * @section page_ifaces_xdg_shell_unstable_v5 Interfaces - * - @subpage page_iface_xdg_shell - create desktop-style surfaces - * - @subpage page_iface_xdg_surface - A desktop window - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v5 Copyright - * <pre> - * - * Copyright © 2008-2013 Kristian Høgsberg - * Copyright © 2013 Rafael Antognolli - * Copyright © 2013 Jasper St. Pierre - * Copyright © 2010-2013 Intel Corporation - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct xdg_popup; -struct xdg_shell; -struct xdg_surface; - -/** - * @page page_iface_xdg_shell xdg_shell - * @section page_iface_xdg_shell_desc Description - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - * @section page_iface_xdg_shell_api API - * See @ref iface_xdg_shell. - */ -/** - * @defgroup iface_xdg_shell The xdg_shell interface - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - */ -extern const struct wl_interface xdg_shell_interface; -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like maximized, fullscreen, minimized, and to move and resize - * them, and associate metadata like title and app id. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. Prior to committing the new - * state, it can set up initial configuration, such as maximizing or setting - * a window geometry. - * - * Even without attaching a buffer the compositor must respond to initial - * committed configuration, for instance sending a configure event with - * expected window geometry if the client maximized its surface during - * initialization. - * - * For a surface to be mapped by the compositor the client must have - * committed both an xdg_surface state and a buffer. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like maximized, fullscreen, minimized, and to move and resize - * them, and associate metadata like title and app id. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. Prior to committing the new - * state, it can set up initial configuration, such as maximizing or setting - * a window geometry. - * - * Even without attaching a buffer the compositor must respond to initial - * committed configuration, for instance sending a configure event with - * expected window geometry if the client maximized its surface during - * initialization. - * - * For a surface to be mapped by the compositor the client must have - * committed both an xdg_surface state and a buffer. - */ -extern const struct wl_interface xdg_surface_interface; -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * A popup surface is a short-lived, temporary surface that can be - * used to implement menus. It takes an explicit grab on the surface - * that will be dismissed when the user dismisses the popup. This can - * be done by the user clicking outside the surface, using the keyboard, - * or even locking the screen through closing the lid or a timeout. - * - * When the popup is dismissed, a popup_done event will be sent out, - * and at the same time the surface will be unmapped. The xdg_popup - * object is now inert and cannot be reactivated, so clients should - * destroy it. Explicitly destroying the xdg_popup object will also - * dismiss the popup and unmap the surface. - * - * Clients will receive events for all their surfaces during this - * grab (which is an "owner-events" grab in X11 parlance). This is - * done so that users can navigate through submenus and other - * "nested" popup windows without having to dismiss the topmost - * popup. - * - * Clients that want to dismiss the popup when another surface of - * their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either an xdg_surface or xdg_popup - * role. - * - * Specifying an xdg_popup for the parent means that the popups are - * nested, with this popup now being the topmost popup. Nested - * popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times - * is the topmost one. - * - * If there is an existing popup when creating a new popup, the - * parent must be the current topmost popup. - * - * A parent surface must be mapped before the new popup is mapped. - * - * When compositors choose to dismiss a popup, they will likely - * dismiss every nested popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_shell.get_xdg_popup. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both the xdg_popup state and a buffer. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * A popup surface is a short-lived, temporary surface that can be - * used to implement menus. It takes an explicit grab on the surface - * that will be dismissed when the user dismisses the popup. This can - * be done by the user clicking outside the surface, using the keyboard, - * or even locking the screen through closing the lid or a timeout. - * - * When the popup is dismissed, a popup_done event will be sent out, - * and at the same time the surface will be unmapped. The xdg_popup - * object is now inert and cannot be reactivated, so clients should - * destroy it. Explicitly destroying the xdg_popup object will also - * dismiss the popup and unmap the surface. - * - * Clients will receive events for all their surfaces during this - * grab (which is an "owner-events" grab in X11 parlance). This is - * done so that users can navigate through submenus and other - * "nested" popup windows without having to dismiss the topmost - * popup. - * - * Clients that want to dismiss the popup when another surface of - * their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either an xdg_surface or xdg_popup - * role. - * - * Specifying an xdg_popup for the parent means that the popups are - * nested, with this popup now being the topmost popup. Nested - * popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times - * is the topmost one. - * - * If there is an existing popup when creating a new popup, the - * parent must be the current topmost popup. - * - * A parent surface must be mapped before the new popup is mapped. - * - * When compositors choose to dismiss a popup, they will likely - * dismiss every nested popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_shell.get_xdg_popup. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both the xdg_popup state and a buffer. - */ -extern const struct wl_interface xdg_popup_interface; - -#ifndef XDG_SHELL_VERSION_ENUM -#define XDG_SHELL_VERSION_ENUM -/** - * @ingroup iface_xdg_shell - * latest protocol version - * - * The 'current' member of this enum gives the version of the - * protocol. Implementations can compare this to the version - * they implement using static_assert to ensure the protocol and - * implementation versions match. - */ -enum xdg_shell_version { - /** - * Always the latest version - */ - XDG_SHELL_VERSION_CURRENT = 5, -}; -#endif /* XDG_SHELL_VERSION_ENUM */ - -#ifndef XDG_SHELL_ERROR_ENUM -#define XDG_SHELL_ERROR_ENUM -enum xdg_shell_error { - /** - * given wl_surface has another role - */ - XDG_SHELL_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - XDG_SHELL_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - XDG_SHELL_ERROR_INVALID_POPUP_PARENT = 3, -}; -#endif /* XDG_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_xdg_shell - * @struct xdg_shell_listener - */ -struct xdg_shell_listener { - /** - * check if the client is alive - * - * The ping event asks the client if it's still alive. Pass the - * serial specified in the event back to the compositor by sending - * a "pong" request back with the specified serial. - * - * Compositors can use this to determine if the client is still - * alive. It's unspecified what will happen if the client doesn't - * respond to the ping request, or in what timeframe. Clients - * should try to respond in a reasonable amount of time. - * - * A compositor is free to ping in any way it wants, but a client - * must always respond to any xdg_shell object it created. - * @param serial pass this to the pong request - */ - void (*ping)(void *data, - struct xdg_shell *xdg_shell, - uint32_t serial); -}; - -/** - * @ingroup iface_xdg_shell - */ -static inline int -xdg_shell_add_listener(struct xdg_shell *xdg_shell, - const struct xdg_shell_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_shell, - (void (**)(void)) listener, data); -} - -#define XDG_SHELL_DESTROY 0 -#define XDG_SHELL_USE_UNSTABLE_VERSION 1 -#define XDG_SHELL_GET_XDG_SURFACE 2 -#define XDG_SHELL_GET_XDG_POPUP 3 -#define XDG_SHELL_PONG 4 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_USE_UNSTABLE_VERSION_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PONG_SINCE_VERSION 1 - -/** @ingroup iface_xdg_shell */ -static inline void -xdg_shell_set_user_data(struct xdg_shell *xdg_shell, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_shell, user_data); -} - -/** @ingroup iface_xdg_shell */ -static inline void * -xdg_shell_get_user_data(struct xdg_shell *xdg_shell) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_shell); -} - -static inline uint32_t -xdg_shell_get_version(struct xdg_shell *xdg_shell) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_shell); -} - -/** - * @ingroup iface_xdg_shell - * - * Destroy this xdg_shell object. - * - * Destroying a bound xdg_shell object while there are surfaces - * still alive created by this xdg_shell object instance is illegal - * and will result in a protocol error. - */ -static inline void -xdg_shell_destroy(struct xdg_shell *xdg_shell) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_shell); -} - -/** - * @ingroup iface_xdg_shell - * - * Negotiate the unstable version of the interface. This - * mechanism is in place to ensure client and server agree on the - * unstable versions of the protocol that they speak or exit - * cleanly if they don't agree. This request will go away once - * the xdg-shell protocol is stable. - */ -static inline void -xdg_shell_use_unstable_version(struct xdg_shell *xdg_shell, int32_t version) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_USE_UNSTABLE_VERSION, version); -} - -/** - * @ingroup iface_xdg_shell - * - * This creates an xdg_surface for the given surface and gives it the - * xdg_surface role. A wl_surface can only be given an xdg_surface role - * once. If get_xdg_surface is called with a wl_surface that already has - * an active xdg_surface associated with it, or if it had any other role, - * an error is raised. - * - * See the documentation of xdg_surface for more details about what an - * xdg_surface is and how it is used. - */ -static inline struct xdg_surface * -xdg_shell_get_xdg_surface(struct xdg_shell *xdg_shell, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_shell, - XDG_SHELL_GET_XDG_SURFACE, &xdg_surface_interface, NULL, surface); - - return (struct xdg_surface *) id; -} - -/** - * @ingroup iface_xdg_shell - * - * This creates an xdg_popup for the given surface and gives it the - * xdg_popup role. A wl_surface can only be given an xdg_popup role - * once. If get_xdg_popup is called with a wl_surface that already has - * an active xdg_popup associated with it, or if it had any other role, - * an error is raised. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. - * - * See the documentation of xdg_popup for more details about what an - * xdg_popup is and how it is used. - */ -static inline struct xdg_popup * -xdg_shell_get_xdg_popup(struct xdg_shell *xdg_shell, struct wl_surface *surface, struct wl_surface *parent, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) xdg_shell, - XDG_SHELL_GET_XDG_POPUP, &xdg_popup_interface, NULL, surface, parent, seat, serial, x, y); - - return (struct xdg_popup *) id; -} - -/** - * @ingroup iface_xdg_shell - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - */ -static inline void -xdg_shell_pong(struct xdg_shell *xdg_shell, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_shell, - XDG_SHELL_PONG, serial); -} - -#ifndef XDG_SURFACE_RESIZE_EDGE_ENUM -#define XDG_SURFACE_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum xdg_surface_resize_edge { - XDG_SURFACE_RESIZE_EDGE_NONE = 0, - XDG_SURFACE_RESIZE_EDGE_TOP = 1, - XDG_SURFACE_RESIZE_EDGE_BOTTOM = 2, - XDG_SURFACE_RESIZE_EDGE_LEFT = 4, - XDG_SURFACE_RESIZE_EDGE_TOP_LEFT = 5, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_LEFT = 6, - XDG_SURFACE_RESIZE_EDGE_RIGHT = 8, - XDG_SURFACE_RESIZE_EDGE_TOP_RIGHT = 9, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* XDG_SURFACE_RESIZE_EDGE_ENUM */ - -#ifndef XDG_SURFACE_STATE_ENUM -#define XDG_SURFACE_STATE_ENUM -/** - * @ingroup iface_xdg_surface - * the surface is now activated - * - * Client window decorations should be painted as if the window is - * active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ -enum xdg_surface_state { - /** - * the surface is maximized - */ - XDG_SURFACE_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - XDG_SURFACE_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - XDG_SURFACE_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - XDG_SURFACE_STATE_ACTIVATED = 4, -}; -#endif /* XDG_SURFACE_STATE_ENUM */ - -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_listener - */ -struct xdg_surface_listener { - /** - * suggest a surface change - * - * The configure event asks the client to resize its surface or - * to change its state. - * - * The width and height arguments specify a hint to the window - * about how its surface should be resized in window geometry - * coordinates. See set_window_geometry. - * - * If the width or height arguments are zero, it means the client - * should decide its own window dimension. This may happen when the - * compositor need to configure the state of the surface but - * doesn't have any information about any previous or expected - * dimension. - * - * The states listed in the event specify how the width/height - * arguments should be interpreted, and possibly how it should be - * drawn. - * - * Clients should arrange their surface for the new size and - * states, and then send a ack_configure request with the serial - * sent in this configure event at some point before committing the - * new surface. - * - * If the client receives multiple configure events before it can - * respond to one, it is free to discard all but the last event it - * received. - */ - void (*configure)(void *data, - struct xdg_surface *xdg_surface, - int32_t width, - int32_t height, - struct wl_array *states, - uint32_t serial); - /** - * surface wants to be closed - * - * The close event is sent by the compositor when the user wants - * the surface to be closed. This should be equivalent to the user - * clicking the close button in client-side decorations, if your - * application has any... - * - * This is only a request that the user intends to close your - * window. The client may choose to ignore this request, or show a - * dialog to ask the user to save their data... - */ - void (*close)(void *data, - struct xdg_surface *xdg_surface); -}; - -/** - * @ingroup iface_xdg_surface - */ -static inline int -xdg_surface_add_listener(struct xdg_surface *xdg_surface, - const struct xdg_surface_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_surface, - (void (**)(void)) listener, data); -} - -#define XDG_SURFACE_DESTROY 0 -#define XDG_SURFACE_SET_PARENT 1 -#define XDG_SURFACE_SET_TITLE 2 -#define XDG_SURFACE_SET_APP_ID 3 -#define XDG_SURFACE_SHOW_WINDOW_MENU 4 -#define XDG_SURFACE_MOVE 5 -#define XDG_SURFACE_RESIZE 6 -#define XDG_SURFACE_ACK_CONFIGURE 7 -#define XDG_SURFACE_SET_WINDOW_GEOMETRY 8 -#define XDG_SURFACE_SET_MAXIMIZED 9 -#define XDG_SURFACE_UNSET_MAXIMIZED 10 -#define XDG_SURFACE_SET_FULLSCREEN 11 -#define XDG_SURFACE_UNSET_FULLSCREEN 12 -#define XDG_SURFACE_SET_MINIMIZED 13 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MINIMIZED_SINCE_VERSION 1 - -/** @ingroup iface_xdg_surface */ -static inline void -xdg_surface_set_user_data(struct xdg_surface *xdg_surface, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_surface, user_data); -} - -/** @ingroup iface_xdg_surface */ -static inline void * -xdg_surface_get_user_data(struct xdg_surface *xdg_surface) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_surface); -} - -static inline uint32_t -xdg_surface_get_version(struct xdg_surface *xdg_surface) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_surface); -} - -/** - * @ingroup iface_xdg_surface - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state like - * maximization, fullscreen, and so on, will be lost. - */ -static inline void -xdg_surface_destroy(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_surface); -} - -/** - * @ingroup iface_xdg_surface - * - * Set the "parent" of this surface. This window should be stacked - * above a parent. The parent surface must be mapped as long as this - * surface is mapped. - * - * Parent windows should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the dialog - * is raised. - */ -static inline void -xdg_surface_set_parent(struct xdg_surface *xdg_surface, struct xdg_surface *parent) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_PARENT, parent); -} - -/** - * @ingroup iface_xdg_surface - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -xdg_surface_set_title(struct xdg_surface *xdg_surface, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_TITLE, title); -} - -/** - * @ingroup iface_xdg_surface - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group multiple - * surfaces together, or to determine how to launch a new application. - * - * For D-Bus activatable applications, the app ID is used as the D-Bus - * service name. - * - * The compositor shell will try to group application surfaces together - * by their app ID. As a best practice, it is suggested to select app - * ID's that match the basename of the application's .desktop file. - * For example, "org.freedesktop.FooViewer" where the .desktop file is - * "org.freedesktop.FooViewer.desktop". - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] http://standards.freedesktop.org/desktop-entry-spec/ - */ -static inline void -xdg_surface_set_app_id(struct xdg_surface *xdg_surface, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_xdg_surface - * - * Clients implementing client-side decorations might want to show - * a context menu when right-clicking on the decorations, giving the - * user a menu that they can use to maximize or minimize the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu items - * the window menu contains. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. - */ -static inline void -xdg_surface_show_window_menu(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SHOW_WINDOW_MENU, seat, serial, x, y); -} - -/** - * @ingroup iface_xdg_surface - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive move (touch, - * pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed serial - * is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, such as - * updating a pointer cursor, during the move. There is no guarantee - * that the device focus will return when the move is completed. - */ -static inline void -xdg_surface_move(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_MOVE, seat, serial); -} - -/** - * @ingroup iface_xdg_surface - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive resize (touch, - * pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the "resize" - * enum value for more details about what is required. The client - * must also acknowledge configure events using "ack_configure". After - * the resize is completed, the client will receive another "configure" - * event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is no - * guarantee that the device focus will return when the resize is - * completed. - * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. The compositor - * may use this information to update the surface position for - * example when dragging the top left corner. The compositor may also - * use this information to adapt its behavior, e.g. choose an - * appropriate cursor image. - */ -static inline void -xdg_surface_resize(struct xdg_surface *xdg_surface, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_xdg_surface - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client - * must make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, the compositor might use this information to move - * a surface to the top left only when the client has drawn itself - * for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it - * can respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending - * an ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * The compositor expects that the most recently received - * ack_configure request at the time of a commit indicates which - * configure event the client is responding to. - */ -static inline void -xdg_surface_ack_configure(struct xdg_surface *xdg_surface, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_ACK_CONFIGURE, serial); -} - -/** - * @ingroup iface_xdg_surface - * - * The window geometry of a window is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset mode is meant for extremely simple clients. - * - * If responding to a configure event, the window geometry in here - * must respect the sizing negotiations specified by the states in - * the configure event. - * - * The arguments are given in the surface local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. - */ -static inline void -xdg_surface_set_window_geometry(struct xdg_surface *xdg_surface, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_xdg_surface - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the compositor - * will respond by emitting a configure event with the "maximized" state - * and the required window geometry. The client should then update its - * content, drawing it in a maximized state, i.e. without shadow or other - * decoration outside of the window geometry. The client must also - * acknowledge the configure when committing the new content (see - * ack_configure). - * - * It is up to the compositor to decide how and where to maximize the - * surface, for example which output and what region of the screen should - * be used. - * - * If the surface was already maximized, the compositor will still emit - * a configure event with the "maximized" state. - */ -static inline void -xdg_surface_set_maximized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_MAXIMIZED); -} - -/** - * @ingroup iface_xdg_surface - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the compositor - * will respond by emitting a configure event without the "maximized" - * state. If available, the compositor will include the window geometry - * dimensions the window had prior to being maximized in the configure - * request. The client must then update its content, drawing it in a - * regular state, i.e. potentially with shadow, etc. The client must also - * acknowledge the configure when committing the new content (see - * ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before maximizing, if - * applicable. - * - * If the surface was already not maximized, the compositor will still - * emit a configure event without the "maximized" state. - */ -static inline void -xdg_surface_unset_maximized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_UNSET_MAXIMIZED); -} - -/** - * @ingroup iface_xdg_surface - * - * Make the surface fullscreen. - * - * You can specify an output that you would prefer to be fullscreen. - * If this value is NULL, it's up to the compositor to choose which - * display will be used to map this surface. - * - * If the surface doesn't cover the whole output, the compositor will - * position the surface in the center of the output and compensate with - * black borders filling the rest of the output. - */ -static inline void -xdg_surface_set_fullscreen(struct xdg_surface *xdg_surface, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_FULLSCREEN, output); -} - -/** - * @ingroup iface_xdg_surface - */ -static inline void -xdg_surface_unset_fullscreen(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_UNSET_FULLSCREEN); -} - -/** - * @ingroup iface_xdg_surface - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ -static inline void -xdg_surface_set_minimized(struct xdg_surface *xdg_surface) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_surface, - XDG_SURFACE_SET_MINIMIZED); -} - -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_listener - */ -struct xdg_popup_listener { - /** - * popup interaction is done - * - * The popup_done event is sent out when a popup is dismissed by - * the compositor. The client should destroy the xdg_popup object - * at this point. - */ - void (*popup_done)(void *data, - struct xdg_popup *xdg_popup); -}; - -/** - * @ingroup iface_xdg_popup - */ -static inline int -xdg_popup_add_listener(struct xdg_popup *xdg_popup, - const struct xdg_popup_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) xdg_popup, - (void (**)(void)) listener, data); -} - -#define XDG_POPUP_DESTROY 0 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_DESTROY_SINCE_VERSION 1 - -/** @ingroup iface_xdg_popup */ -static inline void -xdg_popup_set_user_data(struct xdg_popup *xdg_popup, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) xdg_popup, user_data); -} - -/** @ingroup iface_xdg_popup */ -static inline void * -xdg_popup_get_user_data(struct xdg_popup *xdg_popup) -{ - return wl_proxy_get_user_data((struct wl_proxy *) xdg_popup); -} - -static inline uint32_t -xdg_popup_get_version(struct xdg_popup *xdg_popup) -{ - return wl_proxy_get_version((struct wl_proxy *) xdg_popup); -} - -/** - * @ingroup iface_xdg_popup - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ -static inline void -xdg_popup_destroy(struct xdg_popup *xdg_popup) -{ - wl_proxy_marshal((struct wl_proxy *) xdg_popup, - XDG_POPUP_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) xdg_popup); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h deleted file mode 100644 index 4ef85e7add2..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v5-server-protocol.h +++ /dev/null @@ -1,903 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V5_SERVER_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V5_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_xdg_shell_unstable_v5 The xdg_shell_unstable_v5 protocol - * @section page_ifaces_xdg_shell_unstable_v5 Interfaces - * - @subpage page_iface_xdg_shell - create desktop-style surfaces - * - @subpage page_iface_xdg_surface - A desktop window - * - @subpage page_iface_xdg_popup - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v5 Copyright - * <pre> - * - * Copyright © 2008-2013 Kristian Høgsberg - * Copyright © 2013 Rafael Antognolli - * Copyright © 2013 Jasper St. Pierre - * Copyright © 2010-2013 Intel Corporation - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct xdg_popup; -struct xdg_shell; -struct xdg_surface; - -/** - * @page page_iface_xdg_shell xdg_shell - * @section page_iface_xdg_shell_desc Description - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - * @section page_iface_xdg_shell_api API - * See @ref iface_xdg_shell. - */ -/** - * @defgroup iface_xdg_shell The xdg_shell interface - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - */ -extern const struct wl_interface xdg_shell_interface; -/** - * @page page_iface_xdg_surface xdg_surface - * @section page_iface_xdg_surface_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like maximized, fullscreen, minimized, and to move and resize - * them, and associate metadata like title and app id. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. Prior to committing the new - * state, it can set up initial configuration, such as maximizing or setting - * a window geometry. - * - * Even without attaching a buffer the compositor must respond to initial - * committed configuration, for instance sending a configure event with - * expected window geometry if the client maximized its surface during - * initialization. - * - * For a surface to be mapped by the compositor the client must have - * committed both an xdg_surface state and a buffer. - * @section page_iface_xdg_surface_api API - * See @ref iface_xdg_surface. - */ -/** - * @defgroup iface_xdg_surface The xdg_surface interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides requests to treat surfaces like windows, allowing to set - * properties like maximized, fullscreen, minimized, and to move and resize - * them, and associate metadata like title and app id. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. Prior to committing the new - * state, it can set up initial configuration, such as maximizing or setting - * a window geometry. - * - * Even without attaching a buffer the compositor must respond to initial - * committed configuration, for instance sending a configure event with - * expected window geometry if the client maximized its surface during - * initialization. - * - * For a surface to be mapped by the compositor the client must have - * committed both an xdg_surface state and a buffer. - */ -extern const struct wl_interface xdg_surface_interface; -/** - * @page page_iface_xdg_popup xdg_popup - * @section page_iface_xdg_popup_desc Description - * - * A popup surface is a short-lived, temporary surface that can be - * used to implement menus. It takes an explicit grab on the surface - * that will be dismissed when the user dismisses the popup. This can - * be done by the user clicking outside the surface, using the keyboard, - * or even locking the screen through closing the lid or a timeout. - * - * When the popup is dismissed, a popup_done event will be sent out, - * and at the same time the surface will be unmapped. The xdg_popup - * object is now inert and cannot be reactivated, so clients should - * destroy it. Explicitly destroying the xdg_popup object will also - * dismiss the popup and unmap the surface. - * - * Clients will receive events for all their surfaces during this - * grab (which is an "owner-events" grab in X11 parlance). This is - * done so that users can navigate through submenus and other - * "nested" popup windows without having to dismiss the topmost - * popup. - * - * Clients that want to dismiss the popup when another surface of - * their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either an xdg_surface or xdg_popup - * role. - * - * Specifying an xdg_popup for the parent means that the popups are - * nested, with this popup now being the topmost popup. Nested - * popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times - * is the topmost one. - * - * If there is an existing popup when creating a new popup, the - * parent must be the current topmost popup. - * - * A parent surface must be mapped before the new popup is mapped. - * - * When compositors choose to dismiss a popup, they will likely - * dismiss every nested popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_shell.get_xdg_popup. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both the xdg_popup state and a buffer. - * @section page_iface_xdg_popup_api API - * See @ref iface_xdg_popup. - */ -/** - * @defgroup iface_xdg_popup The xdg_popup interface - * - * A popup surface is a short-lived, temporary surface that can be - * used to implement menus. It takes an explicit grab on the surface - * that will be dismissed when the user dismisses the popup. This can - * be done by the user clicking outside the surface, using the keyboard, - * or even locking the screen through closing the lid or a timeout. - * - * When the popup is dismissed, a popup_done event will be sent out, - * and at the same time the surface will be unmapped. The xdg_popup - * object is now inert and cannot be reactivated, so clients should - * destroy it. Explicitly destroying the xdg_popup object will also - * dismiss the popup and unmap the surface. - * - * Clients will receive events for all their surfaces during this - * grab (which is an "owner-events" grab in X11 parlance). This is - * done so that users can navigate through submenus and other - * "nested" popup windows without having to dismiss the topmost - * popup. - * - * Clients that want to dismiss the popup when another surface of - * their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either an xdg_surface or xdg_popup - * role. - * - * Specifying an xdg_popup for the parent means that the popups are - * nested, with this popup now being the topmost popup. Nested - * popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times - * is the topmost one. - * - * If there is an existing popup when creating a new popup, the - * parent must be the current topmost popup. - * - * A parent surface must be mapped before the new popup is mapped. - * - * When compositors choose to dismiss a popup, they will likely - * dismiss every nested popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_shell.get_xdg_popup. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * - * For a surface to be mapped by the compositor the client must have - * committed both the xdg_popup state and a buffer. - */ -extern const struct wl_interface xdg_popup_interface; - -#ifndef XDG_SHELL_VERSION_ENUM -#define XDG_SHELL_VERSION_ENUM -/** - * @ingroup iface_xdg_shell - * latest protocol version - * - * The 'current' member of this enum gives the version of the - * protocol. Implementations can compare this to the version - * they implement using static_assert to ensure the protocol and - * implementation versions match. - */ -enum xdg_shell_version { - /** - * Always the latest version - */ - XDG_SHELL_VERSION_CURRENT = 5, -}; -#endif /* XDG_SHELL_VERSION_ENUM */ - -#ifndef XDG_SHELL_ERROR_ENUM -#define XDG_SHELL_ERROR_ENUM -enum xdg_shell_error { - /** - * given wl_surface has another role - */ - XDG_SHELL_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - XDG_SHELL_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - XDG_SHELL_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - XDG_SHELL_ERROR_INVALID_POPUP_PARENT = 3, -}; -#endif /* XDG_SHELL_ERROR_ENUM */ - -/** - * @ingroup iface_xdg_shell - * @struct xdg_shell_interface - */ -struct xdg_shell_interface { - /** - * destroy xdg_shell - * - * Destroy this xdg_shell object. - * - * Destroying a bound xdg_shell object while there are surfaces - * still alive created by this xdg_shell object instance is illegal - * and will result in a protocol error. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * enable use of this unstable version - * - * Negotiate the unstable version of the interface. This - * mechanism is in place to ensure client and server agree on the - * unstable versions of the protocol that they speak or exit - * cleanly if they don't agree. This request will go away once the - * xdg-shell protocol is stable. - */ - void (*use_unstable_version)(struct wl_client *client, - struct wl_resource *resource, - int32_t version); - /** - * create a shell surface from a surface - * - * This creates an xdg_surface for the given surface and gives it - * the xdg_surface role. A wl_surface can only be given an - * xdg_surface role once. If get_xdg_surface is called with a - * wl_surface that already has an active xdg_surface associated - * with it, or if it had any other role, an error is raised. - * - * See the documentation of xdg_surface for more details about what - * an xdg_surface is and how it is used. - */ - void (*get_xdg_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); - /** - * create a popup for a surface - * - * This creates an xdg_popup for the given surface and gives it - * the xdg_popup role. A wl_surface can only be given an xdg_popup - * role once. If get_xdg_popup is called with a wl_surface that - * already has an active xdg_popup associated with it, or if it had - * any other role, an error is raised. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. - * - * See the documentation of xdg_popup for more details about what - * an xdg_popup is and how it is used. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*get_xdg_popup)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface, - struct wl_resource *parent, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. - * @param serial serial of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define XDG_SHELL_PING 0 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_USE_UNSTABLE_VERSION_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_GET_XDG_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_shell - */ -#define XDG_SHELL_PONG_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_shell - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial pass this to the pong request - */ -static inline void -xdg_shell_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, XDG_SHELL_PING, serial); -} - -#ifndef XDG_SURFACE_RESIZE_EDGE_ENUM -#define XDG_SURFACE_RESIZE_EDGE_ENUM -/** - * @ingroup iface_xdg_surface - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum xdg_surface_resize_edge { - XDG_SURFACE_RESIZE_EDGE_NONE = 0, - XDG_SURFACE_RESIZE_EDGE_TOP = 1, - XDG_SURFACE_RESIZE_EDGE_BOTTOM = 2, - XDG_SURFACE_RESIZE_EDGE_LEFT = 4, - XDG_SURFACE_RESIZE_EDGE_TOP_LEFT = 5, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_LEFT = 6, - XDG_SURFACE_RESIZE_EDGE_RIGHT = 8, - XDG_SURFACE_RESIZE_EDGE_TOP_RIGHT = 9, - XDG_SURFACE_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* XDG_SURFACE_RESIZE_EDGE_ENUM */ - -#ifndef XDG_SURFACE_STATE_ENUM -#define XDG_SURFACE_STATE_ENUM -/** - * @ingroup iface_xdg_surface - * the surface is now activated - * - * Client window decorations should be painted as if the window is - * active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ -enum xdg_surface_state { - /** - * the surface is maximized - */ - XDG_SURFACE_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - XDG_SURFACE_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - XDG_SURFACE_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - XDG_SURFACE_STATE_ACTIVATED = 4, -}; -#endif /* XDG_SURFACE_STATE_ENUM */ - -/** - * @ingroup iface_xdg_surface - * @struct xdg_surface_interface - */ -struct xdg_surface_interface { - /** - * Destroy the xdg_surface - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state like - * maximization, fullscreen, and so on, will be lost. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the parent of this surface - * - * Set the "parent" of this surface. This window should be - * stacked above a parent. The parent surface must be mapped as - * long as this surface is mapped. - * - * Parent windows should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the - * dialog is raised. - */ - void (*set_parent)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent); - /** - * set surface title - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set application ID - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group - * multiple surfaces together, or to determine how to launch a new - * application. - * - * For D-Bus activatable applications, the app ID is used as the - * D-Bus service name. - * - * The compositor shell will try to group application surfaces - * together by their app ID. As a best practice, it is suggested to - * select app ID's that match the basename of the application's - * .desktop file. For example, "org.freedesktop.FooViewer" where - * the .desktop file is "org.freedesktop.FooViewer.desktop". - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] http://standards.freedesktop.org/desktop-entry-spec/ - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * show the window menu - * - * Clients implementing client-side decorations might want to - * show a context menu when right-clicking on the decorations, - * giving the user a menu that they can use to maximize or minimize - * the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu - * items the window menu contains. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param x the x position to pop up the window menu at - * @param y the y position to pop up the window menu at - */ - void (*show_window_menu)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * start an interactive move - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive move - * (touch, pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed - * serial is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, - * such as updating a pointer cursor, during the move. There is no - * guarantee that the device focus will return when the move is - * completed. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive - * resize (touch, pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the - * "resize" enum value for more details about what is required. The - * client must also acknowledge configure events using - * "ack_configure". After the resize is completed, the client will - * receive another "configure" event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is - * no guarantee that the device focus will return when the resize - * is completed. - * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. The compositor - * may use this information to update the surface position for - * example when dragging the top left corner. The compositor may - * also use this information to adapt its behavior, e.g. choose an - * appropriate cursor image. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * ack a configure event - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client must - * make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, the compositor might use this information to move - * a surface to the top left only when the client has drawn itself - * for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it can - * respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending an - * ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * The compositor expects that the most recently received - * ack_configure request at the time of a commit indicates which - * configure event the client is responding to. - * @param serial the serial from the configure event - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); - /** - * set the new window geometry - * - * The window geometry of a window is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set once, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset mode is meant for extremely simple clients. - * - * If responding to a configure event, the window geometry in here - * must respect the sizing negotiations specified by the states in - * the configure event. - * - * The arguments are given in the surface local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * maximize the window - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the - * compositor will respond by emitting a configure event with the - * "maximized" state and the required window geometry. The client - * should then update its content, drawing it in a maximized state, - * i.e. without shadow or other decoration outside of the window - * geometry. The client must also acknowledge the configure when - * committing the new content (see ack_configure). - * - * It is up to the compositor to decide how and where to maximize - * the surface, for example which output and what region of the - * screen should be used. - * - * If the surface was already maximized, the compositor will still - * emit a configure event with the "maximized" state. - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * unmaximize the window - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the - * compositor will respond by emitting a configure event without - * the "maximized" state. If available, the compositor will include - * the window geometry dimensions the window had prior to being - * maximized in the configure request. The client must then update - * its content, drawing it in a regular state, i.e. potentially - * with shadow, etc. The client must also acknowledge the configure - * when committing the new content (see ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before - * maximizing, if applicable. - * - * If the surface was already not maximized, the compositor will - * still emit a configure event without the "maximized" state. - */ - void (*unset_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as fullscreen on a monitor - * - * Make the surface fullscreen. - * - * You can specify an output that you would prefer to be - * fullscreen. If this value is NULL, it's up to the compositor to - * choose which display will be used to map this surface. - * - * If the surface doesn't cover the whole output, the compositor - * will position the surface in the center of the output and - * compensate with black borders filling the rest of the output. - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - */ - void (*unset_fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as minimized - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ - void (*set_minimized)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define XDG_SURFACE_CONFIGURE 0 -#define XDG_SURFACE_CLOSE 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_ACK_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_xdg_surface - */ -#define XDG_SURFACE_SET_MINIMIZED_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_surface - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_surface_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states, uint32_t serial) -{ - wl_resource_post_event(resource_, XDG_SURFACE_CONFIGURE, width, height, states, serial); -} - -/** - * @ingroup iface_xdg_surface - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_surface_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, XDG_SURFACE_CLOSE); -} - -/** - * @ingroup iface_xdg_popup - * @struct xdg_popup_interface - */ -struct xdg_popup_interface { - /** - * remove xdg_popup interface - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define XDG_POPUP_POPUP_DONE 0 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - */ -#define XDG_POPUP_DESTROY_SINCE_VERSION 1 - -/** - * @ingroup iface_xdg_popup - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -xdg_popup_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, XDG_POPUP_POPUP_DONE); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h deleted file mode 100644 index 50475ca6274..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-client-protocol.h +++ /dev/null @@ -1,1750 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V6_CLIENT_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-client.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol - * @section page_ifaces_xdg_shell_unstable_v6 Interfaces - * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces - * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner - * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface - * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface - * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v6 Copyright - * <pre> - * - * Copyright © 2008-2013 Kristian Høgsberg - * Copyright © 2013 Rafael Antognolli - * Copyright © 2013 Jasper St. Pierre - * Copyright © 2010-2013 Intel Corporation - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct zxdg_popup_v6; -struct zxdg_positioner_v6; -struct zxdg_shell_v6; -struct zxdg_surface_v6; -struct zxdg_toplevel_v6; - -/** - * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 - * @section page_iface_zxdg_shell_v6_desc Description - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - * @section page_iface_zxdg_shell_v6_api API - * See @ref iface_zxdg_shell_v6. - */ -/** - * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - */ -extern const struct wl_interface zxdg_shell_v6_interface; -/** - * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 - * @section page_iface_zxdg_positioner_v6_desc Description - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. - * @section page_iface_zxdg_positioner_v6_api API - * See @ref iface_zxdg_positioner_v6. - */ -/** - * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. - */ -extern const struct wl_interface zxdg_positioner_v6_interface; -/** - * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 - * @section page_iface_zxdg_surface_v6_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * For a surface to be mapped by the compositor, the following conditions - * must be met: (1) the client has assigned a xdg_surface based role to the - * surface, (2) the client has set and committed the xdg_surface state and - * the role dependent state to the surface and (3) the client has committed a - * buffer to the surface. - * @section page_iface_zxdg_surface_v6_api API - * See @ref iface_zxdg_surface_v6. - */ -/** - * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * For a surface to be mapped by the compositor, the following conditions - * must be met: (1) the client has assigned a xdg_surface based role to the - * surface, (2) the client has set and committed the xdg_surface state and - * the role dependent state to the surface and (3) the client has committed a - * buffer to the surface. - */ -extern const struct wl_interface zxdg_surface_v6_interface; -/** - * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 - * @section page_iface_zxdg_toplevel_v6_desc Description - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * @section page_iface_zxdg_toplevel_v6_api API - * See @ref iface_zxdg_toplevel_v6. - */ -/** - * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - */ -extern const struct wl_interface zxdg_toplevel_v6_interface; -/** - * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 - * @section page_iface_zxdg_popup_v6_desc Description - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either the xdg_toplevel or xdg_popup surface - * role. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_surface.get_popup. An xdg_popup must intersect with or be at least - * partially adjacent to its parent surface. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * @section page_iface_zxdg_popup_v6_api API - * See @ref iface_zxdg_popup_v6. - */ -/** - * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either the xdg_toplevel or xdg_popup surface - * role. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_surface.get_popup. An xdg_popup must intersect with or be at least - * partially adjacent to its parent surface. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - */ -extern const struct wl_interface zxdg_popup_v6_interface; - -#ifndef ZXDG_SHELL_V6_ERROR_ENUM -#define ZXDG_SHELL_V6_ERROR_ENUM -enum zxdg_shell_v6_error { - /** - * given wl_surface has another role - */ - ZXDG_SHELL_V6_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ - ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ - ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, -}; -#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_shell_v6 - * @struct zxdg_shell_v6_listener - */ -struct zxdg_shell_v6_listener { - /** - * check if the client is alive - * - * The ping event asks the client if it's still alive. Pass the - * serial specified in the event back to the compositor by sending - * a "pong" request back with the specified serial. See - * xdg_shell.ping. - * - * Compositors can use this to determine if the client is still - * alive. It's unspecified what will happen if the client doesn't - * respond to the ping request, or in what timeframe. Clients - * should try to respond in a reasonable amount of time. - * - * A compositor is free to ping in any way it wants, but a client - * must always respond to any xdg_shell object it created. - * @param serial pass this to the pong request - */ - void (*ping)(void *data, - struct zxdg_shell_v6 *zxdg_shell_v6, - uint32_t serial); -}; - -/** - * @ingroup iface_zxdg_shell_v6 - */ -static inline int -zxdg_shell_v6_add_listener(struct zxdg_shell_v6 *zxdg_shell_v6, - const struct zxdg_shell_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_shell_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_SHELL_V6_DESTROY 0 -#define ZXDG_SHELL_V6_CREATE_POSITIONER 1 -#define ZXDG_SHELL_V6_GET_XDG_SURFACE 2 -#define ZXDG_SHELL_V6_PONG 3 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_shell_v6 */ -static inline void -zxdg_shell_v6_set_user_data(struct zxdg_shell_v6 *zxdg_shell_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_shell_v6, user_data); -} - -/** @ingroup iface_zxdg_shell_v6 */ -static inline void * -zxdg_shell_v6_get_user_data(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_shell_v6); -} - -static inline uint32_t -zxdg_shell_v6_get_version(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_shell_v6); -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * Destroy this xdg_shell object. - * - * Destroying a bound xdg_shell object while there are surfaces - * still alive created by this xdg_shell object instance is illegal - * and will result in a protocol error. - */ -static inline void -zxdg_shell_v6_destroy(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_shell_v6); -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * Create a positioner object. A positioner object is used to position - * surfaces relative to some parent surface. See the interface description - * and xdg_surface.get_popup for details. - */ -static inline struct zxdg_positioner_v6 * -zxdg_shell_v6_create_positioner(struct zxdg_shell_v6 *zxdg_shell_v6) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_CREATE_POSITIONER, &zxdg_positioner_v6_interface, NULL); - - return (struct zxdg_positioner_v6 *) id; -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * This creates an xdg_surface for the given surface. While xdg_surface - * itself is not a role, the corresponding surface may only be assigned - * a role extending xdg_surface, such as xdg_toplevel or xdg_popup. - * - * This creates an xdg_surface for the given surface. An xdg_surface is - * used as basis to define a role to a given surface, such as xdg_toplevel - * or xdg_popup. It also manages functionality shared between xdg_surface - * based surface roles. - * - * See the documentation of xdg_surface for more details about what an - * xdg_surface is and how it is used. - */ -static inline struct zxdg_surface_v6 * -zxdg_shell_v6_get_xdg_surface(struct zxdg_shell_v6 *zxdg_shell_v6, struct wl_surface *surface) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_GET_XDG_SURFACE, &zxdg_surface_v6_interface, NULL, surface); - - return (struct zxdg_surface_v6 *) id; -} - -/** - * @ingroup iface_zxdg_shell_v6 - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_shell.ping. - */ -static inline void -zxdg_shell_v6_pong(struct zxdg_shell_v6 *zxdg_shell_v6, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_shell_v6, - ZXDG_SHELL_V6_PONG, serial); -} - -#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM -#define ZXDG_POSITIONER_V6_ERROR_ENUM -enum zxdg_positioner_v6_error { - /** - * invalid input provided - */ - ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, -}; -#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM -#define ZXDG_POSITIONER_V6_ANCHOR_ENUM -enum zxdg_positioner_v6_anchor { - /** - * the center of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, - /** - * the top edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, - /** - * the bottom edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, - /** - * the left edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, - /** - * the right edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM -#define ZXDG_POSITIONER_V6_GRAVITY_ENUM -enum zxdg_positioner_v6_gravity { - /** - * center over the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, - /** - * position above the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, - /** - * position below the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, - /** - * position to the left of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, - /** - * position to the right of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_zxdg_positioner_v6 - * vertically resize the surface - * - * Resize the surface vertically so that it is completely unconstrained. - */ -enum zxdg_positioner_v6_constraint_adjustment { - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, -}; -#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ - -#define ZXDG_POSITIONER_V6_DESTROY 0 -#define ZXDG_POSITIONER_V6_SET_SIZE 1 -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT 2 -#define ZXDG_POSITIONER_V6_SET_ANCHOR 3 -#define ZXDG_POSITIONER_V6_SET_GRAVITY 4 -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT 5 -#define ZXDG_POSITIONER_V6_SET_OFFSET 6 - - -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_positioner_v6 */ -static inline void -zxdg_positioner_v6_set_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_positioner_v6, user_data); -} - -/** @ingroup iface_zxdg_positioner_v6 */ -static inline void * -zxdg_positioner_v6_get_user_data(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_positioner_v6); -} - -static inline uint32_t -zxdg_positioner_v6_get_version(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_positioner_v6); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Notify the compositor that the xdg_positioner will no longer be used. - */ -static inline void -zxdg_positioner_v6_destroy(struct zxdg_positioner_v6 *zxdg_positioner_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_positioner_v6); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Set the size of the surface that is to be positioned with the positioner - * object. The size is in surface-local coordinates and corresponds to the - * window geometry. See xdg_surface.set_window_geometry. - * - * If a zero or negative size is set the invalid_input error is raised. - */ -static inline void -zxdg_positioner_v6_set_size(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Specify the anchor rectangle within the parent surface that the child - * surface will be placed relative to. The rectangle is relative to the - * window geometry as defined by xdg_surface.set_window_geometry of the - * parent surface. The rectangle must be at least 1x1 large. - * - * When the xdg_positioner object is used to position a child surface, the - * anchor rectangle may not extend outside the window geometry of the - * positioned child's parent surface. - * - * If a zero or negative size is set the invalid_input error is raised. - */ -static inline void -zxdg_positioner_v6_set_anchor_rect(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_ANCHOR_RECT, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Defines a set of edges for the anchor rectangle. These are used to - * derive an anchor point that the child surface will be positioned - * relative to. If two orthogonal edges are specified (e.g. 'top' and - * 'left'), then the anchor point will be the intersection of the edges - * (e.g. the top left position of the rectangle); otherwise, the derived - * anchor point will be centered on the specified edge, or in the center of - * the anchor rectangle if no edge is specified. - * - * If two parallel anchor edges are specified (e.g. 'left' and 'right'), - * the invalid_input error is raised. - */ -static inline void -zxdg_positioner_v6_set_anchor(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t anchor) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_ANCHOR, anchor); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Defines in what direction a surface should be positioned, relative to - * the anchor point of the parent surface. If two orthogonal gravities are - * specified (e.g. 'bottom' and 'right'), then the child surface will be - * placed in the specified direction; otherwise, the child surface will be - * centered over the anchor point on any axis that had no gravity - * specified. - * - * If two parallel gravities are specified (e.g. 'left' and 'right'), the - * invalid_input error is raised. - */ -static inline void -zxdg_positioner_v6_set_gravity(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t gravity) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_GRAVITY, gravity); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Specify how the window should be positioned if the originally intended - * position caused the surface to be constrained, meaning at least - * partially outside positioning boundaries set by the compositor. The - * adjustment is set by constructing a bitmask describing the adjustment to - * be made when the surface is constrained on that axis. - * - * If no bit for one axis is set, the compositor will assume that the child - * surface should not change its position on that axis when constrained. - * - * If more than one bit for one axis is set, the order of how adjustments - * are applied is specified in the corresponding adjustment descriptions. - * - * The default adjustment is none. - */ -static inline void -zxdg_positioner_v6_set_constraint_adjustment(struct zxdg_positioner_v6 *zxdg_positioner_v6, uint32_t constraint_adjustment) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT, constraint_adjustment); -} - -/** - * @ingroup iface_zxdg_positioner_v6 - * - * Specify the surface position offset relative to the position of the - * anchor on the anchor rectangle and the anchor on the surface. For - * example if the anchor of the anchor rectangle is at (x, y), the surface - * has the gravity bottom|right, and the offset is (ox, oy), the calculated - * surface position will be (x + ox, y + oy). The offset position of the - * surface is the one used for constraint testing. See - * set_constraint_adjustment. - * - * An example use case is placing a popup menu on top of a user interface - * element, while aligning the user interface element of the parent surface - * with some user interface element placed somewhere in the popup surface. - */ -static inline void -zxdg_positioner_v6_set_offset(struct zxdg_positioner_v6 *zxdg_positioner_v6, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_positioner_v6, - ZXDG_POSITIONER_V6_SET_OFFSET, x, y); -} - -#ifndef ZXDG_SURFACE_V6_ERROR_ENUM -#define ZXDG_SURFACE_V6_ERROR_ENUM -enum zxdg_surface_v6_error { - ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, - ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, - ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, -}; -#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_surface_v6 - * @struct zxdg_surface_v6_listener - */ -struct zxdg_surface_v6_listener { - /** - * suggest a surface change - * - * The configure event marks the end of a configure sequence. A - * configure sequence is a set of one or more events configuring - * the state of the xdg_surface, including the final - * xdg_surface.configure event. - * - * Where applicable, xdg_surface surface roles will during a - * configure sequence extend this event as a latched state sent as - * events before the xdg_surface.configure event. Such events - * should be considered to make up a set of atomically applied - * configuration states, where the xdg_surface.configure commits - * the accumulated state. - * - * Clients should arrange their surface for the new states, and - * then send an ack_configure request with the serial sent in this - * configure event at some point before committing the new surface. - * - * If the client receives multiple configure events before it can - * respond to one, it is free to discard all but the last event it - * received. - * @param serial serial of the configure event - */ - void (*configure)(void *data, - struct zxdg_surface_v6 *zxdg_surface_v6, - uint32_t serial); -}; - -/** - * @ingroup iface_zxdg_surface_v6 - */ -static inline int -zxdg_surface_v6_add_listener(struct zxdg_surface_v6 *zxdg_surface_v6, - const struct zxdg_surface_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_surface_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_SURFACE_V6_DESTROY 0 -#define ZXDG_SURFACE_V6_GET_TOPLEVEL 1 -#define ZXDG_SURFACE_V6_GET_POPUP 2 -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY 3 -#define ZXDG_SURFACE_V6_ACK_CONFIGURE 4 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_surface_v6 */ -static inline void -zxdg_surface_v6_set_user_data(struct zxdg_surface_v6 *zxdg_surface_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_surface_v6, user_data); -} - -/** @ingroup iface_zxdg_surface_v6 */ -static inline void * -zxdg_surface_v6_get_user_data(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_surface_v6); -} - -static inline uint32_t -zxdg_surface_v6_get_version(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_surface_v6); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * Destroy the xdg_surface object. An xdg_surface must only be destroyed - * after its role object has been destroyed. - */ -static inline void -zxdg_surface_v6_destroy(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_surface_v6); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * This creates an xdg_toplevel object for the given xdg_surface and gives - * the associated wl_surface the xdg_toplevel role. - * - * See the documentation of xdg_toplevel for more details about what an - * xdg_toplevel is and how it is used. - */ -static inline struct zxdg_toplevel_v6 * -zxdg_surface_v6_get_toplevel(struct zxdg_surface_v6 *zxdg_surface_v6) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_GET_TOPLEVEL, &zxdg_toplevel_v6_interface, NULL); - - return (struct zxdg_toplevel_v6 *) id; -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * This creates an xdg_popup object for the given xdg_surface and gives the - * associated wl_surface the xdg_popup role. - * - * See the documentation of xdg_popup for more details about what an - * xdg_popup is and how it is used. - */ -static inline struct zxdg_popup_v6 * -zxdg_surface_v6_get_popup(struct zxdg_surface_v6 *zxdg_surface_v6, struct zxdg_surface_v6 *parent, struct zxdg_positioner_v6 *positioner) -{ - struct wl_proxy *id; - - id = wl_proxy_marshal_constructor((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_GET_POPUP, &zxdg_popup_v6_interface, NULL, parent, positioner); - - return (struct zxdg_popup_v6 *) id; -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * The window geometry of a surface is its "visible bounds" from the - * user's perspective. Client-side decorations often have invisible - * portions like drop-shadows which should be ignored for the - * purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at the - * time wl_surface.commit of the corresponding wl_surface is called. - * - * Once the window geometry of the surface is set, it is not possible to - * unset it, and it will remain the same until set_window_geometry is - * called again, even if a new subsurface or buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an invalid size - * will raise an error. When applied, the effective window geometry will be - * the set window geometry clamped to the bounding rectangle of the - * combined geometry of the surface of the xdg_surface and the associated - * subsurfaces. - */ -static inline void -zxdg_surface_v6_set_window_geometry(struct zxdg_surface_v6 *zxdg_surface_v6, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_surface_v6 - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client - * must make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, for toplevel surfaces the compositor might use this - * information to move a surface to the top left only when the client has - * drawn itself for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it - * can respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending - * an ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before committing, but - * only the last request sent before a commit indicates which configure - * event the client really is responding to. - */ -static inline void -zxdg_surface_v6_ack_configure(struct zxdg_surface_v6 *zxdg_surface_v6, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_surface_v6, - ZXDG_SURFACE_V6_ACK_CONFIGURE, serial); -} - -#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum zxdg_toplevel_v6_resize_edge { - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ - -#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM -#define ZXDG_TOPLEVEL_V6_STATE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * the surface is now activated - * - * Client window decorations should be painted as if the window is - * active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ -enum zxdg_toplevel_v6_state { - /** - * the surface is maximized - */ - ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, -}; -#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ - -/** - * @ingroup iface_zxdg_toplevel_v6 - * @struct zxdg_toplevel_v6_listener - */ -struct zxdg_toplevel_v6_listener { - /** - * suggest a surface change - * - * This configure event asks the client to resize its toplevel - * surface or to change its state. The configured state should not - * be applied immediately. See xdg_surface.configure for details. - * - * The width and height arguments specify a hint to the window - * about how its surface should be resized in window geometry - * coordinates. See set_window_geometry. - * - * If the width or height arguments are zero, it means the client - * should decide its own window dimension. This may happen when the - * compositor needs to configure the state of the surface but - * doesn't have any information about any previous or expected - * dimension. - * - * The states listed in the event specify how the width/height - * arguments should be interpreted, and possibly how it should be - * drawn. - * - * Clients must send an ack_configure in response to this event. - * See xdg_surface.configure and xdg_surface.ack_configure for - * details. - */ - void (*configure)(void *data, - struct zxdg_toplevel_v6 *zxdg_toplevel_v6, - int32_t width, - int32_t height, - struct wl_array *states); - /** - * surface wants to be closed - * - * The close event is sent by the compositor when the user wants - * the surface to be closed. This should be equivalent to the user - * clicking the close button in client-side decorations, if your - * application has any. - * - * This is only a request that the user intends to close the - * window. The client may choose to ignore this request, or show a - * dialog to ask the user to save their data, etc. - */ - void (*close)(void *data, - struct zxdg_toplevel_v6 *zxdg_toplevel_v6); -}; - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -static inline int -zxdg_toplevel_v6_add_listener(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, - const struct zxdg_toplevel_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_TOPLEVEL_V6_DESTROY 0 -#define ZXDG_TOPLEVEL_V6_SET_PARENT 1 -#define ZXDG_TOPLEVEL_V6_SET_TITLE 2 -#define ZXDG_TOPLEVEL_V6_SET_APP_ID 3 -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU 4 -#define ZXDG_TOPLEVEL_V6_MOVE 5 -#define ZXDG_TOPLEVEL_V6_RESIZE 6 -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE 7 -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE 8 -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED 9 -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED 10 -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN 11 -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN 12 -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED 13 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_toplevel_v6 */ -static inline void -zxdg_toplevel_v6_set_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_v6, user_data); -} - -/** @ingroup iface_zxdg_toplevel_v6 */ -static inline void * -zxdg_toplevel_v6_get_user_data(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_v6); -} - -static inline uint32_t -zxdg_toplevel_v6_get_version(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_v6); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state like - * maximization, fullscreen, and so on, will be lost. - */ -static inline void -zxdg_toplevel_v6_destroy(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_v6); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set the "parent" of this surface. This window should be stacked - * above a parent. The parent surface must be mapped as long as this - * surface is mapped. - * - * Parent windows should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the dialog - * is raised. - */ -static inline void -zxdg_toplevel_v6_set_parent(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct zxdg_toplevel_v6 *parent) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_PARENT, parent); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ -static inline void -zxdg_toplevel_v6_set_title(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *title) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_TITLE, title); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group multiple - * surfaces together, or to determine how to launch a new application. - * - * For D-Bus activatable applications, the app ID is used as the D-Bus - * service name. - * - * The compositor shell will try to group application surfaces together - * by their app ID. As a best practice, it is suggested to select app - * ID's that match the basename of the application's .desktop file. - * For example, "org.freedesktop.FooViewer" where the .desktop file is - * "org.freedesktop.FooViewer.desktop". - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] http://standards.freedesktop.org/desktop-entry-spec/ - */ -static inline void -zxdg_toplevel_v6_set_app_id(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, const char *app_id) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_APP_ID, app_id); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Clients implementing client-side decorations might want to show - * a context menu when right-clicking on the decorations, giving the - * user a menu that they can use to maximize or minimize the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu items - * the window menu contains. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. - */ -static inline void -zxdg_toplevel_v6_show_window_menu(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, int32_t x, int32_t y) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU, seat, serial, x, y); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive move (touch, - * pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed serial - * is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, such as - * updating a pointer cursor, during the move. There is no guarantee - * that the device focus will return when the move is completed. - */ -static inline void -zxdg_toplevel_v6_move(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_MOVE, seat, serial); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user action - * like a button press, key press, or touch down event. The passed - * serial is used to determine the type of interactive resize (touch, - * pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the "resize" - * enum value for more details about what is required. The client - * must also acknowledge configure events using "ack_configure". After - * the resize is completed, the client will receive another "configure" - * event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is no - * guarantee that the device focus will return when the resize is - * completed. - * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. The compositor - * may use this information to update the surface position for - * example when dragging the top left corner. The compositor may also - * use this information to adapt its behavior, e.g. choose an - * appropriate cursor image. - */ -static inline void -zxdg_toplevel_v6_resize(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_seat *seat, uint32_t serial, uint32_t edges) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_RESIZE, seat, serial, edges); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor does - * not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. - * As a result, a client wishing to reset the maximum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * protocol error. - */ -static inline void -zxdg_toplevel_v6_set_max_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MAX_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor does - * not try to configure the window below this size. - * - * The width and height arguments are in window geometry coordinates. - * See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get applied - * on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. - * As a result, a client wishing to reset the minimum size - * to an unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. Using - * strictly negative values for width and height will result in a - * protocol error. - */ -static inline void -zxdg_toplevel_v6_set_min_size(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, int32_t width, int32_t height) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MIN_SIZE, width, height); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the compositor - * will respond by emitting a configure event with the "maximized" state - * and the required window geometry. The client should then update its - * content, drawing it in a maximized state, i.e. without shadow or other - * decoration outside of the window geometry. The client must also - * acknowledge the configure when committing the new content (see - * ack_configure). - * - * It is up to the compositor to decide how and where to maximize the - * surface, for example which output and what region of the screen should - * be used. - * - * If the surface was already maximized, the compositor will still emit - * a configure event with the "maximized" state. - */ -static inline void -zxdg_toplevel_v6_set_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MAXIMIZED); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the compositor - * will respond by emitting a configure event without the "maximized" - * state. If available, the compositor will include the window geometry - * dimensions the window had prior to being maximized in the configure - * request. The client must then update its content, drawing it in a - * regular state, i.e. potentially with shadow, etc. The client must also - * acknowledge the configure when committing the new content (see - * ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before maximizing, if - * applicable. - * - * If the surface was already not maximized, the compositor will still - * emit a configure event without the "maximized" state. - */ -static inline void -zxdg_toplevel_v6_unset_maximized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Make the surface fullscreen. - * - * You can specify an output that you would prefer to be fullscreen. - * If this value is NULL, it's up to the compositor to choose which - * display will be used to map this surface. - * - * If the surface doesn't cover the whole output, the compositor will - * position the surface in the center of the output and compensate with - * black borders filling the rest of the output. - */ -static inline void -zxdg_toplevel_v6_set_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6, struct wl_output *output) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_FULLSCREEN, output); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -static inline void -zxdg_toplevel_v6_unset_fullscreen(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ -static inline void -zxdg_toplevel_v6_set_minimized(struct zxdg_toplevel_v6 *zxdg_toplevel_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_v6, - ZXDG_TOPLEVEL_V6_SET_MINIMIZED); -} - -#ifndef ZXDG_POPUP_V6_ERROR_ENUM -#define ZXDG_POPUP_V6_ERROR_ENUM -enum zxdg_popup_v6_error { - /** - * tried to grab after being mapped - */ - ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, -}; -#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_popup_v6 - * @struct zxdg_popup_v6_listener - */ -struct zxdg_popup_v6_listener { - /** - * configure the popup surface - * - * This event asks the popup surface to configure itself given - * the configuration. The configured state should not be applied - * immediately. See xdg_surface.configure for details. - * - * The x and y arguments represent the position the popup was - * placed at given the xdg_positioner rule, relative to the upper - * left corner of the window geometry of the parent surface. - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ - void (*configure)(void *data, - struct zxdg_popup_v6 *zxdg_popup_v6, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * popup interaction is done - * - * The popup_done event is sent out when a popup is dismissed by - * the compositor. The client should destroy the xdg_popup object - * at this point. - */ - void (*popup_done)(void *data, - struct zxdg_popup_v6 *zxdg_popup_v6); -}; - -/** - * @ingroup iface_zxdg_popup_v6 - */ -static inline int -zxdg_popup_v6_add_listener(struct zxdg_popup_v6 *zxdg_popup_v6, - const struct zxdg_popup_v6_listener *listener, void *data) -{ - return wl_proxy_add_listener((struct wl_proxy *) zxdg_popup_v6, - (void (**)(void)) listener, data); -} - -#define ZXDG_POPUP_V6_DESTROY 0 -#define ZXDG_POPUP_V6_GRAB 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1 - -/** @ingroup iface_zxdg_popup_v6 */ -static inline void -zxdg_popup_v6_set_user_data(struct zxdg_popup_v6 *zxdg_popup_v6, void *user_data) -{ - wl_proxy_set_user_data((struct wl_proxy *) zxdg_popup_v6, user_data); -} - -/** @ingroup iface_zxdg_popup_v6 */ -static inline void * -zxdg_popup_v6_get_user_data(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - return wl_proxy_get_user_data((struct wl_proxy *) zxdg_popup_v6); -} - -static inline uint32_t -zxdg_popup_v6_get_version(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - return wl_proxy_get_version((struct wl_proxy *) zxdg_popup_v6); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ -static inline void -zxdg_popup_v6_destroy(struct zxdg_popup_v6 *zxdg_popup_v6) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, - ZXDG_POPUP_V6_DESTROY); - - wl_proxy_destroy((struct wl_proxy *) zxdg_popup_v6); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * - * This request makes the created popup take an explicit grab. An explicit - * grab will be dismissed when the user dismisses the popup, or when the - * client destroys the xdg_popup. This can be done by the user clicking - * outside the surface, using the keyboard, or even locking the screen - * through closing the lid or a timeout. - * - * If the compositor denies the grab, the popup will be immediately - * dismissed. - * - * This request must be used in response to some sort of user action like a - * button press, key press, or touch down event. The serial number of the - * event should be passed as 'serial'. - * - * The parent of a grabbing popup must either be an xdg_toplevel surface or - * another xdg_popup with an explicit grab. If the parent is another - * xdg_popup it means that the popups are nested, with this popup now being - * the topmost popup. - * - * Nested popups must be destroyed in the reverse order they were created - * in, e.g. the only popup you are allowed to destroy at all times is the - * topmost one. - * - * When compositors choose to dismiss a popup, they may dismiss every - * nested grabbing popup as well. When a compositor dismisses popups, it - * will follow the same dismissing order as required from the client. - * - * The parent of a grabbing popup must either be another xdg_popup with an - * active explicit grab, or an xdg_popup or xdg_toplevel, if there are no - * explicit grabs already taken. - * - * If the topmost grabbing popup is destroyed, the grab will be returned to - * the parent of the popup, if that parent previously had an explicit grab. - * - * If the parent is a grabbing popup which has already been dismissed, this - * popup will be immediately dismissed. If the parent is a popup that did - * not take an explicit grab, an error will be raised. - * - * During a popup grab, the client owning the grab will receive pointer - * and touch events for all their surfaces as normal (similar to an - * "owner-events" grab in X11 parlance), while the top most grabbing popup - * will always have keyboard focus. - */ -static inline void -zxdg_popup_v6_grab(struct zxdg_popup_v6 *zxdg_popup_v6, struct wl_seat *seat, uint32_t serial) -{ - wl_proxy_marshal((struct wl_proxy *) zxdg_popup_v6, - ZXDG_POPUP_V6_GRAB, seat, serial); -} - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h b/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h deleted file mode 100644 index 57dc92bfcb5..00000000000 --- a/chromium/third_party/wayland-protocols/include/protocol/xdg-shell-unstable-v6-server-protocol.h +++ /dev/null @@ -1,1441 +0,0 @@ -/* Generated by wayland-scanner 1.13.0 */ - -#ifndef XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H -#define XDG_SHELL_UNSTABLE_V6_SERVER_PROTOCOL_H - -#include <stdint.h> -#include <stddef.h> -#include "wayland-server.h" - -#ifdef __cplusplus -extern "C" { -#endif - -struct wl_client; -struct wl_resource; - -/** - * @page page_xdg_shell_unstable_v6 The xdg_shell_unstable_v6 protocol - * @section page_ifaces_xdg_shell_unstable_v6 Interfaces - * - @subpage page_iface_zxdg_shell_v6 - create desktop-style surfaces - * - @subpage page_iface_zxdg_positioner_v6 - child surface positioner - * - @subpage page_iface_zxdg_surface_v6 - desktop user interface surface base interface - * - @subpage page_iface_zxdg_toplevel_v6 - toplevel surface - * - @subpage page_iface_zxdg_popup_v6 - short-lived, popup surfaces for menus - * @section page_copyright_xdg_shell_unstable_v6 Copyright - * <pre> - * - * Copyright © 2008-2013 Kristian Høgsberg - * Copyright © 2013 Rafael Antognolli - * Copyright © 2013 Jasper St. Pierre - * Copyright © 2010-2013 Intel Corporation - * - * 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 - * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * 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> - */ -struct wl_output; -struct wl_seat; -struct wl_surface; -struct zxdg_popup_v6; -struct zxdg_positioner_v6; -struct zxdg_shell_v6; -struct zxdg_surface_v6; -struct zxdg_toplevel_v6; - -/** - * @page page_iface_zxdg_shell_v6 zxdg_shell_v6 - * @section page_iface_zxdg_shell_v6_desc Description - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - * @section page_iface_zxdg_shell_v6_api API - * See @ref iface_zxdg_shell_v6. - */ -/** - * @defgroup iface_zxdg_shell_v6 The zxdg_shell_v6 interface - * - * xdg_shell allows clients to turn a wl_surface into a "real window" - * which can be dragged, resized, stacked, and moved around by the - * user. Everything about this interface is suited towards traditional - * desktop environments. - */ -extern const struct wl_interface zxdg_shell_v6_interface; -/** - * @page page_iface_zxdg_positioner_v6 zxdg_positioner_v6 - * @section page_iface_zxdg_positioner_v6_desc Description - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. - * @section page_iface_zxdg_positioner_v6_api API - * See @ref iface_zxdg_positioner_v6. - */ -/** - * @defgroup iface_zxdg_positioner_v6 The zxdg_positioner_v6 interface - * - * The xdg_positioner provides a collection of rules for the placement of a - * child surface relative to a parent surface. Rules can be defined to ensure - * the child surface remains within the visible area's borders, and to - * specify how the child surface changes its position, such as sliding along - * an axis, or flipping around a rectangle. These positioner-created rules are - * constrained by the requirement that a child surface must intersect with or - * be at least partially adjacent to its parent surface. - * - * See the various requests for details about possible rules. - * - * At the time of the request, the compositor makes a copy of the rules - * specified by the xdg_positioner. Thus, after the request is complete the - * xdg_positioner object can be destroyed or reused; further changes to the - * object will have no effect on previous usages. - * - * For an xdg_positioner object to be considered complete, it must have a - * non-zero size set by set_size, and a non-zero anchor rectangle set by - * set_anchor_rect. Passing an incomplete xdg_positioner object when - * positioning a surface raises an error. - */ -extern const struct wl_interface zxdg_positioner_v6_interface; -/** - * @page page_iface_zxdg_surface_v6 zxdg_surface_v6 - * @section page_iface_zxdg_surface_v6_desc Description - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * For a surface to be mapped by the compositor, the following conditions - * must be met: (1) the client has assigned a xdg_surface based role to the - * surface, (2) the client has set and committed the xdg_surface state and - * the role dependent state to the surface and (3) the client has committed a - * buffer to the surface. - * @section page_iface_zxdg_surface_v6_api API - * See @ref iface_zxdg_surface_v6. - */ -/** - * @defgroup iface_zxdg_surface_v6 The zxdg_surface_v6 interface - * - * An interface that may be implemented by a wl_surface, for - * implementations that provide a desktop-style user interface. - * - * It provides a base set of functionality required to construct user - * interface elements requiring management by the compositor, such as - * toplevel windows, menus, etc. The types of functionality are split into - * xdg_surface roles. - * - * Creating an xdg_surface does not set the role for a wl_surface. In order - * to map an xdg_surface, the client must create a role-specific object - * using, e.g., get_toplevel, get_popup. The wl_surface for any given - * xdg_surface can have at most one role, and may not be assigned any role - * not based on xdg_surface. - * - * A role must be assigned before any other requests are made to the - * xdg_surface object. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_surface state to take effect. - * - * Creating an xdg_surface from a wl_surface which has a buffer attached or - * committed is a client error, and any attempts by a client to attach or - * manipulate a buffer prior to the first xdg_surface.configure call must - * also be treated as errors. - * - * For a surface to be mapped by the compositor, the following conditions - * must be met: (1) the client has assigned a xdg_surface based role to the - * surface, (2) the client has set and committed the xdg_surface state and - * the role dependent state to the surface and (3) the client has committed a - * buffer to the surface. - */ -extern const struct wl_interface zxdg_surface_v6_interface; -/** - * @page page_iface_zxdg_toplevel_v6 zxdg_toplevel_v6 - * @section page_iface_zxdg_toplevel_v6_desc Description - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - * @section page_iface_zxdg_toplevel_v6_api API - * See @ref iface_zxdg_toplevel_v6. - */ -/** - * @defgroup iface_zxdg_toplevel_v6 The zxdg_toplevel_v6 interface - * - * This interface defines an xdg_surface role which allows a surface to, - * among other things, set window-like properties such as maximize, - * fullscreen, and minimize, set application-specific metadata like title and - * id, and well as trigger user interactive operations such as interactive - * resize and move. - */ -extern const struct wl_interface zxdg_toplevel_v6_interface; -/** - * @page page_iface_zxdg_popup_v6 zxdg_popup_v6 - * @section page_iface_zxdg_popup_v6_desc Description - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either the xdg_toplevel or xdg_popup surface - * role. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_surface.get_popup. An xdg_popup must intersect with or be at least - * partially adjacent to its parent surface. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - * @section page_iface_zxdg_popup_v6_api API - * See @ref iface_zxdg_popup_v6. - */ -/** - * @defgroup iface_zxdg_popup_v6 The zxdg_popup_v6 interface - * - * A popup surface is a short-lived, temporary surface. It can be used to - * implement for example menus, popovers, tooltips and other similar user - * interface concepts. - * - * A popup can be made to take an explicit grab. See xdg_popup.grab for - * details. - * - * When the popup is dismissed, a popup_done event will be sent out, and at - * the same time the surface will be unmapped. See the xdg_popup.popup_done - * event for details. - * - * Explicitly destroying the xdg_popup object will also dismiss the popup and - * unmap the surface. Clients that want to dismiss the popup when another - * surface of their own is clicked should dismiss the popup using the destroy - * request. - * - * The parent surface must have either the xdg_toplevel or xdg_popup surface - * role. - * - * A newly created xdg_popup will be stacked on top of all previously created - * xdg_popup surfaces associated with the same xdg_toplevel. - * - * The parent of an xdg_popup must be mapped (see the xdg_surface - * description) before the xdg_popup itself. - * - * The x and y arguments passed when creating the popup object specify - * where the top left of the popup should be placed, relative to the - * local surface coordinates of the parent surface. See - * xdg_surface.get_popup. An xdg_popup must intersect with or be at least - * partially adjacent to its parent surface. - * - * The client must call wl_surface.commit on the corresponding wl_surface - * for the xdg_popup state to take effect. - */ -extern const struct wl_interface zxdg_popup_v6_interface; - -#ifndef ZXDG_SHELL_V6_ERROR_ENUM -#define ZXDG_SHELL_V6_ERROR_ENUM -enum zxdg_shell_v6_error { - /** - * given wl_surface has another role - */ - ZXDG_SHELL_V6_ERROR_ROLE = 0, - /** - * xdg_shell was destroyed before children - */ - ZXDG_SHELL_V6_ERROR_DEFUNCT_SURFACES = 1, - /** - * the client tried to map or destroy a non-topmost popup - */ - ZXDG_SHELL_V6_ERROR_NOT_THE_TOPMOST_POPUP = 2, - /** - * the client specified an invalid popup parent surface - */ - ZXDG_SHELL_V6_ERROR_INVALID_POPUP_PARENT = 3, - /** - * the client provided an invalid surface state - */ - ZXDG_SHELL_V6_ERROR_INVALID_SURFACE_STATE = 4, - /** - * the client provided an invalid positioner - */ - ZXDG_SHELL_V6_ERROR_INVALID_POSITIONER = 5, -}; -#endif /* ZXDG_SHELL_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_shell_v6 - * @struct zxdg_shell_v6_interface - */ -struct zxdg_shell_v6_interface { - /** - * destroy xdg_shell - * - * Destroy this xdg_shell object. - * - * Destroying a bound xdg_shell object while there are surfaces - * still alive created by this xdg_shell object instance is illegal - * and will result in a protocol error. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * create a positioner object - * - * Create a positioner object. A positioner object is used to - * position surfaces relative to some parent surface. See the - * interface description and xdg_surface.get_popup for details. - */ - void (*create_positioner)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * create a shell surface from a surface - * - * This creates an xdg_surface for the given surface. While - * xdg_surface itself is not a role, the corresponding surface may - * only be assigned a role extending xdg_surface, such as - * xdg_toplevel or xdg_popup. - * - * This creates an xdg_surface for the given surface. An - * xdg_surface is used as basis to define a role to a given - * surface, such as xdg_toplevel or xdg_popup. It also manages - * functionality shared between xdg_surface based surface roles. - * - * See the documentation of xdg_surface for more details about what - * an xdg_surface is and how it is used. - */ - void (*get_xdg_surface)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *surface); - /** - * respond to a ping event - * - * A client must respond to a ping event with a pong request or - * the client may be deemed unresponsive. See xdg_shell.ping. - * @param serial serial of the ping event - */ - void (*pong)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define ZXDG_SHELL_V6_PING 0 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PING_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_CREATE_POSITIONER_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_GET_XDG_SURFACE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_shell_v6 - */ -#define ZXDG_SHELL_V6_PONG_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_shell_v6 - * Sends an ping event to the client owning the resource. - * @param resource_ The client's resource - * @param serial pass this to the pong request - */ -static inline void -zxdg_shell_v6_send_ping(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, ZXDG_SHELL_V6_PING, serial); -} - -#ifndef ZXDG_POSITIONER_V6_ERROR_ENUM -#define ZXDG_POSITIONER_V6_ERROR_ENUM -enum zxdg_positioner_v6_error { - /** - * invalid input provided - */ - ZXDG_POSITIONER_V6_ERROR_INVALID_INPUT = 0, -}; -#endif /* ZXDG_POSITIONER_V6_ERROR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_ANCHOR_ENUM -#define ZXDG_POSITIONER_V6_ANCHOR_ENUM -enum zxdg_positioner_v6_anchor { - /** - * the center of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_NONE = 0, - /** - * the top edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_TOP = 1, - /** - * the bottom edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_BOTTOM = 2, - /** - * the left edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_LEFT = 4, - /** - * the right edge of the anchor rectangle - */ - ZXDG_POSITIONER_V6_ANCHOR_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_ANCHOR_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_GRAVITY_ENUM -#define ZXDG_POSITIONER_V6_GRAVITY_ENUM -enum zxdg_positioner_v6_gravity { - /** - * center over the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_NONE = 0, - /** - * position above the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_TOP = 1, - /** - * position below the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_BOTTOM = 2, - /** - * position to the left of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_LEFT = 4, - /** - * position to the right of the anchor edge - */ - ZXDG_POSITIONER_V6_GRAVITY_RIGHT = 8, -}; -#endif /* ZXDG_POSITIONER_V6_GRAVITY_ENUM */ - -#ifndef ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -#define ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM -/** - * @ingroup iface_zxdg_positioner_v6 - * vertically resize the surface - * - * Resize the surface vertically so that it is completely unconstrained. - */ -enum zxdg_positioner_v6_constraint_adjustment { - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_NONE = 0, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_X = 1, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_SLIDE_Y = 2, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_X = 4, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_FLIP_Y = 8, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_X = 16, - ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_RESIZE_Y = 32, -}; -#endif /* ZXDG_POSITIONER_V6_CONSTRAINT_ADJUSTMENT_ENUM */ - -/** - * @ingroup iface_zxdg_positioner_v6 - * @struct zxdg_positioner_v6_interface - */ -struct zxdg_positioner_v6_interface { - /** - * destroy the xdg_positioner object - * - * Notify the compositor that the xdg_positioner will no longer - * be used. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the size of the to-be positioned rectangle - * - * Set the size of the surface that is to be positioned with the - * positioner object. The size is in surface-local coordinates and - * corresponds to the window geometry. See - * xdg_surface.set_window_geometry. - * - * If a zero or negative size is set the invalid_input error is - * raised. - * @param width width of positioned rectangle - * @param height height of positioned rectangle - */ - void (*set_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the anchor rectangle within the parent surface - * - * Specify the anchor rectangle within the parent surface that - * the child surface will be placed relative to. The rectangle is - * relative to the window geometry as defined by - * xdg_surface.set_window_geometry of the parent surface. The - * rectangle must be at least 1x1 large. - * - * When the xdg_positioner object is used to position a child - * surface, the anchor rectangle may not extend outside the window - * geometry of the positioned child's parent surface. - * - * If a zero or negative size is set the invalid_input error is - * raised. - * @param x x position of anchor rectangle - * @param y y position of anchor rectangle - * @param width width of anchor rectangle - * @param height height of anchor rectangle - */ - void (*set_anchor_rect)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * set anchor rectangle anchor edges - * - * Defines a set of edges for the anchor rectangle. These are - * used to derive an anchor point that the child surface will be - * positioned relative to. If two orthogonal edges are specified - * (e.g. 'top' and 'left'), then the anchor point will be the - * intersection of the edges (e.g. the top left position of the - * rectangle); otherwise, the derived anchor point will be centered - * on the specified edge, or in the center of the anchor rectangle - * if no edge is specified. - * - * If two parallel anchor edges are specified (e.g. 'left' and - * 'right'), the invalid_input error is raised. - * @param anchor bit mask of anchor edges - */ - void (*set_anchor)(struct wl_client *client, - struct wl_resource *resource, - uint32_t anchor); - /** - * set child surface gravity - * - * Defines in what direction a surface should be positioned, - * relative to the anchor point of the parent surface. If two - * orthogonal gravities are specified (e.g. 'bottom' and 'right'), - * then the child surface will be placed in the specified - * direction; otherwise, the child surface will be centered over - * the anchor point on any axis that had no gravity specified. - * - * If two parallel gravities are specified (e.g. 'left' and - * 'right'), the invalid_input error is raised. - * @param gravity bit mask of gravity directions - */ - void (*set_gravity)(struct wl_client *client, - struct wl_resource *resource, - uint32_t gravity); - /** - * set the adjustment to be done when constrained - * - * Specify how the window should be positioned if the originally - * intended position caused the surface to be constrained, meaning - * at least partially outside positioning boundaries set by the - * compositor. The adjustment is set by constructing a bitmask - * describing the adjustment to be made when the surface is - * constrained on that axis. - * - * If no bit for one axis is set, the compositor will assume that - * the child surface should not change its position on that axis - * when constrained. - * - * If more than one bit for one axis is set, the order of how - * adjustments are applied is specified in the corresponding - * adjustment descriptions. - * - * The default adjustment is none. - * @param constraint_adjustment bit mask of constraint adjustments - */ - void (*set_constraint_adjustment)(struct wl_client *client, - struct wl_resource *resource, - uint32_t constraint_adjustment); - /** - * set surface position offset - * - * Specify the surface position offset relative to the position - * of the anchor on the anchor rectangle and the anchor on the - * surface. For example if the anchor of the anchor rectangle is at - * (x, y), the surface has the gravity bottom|right, and the offset - * is (ox, oy), the calculated surface position will be (x + ox, y - * + oy). The offset position of the surface is the one used for - * constraint testing. See set_constraint_adjustment. - * - * An example use case is placing a popup menu on top of a user - * interface element, while aligning the user interface element of - * the parent surface with some user interface element placed - * somewhere in the popup surface. - * @param x surface position x offset - * @param y surface position y offset - */ - void (*set_offset)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y); -}; - - -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_RECT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_ANCHOR_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_GRAVITY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_CONSTRAINT_ADJUSTMENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_positioner_v6 - */ -#define ZXDG_POSITIONER_V6_SET_OFFSET_SINCE_VERSION 1 - -#ifndef ZXDG_SURFACE_V6_ERROR_ENUM -#define ZXDG_SURFACE_V6_ERROR_ENUM -enum zxdg_surface_v6_error { - ZXDG_SURFACE_V6_ERROR_NOT_CONSTRUCTED = 1, - ZXDG_SURFACE_V6_ERROR_ALREADY_CONSTRUCTED = 2, - ZXDG_SURFACE_V6_ERROR_UNCONFIGURED_BUFFER = 3, -}; -#endif /* ZXDG_SURFACE_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_surface_v6 - * @struct zxdg_surface_v6_interface - */ -struct zxdg_surface_v6_interface { - /** - * destroy the xdg_surface - * - * Destroy the xdg_surface object. An xdg_surface must only be - * destroyed after its role object has been destroyed. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * assign the xdg_toplevel surface role - * - * This creates an xdg_toplevel object for the given xdg_surface - * and gives the associated wl_surface the xdg_toplevel role. - * - * See the documentation of xdg_toplevel for more details about - * what an xdg_toplevel is and how it is used. - */ - void (*get_toplevel)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id); - /** - * assign the xdg_popup surface role - * - * This creates an xdg_popup object for the given xdg_surface and - * gives the associated wl_surface the xdg_popup role. - * - * See the documentation of xdg_popup for more details about what - * an xdg_popup is and how it is used. - */ - void (*get_popup)(struct wl_client *client, - struct wl_resource *resource, - uint32_t id, - struct wl_resource *parent, - struct wl_resource *positioner); - /** - * set the new window geometry - * - * The window geometry of a surface is its "visible bounds" from - * the user's perspective. Client-side decorations often have - * invisible portions like drop-shadows which should be ignored for - * the purposes of aligning, placing and constraining windows. - * - * The window geometry is double buffered, and will be applied at - * the time wl_surface.commit of the corresponding wl_surface is - * called. - * - * Once the window geometry of the surface is set, it is not - * possible to unset it, and it will remain the same until - * set_window_geometry is called again, even if a new subsurface or - * buffer is attached. - * - * If never set, the value is the full bounds of the surface, - * including any subsurfaces. This updates dynamically on every - * commit. This unset is meant for extremely simple clients. - * - * The arguments are given in the surface-local coordinate space of - * the wl_surface associated with this xdg_surface. - * - * The width and height must be greater than zero. Setting an - * invalid size will raise an error. When applied, the effective - * window geometry will be the set window geometry clamped to the - * bounding rectangle of the combined geometry of the surface of - * the xdg_surface and the associated subsurfaces. - */ - void (*set_window_geometry)(struct wl_client *client, - struct wl_resource *resource, - int32_t x, - int32_t y, - int32_t width, - int32_t height); - /** - * ack a configure event - * - * When a configure event is received, if a client commits the - * surface in response to the configure event, then the client must - * make an ack_configure request sometime before the commit - * request, passing along the serial of the configure event. - * - * For instance, for toplevel surfaces the compositor might use - * this information to move a surface to the top left only when the - * client has drawn itself for the maximized or fullscreen state. - * - * If the client receives multiple configure events before it can - * respond to one, it only has to ack the last configure event. - * - * A client is not required to commit immediately after sending an - * ack_configure request - it may even ack_configure several times - * before its next surface commit. - * - * A client may send multiple ack_configure requests before - * committing, but only the last request sent before a commit - * indicates which configure event the client really is responding - * to. - * @param serial the serial from the configure event - */ - void (*ack_configure)(struct wl_client *client, - struct wl_resource *resource, - uint32_t serial); -}; - -#define ZXDG_SURFACE_V6_CONFIGURE 0 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_TOPLEVEL_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_GET_POPUP_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_SET_WINDOW_GEOMETRY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_surface_v6 - */ -#define ZXDG_SURFACE_V6_ACK_CONFIGURE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_surface_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param serial serial of the configure event - */ -static inline void -zxdg_surface_v6_send_configure(struct wl_resource *resource_, uint32_t serial) -{ - wl_resource_post_event(resource_, ZXDG_SURFACE_V6_CONFIGURE, serial); -} - -#ifndef ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -#define ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * edge values for resizing - * - * These values are used to indicate which edge of a surface - * is being dragged in a resize operation. - */ -enum zxdg_toplevel_v6_resize_edge { - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_NONE = 0, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP = 1, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM = 2, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_LEFT = 4, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_LEFT = 5, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_LEFT = 6, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_RIGHT = 8, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_TOP_RIGHT = 9, - ZXDG_TOPLEVEL_V6_RESIZE_EDGE_BOTTOM_RIGHT = 10, -}; -#endif /* ZXDG_TOPLEVEL_V6_RESIZE_EDGE_ENUM */ - -#ifndef ZXDG_TOPLEVEL_V6_STATE_ENUM -#define ZXDG_TOPLEVEL_V6_STATE_ENUM -/** - * @ingroup iface_zxdg_toplevel_v6 - * the surface is now activated - * - * Client window decorations should be painted as if the window is - * active. Do not assume this means that the window actually has - * keyboard or pointer focus. - */ -enum zxdg_toplevel_v6_state { - /** - * the surface is maximized - */ - ZXDG_TOPLEVEL_V6_STATE_MAXIMIZED = 1, - /** - * the surface is fullscreen - */ - ZXDG_TOPLEVEL_V6_STATE_FULLSCREEN = 2, - /** - * the surface is being resized - */ - ZXDG_TOPLEVEL_V6_STATE_RESIZING = 3, - /** - * the surface is now activated - */ - ZXDG_TOPLEVEL_V6_STATE_ACTIVATED = 4, -}; -#endif /* ZXDG_TOPLEVEL_V6_STATE_ENUM */ - -/** - * @ingroup iface_zxdg_toplevel_v6 - * @struct zxdg_toplevel_v6_interface - */ -struct zxdg_toplevel_v6_interface { - /** - * destroy the xdg_toplevel - * - * Unmap and destroy the window. The window will be effectively - * hidden from the user's point of view, and all state like - * maximization, fullscreen, and so on, will be lost. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the parent of this surface - * - * Set the "parent" of this surface. This window should be - * stacked above a parent. The parent surface must be mapped as - * long as this surface is mapped. - * - * Parent windows should be set on dialogs, toolboxes, or other - * "auxiliary" surfaces, so that the parent is raised when the - * dialog is raised. - */ - void (*set_parent)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *parent); - /** - * set surface title - * - * Set a short title for the surface. - * - * This string may be used to identify the surface in a task bar, - * window list, or other user interface elements provided by the - * compositor. - * - * The string must be encoded in UTF-8. - */ - void (*set_title)(struct wl_client *client, - struct wl_resource *resource, - const char *title); - /** - * set application ID - * - * Set an application identifier for the surface. - * - * The app ID identifies the general class of applications to which - * the surface belongs. The compositor can use this to group - * multiple surfaces together, or to determine how to launch a new - * application. - * - * For D-Bus activatable applications, the app ID is used as the - * D-Bus service name. - * - * The compositor shell will try to group application surfaces - * together by their app ID. As a best practice, it is suggested to - * select app ID's that match the basename of the application's - * .desktop file. For example, "org.freedesktop.FooViewer" where - * the .desktop file is "org.freedesktop.FooViewer.desktop". - * - * See the desktop-entry specification [0] for more details on - * application identifiers and how they relate to well-known D-Bus - * names and .desktop files. - * - * [0] http://standards.freedesktop.org/desktop-entry-spec/ - */ - void (*set_app_id)(struct wl_client *client, - struct wl_resource *resource, - const char *app_id); - /** - * show the window menu - * - * Clients implementing client-side decorations might want to - * show a context menu when right-clicking on the decorations, - * giving the user a menu that they can use to maximize or minimize - * the window. - * - * This request asks the compositor to pop up such a window menu at - * the given position, relative to the local surface coordinates of - * the parent surface. There are no guarantees as to what menu - * items the window menu contains. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param x the x position to pop up the window menu at - * @param y the y position to pop up the window menu at - */ - void (*show_window_menu)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - int32_t x, - int32_t y); - /** - * start an interactive move - * - * Start an interactive, user-driven move of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive move - * (touch, pointer, etc). - * - * The server may ignore move requests depending on the state of - * the surface (e.g. fullscreen or maximized), or if the passed - * serial is no longer valid. - * - * If triggered, the surface will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the move. It is up to the - * compositor to visually indicate that the move is taking place, - * such as updating a pointer cursor, during the move. There is no - * guarantee that the device focus will return when the move is - * completed. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*move)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); - /** - * start an interactive resize - * - * Start a user-driven, interactive resize of the surface. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * passed serial is used to determine the type of interactive - * resize (touch, pointer, etc). - * - * The server may ignore resize requests depending on the state of - * the surface (e.g. fullscreen or maximized). - * - * If triggered, the client will receive configure events with the - * "resize" state enum value and the expected sizes. See the - * "resize" enum value for more details about what is required. The - * client must also acknowledge configure events using - * "ack_configure". After the resize is completed, the client will - * receive another "configure" event without the resize state. - * - * If triggered, the surface also will lose the focus of the device - * (wl_pointer, wl_touch, etc) used for the resize. It is up to the - * compositor to visually indicate that the resize is taking place, - * such as updating a pointer cursor, during the resize. There is - * no guarantee that the device focus will return when the resize - * is completed. - * - * The edges parameter specifies how the surface should be resized, - * and is one of the values of the resize_edge enum. The compositor - * may use this information to update the surface position for - * example when dragging the top left corner. The compositor may - * also use this information to adapt its behavior, e.g. choose an - * appropriate cursor image. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - * @param edges which edge or corner is being dragged - */ - void (*resize)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial, - uint32_t edges); - /** - * set the maximum size - * - * Set a maximum size for the window. - * - * The client can specify a maximum size so that the compositor - * does not try to configure the window beyond this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the maximum - * size. The compositor may decide to ignore the values set by the - * client and request a larger size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected maximum size in the given dimension. As a - * result, a client wishing to reset the maximum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a maximum size to be smaller than the minimum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width and height will result - * in a protocol error. - */ - void (*set_max_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * set the minimum size - * - * Set a minimum size for the window. - * - * The client can specify a minimum size so that the compositor - * does not try to configure the window below this size. - * - * The width and height arguments are in window geometry - * coordinates. See xdg_surface.set_window_geometry. - * - * Values set in this way are double-buffered. They will get - * applied on the next commit. - * - * The compositor can use this information to allow or disallow - * different states like maximize or fullscreen and draw accurate - * animations. - * - * Similarly, a tiling window manager may use this information to - * place and resize client windows in a more effective way. - * - * The client should not rely on the compositor to obey the minimum - * size. The compositor may decide to ignore the values set by the - * client and request a smaller size. - * - * If never set, or a value of zero in the request, means that the - * client has no expected minimum size in the given dimension. As a - * result, a client wishing to reset the minimum size to an - * unspecified state can use zero for width and height in the - * request. - * - * Requesting a minimum size to be larger than the maximum size of - * a surface is illegal and will result in a protocol error. - * - * The width and height must be greater than or equal to zero. - * Using strictly negative values for width and height will result - * in a protocol error. - */ - void (*set_min_size)(struct wl_client *client, - struct wl_resource *resource, - int32_t width, - int32_t height); - /** - * maximize the window - * - * Maximize the surface. - * - * After requesting that the surface should be maximized, the - * compositor will respond by emitting a configure event with the - * "maximized" state and the required window geometry. The client - * should then update its content, drawing it in a maximized state, - * i.e. without shadow or other decoration outside of the window - * geometry. The client must also acknowledge the configure when - * committing the new content (see ack_configure). - * - * It is up to the compositor to decide how and where to maximize - * the surface, for example which output and what region of the - * screen should be used. - * - * If the surface was already maximized, the compositor will still - * emit a configure event with the "maximized" state. - */ - void (*set_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * unmaximize the window - * - * Unmaximize the surface. - * - * After requesting that the surface should be unmaximized, the - * compositor will respond by emitting a configure event without - * the "maximized" state. If available, the compositor will include - * the window geometry dimensions the window had prior to being - * maximized in the configure request. The client must then update - * its content, drawing it in a regular state, i.e. potentially - * with shadow, etc. The client must also acknowledge the configure - * when committing the new content (see ack_configure). - * - * It is up to the compositor to position the surface after it was - * unmaximized; usually the position the surface had before - * maximizing, if applicable. - * - * If the surface was already not maximized, the compositor will - * still emit a configure event without the "maximized" state. - */ - void (*unset_maximized)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as fullscreen on a monitor - * - * Make the surface fullscreen. - * - * You can specify an output that you would prefer to be - * fullscreen. If this value is NULL, it's up to the compositor to - * choose which display will be used to map this surface. - * - * If the surface doesn't cover the whole output, the compositor - * will position the surface in the center of the output and - * compensate with black borders filling the rest of the output. - */ - void (*set_fullscreen)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *output); - /** - */ - void (*unset_fullscreen)(struct wl_client *client, - struct wl_resource *resource); - /** - * set the window as minimized - * - * Request that the compositor minimize your surface. There is no - * way to know if the surface is currently minimized, nor is there - * any way to unset minimization on this surface. - * - * If you are looking to throttle redrawing when minimized, please - * instead use the wl_surface.frame event for this, as this will - * also work with live previews on windows in Alt-Tab, Expose or - * similar compositor features. - */ - void (*set_minimized)(struct wl_client *client, - struct wl_resource *resource); -}; - -#define ZXDG_TOPLEVEL_V6_CONFIGURE 0 -#define ZXDG_TOPLEVEL_V6_CLOSE 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_CLOSE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_PARENT_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_TITLE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_APP_ID_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SHOW_WINDOW_MENU_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_MOVE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_RESIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAX_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MIN_SIZE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_MAXIMIZED_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_UNSET_FULLSCREEN_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_toplevel_v6 - */ -#define ZXDG_TOPLEVEL_V6_SET_MINIMIZED_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_toplevel_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_toplevel_v6_send_configure(struct wl_resource *resource_, int32_t width, int32_t height, struct wl_array *states) -{ - wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CONFIGURE, width, height, states); -} - -/** - * @ingroup iface_zxdg_toplevel_v6 - * Sends an close event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_toplevel_v6_send_close(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZXDG_TOPLEVEL_V6_CLOSE); -} - -#ifndef ZXDG_POPUP_V6_ERROR_ENUM -#define ZXDG_POPUP_V6_ERROR_ENUM -enum zxdg_popup_v6_error { - /** - * tried to grab after being mapped - */ - ZXDG_POPUP_V6_ERROR_INVALID_GRAB = 0, -}; -#endif /* ZXDG_POPUP_V6_ERROR_ENUM */ - -/** - * @ingroup iface_zxdg_popup_v6 - * @struct zxdg_popup_v6_interface - */ -struct zxdg_popup_v6_interface { - /** - * remove xdg_popup interface - * - * This destroys the popup. Explicitly destroying the xdg_popup - * object will also dismiss the popup, and unmap the surface. - * - * If this xdg_popup is not the "topmost" popup, a protocol error - * will be sent. - */ - void (*destroy)(struct wl_client *client, - struct wl_resource *resource); - /** - * make the popup take an explicit grab - * - * This request makes the created popup take an explicit grab. An - * explicit grab will be dismissed when the user dismisses the - * popup, or when the client destroys the xdg_popup. This can be - * done by the user clicking outside the surface, using the - * keyboard, or even locking the screen through closing the lid or - * a timeout. - * - * If the compositor denies the grab, the popup will be immediately - * dismissed. - * - * This request must be used in response to some sort of user - * action like a button press, key press, or touch down event. The - * serial number of the event should be passed as 'serial'. - * - * The parent of a grabbing popup must either be an xdg_toplevel - * surface or another xdg_popup with an explicit grab. If the - * parent is another xdg_popup it means that the popups are nested, - * with this popup now being the topmost popup. - * - * Nested popups must be destroyed in the reverse order they were - * created in, e.g. the only popup you are allowed to destroy at - * all times is the topmost one. - * - * When compositors choose to dismiss a popup, they may dismiss - * every nested grabbing popup as well. When a compositor dismisses - * popups, it will follow the same dismissing order as required - * from the client. - * - * The parent of a grabbing popup must either be another xdg_popup - * with an active explicit grab, or an xdg_popup or xdg_toplevel, - * if there are no explicit grabs already taken. - * - * If the topmost grabbing popup is destroyed, the grab will be - * returned to the parent of the popup, if that parent previously - * had an explicit grab. - * - * If the parent is a grabbing popup which has already been - * dismissed, this popup will be immediately dismissed. If the - * parent is a popup that did not take an explicit grab, an error - * will be raised. - * - * During a popup grab, the client owning the grab will receive - * pointer and touch events for all their surfaces as normal - * (similar to an "owner-events" grab in X11 parlance), while the - * top most grabbing popup will always have keyboard focus. - * @param seat the wl_seat of the user event - * @param serial the serial of the user event - */ - void (*grab)(struct wl_client *client, - struct wl_resource *resource, - struct wl_resource *seat, - uint32_t serial); -}; - -#define ZXDG_POPUP_V6_CONFIGURE 0 -#define ZXDG_POPUP_V6_POPUP_DONE 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_CONFIGURE_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_POPUP_DONE_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_DESTROY_SINCE_VERSION 1 -/** - * @ingroup iface_zxdg_popup_v6 - */ -#define ZXDG_POPUP_V6_GRAB_SINCE_VERSION 1 - -/** - * @ingroup iface_zxdg_popup_v6 - * Sends an configure event to the client owning the resource. - * @param resource_ The client's resource - * @param x x position relative to parent surface window geometry - * @param y y position relative to parent surface window geometry - * @param width window geometry width - * @param height window geometry height - */ -static inline void -zxdg_popup_v6_send_configure(struct wl_resource *resource_, int32_t x, int32_t y, int32_t width, int32_t height) -{ - wl_resource_post_event(resource_, ZXDG_POPUP_V6_CONFIGURE, x, y, width, height); -} - -/** - * @ingroup iface_zxdg_popup_v6 - * Sends an popup_done event to the client owning the resource. - * @param resource_ The client's resource - */ -static inline void -zxdg_popup_v6_send_popup_done(struct wl_resource *resource_) -{ - wl_resource_post_event(resource_, ZXDG_POPUP_V6_POPUP_DONE); -} - -#ifdef __cplusplus -} -#endif - -#endif |