/* Generated by wayland-scanner 1.23.0 */ #ifndef SURFACE_AUGMENTER_SERVER_PROTOCOL_H #define SURFACE_AUGMENTER_SERVER_PROTOCOL_H #include <stdint.h> #include <stddef.h> #include "wayland-server.h" #ifdef __cplusplus extern "C" { #endif struct wl_client; struct wl_resource; /** * @page page_surface_augmenter The surface_augmenter protocol * @section page_ifaces_surface_augmenter Interfaces * - @subpage page_iface_surface_augmenter - surface composition delegation * - @subpage page_iface_augmented_surface - delegate composition of a wl_surface * - @subpage page_iface_augmented_sub_surface - delegate composition of a wl_subsurface * @section page_copyright_surface_augmenter Copyright * <pre> * * Copyright 2021 The Chromium Authors * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice (including the next * paragraph) shall be included in all copies or substantial portions of the * Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER * DEALINGS IN THE SOFTWARE. * </pre> */ struct augmented_sub_surface; struct augmented_surface; struct surface_augmenter; struct wl_buffer; struct wl_subsurface; struct wl_surface; #ifndef SURFACE_AUGMENTER_INTERFACE #define SURFACE_AUGMENTER_INTERFACE /** * @page page_iface_surface_augmenter surface_augmenter * @section page_iface_surface_augmenter_desc Description * * The global interface exposing surface delegated composition * capabilities is used to instantiate an interface extension for a * wl_surface object. This extended interface will then allow * delegated compostion of the surface contents, effectively * disconnecting the direct relationship between the buffer and the * surface content (adding support for solid quads and rounded corner * for instance). * @section page_iface_surface_augmenter_api API * See @ref iface_surface_augmenter. */ /** * @defgroup iface_surface_augmenter The surface_augmenter interface * * The global interface exposing surface delegated composition * capabilities is used to instantiate an interface extension for a * wl_surface object. This extended interface will then allow * delegated compostion of the surface contents, effectively * disconnecting the direct relationship between the buffer and the * surface content (adding support for solid quads and rounded corner * for instance). */ extern const struct wl_interface surface_augmenter_interface; #endif #ifndef AUGMENTED_SURFACE_INTERFACE #define AUGMENTED_SURFACE_INTERFACE /** * @page page_iface_augmented_surface augmented_surface * @section page_iface_augmented_surface_desc Description * * An additional interface to a wl_surface object, which allows the * client to specify the delegated composition of the surface * contents. * * * This makes the surface an object only used to composite its parent * surface. This means the surface will be clipped to the parent bounds, will * not receive input events or display enter/leave events, etc. * * Use wl_subsurface role objects to express which parent surface this will * perform delegate composition for. * * The commits to this surface is assumed to behave synchronized with its * parent commits, as a synchronized wl_subsurface would. * * The compositor does not perform fine-grained damage extension calculation * that is introduced by an augmented_surface moving, resizing, changing * stacking, or disappearing. A client performing such operations should * account for it and damage the parent non-augmented wl_surface accordingly. * * Various changes like adding or removing an augmented sub-surface, changing * its position or stacking order, will not introduce extra damage on the * compositor side. The parent wl_surface should account for the extra damage * introduced. * * This surface, using a wl_subsurface role of its parent, cannot be stacked * relative to non-augmented sub-surfaces of the parent, but can be stacked * relative to other augmented children. Nor can this surface have * non-augmented sub-surface children. * * A mixed tree structure of using augmented_surfaces to delegate composite * wl_surfaces would look like this: * * wl_surface@1:{ augmented_surface@1,2,3 } * / \_____ * / \ * wl_surface@2: wl_surface@3: * { augmented_surface@4,5 } { augmented_surface@6 } * * Every wl_surface has a list of augmented_surfaces. Assuming the * wl_surface stacking order, from bottom to top, is: * wl_surface@1, wl_surface@2, wl_surface@3 * * Then the final composition order, from bottom to top, is: * wl_surface@1, augmented_surface@1,2,3, wl_surface@2, augmented_surface@4,5, * wl_surface@3, augmented_surface@6 * @section page_iface_augmented_surface_api API * See @ref iface_augmented_surface. */ /** * @defgroup iface_augmented_surface The augmented_surface interface * * An additional interface to a wl_surface object, which allows the * client to specify the delegated composition of the surface * contents. * * * This makes the surface an object only used to composite its parent * surface. This means the surface will be clipped to the parent bounds, will * not receive input events or display enter/leave events, etc. * * Use wl_subsurface role objects to express which parent surface this will * perform delegate composition for. * * The commits to this surface is assumed to behave synchronized with its * parent commits, as a synchronized wl_subsurface would. * * The compositor does not perform fine-grained damage extension calculation * that is introduced by an augmented_surface moving, resizing, changing * stacking, or disappearing. A client performing such operations should * account for it and damage the parent non-augmented wl_surface accordingly. * * Various changes like adding or removing an augmented sub-surface, changing * its position or stacking order, will not introduce extra damage on the * compositor side. The parent wl_surface should account for the extra damage * introduced. * * This surface, using a wl_subsurface role of its parent, cannot be stacked * relative to non-augmented sub-surfaces of the parent, but can be stacked * relative to other augmented children. Nor can this surface have * non-augmented sub-surface children. * * A mixed tree structure of using augmented_surfaces to delegate composite * wl_surfaces would look like this: * * wl_surface@1:{ augmented_surface@1,2,3 } * / \_____ * / \ * wl_surface@2: wl_surface@3: * { augmented_surface@4,5 } { augmented_surface@6 } * * Every wl_surface has a list of augmented_surfaces. Assuming the * wl_surface stacking order, from bottom to top, is: * wl_surface@1, wl_surface@2, wl_surface@3 * * Then the final composition order, from bottom to top, is: * wl_surface@1, augmented_surface@1,2,3, wl_surface@2, augmented_surface@4,5, * wl_surface@3, augmented_surface@6 */ extern const struct wl_interface augmented_surface_interface; #endif #ifndef AUGMENTED_SUB_SURFACE_INTERFACE #define AUGMENTED_SUB_SURFACE_INTERFACE /** * @page page_iface_augmented_sub_surface augmented_sub_surface * @section page_iface_augmented_sub_surface_desc Description * * An additional interface to a wl_subsurface object, which allows the * client to specify the delegated composition of the surface * contents. * @section page_iface_augmented_sub_surface_api API * See @ref iface_augmented_sub_surface. */ /** * @defgroup iface_augmented_sub_surface The augmented_sub_surface interface * * An additional interface to a wl_subsurface object, which allows the * client to specify the delegated composition of the surface * contents. */ extern const struct wl_interface augmented_sub_surface_interface; #endif #ifndef SURFACE_AUGMENTER_ERROR_ENUM #define SURFACE_AUGMENTER_ERROR_ENUM enum surface_augmenter_error { … }; /** * @ingroup iface_surface_augmenter * Validate a surface_augmenter error value. * * @return true on success, false on error. * @ref surface_augmenter_error */ static inline bool surface_augmenter_error_is_valid(uint32_t value, uint32_t version) { … } #endif /* SURFACE_AUGMENTER_ERROR_ENUM */ /** * @ingroup iface_surface_augmenter * @struct surface_augmenter_interface */ struct surface_augmenter_interface { … }; /** * @ingroup iface_surface_augmenter */ #define SURFACE_AUGMENTER_DESTROY_SINCE_VERSION … /** * @ingroup iface_surface_augmenter */ #define SURFACE_AUGMENTER_CREATE_SOLID_COLOR_BUFFER_SINCE_VERSION … /** * @ingroup iface_surface_augmenter */ #define SURFACE_AUGMENTER_GET_AUGMENTED_SURFACE_SINCE_VERSION … /** * @ingroup iface_surface_augmenter */ #define SURFACE_AUGMENTER_GET_AUGMENTED_SUBSURFACE_SINCE_VERSION … #ifndef AUGMENTED_SURFACE_ERROR_ENUM #define AUGMENTED_SURFACE_ERROR_ENUM enum augmented_surface_error { … }; /** * @ingroup iface_augmented_surface * Validate a augmented_surface error value. * * @return true on success, false on error. * @ref augmented_surface_error */ static inline bool augmented_surface_error_is_valid(uint32_t value, uint32_t version) { … } #endif /* AUGMENTED_SURFACE_ERROR_ENUM */ /** * @ingroup iface_augmented_surface * @struct augmented_surface_interface */ struct augmented_surface_interface { … }; /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_DESTROY_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_ROUNDED_CORNERS_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_DESTINATION_SIZE_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_ROUNDED_CLIP_BOUNDS_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_BACKGROUND_COLOR_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_TRUSTED_DAMAGE_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_ROUNDED_CORNERS_CLIP_BOUNDS_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_CLIP_RECT_SINCE_VERSION … /** * @ingroup iface_augmented_surface */ #define AUGMENTED_SURFACE_SET_FRAME_TRACE_ID_SINCE_VERSION … #ifndef AUGMENTED_SUB_SURFACE_ERROR_ENUM #define AUGMENTED_SUB_SURFACE_ERROR_ENUM enum augmented_sub_surface_error { … }; /** * @ingroup iface_augmented_sub_surface * Validate a augmented_sub_surface error value. * * @return true on success, false on error. * @ref augmented_sub_surface_error */ static inline bool augmented_sub_surface_error_is_valid(uint32_t value, uint32_t version) { … } #endif /* AUGMENTED_SUB_SURFACE_ERROR_ENUM */ /** * @ingroup iface_augmented_sub_surface * @struct augmented_sub_surface_interface */ struct augmented_sub_surface_interface { … }; /** * @ingroup iface_augmented_sub_surface */ #define AUGMENTED_SUB_SURFACE_DESTROY_SINCE_VERSION … /** * @ingroup iface_augmented_sub_surface */ #define AUGMENTED_SUB_SURFACE_SET_POSITION_SINCE_VERSION … /** * @ingroup iface_augmented_sub_surface */ #define AUGMENTED_SUB_SURFACE_SET_CLIP_RECT_SINCE_VERSION … /** * @ingroup iface_augmented_sub_surface */ #define AUGMENTED_SUB_SURFACE_SET_TRANSFORM_SINCE_VERSION … #ifdef __cplusplus } #endif #endif