feat(kotlin-compose): design system + 33 components + gallery_kt + e2e android emulator + scaffolder fixes

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-11 16:28:50 +02:00
parent bd036cf3d4
commit 42c14fae59
2452 changed files with 415108 additions and 25 deletions
@@ -0,0 +1,268 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef ALPHA_MODIFIER_V1_CLIENT_PROTOCOL_H
#define ALPHA_MODIFIER_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_alpha_modifier_v1 The alpha_modifier_v1 protocol
* @section page_ifaces_alpha_modifier_v1 Interfaces
* - @subpage page_iface_wp_alpha_modifier_v1 - surface alpha modifier manager
* - @subpage page_iface_wp_alpha_modifier_surface_v1 - alpha modifier object for a surface
* @section page_copyright_alpha_modifier_v1 Copyright
* <pre>
*
* Copyright © 2024 Xaver Hugl
*
* 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_alpha_modifier_surface_v1;
struct wp_alpha_modifier_v1;
#ifndef WP_ALPHA_MODIFIER_V1_INTERFACE
#define WP_ALPHA_MODIFIER_V1_INTERFACE
/**
* @page page_iface_wp_alpha_modifier_v1 wp_alpha_modifier_v1
* @section page_iface_wp_alpha_modifier_v1_desc Description
*
* This interface allows a client to set a factor for the alpha values on a
* surface, which can be used to offload such operations to the compositor,
* which can in turn for example offload them to KMS.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
* @section page_iface_wp_alpha_modifier_v1_api API
* See @ref iface_wp_alpha_modifier_v1.
*/
/**
* @defgroup iface_wp_alpha_modifier_v1 The wp_alpha_modifier_v1 interface
*
* This interface allows a client to set a factor for the alpha values on a
* surface, which can be used to offload such operations to the compositor,
* which can in turn for example offload them to KMS.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*/
extern const struct wl_interface wp_alpha_modifier_v1_interface;
#endif
#ifndef WP_ALPHA_MODIFIER_SURFACE_V1_INTERFACE
#define WP_ALPHA_MODIFIER_SURFACE_V1_INTERFACE
/**
* @page page_iface_wp_alpha_modifier_surface_v1 wp_alpha_modifier_surface_v1
* @section page_iface_wp_alpha_modifier_surface_v1_desc Description
*
* This interface allows the client to set a factor for the alpha values on
* a surface, which can be used to offload such operations to the compositor.
* The default factor is UINT32_MAX.
*
* This object has to be destroyed before the associated wl_surface. Once the
* wl_surface is destroyed, all request on this object will raise the
* no_surface error.
* @section page_iface_wp_alpha_modifier_surface_v1_api API
* See @ref iface_wp_alpha_modifier_surface_v1.
*/
/**
* @defgroup iface_wp_alpha_modifier_surface_v1 The wp_alpha_modifier_surface_v1 interface
*
* This interface allows the client to set a factor for the alpha values on
* a surface, which can be used to offload such operations to the compositor.
* The default factor is UINT32_MAX.
*
* This object has to be destroyed before the associated wl_surface. Once the
* wl_surface is destroyed, all request on this object will raise the
* no_surface error.
*/
extern const struct wl_interface wp_alpha_modifier_surface_v1_interface;
#endif
#ifndef WP_ALPHA_MODIFIER_V1_ERROR_ENUM
#define WP_ALPHA_MODIFIER_V1_ERROR_ENUM
enum wp_alpha_modifier_v1_error {
/**
* wl_surface already has a alpha modifier object
*/
WP_ALPHA_MODIFIER_V1_ERROR_ALREADY_CONSTRUCTED = 0,
};
#endif /* WP_ALPHA_MODIFIER_V1_ERROR_ENUM */
#define WP_ALPHA_MODIFIER_V1_DESTROY 0
#define WP_ALPHA_MODIFIER_V1_GET_SURFACE 1
/**
* @ingroup iface_wp_alpha_modifier_v1
*/
#define WP_ALPHA_MODIFIER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_alpha_modifier_v1
*/
#define WP_ALPHA_MODIFIER_V1_GET_SURFACE_SINCE_VERSION 1
/** @ingroup iface_wp_alpha_modifier_v1 */
static inline void
wp_alpha_modifier_v1_set_user_data(struct wp_alpha_modifier_v1 *wp_alpha_modifier_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_alpha_modifier_v1, user_data);
}
/** @ingroup iface_wp_alpha_modifier_v1 */
static inline void *
wp_alpha_modifier_v1_get_user_data(struct wp_alpha_modifier_v1 *wp_alpha_modifier_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_alpha_modifier_v1);
}
static inline uint32_t
wp_alpha_modifier_v1_get_version(struct wp_alpha_modifier_v1 *wp_alpha_modifier_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_v1);
}
/**
* @ingroup iface_wp_alpha_modifier_v1
*
* Destroy the alpha modifier manager. This doesn't destroy objects
* created with the manager.
*/
static inline void
wp_alpha_modifier_v1_destroy(struct wp_alpha_modifier_v1 *wp_alpha_modifier_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_alpha_modifier_v1,
WP_ALPHA_MODIFIER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_alpha_modifier_v1
*
* Create a new alpha modifier surface object associated with the
* given wl_surface. If there is already such an object associated with
* the wl_surface, the already_constructed error will be raised.
*/
static inline struct wp_alpha_modifier_surface_v1 *
wp_alpha_modifier_v1_get_surface(struct wp_alpha_modifier_v1 *wp_alpha_modifier_v1, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) wp_alpha_modifier_v1,
WP_ALPHA_MODIFIER_V1_GET_SURFACE, &wp_alpha_modifier_surface_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_v1), 0, NULL, surface);
return (struct wp_alpha_modifier_surface_v1 *) id;
}
#ifndef WP_ALPHA_MODIFIER_SURFACE_V1_ERROR_ENUM
#define WP_ALPHA_MODIFIER_SURFACE_V1_ERROR_ENUM
enum wp_alpha_modifier_surface_v1_error {
/**
* wl_surface was destroyed
*/
WP_ALPHA_MODIFIER_SURFACE_V1_ERROR_NO_SURFACE = 0,
};
#endif /* WP_ALPHA_MODIFIER_SURFACE_V1_ERROR_ENUM */
#define WP_ALPHA_MODIFIER_SURFACE_V1_DESTROY 0
#define WP_ALPHA_MODIFIER_SURFACE_V1_SET_MULTIPLIER 1
/**
* @ingroup iface_wp_alpha_modifier_surface_v1
*/
#define WP_ALPHA_MODIFIER_SURFACE_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_alpha_modifier_surface_v1
*/
#define WP_ALPHA_MODIFIER_SURFACE_V1_SET_MULTIPLIER_SINCE_VERSION 1
/** @ingroup iface_wp_alpha_modifier_surface_v1 */
static inline void
wp_alpha_modifier_surface_v1_set_user_data(struct wp_alpha_modifier_surface_v1 *wp_alpha_modifier_surface_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_alpha_modifier_surface_v1, user_data);
}
/** @ingroup iface_wp_alpha_modifier_surface_v1 */
static inline void *
wp_alpha_modifier_surface_v1_get_user_data(struct wp_alpha_modifier_surface_v1 *wp_alpha_modifier_surface_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_alpha_modifier_surface_v1);
}
static inline uint32_t
wp_alpha_modifier_surface_v1_get_version(struct wp_alpha_modifier_surface_v1 *wp_alpha_modifier_surface_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_surface_v1);
}
/**
* @ingroup iface_wp_alpha_modifier_surface_v1
*
* This destroys the object, and is equivalent to set_multiplier with
* a value of UINT32_MAX, with the same double-buffered semantics as
* set_multiplier.
*/
static inline void
wp_alpha_modifier_surface_v1_destroy(struct wp_alpha_modifier_surface_v1 *wp_alpha_modifier_surface_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_alpha_modifier_surface_v1,
WP_ALPHA_MODIFIER_SURFACE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_surface_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_alpha_modifier_surface_v1
*
* Sets the alpha multiplier for the surface. The alpha multiplier is
* double-buffered state, see wl_surface.commit for details.
*
* This factor is applied in the compositor's blending space, as an
* additional step after the processing of per-pixel alpha values for the
* wl_surface. The exact meaning of the factor is thus undefined, unless
* the blending space is specified in a different extension.
*
* This multiplier is applied even if the buffer attached to the
* wl_surface doesn't have an alpha channel; in that case an alpha value
* of one is used instead.
*
* Zero means completely transparent, UINT32_MAX means completely opaque.
*/
static inline void
wp_alpha_modifier_surface_v1_set_multiplier(struct wp_alpha_modifier_surface_v1 *wp_alpha_modifier_surface_v1, uint32_t factor)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_alpha_modifier_surface_v1,
WP_ALPHA_MODIFIER_SURFACE_V1_SET_MULTIPLIER, NULL, wl_proxy_get_version((struct wl_proxy *) wp_alpha_modifier_surface_v1), 0, factor);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,70 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2024 Xaver Hugl
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wp_alpha_modifier_surface_v1_interface;
static const struct wl_interface *alpha_modifier_v1_types[] = {
NULL,
&wp_alpha_modifier_surface_v1_interface,
&wl_surface_interface,
};
static const struct wl_message wp_alpha_modifier_v1_requests[] = {
{ "destroy", "", alpha_modifier_v1_types + 0 },
{ "get_surface", "no", alpha_modifier_v1_types + 1 },
};
WL_PRIVATE const struct wl_interface wp_alpha_modifier_v1_interface = {
"wp_alpha_modifier_v1", 1,
2, wp_alpha_modifier_v1_requests,
0, NULL,
};
static const struct wl_message wp_alpha_modifier_surface_v1_requests[] = {
{ "destroy", "", alpha_modifier_v1_types + 0 },
{ "set_multiplier", "u", alpha_modifier_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_alpha_modifier_surface_v1_interface = {
"wp_alpha_modifier_surface_v1", 1,
2, wp_alpha_modifier_surface_v1_requests,
0, NULL,
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,231 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright 2019 Sebastian Wick
* Copyright 2019 Erwin Burema
* Copyright 2020 AMD
* Copyright 2020-2024 Collabora, Ltd.
* Copyright 2024 Xaver Hugl
* Copyright 2022-2025 Red Hat, Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wp_color_management_output_v1_interface;
extern const struct wl_interface wp_color_management_surface_feedback_v1_interface;
extern const struct wl_interface wp_color_management_surface_v1_interface;
extern const struct wl_interface wp_image_description_creator_icc_v1_interface;
extern const struct wl_interface wp_image_description_creator_params_v1_interface;
extern const struct wl_interface wp_image_description_info_v1_interface;
extern const struct wl_interface wp_image_description_reference_v1_interface;
extern const struct wl_interface wp_image_description_v1_interface;
static const struct wl_interface *color_management_v1_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&wp_color_management_output_v1_interface,
&wl_output_interface,
&wp_color_management_surface_v1_interface,
&wl_surface_interface,
&wp_color_management_surface_feedback_v1_interface,
&wl_surface_interface,
&wp_image_description_creator_icc_v1_interface,
&wp_image_description_creator_params_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_reference_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
NULL,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_v1_interface,
&wp_image_description_info_v1_interface,
};
static const struct wl_message wp_color_manager_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
{ "get_output", "no", color_management_v1_types + 8 },
{ "get_surface", "no", color_management_v1_types + 10 },
{ "get_surface_feedback", "no", color_management_v1_types + 12 },
{ "create_icc_creator", "n", color_management_v1_types + 14 },
{ "create_parametric_creator", "n", color_management_v1_types + 15 },
{ "create_windows_scrgb", "n", color_management_v1_types + 16 },
{ "get_image_description", "2no", color_management_v1_types + 17 },
};
static const struct wl_message wp_color_manager_v1_events[] = {
{ "supported_intent", "u", color_management_v1_types + 0 },
{ "supported_feature", "u", color_management_v1_types + 0 },
{ "supported_tf_named", "u", color_management_v1_types + 0 },
{ "supported_primaries_named", "u", color_management_v1_types + 0 },
{ "done", "", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_manager_v1_interface = {
"wp_color_manager_v1", 2,
8, wp_color_manager_v1_requests,
5, wp_color_manager_v1_events,
};
static const struct wl_message wp_color_management_output_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
{ "get_image_description", "n", color_management_v1_types + 19 },
};
static const struct wl_message wp_color_management_output_v1_events[] = {
{ "image_description_changed", "", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_management_output_v1_interface = {
"wp_color_management_output_v1", 2,
2, wp_color_management_output_v1_requests,
1, wp_color_management_output_v1_events,
};
static const struct wl_message wp_color_management_surface_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
{ "set_image_description", "ou", color_management_v1_types + 20 },
{ "unset_image_description", "", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_management_surface_v1_interface = {
"wp_color_management_surface_v1", 2,
3, wp_color_management_surface_v1_requests,
0, NULL,
};
static const struct wl_message wp_color_management_surface_feedback_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
{ "get_preferred", "n", color_management_v1_types + 22 },
{ "get_preferred_parametric", "n", color_management_v1_types + 23 },
};
static const struct wl_message wp_color_management_surface_feedback_v1_events[] = {
{ "preferred_changed", "u", color_management_v1_types + 0 },
{ "preferred_changed2", "2uu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_color_management_surface_feedback_v1_interface = {
"wp_color_management_surface_feedback_v1", 2,
3, wp_color_management_surface_feedback_v1_requests,
2, wp_color_management_surface_feedback_v1_events,
};
static const struct wl_message wp_image_description_creator_icc_v1_requests[] = {
{ "create", "n", color_management_v1_types + 24 },
{ "set_icc_file", "huu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_creator_icc_v1_interface = {
"wp_image_description_creator_icc_v1", 2,
2, wp_image_description_creator_icc_v1_requests,
0, NULL,
};
static const struct wl_message wp_image_description_creator_params_v1_requests[] = {
{ "create", "n", color_management_v1_types + 25 },
{ "set_tf_named", "u", color_management_v1_types + 0 },
{ "set_tf_power", "u", color_management_v1_types + 0 },
{ "set_primaries_named", "u", color_management_v1_types + 0 },
{ "set_primaries", "iiiiiiii", color_management_v1_types + 0 },
{ "set_luminances", "uuu", color_management_v1_types + 0 },
{ "set_mastering_display_primaries", "iiiiiiii", color_management_v1_types + 0 },
{ "set_mastering_luminance", "uu", color_management_v1_types + 0 },
{ "set_max_cll", "u", color_management_v1_types + 0 },
{ "set_max_fall", "u", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_creator_params_v1_interface = {
"wp_image_description_creator_params_v1", 2,
10, wp_image_description_creator_params_v1_requests,
0, NULL,
};
static const struct wl_message wp_image_description_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
{ "get_information", "n", color_management_v1_types + 26 },
};
static const struct wl_message wp_image_description_v1_events[] = {
{ "failed", "us", color_management_v1_types + 0 },
{ "ready", "u", color_management_v1_types + 0 },
{ "ready2", "2uu", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_v1_interface = {
"wp_image_description_v1", 2,
2, wp_image_description_v1_requests,
3, wp_image_description_v1_events,
};
static const struct wl_message wp_image_description_info_v1_events[] = {
{ "done", "", color_management_v1_types + 0 },
{ "icc_file", "hu", color_management_v1_types + 0 },
{ "primaries", "iiiiiiii", color_management_v1_types + 0 },
{ "primaries_named", "u", color_management_v1_types + 0 },
{ "tf_power", "u", color_management_v1_types + 0 },
{ "tf_named", "u", color_management_v1_types + 0 },
{ "luminances", "uuu", color_management_v1_types + 0 },
{ "target_primaries", "iiiiiiii", color_management_v1_types + 0 },
{ "target_luminance", "uu", color_management_v1_types + 0 },
{ "target_max_cll", "u", color_management_v1_types + 0 },
{ "target_max_fall", "u", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_info_v1_interface = {
"wp_image_description_info_v1", 2,
0, NULL,
11, wp_image_description_info_v1_events,
};
static const struct wl_message wp_image_description_reference_v1_requests[] = {
{ "destroy", "", color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_image_description_reference_v1_interface = {
"wp_image_description_reference_v1", 1,
1, wp_image_description_reference_v1_requests,
0, NULL,
};
@@ -0,0 +1,422 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H
#define CURSOR_SHAPE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_cursor_shape_v1 The cursor_shape_v1 protocol
* @section page_ifaces_cursor_shape_v1 Interfaces
* - @subpage page_iface_wp_cursor_shape_manager_v1 - cursor shape manager
* - @subpage page_iface_wp_cursor_shape_device_v1 - cursor shape for a device
* @section page_copyright_cursor_shape_v1 Copyright
* <pre>
*
* Copyright 2018 The Chromium Authors
* Copyright 2023 Simon Ser
*
* 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 wp_cursor_shape_device_v1;
struct wp_cursor_shape_manager_v1;
struct zwp_tablet_tool_v2;
#ifndef WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE
#define WP_CURSOR_SHAPE_MANAGER_V1_INTERFACE
/**
* @page page_iface_wp_cursor_shape_manager_v1 wp_cursor_shape_manager_v1
* @section page_iface_wp_cursor_shape_manager_v1_desc Description
*
* This global offers an alternative, optional way to set cursor images. This
* new way uses enumerated cursors instead of a wl_surface like
* wl_pointer.set_cursor does.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
* @section page_iface_wp_cursor_shape_manager_v1_api API
* See @ref iface_wp_cursor_shape_manager_v1.
*/
/**
* @defgroup iface_wp_cursor_shape_manager_v1 The wp_cursor_shape_manager_v1 interface
*
* This global offers an alternative, optional way to set cursor images. This
* new way uses enumerated cursors instead of a wl_surface like
* wl_pointer.set_cursor does.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*/
extern const struct wl_interface wp_cursor_shape_manager_v1_interface;
#endif
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE
#define WP_CURSOR_SHAPE_DEVICE_V1_INTERFACE
/**
* @page page_iface_wp_cursor_shape_device_v1 wp_cursor_shape_device_v1
* @section page_iface_wp_cursor_shape_device_v1_desc Description
*
* This interface advertises the list of supported cursor shapes for a
* device, and allows clients to set the cursor shape.
* @section page_iface_wp_cursor_shape_device_v1_api API
* See @ref iface_wp_cursor_shape_device_v1.
*/
/**
* @defgroup iface_wp_cursor_shape_device_v1 The wp_cursor_shape_device_v1 interface
*
* This interface advertises the list of supported cursor shapes for a
* device, and allows clients to set the cursor shape.
*/
extern const struct wl_interface wp_cursor_shape_device_v1_interface;
#endif
#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY 0
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER 1
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2 2
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*/
#define WP_CURSOR_SHAPE_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*/
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER_SINCE_VERSION 1
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*/
#define WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2_SINCE_VERSION 1
/** @ingroup iface_wp_cursor_shape_manager_v1 */
static inline void
wp_cursor_shape_manager_v1_set_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1, user_data);
}
/** @ingroup iface_wp_cursor_shape_manager_v1 */
static inline void *
wp_cursor_shape_manager_v1_get_user_data(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_manager_v1);
}
static inline uint32_t
wp_cursor_shape_manager_v1_get_version(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1);
}
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*
* Destroy the cursor shape manager.
*/
static inline void
wp_cursor_shape_manager_v1_destroy(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1,
WP_CURSOR_SHAPE_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*
* Obtain a wp_cursor_shape_device_v1 for a wl_pointer object.
*/
static inline struct wp_cursor_shape_device_v1 *
wp_cursor_shape_manager_v1_get_pointer(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct wl_pointer *pointer)
{
struct wl_proxy *cursor_shape_device;
cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1,
WP_CURSOR_SHAPE_MANAGER_V1_GET_POINTER, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, pointer);
return (struct wp_cursor_shape_device_v1 *) cursor_shape_device;
}
/**
* @ingroup iface_wp_cursor_shape_manager_v1
*
* Obtain a wp_cursor_shape_device_v1 for a zwp_tablet_tool_v2 object.
*/
static inline struct wp_cursor_shape_device_v1 *
wp_cursor_shape_manager_v1_get_tablet_tool_v2(struct wp_cursor_shape_manager_v1 *wp_cursor_shape_manager_v1, struct zwp_tablet_tool_v2 *tablet_tool)
{
struct wl_proxy *cursor_shape_device;
cursor_shape_device = wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_manager_v1,
WP_CURSOR_SHAPE_MANAGER_V1_GET_TABLET_TOOL_V2, &wp_cursor_shape_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_manager_v1), 0, NULL, tablet_tool);
return (struct wp_cursor_shape_device_v1 *) cursor_shape_device;
}
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM
/**
* @ingroup iface_wp_cursor_shape_device_v1
* cursor shapes
*
* This enum describes cursor shapes.
*
* The names are taken from the CSS W3C specification:
* https://w3c.github.io/csswg-drafts/css-ui/#cursor
*/
enum wp_cursor_shape_device_v1_shape {
/**
* default cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT = 1,
/**
* a context menu is available for the object under the cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU = 2,
/**
* help is available for the object under the cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP = 3,
/**
* pointer that indicates a link or another interactive element
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER = 4,
/**
* progress indicator
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS = 5,
/**
* program is busy, user should wait
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT = 6,
/**
* a cell or set of cells may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL = 7,
/**
* simple crosshair
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR = 8,
/**
* text may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT = 9,
/**
* vertical text may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT = 10,
/**
* drag-and-drop: alias of/shortcut to something is to be created
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS = 11,
/**
* drag-and-drop: something is to be copied
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY = 12,
/**
* drag-and-drop: something is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE = 13,
/**
* drag-and-drop: the dragged item cannot be dropped at the current cursor location
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP = 14,
/**
* drag-and-drop: the requested action will not be carried out
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED = 15,
/**
* drag-and-drop: something can be grabbed
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB = 16,
/**
* drag-and-drop: something is being grabbed
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING = 17,
/**
* resizing: the east border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE = 18,
/**
* resizing: the north border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE = 19,
/**
* resizing: the north-east corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE = 20,
/**
* resizing: the north-west corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE = 21,
/**
* resizing: the south border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE = 22,
/**
* resizing: the south-east corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE = 23,
/**
* resizing: the south-west corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE = 24,
/**
* resizing: the west border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE = 25,
/**
* resizing: the east and west borders are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE = 26,
/**
* resizing: the north and south borders are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE = 27,
/**
* resizing: the north-east and south-west corners are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE = 28,
/**
* resizing: the north-west and south-east corners are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE = 29,
/**
* resizing: that the item/column can be resized horizontally
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE = 30,
/**
* resizing: that the item/row can be resized vertically
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE = 31,
/**
* something can be scrolled in any direction
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL = 32,
/**
* something can be zoomed in
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN = 33,
/**
* something can be zoomed out
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT = 34,
};
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM */
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM
#define WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM
enum wp_cursor_shape_device_v1_error {
/**
* the specified shape value is invalid
*/
WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE = 1,
};
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM */
#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY 0
#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE 1
/**
* @ingroup iface_wp_cursor_shape_device_v1
*/
#define WP_CURSOR_SHAPE_DEVICE_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_cursor_shape_device_v1
*/
#define WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE_SINCE_VERSION 1
/** @ingroup iface_wp_cursor_shape_device_v1 */
static inline void
wp_cursor_shape_device_v1_set_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_cursor_shape_device_v1, user_data);
}
/** @ingroup iface_wp_cursor_shape_device_v1 */
static inline void *
wp_cursor_shape_device_v1_get_user_data(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_cursor_shape_device_v1);
}
static inline uint32_t
wp_cursor_shape_device_v1_get_version(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1);
}
/**
* @ingroup iface_wp_cursor_shape_device_v1
*
* Destroy the cursor shape device.
*
* The device cursor shape remains unchanged.
*/
static inline void
wp_cursor_shape_device_v1_destroy(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1,
WP_CURSOR_SHAPE_DEVICE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_cursor_shape_device_v1
*
* Sets the device cursor to the specified shape. The compositor will
* change the cursor image based on the specified shape.
*
* The cursor actually changes only if the input device focus is one of
* the requesting client's surfaces. If any, the previous cursor image
* (surface or shape) is replaced.
*
* The "shape" argument must be a valid enum entry, otherwise the
* invalid_shape protocol error is raised.
*
* This is similar to the wl_pointer.set_cursor and
* zwp_tablet_tool_v2.set_cursor requests, but this request accepts a
* shape instead of contents in the form of a surface. Clients can mix
* set_cursor and set_shape requests.
*
* The serial parameter must match the latest wl_pointer.enter or
* zwp_tablet_tool_v2.proximity_in serial number sent to the client.
* Otherwise the request will be ignored.
*/
static inline void
wp_cursor_shape_device_v1_set_shape(struct wp_cursor_shape_device_v1 *wp_cursor_shape_device_v1, uint32_t serial, uint32_t shape)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_cursor_shape_device_v1,
WP_CURSOR_SHAPE_DEVICE_V1_SET_SHAPE, NULL, wl_proxy_get_version((struct wl_proxy *) wp_cursor_shape_device_v1), 0, serial, shape);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,74 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright 2018 The Chromium Authors
* Copyright 2023 Simon Ser
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wp_cursor_shape_device_v1_interface;
extern const struct wl_interface zwp_tablet_tool_v2_interface;
static const struct wl_interface *cursor_shape_v1_types[] = {
NULL,
NULL,
&wp_cursor_shape_device_v1_interface,
&wl_pointer_interface,
&wp_cursor_shape_device_v1_interface,
&zwp_tablet_tool_v2_interface,
};
static const struct wl_message wp_cursor_shape_manager_v1_requests[] = {
{ "destroy", "", cursor_shape_v1_types + 0 },
{ "get_pointer", "no", cursor_shape_v1_types + 2 },
{ "get_tablet_tool_v2", "no", cursor_shape_v1_types + 4 },
};
WL_PRIVATE const struct wl_interface wp_cursor_shape_manager_v1_interface = {
"wp_cursor_shape_manager_v1", 1,
3, wp_cursor_shape_manager_v1_requests,
0, NULL,
};
static const struct wl_message wp_cursor_shape_device_v1_requests[] = {
{ "destroy", "", cursor_shape_v1_types + 0 },
{ "set_shape", "uu", cursor_shape_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_cursor_shape_device_v1_interface = {
"wp_cursor_shape_device_v1", 1,
2, wp_cursor_shape_device_v1_requests,
0, NULL,
};
@@ -0,0 +1,264 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef FRACTIONAL_SCALE_V1_CLIENT_PROTOCOL_H
#define FRACTIONAL_SCALE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_fractional_scale_v1 The fractional_scale_v1 protocol
* Protocol for requesting fractional surface scales
*
* @section page_desc_fractional_scale_v1 Description
*
* This protocol allows a compositor to suggest for surfaces to render at
* fractional scales.
*
* A client can submit scaled content by utilizing wp_viewport. This is done by
* creating a wp_viewport object for the surface and setting the destination
* rectangle to the surface size before the scale factor is applied.
*
* The buffer size is calculated by multiplying the surface size by the
* intended scale.
*
* The wl_surface buffer scale should remain set to 1.
*
* If a surface has a surface-local size of 100 px by 50 px and wishes to
* submit buffers with a scale of 1.5, then a buffer of 150px by 75 px should
* be used and the wp_viewport destination rectangle should be 100 px by 50 px.
*
* For toplevel surfaces, the size is rounded halfway away from zero. The
* rounding algorithm for subsurface position and size is not defined.
*
* @section page_ifaces_fractional_scale_v1 Interfaces
* - @subpage page_iface_wp_fractional_scale_manager_v1 - fractional surface scale information
* - @subpage page_iface_wp_fractional_scale_v1 - fractional scale interface to a wl_surface
* @section page_copyright_fractional_scale_v1 Copyright
* <pre>
*
* Copyright © 2022 Kenny Levinsen
*
* 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_fractional_scale_manager_v1;
struct wp_fractional_scale_v1;
#ifndef WP_FRACTIONAL_SCALE_MANAGER_V1_INTERFACE
#define WP_FRACTIONAL_SCALE_MANAGER_V1_INTERFACE
/**
* @page page_iface_wp_fractional_scale_manager_v1 wp_fractional_scale_manager_v1
* @section page_iface_wp_fractional_scale_manager_v1_desc Description
*
* A global interface for requesting surfaces to use fractional scales.
* @section page_iface_wp_fractional_scale_manager_v1_api API
* See @ref iface_wp_fractional_scale_manager_v1.
*/
/**
* @defgroup iface_wp_fractional_scale_manager_v1 The wp_fractional_scale_manager_v1 interface
*
* A global interface for requesting surfaces to use fractional scales.
*/
extern const struct wl_interface wp_fractional_scale_manager_v1_interface;
#endif
#ifndef WP_FRACTIONAL_SCALE_V1_INTERFACE
#define WP_FRACTIONAL_SCALE_V1_INTERFACE
/**
* @page page_iface_wp_fractional_scale_v1 wp_fractional_scale_v1
* @section page_iface_wp_fractional_scale_v1_desc Description
*
* An additional interface to a wl_surface object which allows the compositor
* to inform the client of the preferred scale.
* @section page_iface_wp_fractional_scale_v1_api API
* See @ref iface_wp_fractional_scale_v1.
*/
/**
* @defgroup iface_wp_fractional_scale_v1 The wp_fractional_scale_v1 interface
*
* An additional interface to a wl_surface object which allows the compositor
* to inform the client of the preferred scale.
*/
extern const struct wl_interface wp_fractional_scale_v1_interface;
#endif
#ifndef WP_FRACTIONAL_SCALE_MANAGER_V1_ERROR_ENUM
#define WP_FRACTIONAL_SCALE_MANAGER_V1_ERROR_ENUM
enum wp_fractional_scale_manager_v1_error {
/**
* the surface already has a fractional_scale object associated
*/
WP_FRACTIONAL_SCALE_MANAGER_V1_ERROR_FRACTIONAL_SCALE_EXISTS = 0,
};
#endif /* WP_FRACTIONAL_SCALE_MANAGER_V1_ERROR_ENUM */
#define WP_FRACTIONAL_SCALE_MANAGER_V1_DESTROY 0
#define WP_FRACTIONAL_SCALE_MANAGER_V1_GET_FRACTIONAL_SCALE 1
/**
* @ingroup iface_wp_fractional_scale_manager_v1
*/
#define WP_FRACTIONAL_SCALE_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_fractional_scale_manager_v1
*/
#define WP_FRACTIONAL_SCALE_MANAGER_V1_GET_FRACTIONAL_SCALE_SINCE_VERSION 1
/** @ingroup iface_wp_fractional_scale_manager_v1 */
static inline void
wp_fractional_scale_manager_v1_set_user_data(struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_fractional_scale_manager_v1, user_data);
}
/** @ingroup iface_wp_fractional_scale_manager_v1 */
static inline void *
wp_fractional_scale_manager_v1_get_user_data(struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_fractional_scale_manager_v1);
}
static inline uint32_t
wp_fractional_scale_manager_v1_get_version(struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_fractional_scale_manager_v1);
}
/**
* @ingroup iface_wp_fractional_scale_manager_v1
*
* Informs the server that the client will not be using this protocol
* object anymore. This does not affect any other objects,
* wp_fractional_scale_v1 objects included.
*/
static inline void
wp_fractional_scale_manager_v1_destroy(struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_fractional_scale_manager_v1,
WP_FRACTIONAL_SCALE_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_fractional_scale_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_fractional_scale_manager_v1
*
* Create an add-on object for the the wl_surface to let the compositor
* request fractional scales. If the given wl_surface already has a
* wp_fractional_scale_v1 object associated, the fractional_scale_exists
* protocol error is raised.
*/
static inline struct wp_fractional_scale_v1 *
wp_fractional_scale_manager_v1_get_fractional_scale(struct wp_fractional_scale_manager_v1 *wp_fractional_scale_manager_v1, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) wp_fractional_scale_manager_v1,
WP_FRACTIONAL_SCALE_MANAGER_V1_GET_FRACTIONAL_SCALE, &wp_fractional_scale_v1_interface, wl_proxy_get_version((struct wl_proxy *) wp_fractional_scale_manager_v1), 0, NULL, surface);
return (struct wp_fractional_scale_v1 *) id;
}
/**
* @ingroup iface_wp_fractional_scale_v1
* @struct wp_fractional_scale_v1_listener
*/
struct wp_fractional_scale_v1_listener {
/**
* notify of new preferred scale
*
* Notification of a new preferred scale for this surface that
* the compositor suggests that the client should use.
*
* The sent scale is the numerator of a fraction with a denominator
* of 120.
* @param scale the new preferred scale
*/
void (*preferred_scale)(void *data,
struct wp_fractional_scale_v1 *wp_fractional_scale_v1,
uint32_t scale);
};
/**
* @ingroup iface_wp_fractional_scale_v1
*/
static inline int
wp_fractional_scale_v1_add_listener(struct wp_fractional_scale_v1 *wp_fractional_scale_v1,
const struct wp_fractional_scale_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) wp_fractional_scale_v1,
(void (**)(void)) listener, data);
}
#define WP_FRACTIONAL_SCALE_V1_DESTROY 0
/**
* @ingroup iface_wp_fractional_scale_v1
*/
#define WP_FRACTIONAL_SCALE_V1_PREFERRED_SCALE_SINCE_VERSION 1
/**
* @ingroup iface_wp_fractional_scale_v1
*/
#define WP_FRACTIONAL_SCALE_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_wp_fractional_scale_v1 */
static inline void
wp_fractional_scale_v1_set_user_data(struct wp_fractional_scale_v1 *wp_fractional_scale_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_fractional_scale_v1, user_data);
}
/** @ingroup iface_wp_fractional_scale_v1 */
static inline void *
wp_fractional_scale_v1_get_user_data(struct wp_fractional_scale_v1 *wp_fractional_scale_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_fractional_scale_v1);
}
static inline uint32_t
wp_fractional_scale_v1_get_version(struct wp_fractional_scale_v1 *wp_fractional_scale_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_fractional_scale_v1);
}
/**
* @ingroup iface_wp_fractional_scale_v1
*
* Destroy the fractional scale object. When this object is destroyed,
* preferred_scale events will no longer be sent.
*/
static inline void
wp_fractional_scale_v1_destroy(struct wp_fractional_scale_v1 *wp_fractional_scale_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_fractional_scale_v1,
WP_FRACTIONAL_SCALE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_fractional_scale_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,73 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2022 Kenny Levinsen
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wp_fractional_scale_v1_interface;
static const struct wl_interface *fractional_scale_v1_types[] = {
NULL,
&wp_fractional_scale_v1_interface,
&wl_surface_interface,
};
static const struct wl_message wp_fractional_scale_manager_v1_requests[] = {
{ "destroy", "", fractional_scale_v1_types + 0 },
{ "get_fractional_scale", "no", fractional_scale_v1_types + 1 },
};
WL_PRIVATE const struct wl_interface wp_fractional_scale_manager_v1_interface = {
"wp_fractional_scale_manager_v1", 1,
2, wp_fractional_scale_manager_v1_requests,
0, NULL,
};
static const struct wl_message wp_fractional_scale_v1_requests[] = {
{ "destroy", "", fractional_scale_v1_types + 0 },
};
static const struct wl_message wp_fractional_scale_v1_events[] = {
{ "preferred_scale", "u", fractional_scale_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_fractional_scale_v1_interface = {
"wp_fractional_scale_v1", 1,
1, wp_fractional_scale_v1_requests,
1, wp_fractional_scale_v1_events,
};
@@ -0,0 +1,399 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef FROG_COLOR_MANAGEMENT_V1_CLIENT_PROTOCOL_H
#define FROG_COLOR_MANAGEMENT_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_frog_color_management_v1 The frog_color_management_v1 protocol
* experimental color management protocol
*
* @section page_desc_frog_color_management_v1 Description
*
* The aim of this color management extension is to get HDR games working quickly,
* and have an easy way to test implementations in the wild before the upstream
* protocol is ready to be merged.
* For that purpose it's intentionally limited and cut down and does not serve
* all uses cases.
*
* @section page_ifaces_frog_color_management_v1 Interfaces
* - @subpage page_iface_frog_color_management_factory_v1 - color management factory
* - @subpage page_iface_frog_color_managed_surface - color managed surface
* @section page_copyright_frog_color_management_v1 Copyright
* <pre>
*
* Copyright © 2023 Joshua Ashton for Valve Software
* Copyright © 2023 Xaver Hugl
*
* 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 frog_color_managed_surface;
struct frog_color_management_factory_v1;
struct wl_surface;
#ifndef FROG_COLOR_MANAGEMENT_FACTORY_V1_INTERFACE
#define FROG_COLOR_MANAGEMENT_FACTORY_V1_INTERFACE
/**
* @page page_iface_frog_color_management_factory_v1 frog_color_management_factory_v1
* @section page_iface_frog_color_management_factory_v1_desc Description
*
* The color management factory singleton creates color managed surface objects.
* @section page_iface_frog_color_management_factory_v1_api API
* See @ref iface_frog_color_management_factory_v1.
*/
/**
* @defgroup iface_frog_color_management_factory_v1 The frog_color_management_factory_v1 interface
*
* The color management factory singleton creates color managed surface objects.
*/
extern const struct wl_interface frog_color_management_factory_v1_interface;
#endif
#ifndef FROG_COLOR_MANAGED_SURFACE_INTERFACE
#define FROG_COLOR_MANAGED_SURFACE_INTERFACE
/**
* @page page_iface_frog_color_managed_surface frog_color_managed_surface
* @section page_iface_frog_color_managed_surface_desc Description
*
* Interface for changing surface color management and HDR state.
*
* An implementation must: support every part of the version
* of the frog_color_managed_surface interface it exposes.
* Including all known enums associated with a given version.
* @section page_iface_frog_color_managed_surface_api API
* See @ref iface_frog_color_managed_surface.
*/
/**
* @defgroup iface_frog_color_managed_surface The frog_color_managed_surface interface
*
* Interface for changing surface color management and HDR state.
*
* An implementation must: support every part of the version
* of the frog_color_managed_surface interface it exposes.
* Including all known enums associated with a given version.
*/
extern const struct wl_interface frog_color_managed_surface_interface;
#endif
#define FROG_COLOR_MANAGEMENT_FACTORY_V1_DESTROY 0
#define FROG_COLOR_MANAGEMENT_FACTORY_V1_GET_COLOR_MANAGED_SURFACE 1
/**
* @ingroup iface_frog_color_management_factory_v1
*/
#define FROG_COLOR_MANAGEMENT_FACTORY_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_management_factory_v1
*/
#define FROG_COLOR_MANAGEMENT_FACTORY_V1_GET_COLOR_MANAGED_SURFACE_SINCE_VERSION 1
/** @ingroup iface_frog_color_management_factory_v1 */
static inline void
frog_color_management_factory_v1_set_user_data(struct frog_color_management_factory_v1 *frog_color_management_factory_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) frog_color_management_factory_v1, user_data);
}
/** @ingroup iface_frog_color_management_factory_v1 */
static inline void *
frog_color_management_factory_v1_get_user_data(struct frog_color_management_factory_v1 *frog_color_management_factory_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) frog_color_management_factory_v1);
}
static inline uint32_t
frog_color_management_factory_v1_get_version(struct frog_color_management_factory_v1 *frog_color_management_factory_v1)
{
return wl_proxy_get_version((struct wl_proxy *) frog_color_management_factory_v1);
}
/**
* @ingroup iface_frog_color_management_factory_v1
*/
static inline void
frog_color_management_factory_v1_destroy(struct frog_color_management_factory_v1 *frog_color_management_factory_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_management_factory_v1,
FROG_COLOR_MANAGEMENT_FACTORY_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_management_factory_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_frog_color_management_factory_v1
*
*/
static inline struct frog_color_managed_surface *
frog_color_management_factory_v1_get_color_managed_surface(struct frog_color_management_factory_v1 *frog_color_management_factory_v1, struct wl_surface *surface)
{
struct wl_proxy *callback;
callback = wl_proxy_marshal_flags((struct wl_proxy *) frog_color_management_factory_v1,
FROG_COLOR_MANAGEMENT_FACTORY_V1_GET_COLOR_MANAGED_SURFACE, &frog_color_managed_surface_interface, wl_proxy_get_version((struct wl_proxy *) frog_color_management_factory_v1), 0, surface, NULL);
return (struct frog_color_managed_surface *) callback;
}
#ifndef FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ENUM
#define FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ENUM
/**
* @ingroup iface_frog_color_managed_surface
* known transfer functions
*
* Extended information on the transfer functions described
* here can be found in the Khronos Data Format specification:
*
* https://registry.khronos.org/DataFormat/specs/1.3/dataformat.1.3.html
*/
enum frog_color_managed_surface_transfer_function {
/**
* specifies undefined, implementation-specific handling of the surface's transfer function.
*/
FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_UNDEFINED = 0,
/**
* specifies the sRGB non-linear EOTF. An implementation may: display this as Gamma 2.2 for the purposes of being consistent with content rendering across displays, rendering_intent and user expectations.
*/
FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SRGB = 1,
/**
* specifies gamma 2.2 power curve as the EOTF
*/
FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_GAMMA_22 = 2,
/**
* specifies the SMPTE ST2084 Perceptual Quantizer (PQ) EOTF
*/
FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ST2084_PQ = 3,
/**
* specifies the scRGB (extended sRGB) linear EOTF. Note: Primaries outside the gamut triangle specified can be expressed with negative values for this transfer function.
*/
FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_SCRGB_LINEAR = 4,
};
#endif /* FROG_COLOR_MANAGED_SURFACE_TRANSFER_FUNCTION_ENUM */
#ifndef FROG_COLOR_MANAGED_SURFACE_PRIMARIES_ENUM
#define FROG_COLOR_MANAGED_SURFACE_PRIMARIES_ENUM
/**
* @ingroup iface_frog_color_managed_surface
* known primaries
*/
enum frog_color_managed_surface_primaries {
/**
* specifies undefined, implementation-specific handling
*/
FROG_COLOR_MANAGED_SURFACE_PRIMARIES_UNDEFINED = 0,
/**
* specifies Rec.709/sRGB primaries with D65 white point
*/
FROG_COLOR_MANAGED_SURFACE_PRIMARIES_REC709 = 1,
/**
* specifies Rec.2020/HDR10 primaries with D65 white point
*/
FROG_COLOR_MANAGED_SURFACE_PRIMARIES_REC2020 = 2,
};
#endif /* FROG_COLOR_MANAGED_SURFACE_PRIMARIES_ENUM */
#ifndef FROG_COLOR_MANAGED_SURFACE_RENDER_INTENT_ENUM
#define FROG_COLOR_MANAGED_SURFACE_RENDER_INTENT_ENUM
/**
* @ingroup iface_frog_color_managed_surface
* known render intents
*
* Extended information on render intents described
* here can be found in ICC.1:2022:
*
* https://www.color.org/specification/ICC.1-2022-05.pdf
*/
enum frog_color_managed_surface_render_intent {
/**
* perceptual
*/
FROG_COLOR_MANAGED_SURFACE_RENDER_INTENT_PERCEPTUAL = 0,
};
#endif /* FROG_COLOR_MANAGED_SURFACE_RENDER_INTENT_ENUM */
/**
* @ingroup iface_frog_color_managed_surface
* @struct frog_color_managed_surface_listener
*/
struct frog_color_managed_surface_listener {
/**
* maximum full frame luminance
*
* Max Full Frame Luminance The max luminance in nits that the
* output is capable of rendering for the full frame sustained.
*
* This value is coded as an unsigned 16-bit value in units of 1
* cd/m2, where 0x0001 represents 1 cd/m2 and 0xFFFF represents
* 65535 cd/m2.
*/
void (*preferred_metadata)(void *data,
struct frog_color_managed_surface *frog_color_managed_surface,
uint32_t transfer_function,
uint32_t output_display_primary_red_x,
uint32_t output_display_primary_red_y,
uint32_t output_display_primary_green_x,
uint32_t output_display_primary_green_y,
uint32_t output_display_primary_blue_x,
uint32_t output_display_primary_blue_y,
uint32_t output_white_point_x,
uint32_t output_white_point_y,
uint32_t max_luminance,
uint32_t min_luminance,
uint32_t max_full_frame_luminance);
};
/**
* @ingroup iface_frog_color_managed_surface
*/
static inline int
frog_color_managed_surface_add_listener(struct frog_color_managed_surface *frog_color_managed_surface,
const struct frog_color_managed_surface_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) frog_color_managed_surface,
(void (**)(void)) listener, data);
}
#define FROG_COLOR_MANAGED_SURFACE_DESTROY 0
#define FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_TRANSFER_FUNCTION 1
#define FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_CONTAINER_COLOR_VOLUME 2
#define FROG_COLOR_MANAGED_SURFACE_SET_RENDER_INTENT 3
#define FROG_COLOR_MANAGED_SURFACE_SET_HDR_METADATA 4
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_PREFERRED_METADATA_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_TRANSFER_FUNCTION_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_CONTAINER_COLOR_VOLUME_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_SET_RENDER_INTENT_SINCE_VERSION 1
/**
* @ingroup iface_frog_color_managed_surface
*/
#define FROG_COLOR_MANAGED_SURFACE_SET_HDR_METADATA_SINCE_VERSION 1
/** @ingroup iface_frog_color_managed_surface */
static inline void
frog_color_managed_surface_set_user_data(struct frog_color_managed_surface *frog_color_managed_surface, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) frog_color_managed_surface, user_data);
}
/** @ingroup iface_frog_color_managed_surface */
static inline void *
frog_color_managed_surface_get_user_data(struct frog_color_managed_surface *frog_color_managed_surface)
{
return wl_proxy_get_user_data((struct wl_proxy *) frog_color_managed_surface);
}
static inline uint32_t
frog_color_managed_surface_get_version(struct frog_color_managed_surface *frog_color_managed_surface)
{
return wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface);
}
/**
* @ingroup iface_frog_color_managed_surface
*
* Destroying the color managed surface resets all known color
* state for the surface back to 'undefined' implementation-specific
* values.
*/
static inline void
frog_color_managed_surface_destroy(struct frog_color_managed_surface *frog_color_managed_surface)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_managed_surface,
FROG_COLOR_MANAGED_SURFACE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_frog_color_managed_surface
*/
static inline void
frog_color_managed_surface_set_known_transfer_function(struct frog_color_managed_surface *frog_color_managed_surface, uint32_t transfer_function)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_managed_surface,
FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_TRANSFER_FUNCTION, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface), 0, transfer_function);
}
/**
* @ingroup iface_frog_color_managed_surface
*/
static inline void
frog_color_managed_surface_set_known_container_color_volume(struct frog_color_managed_surface *frog_color_managed_surface, uint32_t primaries)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_managed_surface,
FROG_COLOR_MANAGED_SURFACE_SET_KNOWN_CONTAINER_COLOR_VOLUME, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface), 0, primaries);
}
/**
* @ingroup iface_frog_color_managed_surface
*
* NOTE: On a surface with "perceptual" (default) render intent, handling of the container's color volume
* is implementation-specific, and may differ between different transfer functions it is paired with:
* ie. sRGB + 709 rendering may have it's primaries widened to more of the available display's gamut
* to be be more pleasing for the viewer.
* Compared to scRGB Linear + 709 being treated faithfully as 709
* (including utilizing negatives out of the 709 gamut triangle)
*/
static inline void
frog_color_managed_surface_set_render_intent(struct frog_color_managed_surface *frog_color_managed_surface, uint32_t render_intent)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_managed_surface,
FROG_COLOR_MANAGED_SURFACE_SET_RENDER_INTENT, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface), 0, render_intent);
}
/**
* @ingroup iface_frog_color_managed_surface
*
* Max Frame Average Light Level.
* This value is coded as an unsigned 16-bit value in units of 1 cd/m2,
* where 0x0001 represents 1 cd/m2 and 0xFFFF represents 65535 cd/m2.
*/
static inline void
frog_color_managed_surface_set_hdr_metadata(struct frog_color_managed_surface *frog_color_managed_surface, uint32_t mastering_display_primary_red_x, uint32_t mastering_display_primary_red_y, uint32_t mastering_display_primary_green_x, uint32_t mastering_display_primary_green_y, uint32_t mastering_display_primary_blue_x, uint32_t mastering_display_primary_blue_y, uint32_t mastering_white_point_x, uint32_t mastering_white_point_y, uint32_t max_display_mastering_luminance, uint32_t min_display_mastering_luminance, uint32_t max_cll, uint32_t max_fall)
{
wl_proxy_marshal_flags((struct wl_proxy *) frog_color_managed_surface,
FROG_COLOR_MANAGED_SURFACE_SET_HDR_METADATA, NULL, wl_proxy_get_version((struct wl_proxy *) frog_color_managed_surface), 0, mastering_display_primary_red_x, mastering_display_primary_red_y, mastering_display_primary_green_x, mastering_display_primary_green_y, mastering_display_primary_blue_x, mastering_display_primary_blue_y, mastering_white_point_x, mastering_white_point_y, max_display_mastering_luminance, min_display_mastering_luminance, max_cll, max_fall);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,89 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2023 Joshua Ashton for Valve Software
* Copyright © 2023 Xaver Hugl
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface frog_color_managed_surface_interface;
extern const struct wl_interface wl_surface_interface;
static const struct wl_interface *frog_color_management_v1_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&wl_surface_interface,
&frog_color_managed_surface_interface,
};
static const struct wl_message frog_color_management_factory_v1_requests[] = {
{ "destroy", "", frog_color_management_v1_types + 0 },
{ "get_color_managed_surface", "on", frog_color_management_v1_types + 12 },
};
WL_PRIVATE const struct wl_interface frog_color_management_factory_v1_interface = {
"frog_color_management_factory_v1", 1,
2, frog_color_management_factory_v1_requests,
0, NULL,
};
static const struct wl_message frog_color_managed_surface_requests[] = {
{ "destroy", "", frog_color_management_v1_types + 0 },
{ "set_known_transfer_function", "u", frog_color_management_v1_types + 0 },
{ "set_known_container_color_volume", "u", frog_color_management_v1_types + 0 },
{ "set_render_intent", "u", frog_color_management_v1_types + 0 },
{ "set_hdr_metadata", "uuuuuuuuuuuu", frog_color_management_v1_types + 0 },
};
static const struct wl_message frog_color_managed_surface_events[] = {
{ "preferred_metadata", "uuuuuuuuuuuu", frog_color_management_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface frog_color_managed_surface_interface = {
"frog_color_managed_surface", 1,
5, frog_color_managed_surface_requests,
1, frog_color_managed_surface_events,
};
@@ -0,0 +1,232 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define IDLE_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_idle_inhibit_unstable_v1 The idle_inhibit_unstable_v1 protocol
* @section page_ifaces_idle_inhibit_unstable_v1 Interfaces
* - @subpage page_iface_zwp_idle_inhibit_manager_v1 - control behavior when display idles
* - @subpage page_iface_zwp_idle_inhibitor_v1 - context object for inhibiting idle behavior
* @section page_copyright_idle_inhibit_unstable_v1 Copyright
* <pre>
*
* Copyright © 2015 Samsung Electronics Co., 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 zwp_idle_inhibit_manager_v1;
struct zwp_idle_inhibitor_v1;
#ifndef ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
#define ZWP_IDLE_INHIBIT_MANAGER_V1_INTERFACE
/**
* @page page_iface_zwp_idle_inhibit_manager_v1 zwp_idle_inhibit_manager_v1
* @section page_iface_zwp_idle_inhibit_manager_v1_desc Description
*
* This interface permits inhibiting the idle behavior such as screen
* blanking, locking, and screensaving. The client binds the idle manager
* globally, then creates idle-inhibitor objects for each surface.
*
* 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_idle_inhibit_manager_v1_api API
* See @ref iface_zwp_idle_inhibit_manager_v1.
*/
/**
* @defgroup iface_zwp_idle_inhibit_manager_v1 The zwp_idle_inhibit_manager_v1 interface
*
* This interface permits inhibiting the idle behavior such as screen
* blanking, locking, and screensaving. The client binds the idle manager
* globally, then creates idle-inhibitor objects for each surface.
*
* 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_idle_inhibit_manager_v1_interface;
#endif
#ifndef ZWP_IDLE_INHIBITOR_V1_INTERFACE
#define ZWP_IDLE_INHIBITOR_V1_INTERFACE
/**
* @page page_iface_zwp_idle_inhibitor_v1 zwp_idle_inhibitor_v1
* @section page_iface_zwp_idle_inhibitor_v1_desc Description
*
* An idle inhibitor prevents the output that the associated surface is
* visible on from being set to a state where it is not visually usable due
* to lack of user interaction (e.g. blanked, dimmed, locked, set to power
* save, etc.) Any screensaver processes are also blocked from displaying.
*
* If the surface is destroyed, unmapped, becomes occluded, loses
* visibility, or otherwise becomes not visually relevant for the user, the
* idle inhibitor will not be honored by the compositor; if the surface
* subsequently regains visibility the inhibitor takes effect once again.
* Likewise, the inhibitor isn't honored if the system was already idled at
* the time the inhibitor was established, although if the system later
* de-idles and re-idles the inhibitor will take effect.
* @section page_iface_zwp_idle_inhibitor_v1_api API
* See @ref iface_zwp_idle_inhibitor_v1.
*/
/**
* @defgroup iface_zwp_idle_inhibitor_v1 The zwp_idle_inhibitor_v1 interface
*
* An idle inhibitor prevents the output that the associated surface is
* visible on from being set to a state where it is not visually usable due
* to lack of user interaction (e.g. blanked, dimmed, locked, set to power
* save, etc.) Any screensaver processes are also blocked from displaying.
*
* If the surface is destroyed, unmapped, becomes occluded, loses
* visibility, or otherwise becomes not visually relevant for the user, the
* idle inhibitor will not be honored by the compositor; if the surface
* subsequently regains visibility the inhibitor takes effect once again.
* Likewise, the inhibitor isn't honored if the system was already idled at
* the time the inhibitor was established, although if the system later
* de-idles and re-idles the inhibitor will take effect.
*/
extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
#endif
#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY 0
#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR 1
/**
* @ingroup iface_zwp_idle_inhibit_manager_v1
*/
#define ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_idle_inhibit_manager_v1
*/
#define ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR_SINCE_VERSION 1
/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
static inline void
zwp_idle_inhibit_manager_v1_set_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1, user_data);
}
/** @ingroup iface_zwp_idle_inhibit_manager_v1 */
static inline void *
zwp_idle_inhibit_manager_v1_get_user_data(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
}
static inline uint32_t
zwp_idle_inhibit_manager_v1_get_version(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1);
}
/**
* @ingroup iface_zwp_idle_inhibit_manager_v1
*
* Destroy the inhibit manager.
*/
static inline void
zwp_idle_inhibit_manager_v1_destroy(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
ZWP_IDLE_INHIBIT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_idle_inhibit_manager_v1
*
* Create a new inhibitor object associated with the given surface.
*/
static inline struct zwp_idle_inhibitor_v1 *
zwp_idle_inhibit_manager_v1_create_inhibitor(struct zwp_idle_inhibit_manager_v1 *zwp_idle_inhibit_manager_v1, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibit_manager_v1,
ZWP_IDLE_INHIBIT_MANAGER_V1_CREATE_INHIBITOR, &zwp_idle_inhibitor_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibit_manager_v1), 0, NULL, surface);
return (struct zwp_idle_inhibitor_v1 *) id;
}
#define ZWP_IDLE_INHIBITOR_V1_DESTROY 0
/**
* @ingroup iface_zwp_idle_inhibitor_v1
*/
#define ZWP_IDLE_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_idle_inhibitor_v1 */
static inline void
zwp_idle_inhibitor_v1_set_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1, user_data);
}
/** @ingroup iface_zwp_idle_inhibitor_v1 */
static inline void *
zwp_idle_inhibitor_v1_get_user_data(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_idle_inhibitor_v1);
}
static inline uint32_t
zwp_idle_inhibitor_v1_get_version(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1);
}
/**
* @ingroup iface_zwp_idle_inhibitor_v1
*
* Remove the inhibitor effect from the associated wl_surface.
*/
static inline void
zwp_idle_inhibitor_v1_destroy(struct zwp_idle_inhibitor_v1 *zwp_idle_inhibitor_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_idle_inhibitor_v1,
ZWP_IDLE_INHIBITOR_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_idle_inhibitor_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,68 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2015 Samsung Electronics Co., 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_idle_inhibitor_v1_interface;
static const struct wl_interface *idle_inhibit_unstable_v1_types[] = {
&zwp_idle_inhibitor_v1_interface,
&wl_surface_interface,
};
static const struct wl_message zwp_idle_inhibit_manager_v1_requests[] = {
{ "destroy", "", idle_inhibit_unstable_v1_types + 0 },
{ "create_inhibitor", "no", idle_inhibit_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_idle_inhibit_manager_v1_interface = {
"zwp_idle_inhibit_manager_v1", 1,
2, zwp_idle_inhibit_manager_v1_requests,
0, NULL,
};
static const struct wl_message zwp_idle_inhibitor_v1_requests[] = {
{ "destroy", "", idle_inhibit_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_idle_inhibitor_v1_interface = {
"zwp_idle_inhibitor_v1", 1,
1, zwp_idle_inhibitor_v1_requests,
0, NULL,
};
@@ -0,0 +1,328 @@
/* Generated by wayland-scanner 1.20.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;
#ifndef ZWP_INPUT_TIMESTAMPS_MANAGER_V1_INTERFACE
#define ZWP_INPUT_TIMESTAMPS_MANAGER_V1_INTERFACE
/**
* @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;
#endif
#ifndef ZWP_INPUT_TIMESTAMPS_V1_INTERFACE
#define ZWP_INPUT_TIMESTAMPS_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;
#endif
#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_flags((struct wl_proxy *) zwp_input_timestamps_manager_v1,
ZWP_INPUT_TIMESTAMPS_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @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_flags((struct wl_proxy *) zwp_input_timestamps_manager_v1,
ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_KEYBOARD_TIMESTAMPS, &zwp_input_timestamps_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1), 0, 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_flags((struct wl_proxy *) zwp_input_timestamps_manager_v1,
ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_POINTER_TIMESTAMPS, &zwp_input_timestamps_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1), 0, 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_flags((struct wl_proxy *) zwp_input_timestamps_manager_v1,
ZWP_INPUT_TIMESTAMPS_MANAGER_V1_GET_TOUCH_TIMESTAMPS, &zwp_input_timestamps_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_manager_v1), 0, 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_flags((struct wl_proxy *) zwp_input_timestamps_v1,
ZWP_INPUT_TIMESTAMPS_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_input_timestamps_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,83 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_keyboard_interface;
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_touch_interface;
extern const struct wl_interface zwp_input_timestamps_v1_interface;
static const struct wl_interface *input_timestamps_unstable_v1_types[] = {
NULL,
NULL,
NULL,
&zwp_input_timestamps_v1_interface,
&wl_keyboard_interface,
&zwp_input_timestamps_v1_interface,
&wl_pointer_interface,
&zwp_input_timestamps_v1_interface,
&wl_touch_interface,
};
static const struct wl_message zwp_input_timestamps_manager_v1_requests[] = {
{ "destroy", "", input_timestamps_unstable_v1_types + 0 },
{ "get_keyboard_timestamps", "no", input_timestamps_unstable_v1_types + 3 },
{ "get_pointer_timestamps", "no", input_timestamps_unstable_v1_types + 5 },
{ "get_touch_timestamps", "no", input_timestamps_unstable_v1_types + 7 },
};
WL_PRIVATE const struct wl_interface zwp_input_timestamps_manager_v1_interface = {
"zwp_input_timestamps_manager_v1", 1,
4, zwp_input_timestamps_manager_v1_requests,
0, NULL,
};
static const struct wl_message zwp_input_timestamps_v1_requests[] = {
{ "destroy", "", input_timestamps_unstable_v1_types + 0 },
};
static const struct wl_message zwp_input_timestamps_v1_events[] = {
{ "timestamp", "uuu", input_timestamps_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_input_timestamps_v1_interface = {
"zwp_input_timestamps_v1", 1,
1, zwp_input_timestamps_v1_requests,
1, zwp_input_timestamps_v1_events,
};
@@ -0,0 +1,337 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef KEYBOARD_SHORTCUTS_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define KEYBOARD_SHORTCUTS_INHIBIT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_keyboard_shortcuts_inhibit_unstable_v1 The keyboard_shortcuts_inhibit_unstable_v1 protocol
* Protocol for inhibiting the compositor keyboard shortcuts
*
* @section page_desc_keyboard_shortcuts_inhibit_unstable_v1 Description
*
* This protocol specifies a way for a client to request the compositor
* to ignore its own keyboard shortcuts for a given seat, so that all
* key events from that seat get forwarded to a surface.
*
* 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_keyboard_shortcuts_inhibit_unstable_v1 Interfaces
* - @subpage page_iface_zwp_keyboard_shortcuts_inhibit_manager_v1 - context object for keyboard grab_manager
* - @subpage page_iface_zwp_keyboard_shortcuts_inhibitor_v1 - context object for keyboard shortcuts inhibitor
* @section page_copyright_keyboard_shortcuts_inhibit_unstable_v1 Copyright
* <pre>
*
* Copyright © 2017 Red Hat Inc.
*
* 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 wl_surface;
struct zwp_keyboard_shortcuts_inhibit_manager_v1;
struct zwp_keyboard_shortcuts_inhibitor_v1;
#ifndef ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_INTERFACE
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_INTERFACE
/**
* @page page_iface_zwp_keyboard_shortcuts_inhibit_manager_v1 zwp_keyboard_shortcuts_inhibit_manager_v1
* @section page_iface_zwp_keyboard_shortcuts_inhibit_manager_v1_desc Description
*
* A global interface used for inhibiting the compositor keyboard shortcuts.
* @section page_iface_zwp_keyboard_shortcuts_inhibit_manager_v1_api API
* See @ref iface_zwp_keyboard_shortcuts_inhibit_manager_v1.
*/
/**
* @defgroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1 The zwp_keyboard_shortcuts_inhibit_manager_v1 interface
*
* A global interface used for inhibiting the compositor keyboard shortcuts.
*/
extern const struct wl_interface zwp_keyboard_shortcuts_inhibit_manager_v1_interface;
#endif
#ifndef ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_INTERFACE
#define ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_INTERFACE
/**
* @page page_iface_zwp_keyboard_shortcuts_inhibitor_v1 zwp_keyboard_shortcuts_inhibitor_v1
* @section page_iface_zwp_keyboard_shortcuts_inhibitor_v1_desc Description
*
* A keyboard shortcuts inhibitor instructs the compositor to ignore
* its own keyboard shortcuts when the associated surface has keyboard
* focus. As a result, when the surface has keyboard focus on the given
* seat, it will receive all key events originating from the specified
* seat, even those which would normally be caught by the compositor for
* its own shortcuts.
*
* The Wayland compositor is however under no obligation to disable
* all of its shortcuts, and may keep some special key combo for its own
* use, including but not limited to one allowing the user to forcibly
* restore normal keyboard events routing in the case of an unwilling
* client. The compositor may also use the same key combo to reactivate
* an existing shortcut inhibitor that was previously deactivated on
* user request.
*
* When the compositor restores its own keyboard shortcuts, an
* "inactive" event is emitted to notify the client that the keyboard
* shortcuts inhibitor is not effectively active for the surface and
* seat any more, and the client should not expect to receive all
* keyboard events.
*
* When the keyboard shortcuts inhibitor is inactive, the client has
* no way to forcibly reactivate the keyboard shortcuts inhibitor.
*
* The user can chose to re-enable a previously deactivated keyboard
* shortcuts inhibitor using any mechanism the compositor may offer,
* in which case the compositor will send an "active" event to notify
* the client.
*
* If the surface is destroyed, unmapped, or loses the seat's keyboard
* focus, the keyboard shortcuts inhibitor becomes irrelevant and the
* compositor will restore its own keyboard shortcuts but no "inactive"
* event is emitted in this case.
* @section page_iface_zwp_keyboard_shortcuts_inhibitor_v1_api API
* See @ref iface_zwp_keyboard_shortcuts_inhibitor_v1.
*/
/**
* @defgroup iface_zwp_keyboard_shortcuts_inhibitor_v1 The zwp_keyboard_shortcuts_inhibitor_v1 interface
*
* A keyboard shortcuts inhibitor instructs the compositor to ignore
* its own keyboard shortcuts when the associated surface has keyboard
* focus. As a result, when the surface has keyboard focus on the given
* seat, it will receive all key events originating from the specified
* seat, even those which would normally be caught by the compositor for
* its own shortcuts.
*
* The Wayland compositor is however under no obligation to disable
* all of its shortcuts, and may keep some special key combo for its own
* use, including but not limited to one allowing the user to forcibly
* restore normal keyboard events routing in the case of an unwilling
* client. The compositor may also use the same key combo to reactivate
* an existing shortcut inhibitor that was previously deactivated on
* user request.
*
* When the compositor restores its own keyboard shortcuts, an
* "inactive" event is emitted to notify the client that the keyboard
* shortcuts inhibitor is not effectively active for the surface and
* seat any more, and the client should not expect to receive all
* keyboard events.
*
* When the keyboard shortcuts inhibitor is inactive, the client has
* no way to forcibly reactivate the keyboard shortcuts inhibitor.
*
* The user can chose to re-enable a previously deactivated keyboard
* shortcuts inhibitor using any mechanism the compositor may offer,
* in which case the compositor will send an "active" event to notify
* the client.
*
* If the surface is destroyed, unmapped, or loses the seat's keyboard
* focus, the keyboard shortcuts inhibitor becomes irrelevant and the
* compositor will restore its own keyboard shortcuts but no "inactive"
* event is emitted in this case.
*/
extern const struct wl_interface zwp_keyboard_shortcuts_inhibitor_v1_interface;
#endif
#ifndef ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_ERROR_ENUM
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_ERROR_ENUM
enum zwp_keyboard_shortcuts_inhibit_manager_v1_error {
/**
* the shortcuts are already inhibited for this surface
*/
ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_ERROR_ALREADY_INHIBITED = 0,
};
#endif /* ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_ERROR_ENUM */
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_DESTROY 0
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_INHIBIT_SHORTCUTS 1
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1
*/
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1
*/
#define ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_INHIBIT_SHORTCUTS_SINCE_VERSION 1
/** @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1 */
static inline void
zwp_keyboard_shortcuts_inhibit_manager_v1_set_user_data(struct zwp_keyboard_shortcuts_inhibit_manager_v1 *zwp_keyboard_shortcuts_inhibit_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1, user_data);
}
/** @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1 */
static inline void *
zwp_keyboard_shortcuts_inhibit_manager_v1_get_user_data(struct zwp_keyboard_shortcuts_inhibit_manager_v1 *zwp_keyboard_shortcuts_inhibit_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1);
}
static inline uint32_t
zwp_keyboard_shortcuts_inhibit_manager_v1_get_version(struct zwp_keyboard_shortcuts_inhibit_manager_v1 *zwp_keyboard_shortcuts_inhibit_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1);
}
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1
*
* Destroy the keyboard shortcuts inhibitor manager.
*/
static inline void
zwp_keyboard_shortcuts_inhibit_manager_v1_destroy(struct zwp_keyboard_shortcuts_inhibit_manager_v1 *zwp_keyboard_shortcuts_inhibit_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1,
ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibit_manager_v1
*
* Create a new keyboard shortcuts inhibitor object associated with
* the given surface for the given seat.
*
* If shortcuts are already inhibited for the specified seat and surface,
* a protocol error "already_inhibited" is raised by the compositor.
*/
static inline struct zwp_keyboard_shortcuts_inhibitor_v1 *
zwp_keyboard_shortcuts_inhibit_manager_v1_inhibit_shortcuts(struct zwp_keyboard_shortcuts_inhibit_manager_v1 *zwp_keyboard_shortcuts_inhibit_manager_v1, struct wl_surface *surface, struct wl_seat *seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1,
ZWP_KEYBOARD_SHORTCUTS_INHIBIT_MANAGER_V1_INHIBIT_SHORTCUTS, &zwp_keyboard_shortcuts_inhibitor_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_keyboard_shortcuts_inhibit_manager_v1), 0, NULL, surface, seat);
return (struct zwp_keyboard_shortcuts_inhibitor_v1 *) id;
}
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
* @struct zwp_keyboard_shortcuts_inhibitor_v1_listener
*/
struct zwp_keyboard_shortcuts_inhibitor_v1_listener {
/**
* shortcuts are inhibited
*
* This event indicates that the shortcut inhibitor is active.
*
* The compositor sends this event every time compositor shortcuts
* are inhibited on behalf of the surface. When active, the client
* may receive input events normally reserved by the compositor
* (see zwp_keyboard_shortcuts_inhibitor_v1).
*
* This occurs typically when the initial request
* "inhibit_shortcuts" first becomes active or when the user
* instructs the compositor to re-enable and existing shortcuts
* inhibitor using any mechanism offered by the compositor.
*/
void (*active)(void *data,
struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1);
/**
* shortcuts are restored
*
* This event indicates that the shortcuts inhibitor is inactive,
* normal shortcuts processing is restored by the compositor.
*/
void (*inactive)(void *data,
struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1);
};
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
*/
static inline int
zwp_keyboard_shortcuts_inhibitor_v1_add_listener(struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1,
const struct zwp_keyboard_shortcuts_inhibitor_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1,
(void (**)(void)) listener, data);
}
#define ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_DESTROY 0
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
*/
#define ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_ACTIVE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
*/
#define ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_INACTIVE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
*/
#define ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1 */
static inline void
zwp_keyboard_shortcuts_inhibitor_v1_set_user_data(struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1, user_data);
}
/** @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1 */
static inline void *
zwp_keyboard_shortcuts_inhibitor_v1_get_user_data(struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1);
}
static inline uint32_t
zwp_keyboard_shortcuts_inhibitor_v1_get_version(struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1);
}
/**
* @ingroup iface_zwp_keyboard_shortcuts_inhibitor_v1
*
* Remove the keyboard shortcuts inhibitor from the associated wl_surface.
*/
static inline void
zwp_keyboard_shortcuts_inhibitor_v1_destroy(struct zwp_keyboard_shortcuts_inhibitor_v1 *zwp_keyboard_shortcuts_inhibitor_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1,
ZWP_KEYBOARD_SHORTCUTS_INHIBITOR_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_keyboard_shortcuts_inhibitor_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,75 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2017 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_keyboard_shortcuts_inhibitor_v1_interface;
static const struct wl_interface *keyboard_shortcuts_inhibit_unstable_v1_types[] = {
&zwp_keyboard_shortcuts_inhibitor_v1_interface,
&wl_surface_interface,
&wl_seat_interface,
};
static const struct wl_message zwp_keyboard_shortcuts_inhibit_manager_v1_requests[] = {
{ "destroy", "", keyboard_shortcuts_inhibit_unstable_v1_types + 0 },
{ "inhibit_shortcuts", "noo", keyboard_shortcuts_inhibit_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_keyboard_shortcuts_inhibit_manager_v1_interface = {
"zwp_keyboard_shortcuts_inhibit_manager_v1", 1,
2, zwp_keyboard_shortcuts_inhibit_manager_v1_requests,
0, NULL,
};
static const struct wl_message zwp_keyboard_shortcuts_inhibitor_v1_requests[] = {
{ "destroy", "", keyboard_shortcuts_inhibit_unstable_v1_types + 0 },
};
static const struct wl_message zwp_keyboard_shortcuts_inhibitor_v1_events[] = {
{ "active", "", keyboard_shortcuts_inhibit_unstable_v1_types + 0 },
{ "inactive", "", keyboard_shortcuts_inhibit_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_keyboard_shortcuts_inhibitor_v1_interface = {
"zwp_keyboard_shortcuts_inhibitor_v1", 1,
1, zwp_keyboard_shortcuts_inhibitor_v1_requests,
2, zwp_keyboard_shortcuts_inhibitor_v1_events,
};
@@ -0,0 +1,667 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define POINTER_CONSTRAINTS_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_pointer_constraints_unstable_v1 The pointer_constraints_unstable_v1 protocol
* protocol for constraining pointer motions
*
* @section page_desc_pointer_constraints_unstable_v1 Description
*
* This protocol specifies a set of interfaces used for adding constraints to
* the motion of a pointer. Possible constraints include confining pointer
* motions to a given region, or locking it to its current position.
*
* In order to constrain the pointer, a client must first bind the global
* interface "wp_pointer_constraints" which, if a compositor supports pointer
* constraints, is exposed by the registry. Using the bound global object, the
* client uses the request that corresponds to the type of constraint it wants
* to make. See wp_pointer_constraints for more details.
*
* 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_pointer_constraints_unstable_v1 Interfaces
* - @subpage page_iface_zwp_pointer_constraints_v1 - constrain the movement of a pointer
* - @subpage page_iface_zwp_locked_pointer_v1 - receive relative pointer motion events
* - @subpage page_iface_zwp_confined_pointer_v1 - confined pointer object
* @section page_copyright_pointer_constraints_unstable_v1 Copyright
* <pre>
*
* Copyright © 2014 Jonas Ådahl
* Copyright © 2015 Red Hat Inc.
*
* 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 wl_region;
struct wl_surface;
struct zwp_confined_pointer_v1;
struct zwp_locked_pointer_v1;
struct zwp_pointer_constraints_v1;
#ifndef ZWP_POINTER_CONSTRAINTS_V1_INTERFACE
#define ZWP_POINTER_CONSTRAINTS_V1_INTERFACE
/**
* @page page_iface_zwp_pointer_constraints_v1 zwp_pointer_constraints_v1
* @section page_iface_zwp_pointer_constraints_v1_desc Description
*
* The global interface exposing pointer constraining functionality. It
* exposes two requests: lock_pointer for locking the pointer to its
* position, and confine_pointer for locking the pointer to a region.
*
* The lock_pointer and confine_pointer requests create the objects
* wp_locked_pointer and wp_confined_pointer respectively, and the client can
* use these objects to interact with the lock.
*
* For any surface, only one lock or confinement may be active across all
* wl_pointer objects of the same seat. If a lock or confinement is requested
* when another lock or confinement is active or requested on the same surface
* and with any of the wl_pointer objects of the same seat, an
* 'already_constrained' error will be raised.
* @section page_iface_zwp_pointer_constraints_v1_api API
* See @ref iface_zwp_pointer_constraints_v1.
*/
/**
* @defgroup iface_zwp_pointer_constraints_v1 The zwp_pointer_constraints_v1 interface
*
* The global interface exposing pointer constraining functionality. It
* exposes two requests: lock_pointer for locking the pointer to its
* position, and confine_pointer for locking the pointer to a region.
*
* The lock_pointer and confine_pointer requests create the objects
* wp_locked_pointer and wp_confined_pointer respectively, and the client can
* use these objects to interact with the lock.
*
* For any surface, only one lock or confinement may be active across all
* wl_pointer objects of the same seat. If a lock or confinement is requested
* when another lock or confinement is active or requested on the same surface
* and with any of the wl_pointer objects of the same seat, an
* 'already_constrained' error will be raised.
*/
extern const struct wl_interface zwp_pointer_constraints_v1_interface;
#endif
#ifndef ZWP_LOCKED_POINTER_V1_INTERFACE
#define ZWP_LOCKED_POINTER_V1_INTERFACE
/**
* @page page_iface_zwp_locked_pointer_v1 zwp_locked_pointer_v1
* @section page_iface_zwp_locked_pointer_v1_desc Description
*
* The wp_locked_pointer interface represents a locked pointer state.
*
* While the lock of this object is active, the wl_pointer objects of the
* associated seat will not emit any wl_pointer.motion events.
*
* This object will send the event 'locked' when the lock is activated.
* Whenever the lock is activated, it is guaranteed that the locked surface
* will already have received pointer focus and that the pointer will be
* within the region passed to the request creating this object.
*
* To unlock the pointer, send the destroy request. This will also destroy
* the wp_locked_pointer object.
*
* If the compositor decides to unlock the pointer the unlocked event is
* sent. See wp_locked_pointer.unlock for details.
*
* When unlocking, the compositor may warp the cursor position to the set
* cursor position hint. If it does, it will not result in any relative
* motion events emitted via wp_relative_pointer.
*
* If the surface the lock was requested on is destroyed and the lock is not
* yet activated, the wp_locked_pointer object is now defunct and must be
* destroyed.
* @section page_iface_zwp_locked_pointer_v1_api API
* See @ref iface_zwp_locked_pointer_v1.
*/
/**
* @defgroup iface_zwp_locked_pointer_v1 The zwp_locked_pointer_v1 interface
*
* The wp_locked_pointer interface represents a locked pointer state.
*
* While the lock of this object is active, the wl_pointer objects of the
* associated seat will not emit any wl_pointer.motion events.
*
* This object will send the event 'locked' when the lock is activated.
* Whenever the lock is activated, it is guaranteed that the locked surface
* will already have received pointer focus and that the pointer will be
* within the region passed to the request creating this object.
*
* To unlock the pointer, send the destroy request. This will also destroy
* the wp_locked_pointer object.
*
* If the compositor decides to unlock the pointer the unlocked event is
* sent. See wp_locked_pointer.unlock for details.
*
* When unlocking, the compositor may warp the cursor position to the set
* cursor position hint. If it does, it will not result in any relative
* motion events emitted via wp_relative_pointer.
*
* If the surface the lock was requested on is destroyed and the lock is not
* yet activated, the wp_locked_pointer object is now defunct and must be
* destroyed.
*/
extern const struct wl_interface zwp_locked_pointer_v1_interface;
#endif
#ifndef ZWP_CONFINED_POINTER_V1_INTERFACE
#define ZWP_CONFINED_POINTER_V1_INTERFACE
/**
* @page page_iface_zwp_confined_pointer_v1 zwp_confined_pointer_v1
* @section page_iface_zwp_confined_pointer_v1_desc Description
*
* The wp_confined_pointer interface represents a confined pointer state.
*
* This object will send the event 'confined' when the confinement is
* activated. Whenever the confinement is activated, it is guaranteed that
* the surface the pointer is confined to will already have received pointer
* focus and that the pointer will be within the region passed to the request
* creating this object. It is up to the compositor to decide whether this
* requires some user interaction and if the pointer will warp to within the
* passed region if outside.
*
* To unconfine the pointer, send the destroy request. This will also destroy
* the wp_confined_pointer object.
*
* If the compositor decides to unconfine the pointer the unconfined event is
* sent. The wp_confined_pointer object is at this point defunct and should
* be destroyed.
* @section page_iface_zwp_confined_pointer_v1_api API
* See @ref iface_zwp_confined_pointer_v1.
*/
/**
* @defgroup iface_zwp_confined_pointer_v1 The zwp_confined_pointer_v1 interface
*
* The wp_confined_pointer interface represents a confined pointer state.
*
* This object will send the event 'confined' when the confinement is
* activated. Whenever the confinement is activated, it is guaranteed that
* the surface the pointer is confined to will already have received pointer
* focus and that the pointer will be within the region passed to the request
* creating this object. It is up to the compositor to decide whether this
* requires some user interaction and if the pointer will warp to within the
* passed region if outside.
*
* To unconfine the pointer, send the destroy request. This will also destroy
* the wp_confined_pointer object.
*
* If the compositor decides to unconfine the pointer the unconfined event is
* sent. The wp_confined_pointer object is at this point defunct and should
* be destroyed.
*/
extern const struct wl_interface zwp_confined_pointer_v1_interface;
#endif
#ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
#define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
/**
* @ingroup iface_zwp_pointer_constraints_v1
* wp_pointer_constraints error values
*
* These errors can be emitted in response to wp_pointer_constraints
* requests.
*/
enum zwp_pointer_constraints_v1_error {
/**
* pointer constraint already requested on that surface
*/
ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1,
};
#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */
#ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
#define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
/**
* @ingroup iface_zwp_pointer_constraints_v1
* constraint lifetime
*
* These values represent different lifetime semantics. They are passed
* as arguments to the factory requests to specify how the constraint
* lifetimes should be managed.
*/
enum zwp_pointer_constraints_v1_lifetime {
/**
* the pointer constraint is defunct once deactivated
*
* A oneshot pointer constraint will never reactivate once it has
* been deactivated. See the corresponding deactivation event
* (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined)
* for details.
*/
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT = 1,
/**
* the pointer constraint may reactivate
*
* A persistent pointer constraint may again reactivate once it
* has been deactivated. See the corresponding deactivation event
* (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined)
* for details.
*/
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2,
};
#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */
#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY 0
#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER 1
#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER 2
/**
* @ingroup iface_zwp_pointer_constraints_v1
*/
#define ZWP_POINTER_CONSTRAINTS_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_pointer_constraints_v1
*/
#define ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER_SINCE_VERSION 1
/**
* @ingroup iface_zwp_pointer_constraints_v1
*/
#define ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER_SINCE_VERSION 1
/** @ingroup iface_zwp_pointer_constraints_v1 */
static inline void
zwp_pointer_constraints_v1_set_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_constraints_v1, user_data);
}
/** @ingroup iface_zwp_pointer_constraints_v1 */
static inline void *
zwp_pointer_constraints_v1_get_user_data(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_constraints_v1);
}
static inline uint32_t
zwp_pointer_constraints_v1_get_version(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1);
}
/**
* @ingroup iface_zwp_pointer_constraints_v1
*
* Used by the client to notify the server that it will no longer use this
* pointer constraints object.
*/
static inline void
zwp_pointer_constraints_v1_destroy(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_constraints_v1,
ZWP_POINTER_CONSTRAINTS_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_pointer_constraints_v1
*
* The lock_pointer request lets the client request to disable movements of
* the virtual pointer (i.e. the cursor), effectively locking the pointer
* to a position. This request may not take effect immediately; in the
* future, when the compositor deems implementation-specific constraints
* are satisfied, the pointer lock will be activated and the compositor
* sends a locked event.
*
* The protocol provides no guarantee that the constraints are ever
* satisfied, and does not require the compositor to send an error if the
* constraints cannot ever be satisfied. It is thus possible to request a
* lock that will never activate.
*
* There may not be another pointer constraint of any kind requested or
* active on the surface for any of the wl_pointer objects of the seat of
* the passed pointer when requesting a lock. If there is, an error will be
* raised. See general pointer lock documentation for more details.
*
* The intersection of the region passed with this request and the input
* region of the surface is used to determine where the pointer must be
* in order for the lock to activate. It is up to the compositor whether to
* warp the pointer or require some kind of user interaction for the lock
* to activate. If the region is null the surface input region is used.
*
* A surface may receive pointer focus without the lock being activated.
*
* The request creates a new object wp_locked_pointer which is used to
* interact with the lock as well as receive updates about its state. See
* the the description of wp_locked_pointer for further information.
*
* Note that while a pointer is locked, the wl_pointer objects of the
* corresponding seat will not emit any wl_pointer.motion events, but
* relative motion events will still be emitted via wp_relative_pointer
* objects of the same seat. wl_pointer.axis and wl_pointer.button events
* are unaffected.
*/
static inline struct zwp_locked_pointer_v1 *
zwp_pointer_constraints_v1_lock_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_constraints_v1,
ZWP_POINTER_CONSTRAINTS_V1_LOCK_POINTER, &zwp_locked_pointer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1), 0, NULL, surface, pointer, region, lifetime);
return (struct zwp_locked_pointer_v1 *) id;
}
/**
* @ingroup iface_zwp_pointer_constraints_v1
*
* The confine_pointer request lets the client request to confine the
* pointer cursor to a given region. This request may not take effect
* immediately; in the future, when the compositor deems implementation-
* specific constraints are satisfied, the pointer confinement will be
* activated and the compositor sends a confined event.
*
* The intersection of the region passed with this request and the input
* region of the surface is used to determine where the pointer must be
* in order for the confinement to activate. It is up to the compositor
* whether to warp the pointer or require some kind of user interaction for
* the confinement to activate. If the region is null the surface input
* region is used.
*
* The request will create a new object wp_confined_pointer which is used
* to interact with the confinement as well as receive updates about its
* state. See the the description of wp_confined_pointer for further
* information.
*/
static inline struct zwp_confined_pointer_v1 *
zwp_pointer_constraints_v1_confine_pointer(struct zwp_pointer_constraints_v1 *zwp_pointer_constraints_v1, struct wl_surface *surface, struct wl_pointer *pointer, struct wl_region *region, uint32_t lifetime)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_constraints_v1,
ZWP_POINTER_CONSTRAINTS_V1_CONFINE_POINTER, &zwp_confined_pointer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_constraints_v1), 0, NULL, surface, pointer, region, lifetime);
return (struct zwp_confined_pointer_v1 *) id;
}
/**
* @ingroup iface_zwp_locked_pointer_v1
* @struct zwp_locked_pointer_v1_listener
*/
struct zwp_locked_pointer_v1_listener {
/**
* lock activation event
*
* Notification that the pointer lock of the seat's pointer is
* activated.
*/
void (*locked)(void *data,
struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
/**
* lock deactivation event
*
* Notification that the pointer lock of the seat's pointer is no
* longer active. If this is a oneshot pointer lock (see
* wp_pointer_constraints.lifetime) this object is now defunct and
* should be destroyed. If this is a persistent pointer lock (see
* wp_pointer_constraints.lifetime) this pointer lock may again
* reactivate in the future.
*/
void (*unlocked)(void *data,
struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1);
};
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
static inline int
zwp_locked_pointer_v1_add_listener(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1,
const struct zwp_locked_pointer_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_locked_pointer_v1,
(void (**)(void)) listener, data);
}
#define ZWP_LOCKED_POINTER_V1_DESTROY 0
#define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT 1
#define ZWP_LOCKED_POINTER_V1_SET_REGION 2
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
#define ZWP_LOCKED_POINTER_V1_LOCKED_SINCE_VERSION 1
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
#define ZWP_LOCKED_POINTER_V1_UNLOCKED_SINCE_VERSION 1
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
#define ZWP_LOCKED_POINTER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
#define ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT_SINCE_VERSION 1
/**
* @ingroup iface_zwp_locked_pointer_v1
*/
#define ZWP_LOCKED_POINTER_V1_SET_REGION_SINCE_VERSION 1
/** @ingroup iface_zwp_locked_pointer_v1 */
static inline void
zwp_locked_pointer_v1_set_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_locked_pointer_v1, user_data);
}
/** @ingroup iface_zwp_locked_pointer_v1 */
static inline void *
zwp_locked_pointer_v1_get_user_data(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_locked_pointer_v1);
}
static inline uint32_t
zwp_locked_pointer_v1_get_version(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1);
}
/**
* @ingroup iface_zwp_locked_pointer_v1
*
* Destroy the locked pointer object. If applicable, the compositor will
* unlock the pointer.
*/
static inline void
zwp_locked_pointer_v1_destroy(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_locked_pointer_v1,
ZWP_LOCKED_POINTER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_locked_pointer_v1
*
* Set the cursor position hint relative to the top left corner of the
* surface.
*
* If the client is drawing its own cursor, it should update the position
* hint to the position of its own cursor. A compositor may use this
* information to warp the pointer upon unlock in order to avoid pointer
* jumps.
*
* The cursor position hint is double buffered. The new hint will only take
* effect when the associated surface gets it pending state applied. See
* wl_surface.commit for details.
*/
static inline void
zwp_locked_pointer_v1_set_cursor_position_hint(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, wl_fixed_t surface_x, wl_fixed_t surface_y)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_locked_pointer_v1,
ZWP_LOCKED_POINTER_V1_SET_CURSOR_POSITION_HINT, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1), 0, surface_x, surface_y);
}
/**
* @ingroup iface_zwp_locked_pointer_v1
*
* Set a new region used to lock the pointer.
*
* The new lock region is double-buffered. The new lock region will
* only take effect when the associated surface gets its pending state
* applied. See wl_surface.commit for details.
*
* For details about the lock region, see wp_locked_pointer.
*/
static inline void
zwp_locked_pointer_v1_set_region(struct zwp_locked_pointer_v1 *zwp_locked_pointer_v1, struct wl_region *region)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_locked_pointer_v1,
ZWP_LOCKED_POINTER_V1_SET_REGION, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_locked_pointer_v1), 0, region);
}
/**
* @ingroup iface_zwp_confined_pointer_v1
* @struct zwp_confined_pointer_v1_listener
*/
struct zwp_confined_pointer_v1_listener {
/**
* pointer confined
*
* Notification that the pointer confinement of the seat's
* pointer is activated.
*/
void (*confined)(void *data,
struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
/**
* pointer unconfined
*
* Notification that the pointer confinement of the seat's
* pointer is no longer active. If this is a oneshot pointer
* confinement (see wp_pointer_constraints.lifetime) this object is
* now defunct and should be destroyed. If this is a persistent
* pointer confinement (see wp_pointer_constraints.lifetime) this
* pointer confinement may again reactivate in the future.
*/
void (*unconfined)(void *data,
struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1);
};
/**
* @ingroup iface_zwp_confined_pointer_v1
*/
static inline int
zwp_confined_pointer_v1_add_listener(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1,
const struct zwp_confined_pointer_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_confined_pointer_v1,
(void (**)(void)) listener, data);
}
#define ZWP_CONFINED_POINTER_V1_DESTROY 0
#define ZWP_CONFINED_POINTER_V1_SET_REGION 1
/**
* @ingroup iface_zwp_confined_pointer_v1
*/
#define ZWP_CONFINED_POINTER_V1_CONFINED_SINCE_VERSION 1
/**
* @ingroup iface_zwp_confined_pointer_v1
*/
#define ZWP_CONFINED_POINTER_V1_UNCONFINED_SINCE_VERSION 1
/**
* @ingroup iface_zwp_confined_pointer_v1
*/
#define ZWP_CONFINED_POINTER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_confined_pointer_v1
*/
#define ZWP_CONFINED_POINTER_V1_SET_REGION_SINCE_VERSION 1
/** @ingroup iface_zwp_confined_pointer_v1 */
static inline void
zwp_confined_pointer_v1_set_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_confined_pointer_v1, user_data);
}
/** @ingroup iface_zwp_confined_pointer_v1 */
static inline void *
zwp_confined_pointer_v1_get_user_data(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_confined_pointer_v1);
}
static inline uint32_t
zwp_confined_pointer_v1_get_version(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_confined_pointer_v1);
}
/**
* @ingroup iface_zwp_confined_pointer_v1
*
* Destroy the confined pointer object. If applicable, the compositor will
* unconfine the pointer.
*/
static inline void
zwp_confined_pointer_v1_destroy(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_confined_pointer_v1,
ZWP_CONFINED_POINTER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_confined_pointer_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_confined_pointer_v1
*
* Set a new region used to confine the pointer.
*
* The new confine region is double-buffered. The new confine region will
* only take effect when the associated surface gets its pending state
* applied. See wl_surface.commit for details.
*
* If the confinement is active when the new confinement region is applied
* and the pointer ends up outside of newly applied region, the pointer may
* warped to a position within the new confinement region. If warped, a
* wl_pointer.motion event will be emitted, but no
* wp_relative_pointer.relative_motion event.
*
* The compositor may also, instead of using the new region, unconfine the
* pointer.
*
* For details about the confine region, see wp_confined_pointer.
*/
static inline void
zwp_confined_pointer_v1_set_region(struct zwp_confined_pointer_v1 *zwp_confined_pointer_v1, struct wl_region *region)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_confined_pointer_v1,
ZWP_CONFINED_POINTER_V1_SET_REGION, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_confined_pointer_v1), 0, region);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,108 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2014 Jonas Ådahl
* Copyright © 2015 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_region_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_confined_pointer_v1_interface;
extern const struct wl_interface zwp_locked_pointer_v1_interface;
static const struct wl_interface *pointer_constraints_unstable_v1_types[] = {
NULL,
NULL,
&zwp_locked_pointer_v1_interface,
&wl_surface_interface,
&wl_pointer_interface,
&wl_region_interface,
NULL,
&zwp_confined_pointer_v1_interface,
&wl_surface_interface,
&wl_pointer_interface,
&wl_region_interface,
NULL,
&wl_region_interface,
&wl_region_interface,
};
static const struct wl_message zwp_pointer_constraints_v1_requests[] = {
{ "destroy", "", pointer_constraints_unstable_v1_types + 0 },
{ "lock_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 2 },
{ "confine_pointer", "noo?ou", pointer_constraints_unstable_v1_types + 7 },
};
WL_PRIVATE const struct wl_interface zwp_pointer_constraints_v1_interface = {
"zwp_pointer_constraints_v1", 1,
3, zwp_pointer_constraints_v1_requests,
0, NULL,
};
static const struct wl_message zwp_locked_pointer_v1_requests[] = {
{ "destroy", "", pointer_constraints_unstable_v1_types + 0 },
{ "set_cursor_position_hint", "ff", pointer_constraints_unstable_v1_types + 0 },
{ "set_region", "?o", pointer_constraints_unstable_v1_types + 12 },
};
static const struct wl_message zwp_locked_pointer_v1_events[] = {
{ "locked", "", pointer_constraints_unstable_v1_types + 0 },
{ "unlocked", "", pointer_constraints_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_locked_pointer_v1_interface = {
"zwp_locked_pointer_v1", 1,
3, zwp_locked_pointer_v1_requests,
2, zwp_locked_pointer_v1_events,
};
static const struct wl_message zwp_confined_pointer_v1_requests[] = {
{ "destroy", "", pointer_constraints_unstable_v1_types + 0 },
{ "set_region", "?o", pointer_constraints_unstable_v1_types + 13 },
};
static const struct wl_message zwp_confined_pointer_v1_events[] = {
{ "confined", "", pointer_constraints_unstable_v1_types + 0 },
{ "unconfined", "", pointer_constraints_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_confined_pointer_v1_interface = {
"zwp_confined_pointer_v1", 1,
2, zwp_confined_pointer_v1_requests,
2, zwp_confined_pointer_v1_events,
};
@@ -0,0 +1,682 @@
/* Generated by wayland-scanner 1.20.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
* - @subpage page_iface_zwp_pointer_gesture_hold_v1 - a hold gesture object
*/
struct wl_pointer;
struct wl_surface;
struct zwp_pointer_gesture_hold_v1;
struct zwp_pointer_gesture_pinch_v1;
struct zwp_pointer_gesture_swipe_v1;
struct zwp_pointer_gestures_v1;
#ifndef ZWP_POINTER_GESTURES_V1_INTERFACE
#define ZWP_POINTER_GESTURES_V1_INTERFACE
/**
* @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.
*
* Three gestures are currently supported: swipe, pinch, and hold.
* Pinch and swipe gestures follow a three-stage cycle: begin, update,
* end, hold gestures follow a two-stage cycle: begin and end. All
* gestures 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.
*
* Three gestures are currently supported: swipe, pinch, and hold.
* Pinch and swipe gestures follow a three-stage cycle: begin, update,
* end, hold gestures follow a two-stage cycle: begin and end. All
* gestures 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;
#endif
#ifndef ZWP_POINTER_GESTURE_SWIPE_V1_INTERFACE
#define ZWP_POINTER_GESTURE_SWIPE_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 hold, 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 hold, 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;
#endif
#ifndef ZWP_POINTER_GESTURE_PINCH_V1_INTERFACE
#define ZWP_POINTER_GESTURE_PINCH_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 hold, 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 hold, 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;
#endif
#ifndef ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE
#define ZWP_POINTER_GESTURE_HOLD_V1_INTERFACE
/**
* @page page_iface_zwp_pointer_gesture_hold_v1 zwp_pointer_gesture_hold_v1
* @section page_iface_zwp_pointer_gesture_hold_v1_desc Description
*
* A hold gesture object notifies a client about a single- or
* multi-finger hold gesture detected on an indirect input device such as
* a touchpad. The gesture is usually initiated by one or more fingers
* being held down without significant movement. The precise conditions
* of when such a gesture is detected are implementation-dependent.
*
* In particular, this gesture may be used to cancel kinetic scrolling.
*
* A hold gesture consists of two stages: begin and end. Unlike pinch and
* swipe there is no update stage.
* There cannot be multiple simultaneous hold, 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_hold_v1_api API
* See @ref iface_zwp_pointer_gesture_hold_v1.
*/
/**
* @defgroup iface_zwp_pointer_gesture_hold_v1 The zwp_pointer_gesture_hold_v1 interface
*
* A hold gesture object notifies a client about a single- or
* multi-finger hold gesture detected on an indirect input device such as
* a touchpad. The gesture is usually initiated by one or more fingers
* being held down without significant movement. The precise conditions
* of when such a gesture is detected are implementation-dependent.
*
* In particular, this gesture may be used to cancel kinetic scrolling.
*
* A hold gesture consists of two stages: begin and end. Unlike pinch and
* swipe there is no update stage.
* There cannot be multiple simultaneous hold, 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_hold_v1_interface;
#endif
#define ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE 0
#define ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE 1
#define ZWP_POINTER_GESTURES_V1_RELEASE 2
#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE 3
/**
* @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
*/
#define ZWP_POINTER_GESTURES_V1_RELEASE_SINCE_VERSION 2
/**
* @ingroup iface_zwp_pointer_gestures_v1
*/
#define ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE_SINCE_VERSION 3
/** @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_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
ZWP_POINTER_GESTURES_V1_GET_SWIPE_GESTURE, &zwp_pointer_gesture_swipe_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, 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_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
ZWP_POINTER_GESTURES_V1_GET_PINCH_GESTURE, &zwp_pointer_gesture_pinch_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, NULL, pointer);
return (struct zwp_pointer_gesture_pinch_v1 *) id;
}
/**
* @ingroup iface_zwp_pointer_gestures_v1
*
* Destroy the pointer gesture object. Swipe, pinch and hold objects
* created via this gesture object remain valid.
*/
static inline void
zwp_pointer_gestures_v1_release(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
ZWP_POINTER_GESTURES_V1_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_pointer_gestures_v1
*
* Create a hold gesture object. See the
* wl_pointer_gesture_hold interface for details.
*/
static inline struct zwp_pointer_gesture_hold_v1 *
zwp_pointer_gestures_v1_get_hold_gesture(struct zwp_pointer_gestures_v1 *zwp_pointer_gestures_v1, struct wl_pointer *pointer)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gestures_v1,
ZWP_POINTER_GESTURES_V1_GET_HOLD_GESTURE, &zwp_pointer_gesture_hold_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gestures_v1), 0, NULL, pointer);
return (struct zwp_pointer_gesture_hold_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_flags((struct wl_proxy *) zwp_pointer_gesture_swipe_v1,
ZWP_POINTER_GESTURE_SWIPE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_swipe_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @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_flags((struct wl_proxy *) zwp_pointer_gesture_pinch_v1,
ZWP_POINTER_GESTURE_PINCH_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_pinch_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
* @struct zwp_pointer_gesture_hold_v1_listener
*/
struct zwp_pointer_gesture_hold_v1_listener {
/**
* multi-finger hold begin
*
* This event is sent when a hold gesture is detected on the
* device.
* @param time timestamp with millisecond granularity
* @param fingers number of fingers
* @since 3
*/
void (*begin)(void *data,
struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
uint32_t serial,
uint32_t time,
struct wl_surface *surface,
uint32_t fingers);
/**
* multi-finger hold end
*
* This event is sent when a hold gesture ceases to be valid.
* This may happen when the holding fingers are lifted or the
* gesture is cancelled, for example if the fingers move past an
* implementation-defined threshold, the finger count changes or
* the hold gesture changes into a different type of gesture.
*
* When a gesture is cancelled, the client may need to 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
* @since 3
*/
void (*end)(void *data,
struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
uint32_t serial,
uint32_t time,
int32_t cancelled);
};
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
*/
static inline int
zwp_pointer_gesture_hold_v1_add_listener(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1,
const struct zwp_pointer_gesture_hold_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_pointer_gesture_hold_v1,
(void (**)(void)) listener, data);
}
#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY 0
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
*/
#define ZWP_POINTER_GESTURE_HOLD_V1_BEGIN_SINCE_VERSION 3
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
*/
#define ZWP_POINTER_GESTURE_HOLD_V1_END_SINCE_VERSION 3
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
*/
#define ZWP_POINTER_GESTURE_HOLD_V1_DESTROY_SINCE_VERSION 3
/** @ingroup iface_zwp_pointer_gesture_hold_v1 */
static inline void
zwp_pointer_gesture_hold_v1_set_user_data(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_pointer_gesture_hold_v1, user_data);
}
/** @ingroup iface_zwp_pointer_gesture_hold_v1 */
static inline void *
zwp_pointer_gesture_hold_v1_get_user_data(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_pointer_gesture_hold_v1);
}
static inline uint32_t
zwp_pointer_gesture_hold_v1_get_version(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_hold_v1);
}
/**
* @ingroup iface_zwp_pointer_gesture_hold_v1
*/
static inline void
zwp_pointer_gesture_hold_v1_destroy(struct zwp_pointer_gesture_hold_v1 *zwp_pointer_gesture_hold_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_pointer_gesture_hold_v1,
ZWP_POINTER_GESTURE_HOLD_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_pointer_gesture_hold_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,108 @@
/* Generated by wayland-scanner 1.20.0 */
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_pointer_gesture_hold_v1_interface;
extern const struct wl_interface zwp_pointer_gesture_pinch_v1_interface;
extern const struct wl_interface zwp_pointer_gesture_swipe_v1_interface;
static const struct wl_interface *pointer_gestures_unstable_v1_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
&zwp_pointer_gesture_swipe_v1_interface,
&wl_pointer_interface,
&zwp_pointer_gesture_pinch_v1_interface,
&wl_pointer_interface,
&zwp_pointer_gesture_hold_v1_interface,
&wl_pointer_interface,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_surface_interface,
NULL,
};
static const struct wl_message zwp_pointer_gestures_v1_requests[] = {
{ "get_swipe_gesture", "no", pointer_gestures_unstable_v1_types + 5 },
{ "get_pinch_gesture", "no", pointer_gestures_unstable_v1_types + 7 },
{ "release", "2", pointer_gestures_unstable_v1_types + 0 },
{ "get_hold_gesture", "3no", pointer_gestures_unstable_v1_types + 9 },
};
WL_PRIVATE const struct wl_interface zwp_pointer_gestures_v1_interface = {
"zwp_pointer_gestures_v1", 3,
4, zwp_pointer_gestures_v1_requests,
0, NULL,
};
static const struct wl_message zwp_pointer_gesture_swipe_v1_requests[] = {
{ "destroy", "", pointer_gestures_unstable_v1_types + 0 },
};
static const struct wl_message zwp_pointer_gesture_swipe_v1_events[] = {
{ "begin", "uuou", pointer_gestures_unstable_v1_types + 11 },
{ "update", "uff", pointer_gestures_unstable_v1_types + 0 },
{ "end", "uui", pointer_gestures_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_pointer_gesture_swipe_v1_interface = {
"zwp_pointer_gesture_swipe_v1", 2,
1, zwp_pointer_gesture_swipe_v1_requests,
3, zwp_pointer_gesture_swipe_v1_events,
};
static const struct wl_message zwp_pointer_gesture_pinch_v1_requests[] = {
{ "destroy", "", pointer_gestures_unstable_v1_types + 0 },
};
static const struct wl_message zwp_pointer_gesture_pinch_v1_events[] = {
{ "begin", "uuou", pointer_gestures_unstable_v1_types + 15 },
{ "update", "uffff", pointer_gestures_unstable_v1_types + 0 },
{ "end", "uui", pointer_gestures_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_pointer_gesture_pinch_v1_interface = {
"zwp_pointer_gesture_pinch_v1", 2,
1, zwp_pointer_gesture_pinch_v1_requests,
3, zwp_pointer_gesture_pinch_v1_events,
};
static const struct wl_message zwp_pointer_gesture_hold_v1_requests[] = {
{ "destroy", "3", pointer_gestures_unstable_v1_types + 0 },
};
static const struct wl_message zwp_pointer_gesture_hold_v1_events[] = {
{ "begin", "3uuou", pointer_gestures_unstable_v1_types + 19 },
{ "end", "3uui", pointer_gestures_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_pointer_gesture_hold_v1_interface = {
"zwp_pointer_gesture_hold_v1", 3,
1, zwp_pointer_gesture_hold_v1_requests,
2, zwp_pointer_gesture_hold_v1_events,
};
@@ -0,0 +1,159 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef POINTER_WARP_V1_CLIENT_PROTOCOL_H
#define POINTER_WARP_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_pointer_warp_v1 The pointer_warp_v1 protocol
* @section page_ifaces_pointer_warp_v1 Interfaces
* - @subpage page_iface_wp_pointer_warp_v1 - reposition the pointer to a location on a surface
* @section page_copyright_pointer_warp_v1 Copyright
* <pre>
*
* Copyright © 2024 Neal Gompa
* Copyright © 2024 Xaver Hugl
* Copyright © 2024 Matthias Klumpp
* Copyright © 2024 Vlad Zahorodnii
*
* 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 wl_surface;
struct wp_pointer_warp_v1;
#ifndef WP_POINTER_WARP_V1_INTERFACE
#define WP_POINTER_WARP_V1_INTERFACE
/**
* @page page_iface_wp_pointer_warp_v1 wp_pointer_warp_v1
* @section page_iface_wp_pointer_warp_v1_desc Description
*
* This global interface allows applications to request the pointer to be
* moved to a position relative to a wl_surface.
*
* Note that if the desired behavior is to constrain the pointer to an area
* or lock it to a position, this protocol does not provide a reliable way
* to do that. The pointer constraint and pointer lock protocols should be
* used for those use cases instead.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
* @section page_iface_wp_pointer_warp_v1_api API
* See @ref iface_wp_pointer_warp_v1.
*/
/**
* @defgroup iface_wp_pointer_warp_v1 The wp_pointer_warp_v1 interface
*
* This global interface allows applications to request the pointer to be
* moved to a position relative to a wl_surface.
*
* Note that if the desired behavior is to constrain the pointer to an area
* or lock it to a position, this protocol does not provide a reliable way
* to do that. The pointer constraint and pointer lock protocols should be
* used for those use cases instead.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*/
extern const struct wl_interface wp_pointer_warp_v1_interface;
#endif
#define WP_POINTER_WARP_V1_DESTROY 0
#define WP_POINTER_WARP_V1_WARP_POINTER 1
/**
* @ingroup iface_wp_pointer_warp_v1
*/
#define WP_POINTER_WARP_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_wp_pointer_warp_v1
*/
#define WP_POINTER_WARP_V1_WARP_POINTER_SINCE_VERSION 1
/** @ingroup iface_wp_pointer_warp_v1 */
static inline void
wp_pointer_warp_v1_set_user_data(struct wp_pointer_warp_v1 *wp_pointer_warp_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) wp_pointer_warp_v1, user_data);
}
/** @ingroup iface_wp_pointer_warp_v1 */
static inline void *
wp_pointer_warp_v1_get_user_data(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) wp_pointer_warp_v1);
}
static inline uint32_t
wp_pointer_warp_v1_get_version(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
{
return wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1);
}
/**
* @ingroup iface_wp_pointer_warp_v1
*
* Destroy the pointer warp manager.
*/
static inline void
wp_pointer_warp_v1_destroy(struct wp_pointer_warp_v1 *wp_pointer_warp_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_pointer_warp_v1,
WP_POINTER_WARP_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_wp_pointer_warp_v1
*
* Request the compositor to move the pointer to a surface-local position.
* Whether or not the compositor honors the request is implementation defined,
* but it should
* - honor it if the surface has pointer focus, including
* when it has an implicit pointer grab
* - reject it if the enter serial is incorrect
* - reject it if the requested position is outside of the surface
*
* Note that the enter serial is valid for any surface of the client,
* and does not have to be from the surface the pointer is warped to.
*
*/
static inline void
wp_pointer_warp_v1_warp_pointer(struct wp_pointer_warp_v1 *wp_pointer_warp_v1, struct wl_surface *surface, struct wl_pointer *pointer, wl_fixed_t x, wl_fixed_t y, uint32_t serial)
{
wl_proxy_marshal_flags((struct wl_proxy *) wp_pointer_warp_v1,
WP_POINTER_WARP_V1_WARP_POINTER, NULL, wl_proxy_get_version((struct wl_proxy *) wp_pointer_warp_v1), 0, surface, pointer, x, y, serial);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,62 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2024 Neal Gompa
* Copyright © 2024 Xaver Hugl
* Copyright © 2024 Matthias Klumpp
* Copyright © 2024 Vlad Zahorodnii
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_surface_interface;
static const struct wl_interface *pointer_warp_v1_types[] = {
&wl_surface_interface,
&wl_pointer_interface,
NULL,
NULL,
NULL,
};
static const struct wl_message wp_pointer_warp_v1_requests[] = {
{ "destroy", "", pointer_warp_v1_types + 0 },
{ "warp_pointer", "ooffu", pointer_warp_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_pointer_warp_v1_interface = {
"wp_pointer_warp_v1", 1,
2, wp_pointer_warp_v1_requests,
0, NULL,
};
@@ -0,0 +1,582 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef WP_PRIMARY_SELECTION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define WP_PRIMARY_SELECTION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_wp_primary_selection_unstable_v1 The wp_primary_selection_unstable_v1 protocol
* Primary selection protocol
*
* @section page_desc_wp_primary_selection_unstable_v1 Description
*
* This protocol provides the ability to have a primary selection device to
* match that of the X server. This primary selection is a shortcut to the
* common clipboard selection, where text just needs to be selected in order
* to allow copying it elsewhere. The de facto way to perform this action
* is the middle mouse button, although it is not limited to this one.
*
* Clients wishing to honor primary selection should create a primary
* selection source and set it as the selection through
* wp_primary_selection_device.set_selection whenever the text selection
* changes. In order to minimize calls in pointer-driven text selection,
* it should happen only once after the operation finished. Similarly,
* a NULL source should be set when text is unselected.
*
* wp_primary_selection_offer objects are first announced through the
* wp_primary_selection_device.data_offer event. Immediately after this event,
* the primary data offer will emit wp_primary_selection_offer.offer events
* to let know of the mime types being offered.
*
* When the primary selection changes, the client with the keyboard focus
* will receive wp_primary_selection_device.selection events. Only the client
* with the keyboard focus will receive such events with a non-NULL
* wp_primary_selection_offer. Across keyboard focus changes, previously
* focused clients will receive wp_primary_selection_device.events with a
* NULL wp_primary_selection_offer.
*
* In order to request the primary selection data, the client must pass
* a recent serial pertaining to the press event that is triggering the
* operation, if the compositor deems the serial valid and recent, the
* wp_primary_selection_source.send event will happen in the other end
* to let the transfer begin. The client owning the primary selection
* should write the requested data, and close the file descriptor
* immediately.
*
* If the primary selection owner client disappeared during the transfer,
* the client reading the data will receive a
* wp_primary_selection_device.selection event with a NULL
* wp_primary_selection_offer, the client should take this as a hint
* to finish the reads related to the no longer existing offer.
*
* The primary selection owner should be checking for errors during
* writes, merely cancelling the ongoing transfer if any happened.
*
* @section page_ifaces_wp_primary_selection_unstable_v1 Interfaces
* - @subpage page_iface_zwp_primary_selection_device_manager_v1 - X primary selection emulation
* - @subpage page_iface_zwp_primary_selection_device_v1 -
* - @subpage page_iface_zwp_primary_selection_offer_v1 - offer to transfer primary selection contents
* - @subpage page_iface_zwp_primary_selection_source_v1 - offer to replace the contents of the primary selection
* @section page_copyright_wp_primary_selection_unstable_v1 Copyright
* <pre>
*
* Copyright © 2015, 2016 Red Hat
*
* 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 zwp_primary_selection_device_manager_v1;
struct zwp_primary_selection_device_v1;
struct zwp_primary_selection_offer_v1;
struct zwp_primary_selection_source_v1;
#ifndef ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_INTERFACE
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_INTERFACE
/**
* @page page_iface_zwp_primary_selection_device_manager_v1 zwp_primary_selection_device_manager_v1
* @section page_iface_zwp_primary_selection_device_manager_v1_desc Description
*
* The primary selection device manager is a singleton global object that
* provides access to the primary selection. It allows to create
* wp_primary_selection_source objects, as well as retrieving the per-seat
* wp_primary_selection_device objects.
* @section page_iface_zwp_primary_selection_device_manager_v1_api API
* See @ref iface_zwp_primary_selection_device_manager_v1.
*/
/**
* @defgroup iface_zwp_primary_selection_device_manager_v1 The zwp_primary_selection_device_manager_v1 interface
*
* The primary selection device manager is a singleton global object that
* provides access to the primary selection. It allows to create
* wp_primary_selection_source objects, as well as retrieving the per-seat
* wp_primary_selection_device objects.
*/
extern const struct wl_interface zwp_primary_selection_device_manager_v1_interface;
#endif
#ifndef ZWP_PRIMARY_SELECTION_DEVICE_V1_INTERFACE
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_INTERFACE
/**
* @page page_iface_zwp_primary_selection_device_v1 zwp_primary_selection_device_v1
* @section page_iface_zwp_primary_selection_device_v1_api API
* See @ref iface_zwp_primary_selection_device_v1.
*/
/**
* @defgroup iface_zwp_primary_selection_device_v1 The zwp_primary_selection_device_v1 interface
*/
extern const struct wl_interface zwp_primary_selection_device_v1_interface;
#endif
#ifndef ZWP_PRIMARY_SELECTION_OFFER_V1_INTERFACE
#define ZWP_PRIMARY_SELECTION_OFFER_V1_INTERFACE
/**
* @page page_iface_zwp_primary_selection_offer_v1 zwp_primary_selection_offer_v1
* @section page_iface_zwp_primary_selection_offer_v1_desc Description
*
* A wp_primary_selection_offer represents an offer to transfer the contents
* of the primary selection clipboard to the client. Similar to
* wl_data_offer, the offer also describes the mime types that the data can
* be converted to and provides the mechanisms for transferring the data
* directly to the client.
* @section page_iface_zwp_primary_selection_offer_v1_api API
* See @ref iface_zwp_primary_selection_offer_v1.
*/
/**
* @defgroup iface_zwp_primary_selection_offer_v1 The zwp_primary_selection_offer_v1 interface
*
* A wp_primary_selection_offer represents an offer to transfer the contents
* of the primary selection clipboard to the client. Similar to
* wl_data_offer, the offer also describes the mime types that the data can
* be converted to and provides the mechanisms for transferring the data
* directly to the client.
*/
extern const struct wl_interface zwp_primary_selection_offer_v1_interface;
#endif
#ifndef ZWP_PRIMARY_SELECTION_SOURCE_V1_INTERFACE
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_INTERFACE
/**
* @page page_iface_zwp_primary_selection_source_v1 zwp_primary_selection_source_v1
* @section page_iface_zwp_primary_selection_source_v1_desc Description
*
* The source side of a wp_primary_selection_offer, it provides a way to
* describe the offered data and respond to requests to transfer the
* requested contents of the primary selection clipboard.
* @section page_iface_zwp_primary_selection_source_v1_api API
* See @ref iface_zwp_primary_selection_source_v1.
*/
/**
* @defgroup iface_zwp_primary_selection_source_v1 The zwp_primary_selection_source_v1 interface
*
* The source side of a wp_primary_selection_offer, it provides a way to
* describe the offered data and respond to requests to transfer the
* requested contents of the primary selection clipboard.
*/
extern const struct wl_interface zwp_primary_selection_source_v1_interface;
#endif
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_CREATE_SOURCE 0
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_GET_DEVICE 1
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_DESTROY 2
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_CREATE_SOURCE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_GET_DEVICE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_primary_selection_device_manager_v1 */
static inline void
zwp_primary_selection_device_manager_v1_set_user_data(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_primary_selection_device_manager_v1, user_data);
}
/** @ingroup iface_zwp_primary_selection_device_manager_v1 */
static inline void *
zwp_primary_selection_device_manager_v1_get_user_data(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_primary_selection_device_manager_v1);
}
static inline uint32_t
zwp_primary_selection_device_manager_v1_get_version(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_manager_v1);
}
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*
* Create a new primary selection source.
*/
static inline struct zwp_primary_selection_source_v1 *
zwp_primary_selection_device_manager_v1_create_source(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_device_manager_v1,
ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_CREATE_SOURCE, &zwp_primary_selection_source_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_manager_v1), 0, NULL);
return (struct zwp_primary_selection_source_v1 *) id;
}
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*
* Create a new data device for a given seat.
*/
static inline struct zwp_primary_selection_device_v1 *
zwp_primary_selection_device_manager_v1_get_device(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1, struct wl_seat *seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_device_manager_v1,
ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_GET_DEVICE, &zwp_primary_selection_device_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_manager_v1), 0, NULL, seat);
return (struct zwp_primary_selection_device_v1 *) id;
}
/**
* @ingroup iface_zwp_primary_selection_device_manager_v1
*
* Destroy the primary selection device manager.
*/
static inline void
zwp_primary_selection_device_manager_v1_destroy(struct zwp_primary_selection_device_manager_v1 *zwp_primary_selection_device_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_device_manager_v1,
ZWP_PRIMARY_SELECTION_DEVICE_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_primary_selection_device_v1
* @struct zwp_primary_selection_device_v1_listener
*/
struct zwp_primary_selection_device_v1_listener {
/**
* introduce a new wp_primary_selection_offer
*
* Introduces a new wp_primary_selection_offer object that may be
* used to receive the current primary selection. Immediately
* following this event, the new wp_primary_selection_offer object
* will send wp_primary_selection_offer.offer events to describe
* the offered mime types.
*/
void (*data_offer)(void *data,
struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1,
struct zwp_primary_selection_offer_v1 *offer);
/**
* advertise a new primary selection
*
* The wp_primary_selection_device.selection event is sent to
* notify the client of a new primary selection. This event is sent
* after the wp_primary_selection.data_offer event introducing this
* object, and after the offer has announced its mimetypes through
* wp_primary_selection_offer.offer.
*
* The data_offer is valid until a new offer or NULL is received or
* until the client loses keyboard focus. The client must destroy
* the previous selection data_offer, if any, upon receiving this
* event.
*/
void (*selection)(void *data,
struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1,
struct zwp_primary_selection_offer_v1 *id);
};
/**
* @ingroup iface_zwp_primary_selection_device_v1
*/
static inline int
zwp_primary_selection_device_v1_add_listener(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1,
const struct zwp_primary_selection_device_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_primary_selection_device_v1,
(void (**)(void)) listener, data);
}
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_SET_SELECTION 0
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_DESTROY 1
/**
* @ingroup iface_zwp_primary_selection_device_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_DATA_OFFER_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_device_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_SELECTION_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_device_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_SET_SELECTION_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_device_v1
*/
#define ZWP_PRIMARY_SELECTION_DEVICE_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_primary_selection_device_v1 */
static inline void
zwp_primary_selection_device_v1_set_user_data(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_primary_selection_device_v1, user_data);
}
/** @ingroup iface_zwp_primary_selection_device_v1 */
static inline void *
zwp_primary_selection_device_v1_get_user_data(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_primary_selection_device_v1);
}
static inline uint32_t
zwp_primary_selection_device_v1_get_version(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_v1);
}
/**
* @ingroup iface_zwp_primary_selection_device_v1
*
* Replaces the current selection. The previous owner of the primary
* selection will receive a wp_primary_selection_source.cancelled event.
*
* To unset the selection, set the source to NULL.
*/
static inline void
zwp_primary_selection_device_v1_set_selection(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1, struct zwp_primary_selection_source_v1 *source, uint32_t serial)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_device_v1,
ZWP_PRIMARY_SELECTION_DEVICE_V1_SET_SELECTION, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_v1), 0, source, serial);
}
/**
* @ingroup iface_zwp_primary_selection_device_v1
*
* Destroy the primary selection device.
*/
static inline void
zwp_primary_selection_device_v1_destroy(struct zwp_primary_selection_device_v1 *zwp_primary_selection_device_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_device_v1,
ZWP_PRIMARY_SELECTION_DEVICE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_device_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_primary_selection_offer_v1
* @struct zwp_primary_selection_offer_v1_listener
*/
struct zwp_primary_selection_offer_v1_listener {
/**
* advertise offered mime type
*
* Sent immediately after creating announcing the
* wp_primary_selection_offer through
* wp_primary_selection_device.data_offer. One event is sent per
* offered mime type.
*/
void (*offer)(void *data,
struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1,
const char *mime_type);
};
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*/
static inline int
zwp_primary_selection_offer_v1_add_listener(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1,
const struct zwp_primary_selection_offer_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_primary_selection_offer_v1,
(void (**)(void)) listener, data);
}
#define ZWP_PRIMARY_SELECTION_OFFER_V1_RECEIVE 0
#define ZWP_PRIMARY_SELECTION_OFFER_V1_DESTROY 1
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*/
#define ZWP_PRIMARY_SELECTION_OFFER_V1_OFFER_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*/
#define ZWP_PRIMARY_SELECTION_OFFER_V1_RECEIVE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*/
#define ZWP_PRIMARY_SELECTION_OFFER_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_primary_selection_offer_v1 */
static inline void
zwp_primary_selection_offer_v1_set_user_data(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_primary_selection_offer_v1, user_data);
}
/** @ingroup iface_zwp_primary_selection_offer_v1 */
static inline void *
zwp_primary_selection_offer_v1_get_user_data(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_primary_selection_offer_v1);
}
static inline uint32_t
zwp_primary_selection_offer_v1_get_version(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_offer_v1);
}
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*
* To transfer the contents of the primary selection clipboard, the client
* issues this request and indicates the mime type that it wants to
* receive. The transfer happens through the passed file descriptor
* (typically created with the pipe system call). The source client writes
* the data in the mime type representation requested and then closes the
* file descriptor.
*
* The receiving client reads from the read end of the pipe until EOF and
* closes its end, at which point the transfer is complete.
*/
static inline void
zwp_primary_selection_offer_v1_receive(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1, const char *mime_type, int32_t fd)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_offer_v1,
ZWP_PRIMARY_SELECTION_OFFER_V1_RECEIVE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_offer_v1), 0, mime_type, fd);
}
/**
* @ingroup iface_zwp_primary_selection_offer_v1
*
* Destroy the primary selection offer.
*/
static inline void
zwp_primary_selection_offer_v1_destroy(struct zwp_primary_selection_offer_v1 *zwp_primary_selection_offer_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_offer_v1,
ZWP_PRIMARY_SELECTION_OFFER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_offer_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_primary_selection_source_v1
* @struct zwp_primary_selection_source_v1_listener
*/
struct zwp_primary_selection_source_v1_listener {
/**
* send the primary selection contents
*
* Request for the current primary selection contents from the
* client. Send the specified mime type over the passed file
* descriptor, then close it.
*/
void (*send)(void *data,
struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1,
const char *mime_type,
int32_t fd);
/**
* request for primary selection contents was canceled
*
* This primary selection source is no longer valid. The client
* should clean up and destroy this primary selection source.
*/
void (*cancelled)(void *data,
struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1);
};
/**
* @ingroup iface_zwp_primary_selection_source_v1
*/
static inline int
zwp_primary_selection_source_v1_add_listener(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1,
const struct zwp_primary_selection_source_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_primary_selection_source_v1,
(void (**)(void)) listener, data);
}
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_OFFER 0
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_DESTROY 1
/**
* @ingroup iface_zwp_primary_selection_source_v1
*/
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_SEND_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_source_v1
*/
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_CANCELLED_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_source_v1
*/
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_OFFER_SINCE_VERSION 1
/**
* @ingroup iface_zwp_primary_selection_source_v1
*/
#define ZWP_PRIMARY_SELECTION_SOURCE_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_primary_selection_source_v1 */
static inline void
zwp_primary_selection_source_v1_set_user_data(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_primary_selection_source_v1, user_data);
}
/** @ingroup iface_zwp_primary_selection_source_v1 */
static inline void *
zwp_primary_selection_source_v1_get_user_data(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_primary_selection_source_v1);
}
static inline uint32_t
zwp_primary_selection_source_v1_get_version(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_source_v1);
}
/**
* @ingroup iface_zwp_primary_selection_source_v1
*
* This request adds a mime type to the set of mime types advertised to
* targets. Can be called several times to offer multiple types.
*/
static inline void
zwp_primary_selection_source_v1_offer(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1, const char *mime_type)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_source_v1,
ZWP_PRIMARY_SELECTION_SOURCE_V1_OFFER, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_source_v1), 0, mime_type);
}
/**
* @ingroup iface_zwp_primary_selection_source_v1
*
* Destroy the primary selection source.
*/
static inline void
zwp_primary_selection_source_v1_destroy(struct zwp_primary_selection_source_v1 *zwp_primary_selection_source_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_primary_selection_source_v1,
ZWP_PRIMARY_SELECTION_SOURCE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_primary_selection_source_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,115 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2015, 2016 Red Hat
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface zwp_primary_selection_device_v1_interface;
extern const struct wl_interface zwp_primary_selection_offer_v1_interface;
extern const struct wl_interface zwp_primary_selection_source_v1_interface;
static const struct wl_interface *wp_primary_selection_unstable_v1_types[] = {
NULL,
NULL,
&zwp_primary_selection_source_v1_interface,
&zwp_primary_selection_device_v1_interface,
&wl_seat_interface,
&zwp_primary_selection_source_v1_interface,
NULL,
&zwp_primary_selection_offer_v1_interface,
&zwp_primary_selection_offer_v1_interface,
};
static const struct wl_message zwp_primary_selection_device_manager_v1_requests[] = {
{ "create_source", "n", wp_primary_selection_unstable_v1_types + 2 },
{ "get_device", "no", wp_primary_selection_unstable_v1_types + 3 },
{ "destroy", "", wp_primary_selection_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_primary_selection_device_manager_v1_interface = {
"zwp_primary_selection_device_manager_v1", 1,
3, zwp_primary_selection_device_manager_v1_requests,
0, NULL,
};
static const struct wl_message zwp_primary_selection_device_v1_requests[] = {
{ "set_selection", "?ou", wp_primary_selection_unstable_v1_types + 5 },
{ "destroy", "", wp_primary_selection_unstable_v1_types + 0 },
};
static const struct wl_message zwp_primary_selection_device_v1_events[] = {
{ "data_offer", "n", wp_primary_selection_unstable_v1_types + 7 },
{ "selection", "?o", wp_primary_selection_unstable_v1_types + 8 },
};
WL_PRIVATE const struct wl_interface zwp_primary_selection_device_v1_interface = {
"zwp_primary_selection_device_v1", 1,
2, zwp_primary_selection_device_v1_requests,
2, zwp_primary_selection_device_v1_events,
};
static const struct wl_message zwp_primary_selection_offer_v1_requests[] = {
{ "receive", "sh", wp_primary_selection_unstable_v1_types + 0 },
{ "destroy", "", wp_primary_selection_unstable_v1_types + 0 },
};
static const struct wl_message zwp_primary_selection_offer_v1_events[] = {
{ "offer", "s", wp_primary_selection_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_primary_selection_offer_v1_interface = {
"zwp_primary_selection_offer_v1", 1,
2, zwp_primary_selection_offer_v1_requests,
1, zwp_primary_selection_offer_v1_events,
};
static const struct wl_message zwp_primary_selection_source_v1_requests[] = {
{ "offer", "s", wp_primary_selection_unstable_v1_types + 0 },
{ "destroy", "", wp_primary_selection_unstable_v1_types + 0 },
};
static const struct wl_message zwp_primary_selection_source_v1_events[] = {
{ "send", "sh", wp_primary_selection_unstable_v1_types + 0 },
{ "cancelled", "", wp_primary_selection_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_primary_selection_source_v1_interface = {
"zwp_primary_selection_source_v1", 1,
2, zwp_primary_selection_source_v1_requests,
2, zwp_primary_selection_source_v1_events,
};
@@ -0,0 +1,297 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef RELATIVE_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define RELATIVE_POINTER_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_relative_pointer_unstable_v1 The relative_pointer_unstable_v1 protocol
* protocol for relative pointer motion events
*
* @section page_desc_relative_pointer_unstable_v1 Description
*
* This protocol specifies a set of interfaces used for making clients able to
* receive relative pointer events not obstructed by barriers (such as the
* monitor edge or other pointer barriers).
*
* To start receiving relative pointer events, a client must first bind the
* global interface "wp_relative_pointer_manager" which, if a compositor
* supports relative pointer motion events, is exposed by the registry. After
* having created the relative pointer manager proxy object, the client uses
* it to create the actual relative pointer object using the
* "get_relative_pointer" request given a wl_pointer. The relative pointer
* motion events will then, when applicable, be transmitted via the proxy of
* the newly created relative pointer object. See the documentation of the
* relative pointer interface for more details.
*
* 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_relative_pointer_unstable_v1 Interfaces
* - @subpage page_iface_zwp_relative_pointer_manager_v1 - get relative pointer objects
* - @subpage page_iface_zwp_relative_pointer_v1 - relative pointer object
* @section page_copyright_relative_pointer_unstable_v1 Copyright
* <pre>
*
* Copyright © 2014 Jonas Ådahl
* Copyright © 2015 Red Hat Inc.
*
* 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 zwp_relative_pointer_manager_v1;
struct zwp_relative_pointer_v1;
#ifndef ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE
#define ZWP_RELATIVE_POINTER_MANAGER_V1_INTERFACE
/**
* @page page_iface_zwp_relative_pointer_manager_v1 zwp_relative_pointer_manager_v1
* @section page_iface_zwp_relative_pointer_manager_v1_desc Description
*
* A global interface used for getting the relative pointer object for a
* given pointer.
* @section page_iface_zwp_relative_pointer_manager_v1_api API
* See @ref iface_zwp_relative_pointer_manager_v1.
*/
/**
* @defgroup iface_zwp_relative_pointer_manager_v1 The zwp_relative_pointer_manager_v1 interface
*
* A global interface used for getting the relative pointer object for a
* given pointer.
*/
extern const struct wl_interface zwp_relative_pointer_manager_v1_interface;
#endif
#ifndef ZWP_RELATIVE_POINTER_V1_INTERFACE
#define ZWP_RELATIVE_POINTER_V1_INTERFACE
/**
* @page page_iface_zwp_relative_pointer_v1 zwp_relative_pointer_v1
* @section page_iface_zwp_relative_pointer_v1_desc Description
*
* A wp_relative_pointer object is an extension to the wl_pointer interface
* used for emitting relative pointer events. It shares the same focus as
* wl_pointer objects of the same seat and will only emit events when it has
* focus.
* @section page_iface_zwp_relative_pointer_v1_api API
* See @ref iface_zwp_relative_pointer_v1.
*/
/**
* @defgroup iface_zwp_relative_pointer_v1 The zwp_relative_pointer_v1 interface
*
* A wp_relative_pointer object is an extension to the wl_pointer interface
* used for emitting relative pointer events. It shares the same focus as
* wl_pointer objects of the same seat and will only emit events when it has
* focus.
*/
extern const struct wl_interface zwp_relative_pointer_v1_interface;
#endif
#define ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY 0
#define ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER 1
/**
* @ingroup iface_zwp_relative_pointer_manager_v1
*/
#define ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_relative_pointer_manager_v1
*/
#define ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER_SINCE_VERSION 1
/** @ingroup iface_zwp_relative_pointer_manager_v1 */
static inline void
zwp_relative_pointer_manager_v1_set_user_data(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_relative_pointer_manager_v1, user_data);
}
/** @ingroup iface_zwp_relative_pointer_manager_v1 */
static inline void *
zwp_relative_pointer_manager_v1_get_user_data(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_relative_pointer_manager_v1);
}
static inline uint32_t
zwp_relative_pointer_manager_v1_get_version(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_manager_v1);
}
/**
* @ingroup iface_zwp_relative_pointer_manager_v1
*
* Used by the client to notify the server that it will no longer use this
* relative pointer manager object.
*/
static inline void
zwp_relative_pointer_manager_v1_destroy(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_relative_pointer_manager_v1,
ZWP_RELATIVE_POINTER_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_relative_pointer_manager_v1
*
* Create a relative pointer interface given a wl_pointer object. See the
* wp_relative_pointer interface for more details.
*/
static inline struct zwp_relative_pointer_v1 *
zwp_relative_pointer_manager_v1_get_relative_pointer(struct zwp_relative_pointer_manager_v1 *zwp_relative_pointer_manager_v1, struct wl_pointer *pointer)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_relative_pointer_manager_v1,
ZWP_RELATIVE_POINTER_MANAGER_V1_GET_RELATIVE_POINTER, &zwp_relative_pointer_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_manager_v1), 0, NULL, pointer);
return (struct zwp_relative_pointer_v1 *) id;
}
/**
* @ingroup iface_zwp_relative_pointer_v1
* @struct zwp_relative_pointer_v1_listener
*/
struct zwp_relative_pointer_v1_listener {
/**
* relative pointer motion
*
* Relative x/y pointer motion from the pointer of the seat
* associated with this object.
*
* A relative motion is in the same dimension as regular wl_pointer
* motion events, except they do not represent an absolute
* position. For example, moving a pointer from (x, y) to (x', y')
* would have the equivalent relative motion (x' - x, y' - y). If a
* pointer motion caused the absolute pointer position to be
* clipped by for example the edge of the monitor, the relative
* motion is unaffected by the clipping and will represent the
* unclipped motion.
*
* This event also contains non-accelerated motion deltas. The
* non-accelerated delta is, when applicable, the regular pointer
* motion delta as it was before having applied motion acceleration
* and other transformations such as normalization.
*
* Note that the non-accelerated delta does not represent 'raw'
* events as they were read from some device. Pointer motion
* acceleration is device- and configuration-specific and
* non-accelerated deltas and accelerated deltas may have the same
* value on some devices.
*
* Relative motions are not coupled to wl_pointer.motion events,
* and can be sent in combination with such events, but also
* independently. There may also be scenarios where
* wl_pointer.motion is sent, but there is no relative motion. The
* order of an absolute and relative motion event originating from
* the same physical motion is not guaranteed.
*
* If the client needs button events or focus state, it can receive
* them from a wl_pointer object of the same seat that the
* wp_relative_pointer object is associated with.
* @param utime_hi high 32 bits of a 64 bit timestamp with microsecond granularity
* @param utime_lo low 32 bits of a 64 bit timestamp with microsecond granularity
* @param dx the x component of the motion vector
* @param dy the y component of the motion vector
* @param dx_unaccel the x component of the unaccelerated motion vector
* @param dy_unaccel the y component of the unaccelerated motion vector
*/
void (*relative_motion)(void *data,
struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1,
uint32_t utime_hi,
uint32_t utime_lo,
wl_fixed_t dx,
wl_fixed_t dy,
wl_fixed_t dx_unaccel,
wl_fixed_t dy_unaccel);
};
/**
* @ingroup iface_zwp_relative_pointer_v1
*/
static inline int
zwp_relative_pointer_v1_add_listener(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1,
const struct zwp_relative_pointer_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_relative_pointer_v1,
(void (**)(void)) listener, data);
}
#define ZWP_RELATIVE_POINTER_V1_DESTROY 0
/**
* @ingroup iface_zwp_relative_pointer_v1
*/
#define ZWP_RELATIVE_POINTER_V1_RELATIVE_MOTION_SINCE_VERSION 1
/**
* @ingroup iface_zwp_relative_pointer_v1
*/
#define ZWP_RELATIVE_POINTER_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zwp_relative_pointer_v1 */
static inline void
zwp_relative_pointer_v1_set_user_data(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_relative_pointer_v1, user_data);
}
/** @ingroup iface_zwp_relative_pointer_v1 */
static inline void *
zwp_relative_pointer_v1_get_user_data(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_relative_pointer_v1);
}
static inline uint32_t
zwp_relative_pointer_v1_get_version(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_v1);
}
/**
* @ingroup iface_zwp_relative_pointer_v1
*/
static inline void
zwp_relative_pointer_v1_destroy(struct zwp_relative_pointer_v1 *zwp_relative_pointer_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_relative_pointer_v1,
ZWP_RELATIVE_POINTER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_relative_pointer_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,79 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2014 Jonas Ådahl
* Copyright © 2015 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface zwp_relative_pointer_v1_interface;
static const struct wl_interface *relative_pointer_unstable_v1_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&zwp_relative_pointer_v1_interface,
&wl_pointer_interface,
};
static const struct wl_message zwp_relative_pointer_manager_v1_requests[] = {
{ "destroy", "", relative_pointer_unstable_v1_types + 0 },
{ "get_relative_pointer", "no", relative_pointer_unstable_v1_types + 6 },
};
WL_PRIVATE const struct wl_interface zwp_relative_pointer_manager_v1_interface = {
"zwp_relative_pointer_manager_v1", 1,
2, zwp_relative_pointer_manager_v1_requests,
0, NULL,
};
static const struct wl_message zwp_relative_pointer_v1_requests[] = {
{ "destroy", "", relative_pointer_unstable_v1_types + 0 },
};
static const struct wl_message zwp_relative_pointer_v1_events[] = {
{ "relative_motion", "uuffff", relative_pointer_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_relative_pointer_v1_interface = {
"zwp_relative_pointer_v1", 1,
1, zwp_relative_pointer_v1_requests,
1, zwp_relative_pointer_v1_events,
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,233 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright 2014 © Stephen "Lyude" Chandler Paul
* Copyright 2015-2016 © Red Hat, Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_tablet_pad_group_v2_interface;
extern const struct wl_interface zwp_tablet_pad_ring_v2_interface;
extern const struct wl_interface zwp_tablet_pad_strip_v2_interface;
extern const struct wl_interface zwp_tablet_pad_v2_interface;
extern const struct wl_interface zwp_tablet_seat_v2_interface;
extern const struct wl_interface zwp_tablet_tool_v2_interface;
extern const struct wl_interface zwp_tablet_v2_interface;
static const struct wl_interface *tablet_v2_types[] = {
NULL,
NULL,
NULL,
&zwp_tablet_seat_v2_interface,
&wl_seat_interface,
&zwp_tablet_v2_interface,
&zwp_tablet_tool_v2_interface,
&zwp_tablet_pad_v2_interface,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&zwp_tablet_v2_interface,
&wl_surface_interface,
&zwp_tablet_pad_ring_v2_interface,
&zwp_tablet_pad_strip_v2_interface,
&zwp_tablet_pad_group_v2_interface,
NULL,
&zwp_tablet_v2_interface,
&wl_surface_interface,
NULL,
&wl_surface_interface,
};
static const struct wl_message zwp_tablet_manager_v2_requests[] = {
{ "get_tablet_seat", "no", tablet_v2_types + 3 },
{ "destroy", "", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_manager_v2_interface = {
"zwp_tablet_manager_v2", 1,
2, zwp_tablet_manager_v2_requests,
0, NULL,
};
static const struct wl_message zwp_tablet_seat_v2_requests[] = {
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_seat_v2_events[] = {
{ "tablet_added", "n", tablet_v2_types + 5 },
{ "tool_added", "n", tablet_v2_types + 6 },
{ "pad_added", "n", tablet_v2_types + 7 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_seat_v2_interface = {
"zwp_tablet_seat_v2", 1,
1, zwp_tablet_seat_v2_requests,
3, zwp_tablet_seat_v2_events,
};
static const struct wl_message zwp_tablet_tool_v2_requests[] = {
{ "set_cursor", "u?oii", tablet_v2_types + 8 },
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_tool_v2_events[] = {
{ "type", "u", tablet_v2_types + 0 },
{ "hardware_serial", "uu", tablet_v2_types + 0 },
{ "hardware_id_wacom", "uu", tablet_v2_types + 0 },
{ "capability", "u", tablet_v2_types + 0 },
{ "done", "", tablet_v2_types + 0 },
{ "removed", "", tablet_v2_types + 0 },
{ "proximity_in", "uoo", tablet_v2_types + 12 },
{ "proximity_out", "", tablet_v2_types + 0 },
{ "down", "u", tablet_v2_types + 0 },
{ "up", "", tablet_v2_types + 0 },
{ "motion", "ff", tablet_v2_types + 0 },
{ "pressure", "u", tablet_v2_types + 0 },
{ "distance", "u", tablet_v2_types + 0 },
{ "tilt", "ff", tablet_v2_types + 0 },
{ "rotation", "f", tablet_v2_types + 0 },
{ "slider", "i", tablet_v2_types + 0 },
{ "wheel", "fi", tablet_v2_types + 0 },
{ "button", "uuu", tablet_v2_types + 0 },
{ "frame", "u", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_tool_v2_interface = {
"zwp_tablet_tool_v2", 1,
2, zwp_tablet_tool_v2_requests,
19, zwp_tablet_tool_v2_events,
};
static const struct wl_message zwp_tablet_v2_requests[] = {
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_v2_events[] = {
{ "name", "s", tablet_v2_types + 0 },
{ "id", "uu", tablet_v2_types + 0 },
{ "path", "s", tablet_v2_types + 0 },
{ "done", "", tablet_v2_types + 0 },
{ "removed", "", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_v2_interface = {
"zwp_tablet_v2", 1,
1, zwp_tablet_v2_requests,
5, zwp_tablet_v2_events,
};
static const struct wl_message zwp_tablet_pad_ring_v2_requests[] = {
{ "set_feedback", "su", tablet_v2_types + 0 },
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_pad_ring_v2_events[] = {
{ "source", "u", tablet_v2_types + 0 },
{ "angle", "f", tablet_v2_types + 0 },
{ "stop", "", tablet_v2_types + 0 },
{ "frame", "u", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_pad_ring_v2_interface = {
"zwp_tablet_pad_ring_v2", 1,
2, zwp_tablet_pad_ring_v2_requests,
4, zwp_tablet_pad_ring_v2_events,
};
static const struct wl_message zwp_tablet_pad_strip_v2_requests[] = {
{ "set_feedback", "su", tablet_v2_types + 0 },
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_pad_strip_v2_events[] = {
{ "source", "u", tablet_v2_types + 0 },
{ "position", "u", tablet_v2_types + 0 },
{ "stop", "", tablet_v2_types + 0 },
{ "frame", "u", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_pad_strip_v2_interface = {
"zwp_tablet_pad_strip_v2", 1,
2, zwp_tablet_pad_strip_v2_requests,
4, zwp_tablet_pad_strip_v2_events,
};
static const struct wl_message zwp_tablet_pad_group_v2_requests[] = {
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_pad_group_v2_events[] = {
{ "buttons", "a", tablet_v2_types + 0 },
{ "ring", "n", tablet_v2_types + 15 },
{ "strip", "n", tablet_v2_types + 16 },
{ "modes", "u", tablet_v2_types + 0 },
{ "done", "", tablet_v2_types + 0 },
{ "mode_switch", "uuu", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_pad_group_v2_interface = {
"zwp_tablet_pad_group_v2", 1,
1, zwp_tablet_pad_group_v2_requests,
6, zwp_tablet_pad_group_v2_events,
};
static const struct wl_message zwp_tablet_pad_v2_requests[] = {
{ "set_feedback", "usu", tablet_v2_types + 0 },
{ "destroy", "", tablet_v2_types + 0 },
};
static const struct wl_message zwp_tablet_pad_v2_events[] = {
{ "group", "n", tablet_v2_types + 17 },
{ "path", "s", tablet_v2_types + 0 },
{ "buttons", "u", tablet_v2_types + 0 },
{ "done", "", tablet_v2_types + 0 },
{ "button", "uuu", tablet_v2_types + 0 },
{ "enter", "uoo", tablet_v2_types + 18 },
{ "leave", "uo", tablet_v2_types + 21 },
{ "removed", "", tablet_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_tablet_pad_v2_interface = {
"zwp_tablet_pad_v2", 1,
2, zwp_tablet_pad_v2_requests,
8, zwp_tablet_pad_v2_events,
};
@@ -0,0 +1,832 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H
#define TEXT_INPUT_UNSTABLE_V3_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_text_input_unstable_v3 The text_input_unstable_v3 protocol
* Protocol for composing text
*
* @section page_desc_text_input_unstable_v3 Description
*
* This protocol allows compositors to act as input methods and to send text
* to applications. A text input object is used to manage state of what are
* typically text entry fields in the application.
*
* This document adheres to the RFC 2119 when using words like "must",
* "should", "may", etc.
*
* 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_text_input_unstable_v3 Interfaces
* - @subpage page_iface_zwp_text_input_v3 - text input
* - @subpage page_iface_zwp_text_input_manager_v3 - text input manager
* @section page_copyright_text_input_unstable_v3 Copyright
* <pre>
*
* Copyright © 2012, 2013 Intel Corporation
* Copyright © 2015, 2016 Jan Arne Petersen
* Copyright © 2017, 2018 Red Hat, Inc.
* Copyright © 2018 Purism SPC
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that the above copyright notice appear in
* all copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of
* the copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
* </pre>
*/
struct wl_seat;
struct wl_surface;
struct zwp_text_input_manager_v3;
struct zwp_text_input_v3;
#ifndef ZWP_TEXT_INPUT_V3_INTERFACE
#define ZWP_TEXT_INPUT_V3_INTERFACE
/**
* @page page_iface_zwp_text_input_v3 zwp_text_input_v3
* @section page_iface_zwp_text_input_v3_desc Description
*
* The zwp_text_input_v3 interface represents text input and input methods
* associated with a seat. It provides enter/leave events to follow the
* text input focus for a seat.
*
* Requests are used to enable/disable the text-input object and set
* state information like surrounding and selected text or the content type.
* The information about the entered text is sent to the text-input object
* via the preedit_string and commit_string events.
*
* Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices
* must not point to middle bytes inside a code point: they must either
* point to the first byte of a code point or to the end of the buffer.
* Lengths must be measured between two valid indices.
*
* Focus moving throughout surfaces will result in the emission of
* zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused
* surface must commit zwp_text_input_v3.enable and
* zwp_text_input_v3.disable requests as the keyboard focus moves across
* editable and non-editable elements of the UI. Those two requests are not
* expected to be paired with each other, the compositor must be able to
* handle consecutive series of the same request.
*
* State is sent by the state requests (set_surrounding_text,
* set_content_type and set_cursor_rectangle) and a commit request. After an
* enter event or disable request all state information is invalidated and
* needs to be resent by the client.
* @section page_iface_zwp_text_input_v3_api API
* See @ref iface_zwp_text_input_v3.
*/
/**
* @defgroup iface_zwp_text_input_v3 The zwp_text_input_v3 interface
*
* The zwp_text_input_v3 interface represents text input and input methods
* associated with a seat. It provides enter/leave events to follow the
* text input focus for a seat.
*
* Requests are used to enable/disable the text-input object and set
* state information like surrounding and selected text or the content type.
* The information about the entered text is sent to the text-input object
* via the preedit_string and commit_string events.
*
* Text is valid UTF-8 encoded, indices and lengths are in bytes. Indices
* must not point to middle bytes inside a code point: they must either
* point to the first byte of a code point or to the end of the buffer.
* Lengths must be measured between two valid indices.
*
* Focus moving throughout surfaces will result in the emission of
* zwp_text_input_v3.enter and zwp_text_input_v3.leave events. The focused
* surface must commit zwp_text_input_v3.enable and
* zwp_text_input_v3.disable requests as the keyboard focus moves across
* editable and non-editable elements of the UI. Those two requests are not
* expected to be paired with each other, the compositor must be able to
* handle consecutive series of the same request.
*
* State is sent by the state requests (set_surrounding_text,
* set_content_type and set_cursor_rectangle) and a commit request. After an
* enter event or disable request all state information is invalidated and
* needs to be resent by the client.
*/
extern const struct wl_interface zwp_text_input_v3_interface;
#endif
#ifndef ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE
#define ZWP_TEXT_INPUT_MANAGER_V3_INTERFACE
/**
* @page page_iface_zwp_text_input_manager_v3 zwp_text_input_manager_v3
* @section page_iface_zwp_text_input_manager_v3_desc Description
*
* A factory for text-input objects. This object is a global singleton.
* @section page_iface_zwp_text_input_manager_v3_api API
* See @ref iface_zwp_text_input_manager_v3.
*/
/**
* @defgroup iface_zwp_text_input_manager_v3 The zwp_text_input_manager_v3 interface
*
* A factory for text-input objects. This object is a global singleton.
*/
extern const struct wl_interface zwp_text_input_manager_v3_interface;
#endif
#ifndef ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM
#define ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM
/**
* @ingroup iface_zwp_text_input_v3
* text change reason
*
* Reason for the change of surrounding text or cursor posision.
*/
enum zwp_text_input_v3_change_cause {
/**
* input method caused the change
*/
ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_INPUT_METHOD = 0,
/**
* something else than the input method caused the change
*/
ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_OTHER = 1,
};
#endif /* ZWP_TEXT_INPUT_V3_CHANGE_CAUSE_ENUM */
#ifndef ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM
#define ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM
/**
* @ingroup iface_zwp_text_input_v3
* content hint
*
* Content hint is a bitmask to allow to modify the behavior of the text
* input.
*/
enum zwp_text_input_v3_content_hint {
/**
* no special behavior
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_NONE = 0x0,
/**
* suggest word completions
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_COMPLETION = 0x1,
/**
* suggest word corrections
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_SPELLCHECK = 0x2,
/**
* switch to uppercase letters at the start of a sentence
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_AUTO_CAPITALIZATION = 0x4,
/**
* prefer lowercase letters
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_LOWERCASE = 0x8,
/**
* prefer uppercase letters
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_UPPERCASE = 0x10,
/**
* prefer casing for titles and headings (can be language dependent)
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_TITLECASE = 0x20,
/**
* characters should be hidden
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_HIDDEN_TEXT = 0x40,
/**
* typed text should not be stored
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_SENSITIVE_DATA = 0x80,
/**
* just Latin characters should be entered
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_LATIN = 0x100,
/**
* the text input is multiline
*/
ZWP_TEXT_INPUT_V3_CONTENT_HINT_MULTILINE = 0x200,
};
#endif /* ZWP_TEXT_INPUT_V3_CONTENT_HINT_ENUM */
#ifndef ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM
#define ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM
/**
* @ingroup iface_zwp_text_input_v3
* content purpose
*
* The content purpose allows to specify the primary purpose of a text
* input.
*
* This allows an input method to show special purpose input panels with
* extra characters or to disallow some characters.
*/
enum zwp_text_input_v3_content_purpose {
/**
* default input, allowing all characters
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NORMAL = 0,
/**
* allow only alphabetic characters
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ALPHA = 1,
/**
* allow only digits
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DIGITS = 2,
/**
* input a number (including decimal separator and sign)
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NUMBER = 3,
/**
* input a phone number
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PHONE = 4,
/**
* input an URL
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_URL = 5,
/**
* input an email address
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_EMAIL = 6,
/**
* input a name of a person
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_NAME = 7,
/**
* input a password (combine with sensitive_data hint)
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PASSWORD = 8,
/**
* input is a numeric password (combine with sensitive_data hint)
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_PIN = 9,
/**
* input a date
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATE = 10,
/**
* input a time
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TIME = 11,
/**
* input a date and time
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_DATETIME = 12,
/**
* input for a terminal
*/
ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_TERMINAL = 13,
};
#endif /* ZWP_TEXT_INPUT_V3_CONTENT_PURPOSE_ENUM */
/**
* @ingroup iface_zwp_text_input_v3
* @struct zwp_text_input_v3_listener
*/
struct zwp_text_input_v3_listener {
/**
* enter event
*
* Notification that this seat's text-input focus is on a certain
* surface.
*
* If client has created multiple text input objects, compositor
* must send this event to all of them.
*
* When the seat has the keyboard capability the text-input focus
* follows the keyboard focus. This event sets the current surface
* for the text-input object.
*/
void (*enter)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
struct wl_surface *surface);
/**
* leave event
*
* Notification that this seat's text-input focus is no longer on
* a certain surface. The client should reset any preedit string
* previously set.
*
* The leave notification clears the current surface. It is sent
* before the enter notification for the new focus. After leave
* event, compositor must ignore requests from any text input
* instances until next enter event.
*
* When the seat has the keyboard capability the text-input focus
* follows the keyboard focus.
*/
void (*leave)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
struct wl_surface *surface);
/**
* pre-edit
*
* Notify when a new composing text (pre-edit) should be set at
* the current cursor position. Any previously set composing text
* must be removed. Any previously existing selected text must be
* removed.
*
* The argument text contains the pre-edit string buffer.
*
* The parameters cursor_begin and cursor_end are counted in bytes
* relative to the beginning of the submitted text buffer. Cursor
* should be hidden when both are equal to -1.
*
* They could be represented by the client as a line if both values
* are the same, or as a text highlight otherwise.
*
* Values set with this event are double-buffered. They must be
* applied and reset to initial on the next zwp_text_input_v3.done
* event.
*
* The initial value of text is an empty string, and cursor_begin,
* cursor_end and cursor_hidden are all 0.
*/
void (*preedit_string)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
const char *text,
int32_t cursor_begin,
int32_t cursor_end);
/**
* text commit
*
* Notify when text should be inserted into the editor widget.
* The text to commit could be either just a single character after
* a key press or the result of some composing (pre-edit).
*
* Values set with this event are double-buffered. They must be
* applied and reset to initial on the next zwp_text_input_v3.done
* event.
*
* The initial value of text is an empty string.
*/
void (*commit_string)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
const char *text);
/**
* delete surrounding text
*
* Notify when the text around the current cursor position should
* be deleted.
*
* Before_length and after_length are the number of bytes before
* and after the current cursor index (excluding the selection) to
* delete.
*
* If a preedit text is present, in effect before_length is counted
* from the beginning of it, and after_length from its end (see
* done event sequence).
*
* Values set with this event are double-buffered. They must be
* applied and reset to initial on the next zwp_text_input_v3.done
* event.
*
* The initial values of both before_length and after_length are 0.
* @param before_length length of text before current cursor position
* @param after_length length of text after current cursor position
*/
void (*delete_surrounding_text)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
uint32_t before_length,
uint32_t after_length);
/**
* apply changes
*
* Instruct the application to apply changes to state requested
* by the preedit_string, commit_string and delete_surrounding_text
* events. The state relating to these events is double-buffered,
* and each one modifies the pending state. This event replaces the
* current state with the pending state.
*
* The application must proceed by evaluating the changes in the
* following order:
*
* 1. Replace existing preedit string with the cursor. 2. Delete
* requested surrounding text. 3. Insert commit string with the
* cursor at its end. 4. Calculate surrounding text to send. 5.
* Insert new preedit text in cursor position. 6. Place cursor
* inside preedit text.
*
* The serial number reflects the last state of the
* zwp_text_input_v3 object known to the compositor. The value of
* the serial argument must be equal to the number of commit
* requests already issued on that object. When the client receives
* a done event with a serial different than the number of past
* commit requests, it must proceed as normal, except it should not
* change the current state of the zwp_text_input_v3 object.
*/
void (*done)(void *data,
struct zwp_text_input_v3 *zwp_text_input_v3,
uint32_t serial);
};
/**
* @ingroup iface_zwp_text_input_v3
*/
static inline int
zwp_text_input_v3_add_listener(struct zwp_text_input_v3 *zwp_text_input_v3,
const struct zwp_text_input_v3_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zwp_text_input_v3,
(void (**)(void)) listener, data);
}
#define ZWP_TEXT_INPUT_V3_DESTROY 0
#define ZWP_TEXT_INPUT_V3_ENABLE 1
#define ZWP_TEXT_INPUT_V3_DISABLE 2
#define ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT 3
#define ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE 4
#define ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE 5
#define ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE 6
#define ZWP_TEXT_INPUT_V3_COMMIT 7
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_ENTER_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_LEAVE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_PREEDIT_STRING_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_COMMIT_STRING_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_DELETE_SURROUNDING_TEXT_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_DONE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_ENABLE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_DISABLE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_v3
*/
#define ZWP_TEXT_INPUT_V3_COMMIT_SINCE_VERSION 1
/** @ingroup iface_zwp_text_input_v3 */
static inline void
zwp_text_input_v3_set_user_data(struct zwp_text_input_v3 *zwp_text_input_v3, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_text_input_v3, user_data);
}
/** @ingroup iface_zwp_text_input_v3 */
static inline void *
zwp_text_input_v3_get_user_data(struct zwp_text_input_v3 *zwp_text_input_v3)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_text_input_v3);
}
static inline uint32_t
zwp_text_input_v3_get_version(struct zwp_text_input_v3 *zwp_text_input_v3)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Destroy the wp_text_input object. Also disables all surfaces enabled
* through this wp_text_input object.
*/
static inline void
zwp_text_input_v3_destroy(struct zwp_text_input_v3 *zwp_text_input_v3)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Requests text input on the surface previously obtained from the enter
* event.
*
* This request must be issued every time the active text input changes
* to a new one, including within the current surface. Use
* zwp_text_input_v3.disable when there is no longer any input focus on
* the current surface.
*
* Clients must not enable more than one text input on the single seat
* and should disable the current text input before enabling the new one.
* At most one instance of text input may be in enabled state per instance,
* Requests to enable the another text input when some text input is active
* must be ignored by compositor.
*
* This request resets all state associated with previous enable, disable,
* set_surrounding_text, set_text_change_cause, set_content_type, and
* set_cursor_rectangle requests, as well as the state associated with
* preedit_string, commit_string, and delete_surrounding_text events.
*
* The set_surrounding_text, set_content_type and set_cursor_rectangle
* requests must follow if the text input supports the necessary
* functionality.
*
* State set with this request is double-buffered. It will get applied on
* the next zwp_text_input_v3.commit request, and stay valid until the
* next committed enable or disable request.
*
* The changes must be applied by the compositor after issuing a
* zwp_text_input_v3.commit request.
*/
static inline void
zwp_text_input_v3_enable(struct zwp_text_input_v3 *zwp_text_input_v3)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_ENABLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Explicitly disable text input on the current surface (typically when
* there is no focus on any text entry inside the surface).
*
* State set with this request is double-buffered. It will get applied on
* the next zwp_text_input_v3.commit request.
*/
static inline void
zwp_text_input_v3_disable(struct zwp_text_input_v3 *zwp_text_input_v3)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_DISABLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Sets the surrounding plain text around the input, excluding the preedit
* text.
*
* The client should notify the compositor of any changes in any of the
* values carried with this request, including changes caused by handling
* incoming text-input events as well as changes caused by other
* mechanisms like keyboard typing.
*
* If the client is unaware of the text around the cursor, it should not
* issue this request, to signify lack of support to the compositor.
*
* Text is UTF-8 encoded, and should include the cursor position, the
* complete selection and additional characters before and after them.
* There is a maximum length of wayland messages, so text can not be
* longer than 4000 bytes.
*
* Cursor is the byte offset of the cursor within text buffer.
*
* Anchor is the byte offset of the selection anchor within text buffer.
* If there is no selected text, anchor is the same as cursor.
*
* If any preedit text is present, it is replaced with a cursor for the
* purpose of this event.
*
* Values set with this request are double-buffered. They will get applied
* on the next zwp_text_input_v3.commit request, and stay valid until the
* next committed enable or disable request.
*
* The initial state for affected fields is empty, meaning that the text
* input does not support sending surrounding text. If the empty values
* get applied, subsequent attempts to change them may have no effect.
*/
static inline void
zwp_text_input_v3_set_surrounding_text(struct zwp_text_input_v3 *zwp_text_input_v3, const char *text, int32_t cursor, int32_t anchor)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_SET_SURROUNDING_TEXT, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, text, cursor, anchor);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Tells the compositor why the text surrounding the cursor changed.
*
* Whenever the client detects an external change in text, cursor, or
* anchor posision, it must issue this request to the compositor. This
* request is intended to give the input method a chance to update the
* preedit text in an appropriate way, e.g. by removing it when the user
* starts typing with a keyboard.
*
* cause describes the source of the change.
*
* The value set with this request is double-buffered. It must be applied
* and reset to initial at the next zwp_text_input_v3.commit request.
*
* The initial value of cause is input_method.
*/
static inline void
zwp_text_input_v3_set_text_change_cause(struct zwp_text_input_v3 *zwp_text_input_v3, uint32_t cause)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_SET_TEXT_CHANGE_CAUSE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, cause);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Sets the content purpose and content hint. While the purpose is the
* basic purpose of an input field, the hint flags allow to modify some of
* the behavior.
*
* Values set with this request are double-buffered. They will get applied
* on the next zwp_text_input_v3.commit request.
* Subsequent attempts to update them may have no effect. The values
* remain valid until the next committed enable or disable request.
*
* The initial value for hint is none, and the initial value for purpose
* is normal.
*/
static inline void
zwp_text_input_v3_set_content_type(struct zwp_text_input_v3 *zwp_text_input_v3, uint32_t hint, uint32_t purpose)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_SET_CONTENT_TYPE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, hint, purpose);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Marks an area around the cursor as a x, y, width, height rectangle in
* surface local coordinates.
*
* Allows the compositor to put a window with word suggestions near the
* cursor, without obstructing the text being input.
*
* If the client is unaware of the position of edited text, it should not
* issue this request, to signify lack of support to the compositor.
*
* Values set with this request are double-buffered. They will get applied
* on the next zwp_text_input_v3.commit request, and stay valid until the
* next committed enable or disable request.
*
* The initial values describing a cursor rectangle are empty. That means
* the text input does not support describing the cursor area. If the
* empty values get applied, subsequent attempts to change them may have
* no effect.
*/
static inline void
zwp_text_input_v3_set_cursor_rectangle(struct zwp_text_input_v3 *zwp_text_input_v3, int32_t x, int32_t y, int32_t width, int32_t height)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_SET_CURSOR_RECTANGLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0, x, y, width, height);
}
/**
* @ingroup iface_zwp_text_input_v3
*
* Atomically applies state changes recently sent to the compositor.
*
* The commit request establishes and updates the state of the client, and
* must be issued after any changes to apply them.
*
* Text input state (enabled status, content purpose, content hint,
* surrounding text and change cause, cursor rectangle) is conceptually
* double-buffered within the context of a text input, i.e. between a
* committed enable request and the following committed enable or disable
* request.
*
* Protocol requests modify the pending state, as opposed to the current
* state in use by the input method. A commit request atomically applies
* all pending state, replacing the current state. After commit, the new
* pending state is as documented for each related request.
*
* Requests are applied in the order of arrival.
*
* Neither current nor pending state are modified unless noted otherwise.
*
* The compositor must count the number of commit requests coming from
* each zwp_text_input_v3 object and use the count as the serial in done
* events.
*/
static inline void
zwp_text_input_v3_commit(struct zwp_text_input_v3 *zwp_text_input_v3)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_v3,
ZWP_TEXT_INPUT_V3_COMMIT, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_v3), 0);
}
#define ZWP_TEXT_INPUT_MANAGER_V3_DESTROY 0
#define ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT 1
/**
* @ingroup iface_zwp_text_input_manager_v3
*/
#define ZWP_TEXT_INPUT_MANAGER_V3_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwp_text_input_manager_v3
*/
#define ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT_SINCE_VERSION 1
/** @ingroup iface_zwp_text_input_manager_v3 */
static inline void
zwp_text_input_manager_v3_set_user_data(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zwp_text_input_manager_v3, user_data);
}
/** @ingroup iface_zwp_text_input_manager_v3 */
static inline void *
zwp_text_input_manager_v3_get_user_data(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3)
{
return wl_proxy_get_user_data((struct wl_proxy *) zwp_text_input_manager_v3);
}
static inline uint32_t
zwp_text_input_manager_v3_get_version(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3)
{
return wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3);
}
/**
* @ingroup iface_zwp_text_input_manager_v3
*
* Destroy the wp_text_input_manager object.
*/
static inline void
zwp_text_input_manager_v3_destroy(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3)
{
wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_manager_v3,
ZWP_TEXT_INPUT_MANAGER_V3_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zwp_text_input_manager_v3
*
* Creates a new text-input object for a given seat.
*/
static inline struct zwp_text_input_v3 *
zwp_text_input_manager_v3_get_text_input(struct zwp_text_input_manager_v3 *zwp_text_input_manager_v3, struct wl_seat *seat)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zwp_text_input_manager_v3,
ZWP_TEXT_INPUT_MANAGER_V3_GET_TEXT_INPUT, &zwp_text_input_v3_interface, wl_proxy_get_version((struct wl_proxy *) zwp_text_input_manager_v3), 0, NULL, seat);
return (struct zwp_text_input_v3 *) id;
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,96 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2012, 2013 Intel Corporation
* Copyright © 2015, 2016 Jan Arne Petersen
* Copyright © 2017, 2018 Red Hat, Inc.
* Copyright © 2018 Purism SPC
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that the above copyright notice appear in
* all copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of
* the copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zwp_text_input_v3_interface;
static const struct wl_interface *text_input_unstable_v3_types[] = {
NULL,
NULL,
NULL,
NULL,
&wl_surface_interface,
&wl_surface_interface,
&zwp_text_input_v3_interface,
&wl_seat_interface,
};
static const struct wl_message zwp_text_input_v3_requests[] = {
{ "destroy", "", text_input_unstable_v3_types + 0 },
{ "enable", "", text_input_unstable_v3_types + 0 },
{ "disable", "", text_input_unstable_v3_types + 0 },
{ "set_surrounding_text", "sii", text_input_unstable_v3_types + 0 },
{ "set_text_change_cause", "u", text_input_unstable_v3_types + 0 },
{ "set_content_type", "uu", text_input_unstable_v3_types + 0 },
{ "set_cursor_rectangle", "iiii", text_input_unstable_v3_types + 0 },
{ "commit", "", text_input_unstable_v3_types + 0 },
};
static const struct wl_message zwp_text_input_v3_events[] = {
{ "enter", "o", text_input_unstable_v3_types + 4 },
{ "leave", "o", text_input_unstable_v3_types + 5 },
{ "preedit_string", "?sii", text_input_unstable_v3_types + 0 },
{ "commit_string", "?s", text_input_unstable_v3_types + 0 },
{ "delete_surrounding_text", "uu", text_input_unstable_v3_types + 0 },
{ "done", "u", text_input_unstable_v3_types + 0 },
};
WL_PRIVATE const struct wl_interface zwp_text_input_v3_interface = {
"zwp_text_input_v3", 1,
8, zwp_text_input_v3_requests,
6, zwp_text_input_v3_events,
};
static const struct wl_message zwp_text_input_manager_v3_requests[] = {
{ "destroy", "", text_input_unstable_v3_types + 0 },
{ "get_text_input", "no", text_input_unstable_v3_types + 6 },
};
WL_PRIVATE const struct wl_interface zwp_text_input_manager_v3_interface = {
"zwp_text_input_manager_v3", 1,
2, zwp_text_input_manager_v3_requests,
0, NULL,
};
@@ -0,0 +1,410 @@
/* Generated by wayland-scanner 1.20.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;
#ifndef WP_VIEWPORTER_INTERFACE
#define WP_VIEWPORTER_INTERFACE
/**
* @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;
#endif
#ifndef WP_VIEWPORT_INTERFACE
#define WP_VIEWPORT_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;
#endif
#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_flags((struct wl_proxy *) wp_viewporter,
WP_VIEWPORTER_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_viewporter), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @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_flags((struct wl_proxy *) wp_viewporter,
WP_VIEWPORTER_GET_VIEWPORT, &wp_viewport_interface, wl_proxy_get_version((struct wl_proxy *) wp_viewporter), 0, 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_flags((struct wl_proxy *) wp_viewport,
WP_VIEWPORT_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wp_viewport), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @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_flags((struct wl_proxy *) wp_viewport,
WP_VIEWPORT_SET_SOURCE, NULL, wl_proxy_get_version((struct wl_proxy *) wp_viewport), 0, 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_flags((struct wl_proxy *) wp_viewport,
WP_VIEWPORT_SET_DESTINATION, NULL, wl_proxy_get_version((struct wl_proxy *) wp_viewport), 0, width, height);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,74 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wp_viewport_interface;
static const struct wl_interface *viewporter_types[] = {
NULL,
NULL,
NULL,
NULL,
&wp_viewport_interface,
&wl_surface_interface,
};
static const struct wl_message wp_viewporter_requests[] = {
{ "destroy", "", viewporter_types + 0 },
{ "get_viewport", "no", viewporter_types + 4 },
};
WL_PRIVATE const struct wl_interface wp_viewporter_interface = {
"wp_viewporter", 1,
2, wp_viewporter_requests,
0, NULL,
};
static const struct wl_message wp_viewport_requests[] = {
{ "destroy", "", viewporter_types + 0 },
{ "set_source", "ffff", viewporter_types + 0 },
{ "set_destination", "ii", viewporter_types + 0 },
};
WL_PRIVATE const struct wl_interface wp_viewport_interface = {
"wp_viewport", 1,
3, wp_viewport_requests,
0, NULL,
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,537 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2008-2011 Kristian Høgsberg
* Copyright © 2010-2011 Intel Corporation
* Copyright © 2012-2013 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_buffer_interface;
extern const struct wl_interface wl_callback_interface;
extern const struct wl_interface wl_data_device_interface;
extern const struct wl_interface wl_data_offer_interface;
extern const struct wl_interface wl_data_source_interface;
extern const struct wl_interface wl_keyboard_interface;
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface wl_pointer_interface;
extern const struct wl_interface wl_region_interface;
extern const struct wl_interface wl_registry_interface;
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_shell_surface_interface;
extern const struct wl_interface wl_shm_pool_interface;
extern const struct wl_interface wl_subsurface_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface wl_touch_interface;
static const struct wl_interface *wayland_types[] = {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
&wl_callback_interface,
&wl_registry_interface,
&wl_surface_interface,
&wl_region_interface,
&wl_buffer_interface,
NULL,
NULL,
NULL,
NULL,
NULL,
&wl_shm_pool_interface,
NULL,
NULL,
&wl_data_source_interface,
&wl_surface_interface,
&wl_surface_interface,
NULL,
&wl_data_source_interface,
NULL,
&wl_data_offer_interface,
NULL,
&wl_surface_interface,
NULL,
NULL,
&wl_data_offer_interface,
&wl_data_offer_interface,
&wl_data_source_interface,
&wl_data_device_interface,
&wl_seat_interface,
&wl_shell_surface_interface,
&wl_surface_interface,
&wl_seat_interface,
NULL,
&wl_seat_interface,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
NULL,
NULL,
&wl_output_interface,
&wl_seat_interface,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_output_interface,
&wl_buffer_interface,
NULL,
NULL,
&wl_callback_interface,
&wl_region_interface,
&wl_region_interface,
&wl_output_interface,
&wl_output_interface,
&wl_pointer_interface,
&wl_keyboard_interface,
&wl_touch_interface,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_surface_interface,
NULL,
&wl_surface_interface,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
&wl_surface_interface,
NULL,
NULL,
NULL,
&wl_subsurface_interface,
&wl_surface_interface,
&wl_surface_interface,
&wl_surface_interface,
&wl_surface_interface,
&wl_registry_interface,
};
static const struct wl_message wl_display_requests[] = {
{ "sync", "n", wayland_types + 8 },
{ "get_registry", "n", wayland_types + 9 },
};
static const struct wl_message wl_display_events[] = {
{ "error", "ous", wayland_types + 0 },
{ "delete_id", "u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_display_interface = {
"wl_display", 1,
2, wl_display_requests,
2, wl_display_events,
};
static const struct wl_message wl_registry_requests[] = {
{ "bind", "usun", wayland_types + 0 },
};
static const struct wl_message wl_registry_events[] = {
{ "global", "usu", wayland_types + 0 },
{ "global_remove", "u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_registry_interface = {
"wl_registry", 1,
1, wl_registry_requests,
2, wl_registry_events,
};
static const struct wl_message wl_callback_events[] = {
{ "done", "u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_callback_interface = {
"wl_callback", 1,
0, NULL,
1, wl_callback_events,
};
static const struct wl_message wl_compositor_requests[] = {
{ "create_surface", "n", wayland_types + 10 },
{ "create_region", "n", wayland_types + 11 },
};
WL_PRIVATE const struct wl_interface wl_compositor_interface = {
"wl_compositor", 6,
2, wl_compositor_requests,
0, NULL,
};
static const struct wl_message wl_shm_pool_requests[] = {
{ "create_buffer", "niiiiu", wayland_types + 12 },
{ "destroy", "", wayland_types + 0 },
{ "resize", "i", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_shm_pool_interface = {
"wl_shm_pool", 2,
3, wl_shm_pool_requests,
0, NULL,
};
static const struct wl_message wl_shm_requests[] = {
{ "create_pool", "nhi", wayland_types + 18 },
{ "release", "2", wayland_types + 0 },
};
static const struct wl_message wl_shm_events[] = {
{ "format", "u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_shm_interface = {
"wl_shm", 2,
2, wl_shm_requests,
1, wl_shm_events,
};
static const struct wl_message wl_buffer_requests[] = {
{ "destroy", "", wayland_types + 0 },
};
static const struct wl_message wl_buffer_events[] = {
{ "release", "", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_buffer_interface = {
"wl_buffer", 1,
1, wl_buffer_requests,
1, wl_buffer_events,
};
static const struct wl_message wl_data_offer_requests[] = {
{ "accept", "u?s", wayland_types + 0 },
{ "receive", "sh", wayland_types + 0 },
{ "destroy", "", wayland_types + 0 },
{ "finish", "3", wayland_types + 0 },
{ "set_actions", "3uu", wayland_types + 0 },
};
static const struct wl_message wl_data_offer_events[] = {
{ "offer", "s", wayland_types + 0 },
{ "source_actions", "3u", wayland_types + 0 },
{ "action", "3u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_data_offer_interface = {
"wl_data_offer", 3,
5, wl_data_offer_requests,
3, wl_data_offer_events,
};
static const struct wl_message wl_data_source_requests[] = {
{ "offer", "s", wayland_types + 0 },
{ "destroy", "", wayland_types + 0 },
{ "set_actions", "3u", wayland_types + 0 },
};
static const struct wl_message wl_data_source_events[] = {
{ "target", "?s", wayland_types + 0 },
{ "send", "sh", wayland_types + 0 },
{ "cancelled", "", wayland_types + 0 },
{ "dnd_drop_performed", "3", wayland_types + 0 },
{ "dnd_finished", "3", wayland_types + 0 },
{ "action", "3u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_data_source_interface = {
"wl_data_source", 3,
3, wl_data_source_requests,
6, wl_data_source_events,
};
static const struct wl_message wl_data_device_requests[] = {
{ "start_drag", "?oo?ou", wayland_types + 21 },
{ "set_selection", "?ou", wayland_types + 25 },
{ "release", "2", wayland_types + 0 },
};
static const struct wl_message wl_data_device_events[] = {
{ "data_offer", "n", wayland_types + 27 },
{ "enter", "uoff?o", wayland_types + 28 },
{ "leave", "", wayland_types + 0 },
{ "motion", "uff", wayland_types + 0 },
{ "drop", "", wayland_types + 0 },
{ "selection", "?o", wayland_types + 33 },
};
WL_PRIVATE const struct wl_interface wl_data_device_interface = {
"wl_data_device", 3,
3, wl_data_device_requests,
6, wl_data_device_events,
};
static const struct wl_message wl_data_device_manager_requests[] = {
{ "create_data_source", "n", wayland_types + 34 },
{ "get_data_device", "no", wayland_types + 35 },
};
WL_PRIVATE const struct wl_interface wl_data_device_manager_interface = {
"wl_data_device_manager", 3,
2, wl_data_device_manager_requests,
0, NULL,
};
static const struct wl_message wl_shell_requests[] = {
{ "get_shell_surface", "no", wayland_types + 37 },
};
WL_PRIVATE const struct wl_interface wl_shell_interface = {
"wl_shell", 1,
1, wl_shell_requests,
0, NULL,
};
static const struct wl_message wl_shell_surface_requests[] = {
{ "pong", "u", wayland_types + 0 },
{ "move", "ou", wayland_types + 39 },
{ "resize", "ouu", wayland_types + 41 },
{ "set_toplevel", "", wayland_types + 0 },
{ "set_transient", "oiiu", wayland_types + 44 },
{ "set_fullscreen", "uu?o", wayland_types + 48 },
{ "set_popup", "ouoiiu", wayland_types + 51 },
{ "set_maximized", "?o", wayland_types + 57 },
{ "set_title", "s", wayland_types + 0 },
{ "set_class", "s", wayland_types + 0 },
};
static const struct wl_message wl_shell_surface_events[] = {
{ "ping", "u", wayland_types + 0 },
{ "configure", "uii", wayland_types + 0 },
{ "popup_done", "", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_shell_surface_interface = {
"wl_shell_surface", 1,
10, wl_shell_surface_requests,
3, wl_shell_surface_events,
};
static const struct wl_message wl_surface_requests[] = {
{ "destroy", "", wayland_types + 0 },
{ "attach", "?oii", wayland_types + 58 },
{ "damage", "iiii", wayland_types + 0 },
{ "frame", "n", wayland_types + 61 },
{ "set_opaque_region", "?o", wayland_types + 62 },
{ "set_input_region", "?o", wayland_types + 63 },
{ "commit", "", wayland_types + 0 },
{ "set_buffer_transform", "2i", wayland_types + 0 },
{ "set_buffer_scale", "3i", wayland_types + 0 },
{ "damage_buffer", "4iiii", wayland_types + 0 },
{ "offset", "5ii", wayland_types + 0 },
};
static const struct wl_message wl_surface_events[] = {
{ "enter", "o", wayland_types + 64 },
{ "leave", "o", wayland_types + 65 },
{ "preferred_buffer_scale", "6i", wayland_types + 0 },
{ "preferred_buffer_transform", "6u", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_surface_interface = {
"wl_surface", 6,
11, wl_surface_requests,
4, wl_surface_events,
};
static const struct wl_message wl_seat_requests[] = {
{ "get_pointer", "n", wayland_types + 66 },
{ "get_keyboard", "n", wayland_types + 67 },
{ "get_touch", "n", wayland_types + 68 },
{ "release", "5", wayland_types + 0 },
};
static const struct wl_message wl_seat_events[] = {
{ "capabilities", "u", wayland_types + 0 },
{ "name", "2s", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_seat_interface = {
"wl_seat", 10,
4, wl_seat_requests,
2, wl_seat_events,
};
static const struct wl_message wl_pointer_requests[] = {
{ "set_cursor", "u?oii", wayland_types + 69 },
{ "release", "3", wayland_types + 0 },
};
static const struct wl_message wl_pointer_events[] = {
{ "enter", "uoff", wayland_types + 73 },
{ "leave", "uo", wayland_types + 77 },
{ "motion", "uff", wayland_types + 0 },
{ "button", "uuuu", wayland_types + 0 },
{ "axis", "uuf", wayland_types + 0 },
{ "frame", "5", wayland_types + 0 },
{ "axis_source", "5u", wayland_types + 0 },
{ "axis_stop", "5uu", wayland_types + 0 },
{ "axis_discrete", "5ui", wayland_types + 0 },
{ "axis_value120", "8ui", wayland_types + 0 },
{ "axis_relative_direction", "9uu", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_pointer_interface = {
"wl_pointer", 10,
2, wl_pointer_requests,
11, wl_pointer_events,
};
static const struct wl_message wl_keyboard_requests[] = {
{ "release", "3", wayland_types + 0 },
};
static const struct wl_message wl_keyboard_events[] = {
{ "keymap", "uhu", wayland_types + 0 },
{ "enter", "uoa", wayland_types + 79 },
{ "leave", "uo", wayland_types + 82 },
{ "key", "uuuu", wayland_types + 0 },
{ "modifiers", "uuuuu", wayland_types + 0 },
{ "repeat_info", "4ii", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_keyboard_interface = {
"wl_keyboard", 10,
1, wl_keyboard_requests,
6, wl_keyboard_events,
};
static const struct wl_message wl_touch_requests[] = {
{ "release", "3", wayland_types + 0 },
};
static const struct wl_message wl_touch_events[] = {
{ "down", "uuoiff", wayland_types + 84 },
{ "up", "uui", wayland_types + 0 },
{ "motion", "uiff", wayland_types + 0 },
{ "frame", "", wayland_types + 0 },
{ "cancel", "", wayland_types + 0 },
{ "shape", "6iff", wayland_types + 0 },
{ "orientation", "6if", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_touch_interface = {
"wl_touch", 10,
1, wl_touch_requests,
7, wl_touch_events,
};
static const struct wl_message wl_output_requests[] = {
{ "release", "3", wayland_types + 0 },
};
static const struct wl_message wl_output_events[] = {
{ "geometry", "iiiiissi", wayland_types + 0 },
{ "mode", "uiii", wayland_types + 0 },
{ "done", "2", wayland_types + 0 },
{ "scale", "2i", wayland_types + 0 },
{ "name", "4s", wayland_types + 0 },
{ "description", "4s", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_output_interface = {
"wl_output", 4,
1, wl_output_requests,
6, wl_output_events,
};
static const struct wl_message wl_region_requests[] = {
{ "destroy", "", wayland_types + 0 },
{ "add", "iiii", wayland_types + 0 },
{ "subtract", "iiii", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_region_interface = {
"wl_region", 1,
3, wl_region_requests,
0, NULL,
};
static const struct wl_message wl_subcompositor_requests[] = {
{ "destroy", "", wayland_types + 0 },
{ "get_subsurface", "noo", wayland_types + 90 },
};
WL_PRIVATE const struct wl_interface wl_subcompositor_interface = {
"wl_subcompositor", 1,
2, wl_subcompositor_requests,
0, NULL,
};
static const struct wl_message wl_subsurface_requests[] = {
{ "destroy", "", wayland_types + 0 },
{ "set_position", "ii", wayland_types + 0 },
{ "place_above", "o", wayland_types + 93 },
{ "place_below", "o", wayland_types + 94 },
{ "set_sync", "", wayland_types + 0 },
{ "set_desync", "", wayland_types + 0 },
};
WL_PRIVATE const struct wl_interface wl_subsurface_interface = {
"wl_subsurface", 1,
6, wl_subsurface_requests,
0, NULL,
};
static const struct wl_message wl_fixes_requests[] = {
{ "destroy", "", wayland_types + 0 },
{ "destroy_registry", "o", wayland_types + 95 },
};
WL_PRIVATE const struct wl_interface wl_fixes_interface = {
"wl_fixes", 1,
2, wl_fixes_requests,
0, NULL,
};
@@ -0,0 +1,403 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H
#define XDG_ACTIVATION_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_activation_v1 The xdg_activation_v1 protocol
* Protocol for requesting activation of surfaces
*
* @section page_desc_xdg_activation_v1 Description
*
* The way for a client to pass focus to another toplevel is as follows.
*
* The client that intends to activate another toplevel uses the
* xdg_activation_v1.get_activation_token request to get an activation token.
* This token is then passed to the client to be activated through a separate
* band of communication. The client to be activated will then pass the token
* it received to the xdg_activation_v1.activate request. The compositor can
* then use this token to decide how to react to the activation request.
*
* The token the activating client gets may be ineffective either already at
* the time it receives it, for example if it was not focused, for focus
* stealing prevention. The activating client will have no way to discover
* the validity of the token, and may still forward it to the to be activated
* client.
*
* The created activation token may optionally get information attached to it
* that can be used by the compositor to identify the application that we
* intend to activate. This can for example be used to display a visual hint
* about what application is being started.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*
* @section page_ifaces_xdg_activation_v1 Interfaces
* - @subpage page_iface_xdg_activation_v1 - interface for activating surfaces
* - @subpage page_iface_xdg_activation_token_v1 - an exported activation handle
* @section page_copyright_xdg_activation_v1 Copyright
* <pre>
*
* Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
* Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
*
* 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 wl_surface;
struct xdg_activation_token_v1;
struct xdg_activation_v1;
#ifndef XDG_ACTIVATION_V1_INTERFACE
#define XDG_ACTIVATION_V1_INTERFACE
/**
* @page page_iface_xdg_activation_v1 xdg_activation_v1
* @section page_iface_xdg_activation_v1_desc Description
*
* A global interface used for informing the compositor about applications
* being activated or started, or for applications to request to be
* activated.
* @section page_iface_xdg_activation_v1_api API
* See @ref iface_xdg_activation_v1.
*/
/**
* @defgroup iface_xdg_activation_v1 The xdg_activation_v1 interface
*
* A global interface used for informing the compositor about applications
* being activated or started, or for applications to request to be
* activated.
*/
extern const struct wl_interface xdg_activation_v1_interface;
#endif
#ifndef XDG_ACTIVATION_TOKEN_V1_INTERFACE
#define XDG_ACTIVATION_TOKEN_V1_INTERFACE
/**
* @page page_iface_xdg_activation_token_v1 xdg_activation_token_v1
* @section page_iface_xdg_activation_token_v1_desc Description
*
* An object for setting up a token and receiving a token handle that can
* be passed as an activation token to another client.
*
* The object is created using the xdg_activation_v1.get_activation_token
* request. This object should then be populated with the app_id, surface
* and serial information and committed. The compositor shall then issue a
* done event with the token. In case the request's parameters are invalid,
* the compositor will provide an invalid token.
* @section page_iface_xdg_activation_token_v1_api API
* See @ref iface_xdg_activation_token_v1.
*/
/**
* @defgroup iface_xdg_activation_token_v1 The xdg_activation_token_v1 interface
*
* An object for setting up a token and receiving a token handle that can
* be passed as an activation token to another client.
*
* The object is created using the xdg_activation_v1.get_activation_token
* request. This object should then be populated with the app_id, surface
* and serial information and committed. The compositor shall then issue a
* done event with the token. In case the request's parameters are invalid,
* the compositor will provide an invalid token.
*/
extern const struct wl_interface xdg_activation_token_v1_interface;
#endif
#define XDG_ACTIVATION_V1_DESTROY 0
#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN 1
#define XDG_ACTIVATION_V1_ACTIVATE 2
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_v1
*/
#define XDG_ACTIVATION_V1_ACTIVATE_SINCE_VERSION 1
/** @ingroup iface_xdg_activation_v1 */
static inline void
xdg_activation_v1_set_user_data(struct xdg_activation_v1 *xdg_activation_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_v1, user_data);
}
/** @ingroup iface_xdg_activation_v1 */
static inline void *
xdg_activation_v1_get_user_data(struct xdg_activation_v1 *xdg_activation_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_v1);
}
static inline uint32_t
xdg_activation_v1_get_version(struct xdg_activation_v1 *xdg_activation_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1);
}
/**
* @ingroup iface_xdg_activation_v1
*
* Notify the compositor that the xdg_activation object will no longer be
* used.
*
* The child objects created via this interface are unaffected and should
* be destroyed separately.
*/
static inline void
xdg_activation_v1_destroy(struct xdg_activation_v1 *xdg_activation_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_xdg_activation_v1
*
* Creates an xdg_activation_token_v1 object that will provide
* the initiating client with a unique token for this activation. This
* token should be offered to the clients to be activated.
*/
static inline struct xdg_activation_token_v1 *
xdg_activation_v1_get_activation_token(struct xdg_activation_v1 *xdg_activation_v1)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_GET_ACTIVATION_TOKEN, &xdg_activation_token_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), 0, NULL);
return (struct xdg_activation_token_v1 *) id;
}
/**
* @ingroup iface_xdg_activation_v1
*
* Requests surface activation. It's up to the compositor to display
* this information as desired, for example by placing the surface above
* the rest.
*
* The compositor may know who requested this by checking the activation
* token and might decide not to follow through with the activation if it's
* considered unwanted.
*
* Compositors can ignore unknown presentation tokens when an invalid
* token is passed.
*/
static inline void
xdg_activation_v1_activate(struct xdg_activation_v1 *xdg_activation_v1, const char *token, struct wl_surface *surface)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_v1,
XDG_ACTIVATION_V1_ACTIVATE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_v1), 0, token, surface);
}
#ifndef XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM
#define XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM
enum xdg_activation_token_v1_error {
/**
* The token has already been used previously
*/
XDG_ACTIVATION_TOKEN_V1_ERROR_ALREADY_USED = 0,
};
#endif /* XDG_ACTIVATION_TOKEN_V1_ERROR_ENUM */
/**
* @ingroup iface_xdg_activation_token_v1
* @struct xdg_activation_token_v1_listener
*/
struct xdg_activation_token_v1_listener {
/**
* the exported activation token
*
* The 'done' event contains the unique token of this activation
* request and notifies that the provider is done.
*
* Applications will typically receive the token through the
* XDG_ACTIVATION_TOKEN environment variable as set by its
* launcher, and should unset the environment variable right after
* this request, in order to avoid propagating it to child
* processes.
*
* Applications implementing the D-Bus interface
* org.freedesktop.Application should get their token under
* XDG_ACTIVATION_TOKEN on their platform_data.
*
* Presentation tokens may be transferred across clients through
* means not described in this protocol.
* @param token the exported activation token
*/
void (*done)(void *data,
struct xdg_activation_token_v1 *xdg_activation_token_v1,
const char *token);
};
/**
* @ingroup iface_xdg_activation_token_v1
*/
static inline int
xdg_activation_token_v1_add_listener(struct xdg_activation_token_v1 *xdg_activation_token_v1,
const struct xdg_activation_token_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) xdg_activation_token_v1,
(void (**)(void)) listener, data);
}
#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL 0
#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID 1
#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE 2
#define XDG_ACTIVATION_TOKEN_V1_COMMIT 3
#define XDG_ACTIVATION_TOKEN_V1_DESTROY 4
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_DONE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_SERIAL_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_APP_ID_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_SET_SURFACE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_COMMIT_SINCE_VERSION 1
/**
* @ingroup iface_xdg_activation_token_v1
*/
#define XDG_ACTIVATION_TOKEN_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_xdg_activation_token_v1 */
static inline void
xdg_activation_token_v1_set_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_activation_token_v1, user_data);
}
/** @ingroup iface_xdg_activation_token_v1 */
static inline void *
xdg_activation_token_v1_get_user_data(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_activation_token_v1);
}
static inline uint32_t
xdg_activation_token_v1_get_version(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Provides information about the seat and serial event that requested the
* token.
*
* Must be sent before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_serial(struct xdg_activation_token_v1 *xdg_activation_token_v1, uint32_t serial, struct wl_seat *seat)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_SERIAL, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, serial, seat);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* The requesting client can specify an app_id to associate the token
* being created with it.
*
* Must be sent before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_app_id(struct xdg_activation_token_v1 *xdg_activation_token_v1, const char *app_id)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, app_id);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* The requesting client can specify a surface to associate the token
* being created with it.
*
* Must be triggered before commit. This information is optional.
*/
static inline void
xdg_activation_token_v1_set_surface(struct xdg_activation_token_v1 *xdg_activation_token_v1, struct wl_surface *surface)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_SET_SURFACE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0, surface);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Requests an activation token based on the different parameters that
* have been offered through set_serial, set_surface and set_app_id.
*/
static inline void
xdg_activation_token_v1_commit(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_COMMIT, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), 0);
}
/**
* @ingroup iface_xdg_activation_token_v1
*
* Notify the compositor that the xdg_activation_token_v1 object will no
* longer be used.
*/
static inline void
xdg_activation_token_v1_destroy(struct xdg_activation_token_v1 *xdg_activation_token_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_activation_token_v1,
XDG_ACTIVATION_TOKEN_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_activation_token_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,84 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2020 Aleix Pol Gonzalez <aleixpol@kde.org>
* Copyright © 2020 Carlos Garnacho <carlosg@gnome.org>
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface xdg_activation_token_v1_interface;
static const struct wl_interface *xdg_activation_v1_types[] = {
NULL,
&xdg_activation_token_v1_interface,
NULL,
&wl_surface_interface,
NULL,
&wl_seat_interface,
&wl_surface_interface,
};
static const struct wl_message xdg_activation_v1_requests[] = {
{ "destroy", "", xdg_activation_v1_types + 0 },
{ "get_activation_token", "n", xdg_activation_v1_types + 1 },
{ "activate", "so", xdg_activation_v1_types + 2 },
};
WL_PRIVATE const struct wl_interface xdg_activation_v1_interface = {
"xdg_activation_v1", 1,
3, xdg_activation_v1_requests,
0, NULL,
};
static const struct wl_message xdg_activation_token_v1_requests[] = {
{ "set_serial", "uo", xdg_activation_v1_types + 4 },
{ "set_app_id", "s", xdg_activation_v1_types + 0 },
{ "set_surface", "o", xdg_activation_v1_types + 6 },
{ "commit", "", xdg_activation_v1_types + 0 },
{ "destroy", "", xdg_activation_v1_types + 0 },
};
static const struct wl_message xdg_activation_token_v1_events[] = {
{ "done", "s", xdg_activation_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_activation_token_v1_interface = {
"xdg_activation_token_v1", 1,
5, xdg_activation_token_v1_requests,
1, xdg_activation_token_v1_events,
};
@@ -0,0 +1,378 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define XDG_DECORATION_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_decoration_unstable_v1 The xdg_decoration_unstable_v1 protocol
* @section page_ifaces_xdg_decoration_unstable_v1 Interfaces
* - @subpage page_iface_zxdg_decoration_manager_v1 - window decoration manager
* - @subpage page_iface_zxdg_toplevel_decoration_v1 - decoration object for a toplevel surface
* @section page_copyright_xdg_decoration_unstable_v1 Copyright
* <pre>
*
* Copyright © 2018 Simon Ser
*
* 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 xdg_toplevel;
struct zxdg_decoration_manager_v1;
struct zxdg_toplevel_decoration_v1;
#ifndef ZXDG_DECORATION_MANAGER_V1_INTERFACE
#define ZXDG_DECORATION_MANAGER_V1_INTERFACE
/**
* @page page_iface_zxdg_decoration_manager_v1 zxdg_decoration_manager_v1
* @section page_iface_zxdg_decoration_manager_v1_desc Description
*
* This interface allows a compositor to announce support for server-side
* decorations.
*
* A window decoration is a set of window controls as deemed appropriate by
* the party managing them, such as user interface components used to move,
* resize and change a window's state.
*
* A client can use this protocol to request being decorated by a supporting
* compositor.
*
* If compositor and client do not negotiate the use of a server-side
* decoration using this protocol, clients continue to self-decorate as they
* see fit.
*
* 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_zxdg_decoration_manager_v1_api API
* See @ref iface_zxdg_decoration_manager_v1.
*/
/**
* @defgroup iface_zxdg_decoration_manager_v1 The zxdg_decoration_manager_v1 interface
*
* This interface allows a compositor to announce support for server-side
* decorations.
*
* A window decoration is a set of window controls as deemed appropriate by
* the party managing them, such as user interface components used to move,
* resize and change a window's state.
*
* A client can use this protocol to request being decorated by a supporting
* compositor.
*
* If compositor and client do not negotiate the use of a server-side
* decoration using this protocol, clients continue to self-decorate as they
* see fit.
*
* 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 zxdg_decoration_manager_v1_interface;
#endif
#ifndef ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
#define ZXDG_TOPLEVEL_DECORATION_V1_INTERFACE
/**
* @page page_iface_zxdg_toplevel_decoration_v1 zxdg_toplevel_decoration_v1
* @section page_iface_zxdg_toplevel_decoration_v1_desc Description
*
* The decoration object allows the compositor to toggle server-side window
* decorations for a toplevel surface. The client can request to switch to
* another mode.
*
* The xdg_toplevel_decoration object must be destroyed before its
* xdg_toplevel.
* @section page_iface_zxdg_toplevel_decoration_v1_api API
* See @ref iface_zxdg_toplevel_decoration_v1.
*/
/**
* @defgroup iface_zxdg_toplevel_decoration_v1 The zxdg_toplevel_decoration_v1 interface
*
* The decoration object allows the compositor to toggle server-side window
* decorations for a toplevel surface. The client can request to switch to
* another mode.
*
* The xdg_toplevel_decoration object must be destroyed before its
* xdg_toplevel.
*/
extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
#endif
#define ZXDG_DECORATION_MANAGER_V1_DESTROY 0
#define ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION 1
/**
* @ingroup iface_zxdg_decoration_manager_v1
*/
#define ZXDG_DECORATION_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_decoration_manager_v1
*/
#define ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION_SINCE_VERSION 1
/** @ingroup iface_zxdg_decoration_manager_v1 */
static inline void
zxdg_decoration_manager_v1_set_user_data(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_decoration_manager_v1, user_data);
}
/** @ingroup iface_zxdg_decoration_manager_v1 */
static inline void *
zxdg_decoration_manager_v1_get_user_data(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_decoration_manager_v1);
}
static inline uint32_t
zxdg_decoration_manager_v1_get_version(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_decoration_manager_v1);
}
/**
* @ingroup iface_zxdg_decoration_manager_v1
*
* Destroy the decoration manager. This doesn't destroy objects created
* with the manager.
*/
static inline void
zxdg_decoration_manager_v1_destroy(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_decoration_manager_v1,
ZXDG_DECORATION_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_decoration_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_decoration_manager_v1
*
* Create a new decoration object associated with the given toplevel.
*
* Creating an xdg_toplevel_decoration from an xdg_toplevel 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_toplevel_decoration.configure event must also be treated as
* errors.
*/
static inline struct zxdg_toplevel_decoration_v1 *
zxdg_decoration_manager_v1_get_toplevel_decoration(struct zxdg_decoration_manager_v1 *zxdg_decoration_manager_v1, struct xdg_toplevel *toplevel)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_decoration_manager_v1,
ZXDG_DECORATION_MANAGER_V1_GET_TOPLEVEL_DECORATION, &zxdg_toplevel_decoration_v1_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_decoration_manager_v1), 0, NULL, toplevel);
return (struct zxdg_toplevel_decoration_v1 *) id;
}
#ifndef ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM
#define ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM
enum zxdg_toplevel_decoration_v1_error {
/**
* xdg_toplevel has a buffer attached before configure
*/
ZXDG_TOPLEVEL_DECORATION_V1_ERROR_UNCONFIGURED_BUFFER = 0,
/**
* xdg_toplevel already has a decoration object
*/
ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ALREADY_CONSTRUCTED = 1,
/**
* xdg_toplevel destroyed before the decoration object
*/
ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ORPHANED = 2,
};
#endif /* ZXDG_TOPLEVEL_DECORATION_V1_ERROR_ENUM */
#ifndef ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM
#define ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
* window decoration modes
*
* These values describe window decoration modes.
*/
enum zxdg_toplevel_decoration_v1_mode {
/**
* no server-side window decoration
*/
ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE = 1,
/**
* server-side window decoration
*/
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE = 2,
};
#endif /* ZXDG_TOPLEVEL_DECORATION_V1_MODE_ENUM */
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
* @struct zxdg_toplevel_decoration_v1_listener
*/
struct zxdg_toplevel_decoration_v1_listener {
/**
* suggest a surface change
*
* The configure event asks the client to change its decoration
* mode. The configured state should not be applied immediately.
* Clients must send an ack_configure in response to this event.
* See xdg_surface.configure and xdg_surface.ack_configure for
* details.
*
* A configure event can be sent at any time. The specified mode
* must be obeyed by the client.
* @param mode the decoration mode
*/
void (*configure)(void *data,
struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1,
uint32_t mode);
};
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*/
static inline int
zxdg_toplevel_decoration_v1_add_listener(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1,
const struct zxdg_toplevel_decoration_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_decoration_v1,
(void (**)(void)) listener, data);
}
#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY 0
#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE 1
#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE 2
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*/
#define ZXDG_TOPLEVEL_DECORATION_V1_CONFIGURE_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*/
#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*/
#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*/
#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE_SINCE_VERSION 1
/** @ingroup iface_zxdg_toplevel_decoration_v1 */
static inline void
zxdg_toplevel_decoration_v1_set_user_data(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1, user_data);
}
/** @ingroup iface_zxdg_toplevel_decoration_v1 */
static inline void *
zxdg_toplevel_decoration_v1_get_user_data(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1);
}
static inline uint32_t
zxdg_toplevel_decoration_v1_get_version(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_decoration_v1);
}
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*
* Switch back to a mode without any server-side decorations at the next
* commit.
*/
static inline void
zxdg_toplevel_decoration_v1_destroy(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_toplevel_decoration_v1,
ZXDG_TOPLEVEL_DECORATION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_decoration_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*
* Set the toplevel surface decoration mode. This informs the compositor
* that the client prefers the provided decoration mode.
*
* After requesting a decoration mode, the compositor will respond by
* emitting a xdg_surface.configure event. The client should then update
* its content, drawing it without decorations if the received mode is
* server-side decorations. The client must also acknowledge the configure
* when committing the new content (see xdg_surface.ack_configure).
*
* The compositor can decide not to use the client's mode and enforce a
* different mode instead.
*
* Clients whose decoration mode depend on the xdg_toplevel state may send
* a set_mode request in response to a xdg_surface.configure event and wait
* for the next xdg_surface.configure event to prevent unwanted state.
* Such clients are responsible for preventing configure loops and must
* make sure not to send multiple successive set_mode requests with the
* same decoration mode.
*/
static inline void
zxdg_toplevel_decoration_v1_set_mode(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, uint32_t mode)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_toplevel_decoration_v1,
ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_decoration_v1), 0, mode);
}
/**
* @ingroup iface_zxdg_toplevel_decoration_v1
*
* Unset the toplevel surface decoration mode. This informs the compositor
* that the client doesn't prefer a particular decoration mode.
*
* This request has the same semantics as set_mode.
*/
static inline void
zxdg_toplevel_decoration_v1_unset_mode(struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_toplevel_decoration_v1,
ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_toplevel_decoration_v1), 0);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,75 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2018 Simon Ser
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface xdg_toplevel_interface;
extern const struct wl_interface zxdg_toplevel_decoration_v1_interface;
static const struct wl_interface *xdg_decoration_unstable_v1_types[] = {
NULL,
&zxdg_toplevel_decoration_v1_interface,
&xdg_toplevel_interface,
};
static const struct wl_message zxdg_decoration_manager_v1_requests[] = {
{ "destroy", "", xdg_decoration_unstable_v1_types + 0 },
{ "get_toplevel_decoration", "no", xdg_decoration_unstable_v1_types + 1 },
};
WL_PRIVATE const struct wl_interface zxdg_decoration_manager_v1_interface = {
"zxdg_decoration_manager_v1", 1,
2, zxdg_decoration_manager_v1_requests,
0, NULL,
};
static const struct wl_message zxdg_toplevel_decoration_v1_requests[] = {
{ "destroy", "", xdg_decoration_unstable_v1_types + 0 },
{ "set_mode", "u", xdg_decoration_unstable_v1_types + 0 },
{ "unset_mode", "", xdg_decoration_unstable_v1_types + 0 },
};
static const struct wl_message zxdg_toplevel_decoration_v1_events[] = {
{ "configure", "u", xdg_decoration_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zxdg_toplevel_decoration_v1_interface = {
"zxdg_toplevel_decoration_v1", 1,
3, zxdg_toplevel_decoration_v1_requests,
1, zxdg_toplevel_decoration_v1_events,
};
@@ -0,0 +1,286 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_DIALOG_V1_CLIENT_PROTOCOL_H
#define XDG_DIALOG_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_dialog_v1 The xdg_dialog_v1 protocol
* @section page_ifaces_xdg_dialog_v1 Interfaces
* - @subpage page_iface_xdg_wm_dialog_v1 - create dialogs related to other toplevels
* - @subpage page_iface_xdg_dialog_v1 - dialog object
* @section page_copyright_xdg_dialog_v1 Copyright
* <pre>
*
* Copyright © 2023 Carlos Garnacho
*
* 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 xdg_dialog_v1;
struct xdg_toplevel;
struct xdg_wm_dialog_v1;
#ifndef XDG_WM_DIALOG_V1_INTERFACE
#define XDG_WM_DIALOG_V1_INTERFACE
/**
* @page page_iface_xdg_wm_dialog_v1 xdg_wm_dialog_v1
* @section page_iface_xdg_wm_dialog_v1_desc Description
*
* The xdg_wm_dialog_v1 interface is exposed as a global object allowing
* to register surfaces with a xdg_toplevel role as "dialogs" relative to
* another toplevel.
*
* The compositor may let this relation influence how the surface is
* placed, displayed or interacted with.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
* @section page_iface_xdg_wm_dialog_v1_api API
* See @ref iface_xdg_wm_dialog_v1.
*/
/**
* @defgroup iface_xdg_wm_dialog_v1 The xdg_wm_dialog_v1 interface
*
* The xdg_wm_dialog_v1 interface is exposed as a global object allowing
* to register surfaces with a xdg_toplevel role as "dialogs" relative to
* another toplevel.
*
* The compositor may let this relation influence how the surface is
* placed, displayed or interacted with.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*/
extern const struct wl_interface xdg_wm_dialog_v1_interface;
#endif
#ifndef XDG_DIALOG_V1_INTERFACE
#define XDG_DIALOG_V1_INTERFACE
/**
* @page page_iface_xdg_dialog_v1 xdg_dialog_v1
* @section page_iface_xdg_dialog_v1_desc Description
*
* A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its
* purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a
* temporary window) relative to another toplevel (see
* xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1
* becomes inert.
*
* Through this object, the client may provide additional hints about
* the purpose of the secondary toplevel. This interface has no effect
* on toplevels that are not attached to a parent toplevel.
* @section page_iface_xdg_dialog_v1_api API
* See @ref iface_xdg_dialog_v1.
*/
/**
* @defgroup iface_xdg_dialog_v1 The xdg_dialog_v1 interface
*
* A xdg_dialog_v1 object is an ancillary object tied to a xdg_toplevel. Its
* purpose is hinting the compositor that the toplevel is a "dialog" (e.g. a
* temporary window) relative to another toplevel (see
* xdg_toplevel.set_parent). If the xdg_toplevel is destroyed, the xdg_dialog_v1
* becomes inert.
*
* Through this object, the client may provide additional hints about
* the purpose of the secondary toplevel. This interface has no effect
* on toplevels that are not attached to a parent toplevel.
*/
extern const struct wl_interface xdg_dialog_v1_interface;
#endif
#ifndef XDG_WM_DIALOG_V1_ERROR_ENUM
#define XDG_WM_DIALOG_V1_ERROR_ENUM
enum xdg_wm_dialog_v1_error {
/**
* the xdg_toplevel object has already been used to create a xdg_dialog_v1
*/
XDG_WM_DIALOG_V1_ERROR_ALREADY_USED = 0,
};
#endif /* XDG_WM_DIALOG_V1_ERROR_ENUM */
#define XDG_WM_DIALOG_V1_DESTROY 0
#define XDG_WM_DIALOG_V1_GET_XDG_DIALOG 1
/**
* @ingroup iface_xdg_wm_dialog_v1
*/
#define XDG_WM_DIALOG_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_wm_dialog_v1
*/
#define XDG_WM_DIALOG_V1_GET_XDG_DIALOG_SINCE_VERSION 1
/** @ingroup iface_xdg_wm_dialog_v1 */
static inline void
xdg_wm_dialog_v1_set_user_data(struct xdg_wm_dialog_v1 *xdg_wm_dialog_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_wm_dialog_v1, user_data);
}
/** @ingroup iface_xdg_wm_dialog_v1 */
static inline void *
xdg_wm_dialog_v1_get_user_data(struct xdg_wm_dialog_v1 *xdg_wm_dialog_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_wm_dialog_v1);
}
static inline uint32_t
xdg_wm_dialog_v1_get_version(struct xdg_wm_dialog_v1 *xdg_wm_dialog_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_wm_dialog_v1);
}
/**
* @ingroup iface_xdg_wm_dialog_v1
*
* Destroys the xdg_wm_dialog_v1 object. This does not affect
* the xdg_dialog_v1 objects generated through it.
*/
static inline void
xdg_wm_dialog_v1_destroy(struct xdg_wm_dialog_v1 *xdg_wm_dialog_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_dialog_v1,
XDG_WM_DIALOG_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_wm_dialog_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_xdg_wm_dialog_v1
*
* Creates a xdg_dialog_v1 object for the given toplevel. See the interface
* description for more details.
*
* Compositors must raise an already_used error if clients attempt to
* create multiple xdg_dialog_v1 objects for the same xdg_toplevel.
*/
static inline struct xdg_dialog_v1 *
xdg_wm_dialog_v1_get_xdg_dialog(struct xdg_wm_dialog_v1 *xdg_wm_dialog_v1, struct xdg_toplevel *toplevel)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_wm_dialog_v1,
XDG_WM_DIALOG_V1_GET_XDG_DIALOG, &xdg_dialog_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_wm_dialog_v1), 0, NULL, toplevel);
return (struct xdg_dialog_v1 *) id;
}
#define XDG_DIALOG_V1_DESTROY 0
#define XDG_DIALOG_V1_SET_MODAL 1
#define XDG_DIALOG_V1_UNSET_MODAL 2
/**
* @ingroup iface_xdg_dialog_v1
*/
#define XDG_DIALOG_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_dialog_v1
*/
#define XDG_DIALOG_V1_SET_MODAL_SINCE_VERSION 1
/**
* @ingroup iface_xdg_dialog_v1
*/
#define XDG_DIALOG_V1_UNSET_MODAL_SINCE_VERSION 1
/** @ingroup iface_xdg_dialog_v1 */
static inline void
xdg_dialog_v1_set_user_data(struct xdg_dialog_v1 *xdg_dialog_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_dialog_v1, user_data);
}
/** @ingroup iface_xdg_dialog_v1 */
static inline void *
xdg_dialog_v1_get_user_data(struct xdg_dialog_v1 *xdg_dialog_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_dialog_v1);
}
static inline uint32_t
xdg_dialog_v1_get_version(struct xdg_dialog_v1 *xdg_dialog_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_dialog_v1);
}
/**
* @ingroup iface_xdg_dialog_v1
*
* Destroys the xdg_dialog_v1 object. If this object is destroyed
* before the related xdg_toplevel, the compositor should unapply its
* effects.
*/
static inline void
xdg_dialog_v1_destroy(struct xdg_dialog_v1 *xdg_dialog_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_dialog_v1,
XDG_DIALOG_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_dialog_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_xdg_dialog_v1
*
* Hints that the dialog has "modal" behavior. Modal dialogs typically
* require to be fully addressed by the user (i.e. closed) before resuming
* interaction with the parent toplevel, and may require a distinct
* presentation.
*
* Clients must implement the logic to filter events in the parent
* toplevel on their own.
*
* Compositors may choose any policy in event delivery to the parent
* toplevel, from delivering all events unfiltered to using them for
* internal consumption.
*/
static inline void
xdg_dialog_v1_set_modal(struct xdg_dialog_v1 *xdg_dialog_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_dialog_v1,
XDG_DIALOG_V1_SET_MODAL, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_dialog_v1), 0);
}
/**
* @ingroup iface_xdg_dialog_v1
*
* Drops the hint that this dialog has "modal" behavior. See
* xdg_dialog_v1.set_modal for more details.
*/
static inline void
xdg_dialog_v1_unset_modal(struct xdg_dialog_v1 *xdg_dialog_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_dialog_v1,
XDG_DIALOG_V1_UNSET_MODAL, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_dialog_v1), 0);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,70 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2023 Carlos Garnacho
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface xdg_dialog_v1_interface;
extern const struct wl_interface xdg_toplevel_interface;
static const struct wl_interface *xdg_dialog_v1_types[] = {
&xdg_dialog_v1_interface,
&xdg_toplevel_interface,
};
static const struct wl_message xdg_wm_dialog_v1_requests[] = {
{ "destroy", "", xdg_dialog_v1_types + 0 },
{ "get_xdg_dialog", "no", xdg_dialog_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_wm_dialog_v1_interface = {
"xdg_wm_dialog_v1", 1,
2, xdg_wm_dialog_v1_requests,
0, NULL,
};
static const struct wl_message xdg_dialog_v1_requests[] = {
{ "destroy", "", xdg_dialog_v1_types + 0 },
{ "set_modal", "", xdg_dialog_v1_types + 0 },
{ "unset_modal", "", xdg_dialog_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_dialog_v1_interface = {
"xdg_dialog_v1", 1,
3, xdg_dialog_v1_requests,
0, NULL,
};
@@ -0,0 +1,518 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_FOREIGN_UNSTABLE_V2_CLIENT_PROTOCOL_H
#define XDG_FOREIGN_UNSTABLE_V2_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_foreign_unstable_v2 The xdg_foreign_unstable_v2 protocol
* Protocol for exporting xdg surface handles
*
* @section page_desc_xdg_foreign_unstable_v2 Description
*
* This protocol specifies a way for making it possible to reference a surface
* of a different client. With such a reference, a client can, by using the
* interfaces provided by this protocol, manipulate the relationship between
* its own surfaces and the surface of some other client. For example, stack
* some of its own surface above the other clients surface.
*
* In order for a client A to get a reference of a surface of client B, client
* B must first export its surface using xdg_exporter.export_toplevel. Upon
* doing this, client B will receive a handle (a unique string) that it may
* share with client A in some way (for example D-Bus). After client A has
* received the handle from client B, it may use xdg_importer.import_toplevel
* to create a reference to the surface client B just exported. See the
* corresponding requests for details.
*
* A possible use case for this is out-of-process dialogs. For example when a
* sandboxed client without file system access needs the user to select a file
* on the file system, given sandbox environment support, it can export its
* surface, passing the exported surface handle to an unsandboxed process that
* can show a file browser dialog and stack it above the sandboxed client's
* surface.
*
* 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_xdg_foreign_unstable_v2 Interfaces
* - @subpage page_iface_zxdg_exporter_v2 - interface for exporting surfaces
* - @subpage page_iface_zxdg_importer_v2 - interface for importing surfaces
* - @subpage page_iface_zxdg_exported_v2 - an exported surface handle
* - @subpage page_iface_zxdg_imported_v2 - an imported surface handle
* @section page_copyright_xdg_foreign_unstable_v2 Copyright
* <pre>
*
* Copyright © 2015-2016 Red Hat Inc.
*
* 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 zxdg_exported_v2;
struct zxdg_exporter_v2;
struct zxdg_imported_v2;
struct zxdg_importer_v2;
#ifndef ZXDG_EXPORTER_V2_INTERFACE
#define ZXDG_EXPORTER_V2_INTERFACE
/**
* @page page_iface_zxdg_exporter_v2 zxdg_exporter_v2
* @section page_iface_zxdg_exporter_v2_desc Description
*
* A global interface used for exporting surfaces that can later be imported
* using xdg_importer.
* @section page_iface_zxdg_exporter_v2_api API
* See @ref iface_zxdg_exporter_v2.
*/
/**
* @defgroup iface_zxdg_exporter_v2 The zxdg_exporter_v2 interface
*
* A global interface used for exporting surfaces that can later be imported
* using xdg_importer.
*/
extern const struct wl_interface zxdg_exporter_v2_interface;
#endif
#ifndef ZXDG_IMPORTER_V2_INTERFACE
#define ZXDG_IMPORTER_V2_INTERFACE
/**
* @page page_iface_zxdg_importer_v2 zxdg_importer_v2
* @section page_iface_zxdg_importer_v2_desc Description
*
* A global interface used for importing surfaces exported by xdg_exporter.
* With this interface, a client can create a reference to a surface of
* another client.
* @section page_iface_zxdg_importer_v2_api API
* See @ref iface_zxdg_importer_v2.
*/
/**
* @defgroup iface_zxdg_importer_v2 The zxdg_importer_v2 interface
*
* A global interface used for importing surfaces exported by xdg_exporter.
* With this interface, a client can create a reference to a surface of
* another client.
*/
extern const struct wl_interface zxdg_importer_v2_interface;
#endif
#ifndef ZXDG_EXPORTED_V2_INTERFACE
#define ZXDG_EXPORTED_V2_INTERFACE
/**
* @page page_iface_zxdg_exported_v2 zxdg_exported_v2
* @section page_iface_zxdg_exported_v2_desc Description
*
* An xdg_exported object represents an exported reference to a surface. The
* exported surface may be referenced as long as the xdg_exported object not
* destroyed. Destroying the xdg_exported invalidates any relationship the
* importer may have established using xdg_imported.
* @section page_iface_zxdg_exported_v2_api API
* See @ref iface_zxdg_exported_v2.
*/
/**
* @defgroup iface_zxdg_exported_v2 The zxdg_exported_v2 interface
*
* An xdg_exported object represents an exported reference to a surface. The
* exported surface may be referenced as long as the xdg_exported object not
* destroyed. Destroying the xdg_exported invalidates any relationship the
* importer may have established using xdg_imported.
*/
extern const struct wl_interface zxdg_exported_v2_interface;
#endif
#ifndef ZXDG_IMPORTED_V2_INTERFACE
#define ZXDG_IMPORTED_V2_INTERFACE
/**
* @page page_iface_zxdg_imported_v2 zxdg_imported_v2
* @section page_iface_zxdg_imported_v2_desc Description
*
* An xdg_imported object represents an imported reference to surface exported
* by some client. A client can use this interface to manipulate
* relationships between its own surfaces and the imported surface.
* @section page_iface_zxdg_imported_v2_api API
* See @ref iface_zxdg_imported_v2.
*/
/**
* @defgroup iface_zxdg_imported_v2 The zxdg_imported_v2 interface
*
* An xdg_imported object represents an imported reference to surface exported
* by some client. A client can use this interface to manipulate
* relationships between its own surfaces and the imported surface.
*/
extern const struct wl_interface zxdg_imported_v2_interface;
#endif
#ifndef ZXDG_EXPORTER_V2_ERROR_ENUM
#define ZXDG_EXPORTER_V2_ERROR_ENUM
/**
* @ingroup iface_zxdg_exporter_v2
* error values
*
* These errors can be emitted in response to invalid xdg_exporter
* requests.
*/
enum zxdg_exporter_v2_error {
/**
* surface is not an xdg_toplevel
*/
ZXDG_EXPORTER_V2_ERROR_INVALID_SURFACE = 0,
};
#endif /* ZXDG_EXPORTER_V2_ERROR_ENUM */
#define ZXDG_EXPORTER_V2_DESTROY 0
#define ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL 1
/**
* @ingroup iface_zxdg_exporter_v2
*/
#define ZXDG_EXPORTER_V2_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_exporter_v2
*/
#define ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL_SINCE_VERSION 1
/** @ingroup iface_zxdg_exporter_v2 */
static inline void
zxdg_exporter_v2_set_user_data(struct zxdg_exporter_v2 *zxdg_exporter_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_exporter_v2, user_data);
}
/** @ingroup iface_zxdg_exporter_v2 */
static inline void *
zxdg_exporter_v2_get_user_data(struct zxdg_exporter_v2 *zxdg_exporter_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_exporter_v2);
}
static inline uint32_t
zxdg_exporter_v2_get_version(struct zxdg_exporter_v2 *zxdg_exporter_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2);
}
/**
* @ingroup iface_zxdg_exporter_v2
*
* Notify the compositor that the xdg_exporter object will no longer be
* used.
*/
static inline void
zxdg_exporter_v2_destroy(struct zxdg_exporter_v2 *zxdg_exporter_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exporter_v2,
ZXDG_EXPORTER_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_exporter_v2
*
* The export_toplevel request exports the passed surface so that it can later be
* imported via xdg_importer. When called, a new xdg_exported object will
* be created and xdg_exported.handle will be sent immediately. See the
* corresponding interface and event for details.
*
* A surface may be exported multiple times, and each exported handle may
* be used to create an xdg_imported multiple times. Only xdg_toplevel
* equivalent surfaces may be exported, otherwise an invalid_surface
* protocol error is sent.
*/
static inline struct zxdg_exported_v2 *
zxdg_exporter_v2_export_toplevel(struct zxdg_exporter_v2 *zxdg_exporter_v2, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exporter_v2,
ZXDG_EXPORTER_V2_EXPORT_TOPLEVEL, &zxdg_exported_v2_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_exporter_v2), 0, NULL, surface);
return (struct zxdg_exported_v2 *) id;
}
#define ZXDG_IMPORTER_V2_DESTROY 0
#define ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL 1
/**
* @ingroup iface_zxdg_importer_v2
*/
#define ZXDG_IMPORTER_V2_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_importer_v2
*/
#define ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL_SINCE_VERSION 1
/** @ingroup iface_zxdg_importer_v2 */
static inline void
zxdg_importer_v2_set_user_data(struct zxdg_importer_v2 *zxdg_importer_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_importer_v2, user_data);
}
/** @ingroup iface_zxdg_importer_v2 */
static inline void *
zxdg_importer_v2_get_user_data(struct zxdg_importer_v2 *zxdg_importer_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_importer_v2);
}
static inline uint32_t
zxdg_importer_v2_get_version(struct zxdg_importer_v2 *zxdg_importer_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2);
}
/**
* @ingroup iface_zxdg_importer_v2
*
* Notify the compositor that the xdg_importer object will no longer be
* used.
*/
static inline void
zxdg_importer_v2_destroy(struct zxdg_importer_v2 *zxdg_importer_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_importer_v2,
ZXDG_IMPORTER_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_importer_v2
*
* The import_toplevel request imports a surface from any client given a handle
* retrieved by exporting said surface using xdg_exporter.export_toplevel.
* When called, a new xdg_imported object will be created. This new object
* represents the imported surface, and the importing client can
* manipulate its relationship using it. See xdg_imported for details.
*/
static inline struct zxdg_imported_v2 *
zxdg_importer_v2_import_toplevel(struct zxdg_importer_v2 *zxdg_importer_v2, const char *handle)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_importer_v2,
ZXDG_IMPORTER_V2_IMPORT_TOPLEVEL, &zxdg_imported_v2_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_importer_v2), 0, NULL, handle);
return (struct zxdg_imported_v2 *) id;
}
/**
* @ingroup iface_zxdg_exported_v2
* @struct zxdg_exported_v2_listener
*/
struct zxdg_exported_v2_listener {
/**
* the exported surface handle
*
* The handle event contains the unique handle of this exported
* surface reference. It may be shared with any client, which then
* can use it to import the surface by calling
* xdg_importer.import_toplevel. A handle may be used to import the
* surface multiple times.
* @param handle the exported surface handle
*/
void (*handle)(void *data,
struct zxdg_exported_v2 *zxdg_exported_v2,
const char *handle);
};
/**
* @ingroup iface_zxdg_exported_v2
*/
static inline int
zxdg_exported_v2_add_listener(struct zxdg_exported_v2 *zxdg_exported_v2,
const struct zxdg_exported_v2_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zxdg_exported_v2,
(void (**)(void)) listener, data);
}
#define ZXDG_EXPORTED_V2_DESTROY 0
/**
* @ingroup iface_zxdg_exported_v2
*/
#define ZXDG_EXPORTED_V2_HANDLE_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_exported_v2
*/
#define ZXDG_EXPORTED_V2_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zxdg_exported_v2 */
static inline void
zxdg_exported_v2_set_user_data(struct zxdg_exported_v2 *zxdg_exported_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_exported_v2, user_data);
}
/** @ingroup iface_zxdg_exported_v2 */
static inline void *
zxdg_exported_v2_get_user_data(struct zxdg_exported_v2 *zxdg_exported_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_exported_v2);
}
static inline uint32_t
zxdg_exported_v2_get_version(struct zxdg_exported_v2 *zxdg_exported_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_exported_v2);
}
/**
* @ingroup iface_zxdg_exported_v2
*
* Revoke the previously exported surface. This invalidates any
* relationship the importer may have set up using the xdg_imported created
* given the handle sent via xdg_exported.handle.
*/
static inline void
zxdg_exported_v2_destroy(struct zxdg_exported_v2 *zxdg_exported_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_exported_v2,
ZXDG_EXPORTED_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_exported_v2), WL_MARSHAL_FLAG_DESTROY);
}
#ifndef ZXDG_IMPORTED_V2_ERROR_ENUM
#define ZXDG_IMPORTED_V2_ERROR_ENUM
/**
* @ingroup iface_zxdg_imported_v2
* error values
*
* These errors can be emitted in response to invalid xdg_imported
* requests.
*/
enum zxdg_imported_v2_error {
/**
* surface is not an xdg_toplevel
*/
ZXDG_IMPORTED_V2_ERROR_INVALID_SURFACE = 0,
};
#endif /* ZXDG_IMPORTED_V2_ERROR_ENUM */
/**
* @ingroup iface_zxdg_imported_v2
* @struct zxdg_imported_v2_listener
*/
struct zxdg_imported_v2_listener {
/**
* the imported surface handle has been destroyed
*
* The imported surface handle has been destroyed and any
* relationship set up has been invalidated. This may happen for
* various reasons, for example if the exported surface or the
* exported surface handle has been destroyed, if the handle used
* for importing was invalid.
*/
void (*destroyed)(void *data,
struct zxdg_imported_v2 *zxdg_imported_v2);
};
/**
* @ingroup iface_zxdg_imported_v2
*/
static inline int
zxdg_imported_v2_add_listener(struct zxdg_imported_v2 *zxdg_imported_v2,
const struct zxdg_imported_v2_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zxdg_imported_v2,
(void (**)(void)) listener, data);
}
#define ZXDG_IMPORTED_V2_DESTROY 0
#define ZXDG_IMPORTED_V2_SET_PARENT_OF 1
/**
* @ingroup iface_zxdg_imported_v2
*/
#define ZXDG_IMPORTED_V2_DESTROYED_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_imported_v2
*/
#define ZXDG_IMPORTED_V2_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_imported_v2
*/
#define ZXDG_IMPORTED_V2_SET_PARENT_OF_SINCE_VERSION 1
/** @ingroup iface_zxdg_imported_v2 */
static inline void
zxdg_imported_v2_set_user_data(struct zxdg_imported_v2 *zxdg_imported_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_imported_v2, user_data);
}
/** @ingroup iface_zxdg_imported_v2 */
static inline void *
zxdg_imported_v2_get_user_data(struct zxdg_imported_v2 *zxdg_imported_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_imported_v2);
}
static inline uint32_t
zxdg_imported_v2_get_version(struct zxdg_imported_v2 *zxdg_imported_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2);
}
/**
* @ingroup iface_zxdg_imported_v2
*
* Notify the compositor that it will no longer use the xdg_imported
* object. Any relationship that may have been set up will at this point
* be invalidated.
*/
static inline void
zxdg_imported_v2_destroy(struct zxdg_imported_v2 *zxdg_imported_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_imported_v2,
ZXDG_IMPORTED_V2_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_imported_v2
*
* Set the imported surface as the parent of some surface of the client.
* The passed surface must be an xdg_toplevel equivalent, otherwise an
* invalid_surface protocol error is sent. Calling this function sets up
* a surface to surface relation with the same stacking and positioning
* semantics as xdg_toplevel.set_parent.
*/
static inline void
zxdg_imported_v2_set_parent_of(struct zxdg_imported_v2 *zxdg_imported_v2, struct wl_surface *surface)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_imported_v2,
ZXDG_IMPORTED_V2_SET_PARENT_OF, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_imported_v2), 0, surface);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,103 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2015-2016 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface zxdg_exported_v2_interface;
extern const struct wl_interface zxdg_imported_v2_interface;
static const struct wl_interface *xdg_foreign_unstable_v2_types[] = {
NULL,
&zxdg_exported_v2_interface,
&wl_surface_interface,
&zxdg_imported_v2_interface,
NULL,
&wl_surface_interface,
};
static const struct wl_message zxdg_exporter_v2_requests[] = {
{ "destroy", "", xdg_foreign_unstable_v2_types + 0 },
{ "export_toplevel", "no", xdg_foreign_unstable_v2_types + 1 },
};
WL_PRIVATE const struct wl_interface zxdg_exporter_v2_interface = {
"zxdg_exporter_v2", 1,
2, zxdg_exporter_v2_requests,
0, NULL,
};
static const struct wl_message zxdg_importer_v2_requests[] = {
{ "destroy", "", xdg_foreign_unstable_v2_types + 0 },
{ "import_toplevel", "ns", xdg_foreign_unstable_v2_types + 3 },
};
WL_PRIVATE const struct wl_interface zxdg_importer_v2_interface = {
"zxdg_importer_v2", 1,
2, zxdg_importer_v2_requests,
0, NULL,
};
static const struct wl_message zxdg_exported_v2_requests[] = {
{ "destroy", "", xdg_foreign_unstable_v2_types + 0 },
};
static const struct wl_message zxdg_exported_v2_events[] = {
{ "handle", "s", xdg_foreign_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zxdg_exported_v2_interface = {
"zxdg_exported_v2", 1,
1, zxdg_exported_v2_requests,
1, zxdg_exported_v2_events,
};
static const struct wl_message zxdg_imported_v2_requests[] = {
{ "destroy", "", xdg_foreign_unstable_v2_types + 0 },
{ "set_parent_of", "o", xdg_foreign_unstable_v2_types + 5 },
};
static const struct wl_message zxdg_imported_v2_events[] = {
{ "destroyed", "", xdg_foreign_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zxdg_imported_v2_interface = {
"zxdg_imported_v2", 1,
2, zxdg_imported_v2_requests,
1, zxdg_imported_v2_events,
};
@@ -0,0 +1,411 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define XDG_OUTPUT_UNSTABLE_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_output_unstable_v1 The xdg_output_unstable_v1 protocol
* Protocol to describe output regions
*
* @section page_desc_xdg_output_unstable_v1 Description
*
* This protocol aims at describing outputs in a way which is more in line
* with the concept of an output on desktop oriented systems.
*
* Some information are more specific to the concept of an output for
* a desktop oriented system and may not make sense in other applications,
* such as IVI systems for example.
*
* Typically, the global compositor space on a desktop system is made of
* a contiguous or overlapping set of rectangular regions.
*
* Some of the information provided in this protocol might be identical
* to their counterparts already available from wl_output, in which case
* the information provided by this protocol should be preferred to their
* equivalent in wl_output. The goal is to move the desktop specific
* concepts (such as output location within the global compositor space,
* the connector name and types, etc.) out of the core wl_output protocol.
*
* 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_xdg_output_unstable_v1 Interfaces
* - @subpage page_iface_zxdg_output_manager_v1 - manage xdg_output objects
* - @subpage page_iface_zxdg_output_v1 - compositor logical output region
* @section page_copyright_xdg_output_unstable_v1 Copyright
* <pre>
*
* Copyright © 2017 Red Hat Inc.
*
* 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 zxdg_output_manager_v1;
struct zxdg_output_v1;
#ifndef ZXDG_OUTPUT_MANAGER_V1_INTERFACE
#define ZXDG_OUTPUT_MANAGER_V1_INTERFACE
/**
* @page page_iface_zxdg_output_manager_v1 zxdg_output_manager_v1
* @section page_iface_zxdg_output_manager_v1_desc Description
*
* A global factory interface for xdg_output objects.
* @section page_iface_zxdg_output_manager_v1_api API
* See @ref iface_zxdg_output_manager_v1.
*/
/**
* @defgroup iface_zxdg_output_manager_v1 The zxdg_output_manager_v1 interface
*
* A global factory interface for xdg_output objects.
*/
extern const struct wl_interface zxdg_output_manager_v1_interface;
#endif
#ifndef ZXDG_OUTPUT_V1_INTERFACE
#define ZXDG_OUTPUT_V1_INTERFACE
/**
* @page page_iface_zxdg_output_v1 zxdg_output_v1
* @section page_iface_zxdg_output_v1_desc Description
*
* An xdg_output describes part of the compositor geometry.
*
* This typically corresponds to a monitor that displays part of the
* compositor space.
*
* For objects version 3 onwards, after all xdg_output properties have been
* sent (when the object is created and when properties are updated), a
* wl_output.done event is sent. This allows changes to the output
* properties to be seen as atomic, even if they happen via multiple events.
* @section page_iface_zxdg_output_v1_api API
* See @ref iface_zxdg_output_v1.
*/
/**
* @defgroup iface_zxdg_output_v1 The zxdg_output_v1 interface
*
* An xdg_output describes part of the compositor geometry.
*
* This typically corresponds to a monitor that displays part of the
* compositor space.
*
* For objects version 3 onwards, after all xdg_output properties have been
* sent (when the object is created and when properties are updated), a
* wl_output.done event is sent. This allows changes to the output
* properties to be seen as atomic, even if they happen via multiple events.
*/
extern const struct wl_interface zxdg_output_v1_interface;
#endif
#define ZXDG_OUTPUT_MANAGER_V1_DESTROY 0
#define ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT 1
/**
* @ingroup iface_zxdg_output_manager_v1
*/
#define ZXDG_OUTPUT_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_output_manager_v1
*/
#define ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT_SINCE_VERSION 1
/** @ingroup iface_zxdg_output_manager_v1 */
static inline void
zxdg_output_manager_v1_set_user_data(struct zxdg_output_manager_v1 *zxdg_output_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_output_manager_v1, user_data);
}
/** @ingroup iface_zxdg_output_manager_v1 */
static inline void *
zxdg_output_manager_v1_get_user_data(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_output_manager_v1);
}
static inline uint32_t
zxdg_output_manager_v1_get_version(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1);
}
/**
* @ingroup iface_zxdg_output_manager_v1
*
* Using this request a client can tell the server that it is not
* going to use the xdg_output_manager object anymore.
*
* Any objects already created through this instance are not affected.
*/
static inline void
zxdg_output_manager_v1_destroy(struct zxdg_output_manager_v1 *zxdg_output_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_manager_v1,
ZXDG_OUTPUT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zxdg_output_manager_v1
*
* This creates a new xdg_output object for the given wl_output.
*/
static inline struct zxdg_output_v1 *
zxdg_output_manager_v1_get_xdg_output(struct zxdg_output_manager_v1 *zxdg_output_manager_v1, struct wl_output *output)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_manager_v1,
ZXDG_OUTPUT_MANAGER_V1_GET_XDG_OUTPUT, &zxdg_output_v1_interface, wl_proxy_get_version((struct wl_proxy *) zxdg_output_manager_v1), 0, NULL, output);
return (struct zxdg_output_v1 *) id;
}
/**
* @ingroup iface_zxdg_output_v1
* @struct zxdg_output_v1_listener
*/
struct zxdg_output_v1_listener {
/**
* position of the output within the global compositor space
*
* The position event describes the location of the wl_output
* within the global compositor space.
*
* The logical_position event is sent after creating an xdg_output
* (see xdg_output_manager.get_xdg_output) and whenever the
* location of the output changes within the global compositor
* space.
* @param x x position within the global compositor space
* @param y y position within the global compositor space
*/
void (*logical_position)(void *data,
struct zxdg_output_v1 *zxdg_output_v1,
int32_t x,
int32_t y);
/**
* size of the output in the global compositor space
*
* The logical_size event describes the size of the output in the
* global compositor space.
*
* For example, a surface without any buffer scale, transformation
* nor rotation set, with the size matching the logical_size will
* have the same size as the corresponding output when displayed.
*
* Most regular Wayland clients should not pay attention to the
* logical size and would rather rely on xdg_shell interfaces.
*
* Some clients such as Xwayland, however, need this to configure
* their surfaces in the global compositor space as the compositor
* may apply a different scale from what is advertised by the
* output scaling property (to achieve fractional scaling, for
* example).
*
* For example, for a wl_output mode 3840×2160 and a scale factor
* 2:
*
* - A compositor not scaling the surface buffers will advertise a
* logical size of 3840×2160,
*
* - A compositor automatically scaling the surface buffers will
* advertise a logical size of 1920×1080,
*
* - A compositor using a fractional scale of 1.5 will advertise a
* logical size of 2560×1440.
*
* For example, for a wl_output mode 1920×1080 and a 90 degree
* rotation, the compositor will advertise a logical size of
* 1080x1920.
*
* The logical_size event is sent after creating an xdg_output (see
* xdg_output_manager.get_xdg_output) and whenever the logical size
* of the output changes, either as a result of a change in the
* applied scale or because of a change in the corresponding output
* mode(see wl_output.mode) or transform (see wl_output.transform).
* @param width width in global compositor space
* @param height height in global compositor space
*/
void (*logical_size)(void *data,
struct zxdg_output_v1 *zxdg_output_v1,
int32_t width,
int32_t height);
/**
* all information about the output have been sent
*
* This event is sent after all other properties of an xdg_output
* have been sent.
*
* This allows changes to the xdg_output properties to be seen as
* atomic, even if they happen via multiple events.
*
* For objects version 3 onwards, this event is deprecated.
* Compositors are not required to send it anymore and must send
* wl_output.done instead.
*/
void (*done)(void *data,
struct zxdg_output_v1 *zxdg_output_v1);
/**
* name of this output
*
* Many compositors will assign names to their outputs, show them
* to the user, allow them to be configured by name, etc. The
* client may wish to know this name as well to offer the user
* similar behaviors.
*
* The naming convention is compositor defined, but limited to
* alphanumeric characters and dashes (-). Each name is unique
* among all wl_output globals, but if a wl_output global is
* destroyed the same name may be reused later. The names will also
* remain consistent across sessions with the same hardware and
* software configuration.
*
* Examples of names include 'HDMI-A-1', 'WL-1', 'X11-1', etc.
* However, do not assume that the name is a reflection of an
* underlying DRM connector, X11 connection, etc.
*
* The name event is sent after creating an xdg_output (see
* xdg_output_manager.get_xdg_output). This event is only sent once
* per xdg_output, and the name does not change over the lifetime
* of the wl_output global.
* @param name output name
* @since 2
*/
void (*name)(void *data,
struct zxdg_output_v1 *zxdg_output_v1,
const char *name);
/**
* human-readable description of this output
*
* Many compositors can produce human-readable descriptions of
* their outputs. The client may wish to know this description as
* well, to communicate the user for various purposes.
*
* The description is a UTF-8 string with no convention defined for
* its contents. Examples might include 'Foocorp 11" Display' or
* 'Virtual X11 output via :1'.
*
* The description event is sent after creating an xdg_output (see
* xdg_output_manager.get_xdg_output) and whenever the description
* changes. The description is optional, and may not be sent at
* all.
*
* For objects of version 2 and lower, this event is only sent once
* per xdg_output, and the description does not change over the
* lifetime of the wl_output global.
* @param description output description
* @since 2
*/
void (*description)(void *data,
struct zxdg_output_v1 *zxdg_output_v1,
const char *description);
};
/**
* @ingroup iface_zxdg_output_v1
*/
static inline int
zxdg_output_v1_add_listener(struct zxdg_output_v1 *zxdg_output_v1,
const struct zxdg_output_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zxdg_output_v1,
(void (**)(void)) listener, data);
}
#define ZXDG_OUTPUT_V1_DESTROY 0
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_LOGICAL_POSITION_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_LOGICAL_SIZE_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_DONE_SINCE_VERSION 1
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_NAME_SINCE_VERSION 2
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_DESCRIPTION_SINCE_VERSION 2
/**
* @ingroup iface_zxdg_output_v1
*/
#define ZXDG_OUTPUT_V1_DESTROY_SINCE_VERSION 1
/** @ingroup iface_zxdg_output_v1 */
static inline void
zxdg_output_v1_set_user_data(struct zxdg_output_v1 *zxdg_output_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zxdg_output_v1, user_data);
}
/** @ingroup iface_zxdg_output_v1 */
static inline void *
zxdg_output_v1_get_user_data(struct zxdg_output_v1 *zxdg_output_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) zxdg_output_v1);
}
static inline uint32_t
zxdg_output_v1_get_version(struct zxdg_output_v1 *zxdg_output_v1)
{
return wl_proxy_get_version((struct wl_proxy *) zxdg_output_v1);
}
/**
* @ingroup iface_zxdg_output_v1
*
* Using this request a client can tell the server that it is not
* going to use the xdg_output object anymore.
*/
static inline void
zxdg_output_v1_destroy(struct zxdg_output_v1 *zxdg_output_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) zxdg_output_v1,
ZXDG_OUTPUT_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zxdg_output_v1), WL_MARSHAL_FLAG_DESTROY);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,78 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2017 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface zxdg_output_v1_interface;
static const struct wl_interface *xdg_output_unstable_v1_types[] = {
NULL,
NULL,
&zxdg_output_v1_interface,
&wl_output_interface,
};
static const struct wl_message zxdg_output_manager_v1_requests[] = {
{ "destroy", "", xdg_output_unstable_v1_types + 0 },
{ "get_xdg_output", "no", xdg_output_unstable_v1_types + 2 },
};
WL_PRIVATE const struct wl_interface zxdg_output_manager_v1_interface = {
"zxdg_output_manager_v1", 3,
2, zxdg_output_manager_v1_requests,
0, NULL,
};
static const struct wl_message zxdg_output_v1_requests[] = {
{ "destroy", "", xdg_output_unstable_v1_types + 0 },
};
static const struct wl_message zxdg_output_v1_events[] = {
{ "logical_position", "ii", xdg_output_unstable_v1_types + 0 },
{ "logical_size", "ii", xdg_output_unstable_v1_types + 0 },
{ "done", "", xdg_output_unstable_v1_types + 0 },
{ "name", "2s", xdg_output_unstable_v1_types + 0 },
{ "description", "2s", xdg_output_unstable_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface zxdg_output_v1_interface = {
"zxdg_output_v1", 3,
1, zxdg_output_v1_requests,
5, zxdg_output_v1_events,
};
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,183 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2008-2013 Kristian Høgsberg
* Copyright © 2013 Rafael Antognolli
* Copyright © 2013 Jasper St. Pierre
* Copyright © 2010-2013 Intel Corporation
* Copyright © 2015-2017 Samsung Electronics Co., Ltd
* Copyright © 2015-2017 Red Hat Inc.
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface wl_seat_interface;
extern const struct wl_interface wl_surface_interface;
extern const struct wl_interface xdg_popup_interface;
extern const struct wl_interface xdg_positioner_interface;
extern const struct wl_interface xdg_surface_interface;
extern const struct wl_interface xdg_toplevel_interface;
static const struct wl_interface *xdg_shell_types[] = {
NULL,
NULL,
NULL,
NULL,
&xdg_positioner_interface,
&xdg_surface_interface,
&wl_surface_interface,
&xdg_toplevel_interface,
&xdg_popup_interface,
&xdg_surface_interface,
&xdg_positioner_interface,
&xdg_toplevel_interface,
&wl_seat_interface,
NULL,
NULL,
NULL,
&wl_seat_interface,
NULL,
&wl_seat_interface,
NULL,
NULL,
&wl_output_interface,
&wl_seat_interface,
NULL,
&xdg_positioner_interface,
NULL,
};
static const struct wl_message xdg_wm_base_requests[] = {
{ "destroy", "", xdg_shell_types + 0 },
{ "create_positioner", "n", xdg_shell_types + 4 },
{ "get_xdg_surface", "no", xdg_shell_types + 5 },
{ "pong", "u", xdg_shell_types + 0 },
};
static const struct wl_message xdg_wm_base_events[] = {
{ "ping", "u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
"xdg_wm_base", 7,
4, xdg_wm_base_requests,
1, xdg_wm_base_events,
};
static const struct wl_message xdg_positioner_requests[] = {
{ "destroy", "", xdg_shell_types + 0 },
{ "set_size", "ii", xdg_shell_types + 0 },
{ "set_anchor_rect", "iiii", xdg_shell_types + 0 },
{ "set_anchor", "u", xdg_shell_types + 0 },
{ "set_gravity", "u", xdg_shell_types + 0 },
{ "set_constraint_adjustment", "u", xdg_shell_types + 0 },
{ "set_offset", "ii", xdg_shell_types + 0 },
{ "set_reactive", "3", xdg_shell_types + 0 },
{ "set_parent_size", "3ii", xdg_shell_types + 0 },
{ "set_parent_configure", "3u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
"xdg_positioner", 7,
10, xdg_positioner_requests,
0, NULL,
};
static const struct wl_message xdg_surface_requests[] = {
{ "destroy", "", xdg_shell_types + 0 },
{ "get_toplevel", "n", xdg_shell_types + 7 },
{ "get_popup", "n?oo", xdg_shell_types + 8 },
{ "set_window_geometry", "iiii", xdg_shell_types + 0 },
{ "ack_configure", "u", xdg_shell_types + 0 },
};
static const struct wl_message xdg_surface_events[] = {
{ "configure", "u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_surface_interface = {
"xdg_surface", 7,
5, xdg_surface_requests,
1, xdg_surface_events,
};
static const struct wl_message xdg_toplevel_requests[] = {
{ "destroy", "", xdg_shell_types + 0 },
{ "set_parent", "?o", xdg_shell_types + 11 },
{ "set_title", "s", xdg_shell_types + 0 },
{ "set_app_id", "s", xdg_shell_types + 0 },
{ "show_window_menu", "ouii", xdg_shell_types + 12 },
{ "move", "ou", xdg_shell_types + 16 },
{ "resize", "ouu", xdg_shell_types + 18 },
{ "set_max_size", "ii", xdg_shell_types + 0 },
{ "set_min_size", "ii", xdg_shell_types + 0 },
{ "set_maximized", "", xdg_shell_types + 0 },
{ "unset_maximized", "", xdg_shell_types + 0 },
{ "set_fullscreen", "?o", xdg_shell_types + 21 },
{ "unset_fullscreen", "", xdg_shell_types + 0 },
{ "set_minimized", "", xdg_shell_types + 0 },
};
static const struct wl_message xdg_toplevel_events[] = {
{ "configure", "iia", xdg_shell_types + 0 },
{ "close", "", xdg_shell_types + 0 },
{ "configure_bounds", "4ii", xdg_shell_types + 0 },
{ "wm_capabilities", "5a", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
"xdg_toplevel", 7,
14, xdg_toplevel_requests,
4, xdg_toplevel_events,
};
static const struct wl_message xdg_popup_requests[] = {
{ "destroy", "", xdg_shell_types + 0 },
{ "grab", "ou", xdg_shell_types + 22 },
{ "reposition", "3ou", xdg_shell_types + 24 },
};
static const struct wl_message xdg_popup_events[] = {
{ "configure", "iiii", xdg_shell_types + 0 },
{ "popup_done", "", xdg_shell_types + 0 },
{ "repositioned", "3u", xdg_shell_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_popup_interface = {
"xdg_popup", 7,
3, xdg_popup_requests,
3, xdg_popup_events,
};
@@ -0,0 +1,408 @@
/* Generated by wayland-scanner 1.20.0 */
#ifndef XDG_TOPLEVEL_ICON_V1_CLIENT_PROTOCOL_H
#define XDG_TOPLEVEL_ICON_V1_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 protocol
* protocol to assign icons to toplevels
*
* @section page_desc_xdg_toplevel_icon_v1 Description
*
* This protocol allows clients to set icons for their toplevel surfaces
* either via the XDG icon stock (using an icon name), or from pixel data.
*
* A toplevel icon represents the individual toplevel (unlike the application
* or launcher icon, which represents the application as a whole), and may be
* shown in window switchers, window overviews and taskbars that list
* individual windows.
*
* This document adheres to RFC 2119 when using words like "must",
* "should", "may", etc.
*
* Warning! The protocol described in this file is currently in the testing
* phase. Backward compatible changes may be added together with the
* corresponding interface version bump. Backward incompatible changes can
* only be done by creating a new major version of the extension.
*
* @section page_ifaces_xdg_toplevel_icon_v1 Interfaces
* - @subpage page_iface_xdg_toplevel_icon_manager_v1 - interface to manage toplevel icons
* - @subpage page_iface_xdg_toplevel_icon_v1 - a toplevel window icon
* @section page_copyright_xdg_toplevel_icon_v1 Copyright
* <pre>
*
* Copyright © 2023-2024 Matthias Klumpp
* Copyright © 2024 David Edmundson
*
* 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 xdg_toplevel;
struct xdg_toplevel_icon_manager_v1;
struct xdg_toplevel_icon_v1;
#ifndef XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE
#define XDG_TOPLEVEL_ICON_MANAGER_V1_INTERFACE
/**
* @page page_iface_xdg_toplevel_icon_manager_v1 xdg_toplevel_icon_manager_v1
* @section page_iface_xdg_toplevel_icon_manager_v1_desc Description
*
* This interface allows clients to create toplevel window icons and set
* them on toplevel windows to be displayed to the user.
* @section page_iface_xdg_toplevel_icon_manager_v1_api API
* See @ref iface_xdg_toplevel_icon_manager_v1.
*/
/**
* @defgroup iface_xdg_toplevel_icon_manager_v1 The xdg_toplevel_icon_manager_v1 interface
*
* This interface allows clients to create toplevel window icons and set
* them on toplevel windows to be displayed to the user.
*/
extern const struct wl_interface xdg_toplevel_icon_manager_v1_interface;
#endif
#ifndef XDG_TOPLEVEL_ICON_V1_INTERFACE
#define XDG_TOPLEVEL_ICON_V1_INTERFACE
/**
* @page page_iface_xdg_toplevel_icon_v1 xdg_toplevel_icon_v1
* @section page_iface_xdg_toplevel_icon_v1_desc Description
*
* This interface defines a toplevel icon.
* An icon can have a name, and multiple buffers.
* In order to be applied, the icon must have either a name, or at least
* one buffer assigned. Applying an empty icon (with no buffer or name) to
* a toplevel should reset its icon to the default icon.
*
* It is up to compositor policy whether to prefer using a buffer or loading
* an icon via its name. See 'set_name' and 'add_buffer' for details.
* @section page_iface_xdg_toplevel_icon_v1_api API
* See @ref iface_xdg_toplevel_icon_v1.
*/
/**
* @defgroup iface_xdg_toplevel_icon_v1 The xdg_toplevel_icon_v1 interface
*
* This interface defines a toplevel icon.
* An icon can have a name, and multiple buffers.
* In order to be applied, the icon must have either a name, or at least
* one buffer assigned. Applying an empty icon (with no buffer or name) to
* a toplevel should reset its icon to the default icon.
*
* It is up to compositor policy whether to prefer using a buffer or loading
* an icon via its name. See 'set_name' and 'add_buffer' for details.
*/
extern const struct wl_interface xdg_toplevel_icon_v1_interface;
#endif
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
* @struct xdg_toplevel_icon_manager_v1_listener
*/
struct xdg_toplevel_icon_manager_v1_listener {
/**
* describes a supported & preferred icon size
*
* This event indicates an icon size the compositor prefers to be
* available if the client has scalable icons and can render to any
* size.
*
* When the 'xdg_toplevel_icon_manager_v1' object is created, the
* compositor may send one or more 'icon_size' events to describe
* the list of preferred icon sizes. If the compositor has no size
* preference, it may not send any 'icon_size' event, and it is up
* to the client to decide a suitable icon size.
*
* A sequence of 'icon_size' events must be finished with a 'done'
* event. If the compositor has no size preferences, it must still
* send the 'done' event, without any preceding 'icon_size' events.
* @param size the edge size of the square icon in surface-local coordinates, e.g. 64
*/
void (*icon_size)(void *data,
struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1,
int32_t size);
/**
* all information has been sent
*
* This event is sent after all 'icon_size' events have been
* sent.
*/
void (*done)(void *data,
struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1);
};
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
static inline int
xdg_toplevel_icon_manager_v1_add_listener(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1,
const struct xdg_toplevel_icon_manager_v1_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) xdg_toplevel_icon_manager_v1,
(void (**)(void)) listener, data);
}
#define XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY 0
#define XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON 1
#define XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON 2
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
#define XDG_TOPLEVEL_ICON_MANAGER_V1_ICON_SIZE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
#define XDG_TOPLEVEL_ICON_MANAGER_V1_DONE_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
#define XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
#define XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*/
#define XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON_SINCE_VERSION 1
/** @ingroup iface_xdg_toplevel_icon_manager_v1 */
static inline void
xdg_toplevel_icon_manager_v1_set_user_data(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_icon_manager_v1, user_data);
}
/** @ingroup iface_xdg_toplevel_icon_manager_v1 */
static inline void *
xdg_toplevel_icon_manager_v1_get_user_data(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_icon_manager_v1);
}
static inline uint32_t
xdg_toplevel_icon_manager_v1_get_version(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1);
}
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*
* Destroy the toplevel icon manager.
* This does not destroy objects created with the manager.
*/
static inline void
xdg_toplevel_icon_manager_v1_destroy(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1,
XDG_TOPLEVEL_ICON_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*
* Creates a new icon object. This icon can then be attached to a
* xdg_toplevel via the 'set_icon' request.
*/
static inline struct xdg_toplevel_icon_v1 *
xdg_toplevel_icon_manager_v1_create_icon(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1,
XDG_TOPLEVEL_ICON_MANAGER_V1_CREATE_ICON, &xdg_toplevel_icon_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), 0, NULL);
return (struct xdg_toplevel_icon_v1 *) id;
}
/**
* @ingroup iface_xdg_toplevel_icon_manager_v1
*
* This request assigns the icon 'icon' to 'toplevel', or clears the
* toplevel icon if 'icon' was null.
* This state is double-buffered and is applied on the next
* wl_surface.commit of the toplevel.
*
* After making this call, the xdg_toplevel_icon_v1 provided as 'icon'
* can be destroyed by the client without 'toplevel' losing its icon.
* The xdg_toplevel_icon_v1 is immutable from this point, and any
* future attempts to change it must raise the
* 'xdg_toplevel_icon_v1.immutable' protocol error.
*
* The compositor must set the toplevel icon from either the pixel data
* the icon provides, or by loading a stock icon using the icon name.
* See the description of 'xdg_toplevel_icon_v1' for details.
*
* If 'icon' is set to null, the icon of the respective toplevel is reset
* to its default icon (usually the icon of the application, derived from
* its desktop-entry file, or a placeholder icon).
* If this request is passed an icon with no pixel buffers or icon name
* assigned, the icon must be reset just like if 'icon' was null.
*/
static inline void
xdg_toplevel_icon_manager_v1_set_icon(struct xdg_toplevel_icon_manager_v1 *xdg_toplevel_icon_manager_v1, struct xdg_toplevel *toplevel, struct xdg_toplevel_icon_v1 *icon)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_manager_v1,
XDG_TOPLEVEL_ICON_MANAGER_V1_SET_ICON, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_manager_v1), 0, toplevel, icon);
}
#ifndef XDG_TOPLEVEL_ICON_V1_ERROR_ENUM
#define XDG_TOPLEVEL_ICON_V1_ERROR_ENUM
enum xdg_toplevel_icon_v1_error {
/**
* the provided buffer does not satisfy requirements
*/
XDG_TOPLEVEL_ICON_V1_ERROR_INVALID_BUFFER = 1,
/**
* the icon has already been assigned to a toplevel and must not be changed
*/
XDG_TOPLEVEL_ICON_V1_ERROR_IMMUTABLE = 2,
/**
* the provided buffer has been destroyed before the toplevel icon
*/
XDG_TOPLEVEL_ICON_V1_ERROR_NO_BUFFER = 3,
};
#endif /* XDG_TOPLEVEL_ICON_V1_ERROR_ENUM */
#define XDG_TOPLEVEL_ICON_V1_DESTROY 0
#define XDG_TOPLEVEL_ICON_V1_SET_NAME 1
#define XDG_TOPLEVEL_ICON_V1_ADD_BUFFER 2
/**
* @ingroup iface_xdg_toplevel_icon_v1
*/
#define XDG_TOPLEVEL_ICON_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_v1
*/
#define XDG_TOPLEVEL_ICON_V1_SET_NAME_SINCE_VERSION 1
/**
* @ingroup iface_xdg_toplevel_icon_v1
*/
#define XDG_TOPLEVEL_ICON_V1_ADD_BUFFER_SINCE_VERSION 1
/** @ingroup iface_xdg_toplevel_icon_v1 */
static inline void
xdg_toplevel_icon_v1_set_user_data(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_icon_v1, user_data);
}
/** @ingroup iface_xdg_toplevel_icon_v1 */
static inline void *
xdg_toplevel_icon_v1_get_user_data(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1)
{
return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_icon_v1);
}
static inline uint32_t
xdg_toplevel_icon_v1_get_version(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1)
{
return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1);
}
/**
* @ingroup iface_xdg_toplevel_icon_v1
*
* Destroys the 'xdg_toplevel_icon_v1' object.
* The icon must still remain set on every toplevel it was assigned to,
* until the toplevel icon is reset explicitly.
*/
static inline void
xdg_toplevel_icon_v1_destroy(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1,
XDG_TOPLEVEL_ICON_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_xdg_toplevel_icon_v1
*
* This request assigns an icon name to this icon.
* Any previously set name is overridden.
*
* The compositor must resolve 'icon_name' according to the lookup rules
* described in the XDG icon theme specification[1] using the
* environment's current icon theme.
*
* If the compositor does not support icon names or cannot resolve
* 'icon_name' according to the XDG icon theme specification it must
* fall back to using pixel buffer data instead.
*
* If this request is made after the icon has been assigned to a toplevel
* via 'set_icon', a 'immutable' error must be raised.
*
* [1]: https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html
*/
static inline void
xdg_toplevel_icon_v1_set_name(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, const char *icon_name)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1,
XDG_TOPLEVEL_ICON_V1_SET_NAME, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), 0, icon_name);
}
/**
* @ingroup iface_xdg_toplevel_icon_v1
*
* This request adds pixel data supplied as wl_buffer to the icon.
*
* The client should add pixel data for all icon sizes and scales that
* it can provide, or which are explicitly requested by the compositor
* via 'icon_size' events on xdg_toplevel_icon_manager_v1.
*
* The wl_buffer supplying pixel data as 'buffer' must be backed by wl_shm
* and must be a square (width and height being equal).
* If any of these buffer requirements are not fulfilled, a 'invalid_buffer'
* error must be raised.
*
* If this icon instance already has a buffer of the same size and scale
* from a previous 'add_buffer' request, data from the last request
* overrides the preexisting pixel data.
*
* The wl_buffer must be kept alive for as long as the xdg_toplevel_icon
* it is associated with is not destroyed, otherwise a 'no_buffer' error
* is raised. The buffer contents must not be modified after it was
* assigned to the icon.
*
* If this request is made after the icon has been assigned to a toplevel
* via 'set_icon', a 'immutable' error must be raised.
*/
static inline void
xdg_toplevel_icon_v1_add_buffer(struct xdg_toplevel_icon_v1 *xdg_toplevel_icon_v1, struct wl_buffer *buffer, int32_t scale)
{
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_icon_v1,
XDG_TOPLEVEL_ICON_V1_ADD_BUFFER, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_icon_v1), 0, buffer, scale);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,82 @@
/* Generated by wayland-scanner 1.20.0 */
/*
* Copyright © 2023-2024 Matthias Klumpp
* Copyright © 2024 David Edmundson
*
* 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.
*/
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_buffer_interface;
extern const struct wl_interface xdg_toplevel_interface;
extern const struct wl_interface xdg_toplevel_icon_v1_interface;
static const struct wl_interface *xdg_toplevel_icon_v1_types[] = {
NULL,
&xdg_toplevel_icon_v1_interface,
&xdg_toplevel_interface,
&xdg_toplevel_icon_v1_interface,
&wl_buffer_interface,
NULL,
};
static const struct wl_message xdg_toplevel_icon_manager_v1_requests[] = {
{ "destroy", "", xdg_toplevel_icon_v1_types + 0 },
{ "create_icon", "n", xdg_toplevel_icon_v1_types + 1 },
{ "set_icon", "o?o", xdg_toplevel_icon_v1_types + 2 },
};
static const struct wl_message xdg_toplevel_icon_manager_v1_events[] = {
{ "icon_size", "i", xdg_toplevel_icon_v1_types + 0 },
{ "done", "", xdg_toplevel_icon_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface xdg_toplevel_icon_manager_v1_interface = {
"xdg_toplevel_icon_manager_v1", 1,
3, xdg_toplevel_icon_manager_v1_requests,
2, xdg_toplevel_icon_manager_v1_events,
};
static const struct wl_message xdg_toplevel_icon_v1_requests[] = {
{ "destroy", "", xdg_toplevel_icon_v1_types + 0 },
{ "set_name", "s", xdg_toplevel_icon_v1_types + 0 },
{ "add_buffer", "oi", xdg_toplevel_icon_v1_types + 4 },
};
WL_PRIVATE const struct wl_interface xdg_toplevel_icon_v1_interface = {
"xdg_toplevel_icon_v1", 1,
3, xdg_toplevel_icon_v1_requests,
0, NULL,
};