chromium/out/Default/gen/components/exo/wayland/protocol/surface-augmenter-client-protocol.h

/* Generated by wayland-scanner 1.23.0 */

#ifndef SURFACE_AUGMENTER_CLIENT_PROTOCOL_H
#define SURFACE_AUGMENTER_CLIENT_PROTOCOL_H

#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @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 {};
#endif /* SURFACE_AUGMENTER_ERROR_ENUM */

#define SURFACE_AUGMENTER_DESTROY
#define SURFACE_AUGMENTER_CREATE_SOLID_COLOR_BUFFER
#define SURFACE_AUGMENTER_GET_AUGMENTED_SURFACE
#define SURFACE_AUGMENTER_GET_AUGMENTED_SUBSURFACE


/**
 * @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

/** @ingroup iface_surface_augmenter */
static inline void
surface_augmenter_set_user_data(struct surface_augmenter *surface_augmenter, void *user_data)
{}

/** @ingroup iface_surface_augmenter */
static inline void *
surface_augmenter_get_user_data(struct surface_augmenter *surface_augmenter)
{}

static inline uint32_t
surface_augmenter_get_version(struct surface_augmenter *surface_augmenter)
{}

/**
 * @ingroup iface_surface_augmenter
 *
 * Informs the server that the client will not be using this
 * protocol object anymore. This does not affect any other objects,
 * augmenter objects included.
 */
static inline void
surface_augmenter_destroy(struct surface_augmenter *surface_augmenter)
{}

/**
 * @ingroup iface_surface_augmenter
 *
 * Instantiate a buffer of the given size for the purpose of a solid color
 * quad of a given color.
 *
 *
 * This buffer does not require resources in the compositor, so it is immediately
 * reusable and shareable. So it is not responsible for sending wl_buffer.release
 * or zwp_linux_buffer_release_v1.*_release events.
 */
static inline struct wl_buffer *
surface_augmenter_create_solid_color_buffer(struct surface_augmenter *surface_augmenter, struct wl_array *color, int32_t width, int32_t height)
{}

/**
 * @ingroup iface_surface_augmenter
 *
 * Instantiate an interface extension for the given wl_surface to
 * extend composition of its content. If the given wl_surface already has
 * a augmentation object associated, the delegate_exists protocol error is
 * raised.
 *
 *
 * If needs to be called, this must be called before a surface role object is
 * created.
 */
static inline struct augmented_surface *
surface_augmenter_get_augmented_surface(struct surface_augmenter *surface_augmenter, struct wl_surface *surface)
{}

/**
 * @ingroup iface_surface_augmenter
 *
 * Instantiate an interface extension for the given wl_subsurface to
 * extend composition of its content. If the given wl_subsurface already has
 * a augmentation object associated, the delegate_exists protocol error is
 * raised.
 */
static inline struct augmented_sub_surface *
surface_augmenter_get_augmented_subsurface(struct surface_augmenter *surface_augmenter, struct wl_subsurface *subsurface)
{}

#ifndef AUGMENTED_SURFACE_ERROR_ENUM
#define AUGMENTED_SURFACE_ERROR_ENUM
enum augmented_surface_error {};
#endif /* AUGMENTED_SURFACE_ERROR_ENUM */

#define AUGMENTED_SURFACE_DESTROY
#define AUGMENTED_SURFACE_SET_ROUNDED_CORNERS
#define AUGMENTED_SURFACE_SET_DESTINATION_SIZE
#define AUGMENTED_SURFACE_SET_ROUNDED_CLIP_BOUNDS
#define AUGMENTED_SURFACE_SET_BACKGROUND_COLOR
#define AUGMENTED_SURFACE_SET_TRUSTED_DAMAGE
#define AUGMENTED_SURFACE_SET_ROUNDED_CORNERS_CLIP_BOUNDS
#define AUGMENTED_SURFACE_SET_CLIP_RECT
#define AUGMENTED_SURFACE_SET_FRAME_TRACE_ID


/**
 * @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

/** @ingroup iface_augmented_surface */
static inline void
augmented_surface_set_user_data(struct augmented_surface *augmented_surface, void *user_data)
{}

/** @ingroup iface_augmented_surface */
static inline void *
augmented_surface_get_user_data(struct augmented_surface *augmented_surface)
{}

static inline uint32_t
augmented_surface_get_version(struct augmented_surface *augmented_surface)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * Client will no longer be able to control the delegated composition properties
 * of this surface. This does not change the existing delegated composition
 * behavior.
 */
static inline void
augmented_surface_destroy(struct augmented_surface *augmented_surface)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * [Deprecated]. Use set_rounded_corners_clip_bounds request below.
 *
 * Informs the server that it must apply the rounded corners
 * mask filter that shall be applied on next commit. Use
 * set_rounded_corners_bounds instead.
 */
static inline void
augmented_surface_set_rounded_corners(struct augmented_surface *augmented_surface, wl_fixed_t top_left, wl_fixed_t top_right, wl_fixed_t bottom_right, wl_fixed_t bottom_left)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * Sets the surface destination viewport size, with subpixel accuracy.
 * This state is double-buffered, and is applied on the next wl_surface.commit.
 */
static inline void
augmented_surface_set_destination_size(struct augmented_surface *augmented_surface, wl_fixed_t width, wl_fixed_t height)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * [Deprecated]. Use set_rounded_corners_clip_bounds request below.
 *
 * Informs the server that it must apply the rounded clipping mask filter
 * that shall be applied on next commit. The mask can be uniform for
 * several surfaces and applied uniformally so that two or more
 * surfaces visually look as a single surface with rounded corners.
 * Please note this is can only be used on surfaces that are used as
 * overlays, which must not have any subtrees. The rounding will be
 * ignored if the bounds are outside of the surface.
 */
static inline void
augmented_surface_set_rounded_clip_bounds(struct augmented_surface *augmented_surface, int32_t x, int32_t y, int32_t width, int32_t height, wl_fixed_t top_left, wl_fixed_t top_right, wl_fixed_t bottom_right, wl_fixed_t bottom_left)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * Sets a background color of a this surface. This information will be
 * associated with the next buffer commit. Please note this is different
 * from solid color buffers, which creates a new buffer instance, and
 * rather provides additional information how the buffer should be
 * composited. Passing empty array means the background color is reset.
 * The default value is determined by the Wayland compositor then.
 */
static inline void
augmented_surface_set_background_color(struct augmented_surface *augmented_surface, struct wl_array *color)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * [Deprecated] When set, this surface trusts all damage reported to this
 * surface and descendant sub-surfaces is accurate, and will not try to
 * recompute it. If not set, various changes like adding or removing a
 * sub-surface, changing its position or stacking order, can cause full
 * damage on this surface.
 *
 * The initial state is disabled.
 */
static inline void
augmented_surface_set_trusted_damage(struct augmented_surface *augmented_surface, int32_t enabled)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * Informs the server that it must apply the rounded clipping mask filter
 * that shall be applied on next commit. The mask can be uniform for
 * several surfaces and applied uniformally so that two or more
 * surfaces visually look as a single surface with rounded corners.
 *
 * Since version 9, the bounds will be placed with its origin (top left
 * corner pixel) at the location x, y of the surface local coordinate
 * system. On version 8 or before, it is placed with its root surface
 * coordinates, but this is deperecated.
 *
 * Please note this is can only be used on surfaces that are used as
 * overlays, which must not have any subtrees. The rounding will be
 * ignored if the bounds are outside of the surface.
 */
static inline void
augmented_surface_set_rounded_corners_clip_bounds(struct augmented_surface *augmented_surface, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height, wl_fixed_t top_left, wl_fixed_t top_right, wl_fixed_t bottom_right, wl_fixed_t bottom_left)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * This schedules a clip rect to be applied when drawing this sub-surface.
 * The clip will be placed with its origin (top left corner pixel) at the
 * location x, y of the surface local coordinate system. The coordinates are not
 * restricted to the surface area. Negative x and y values are allowed.
 *
 * If all of x, y, width and height are -1.0, the clip rect is unset instead.
 *
 * Initially, surfaces have no clip set.
 * This state is double-buffered, and is applied on the next wl_surface.commit.
 */
static inline void
augmented_surface_set_clip_rect(struct augmented_surface *augmented_surface, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height)
{}

/**
 * @ingroup iface_augmented_surface
 *
 * This sets a trace ID to connect the frame submission trace event flow at
 * the client and the server side.
 * This state is double-buffered, and is applied on the next
 * wl_surface.commit.
 */
static inline void
augmented_surface_set_frame_trace_id(struct augmented_surface *augmented_surface, uint32_t id_hi, uint32_t id_lo)
{}

#ifndef AUGMENTED_SUB_SURFACE_ERROR_ENUM
#define AUGMENTED_SUB_SURFACE_ERROR_ENUM
enum augmented_sub_surface_error {};
#endif /* AUGMENTED_SUB_SURFACE_ERROR_ENUM */

#define AUGMENTED_SUB_SURFACE_DESTROY
#define AUGMENTED_SUB_SURFACE_SET_POSITION
#define AUGMENTED_SUB_SURFACE_SET_CLIP_RECT
#define AUGMENTED_SUB_SURFACE_SET_TRANSFORM


/**
 * @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

/** @ingroup iface_augmented_sub_surface */
static inline void
augmented_sub_surface_set_user_data(struct augmented_sub_surface *augmented_sub_surface, void *user_data)
{}

/** @ingroup iface_augmented_sub_surface */
static inline void *
augmented_sub_surface_get_user_data(struct augmented_sub_surface *augmented_sub_surface)
{}

static inline uint32_t
augmented_sub_surface_get_version(struct augmented_sub_surface *augmented_sub_surface)
{}

/**
 * @ingroup iface_augmented_sub_surface
 *
 * The associated wl_surface's augmenter is removed.
 * The change is applied on the next wl_surface.commit.
 */
static inline void
augmented_sub_surface_destroy(struct augmented_sub_surface *augmented_sub_surface)
{}

/**
 * @ingroup iface_augmented_sub_surface
 *
 * This schedules a sub-surface position change.
 * The sub-surface will be moved so that its origin (top left
 * corner pixel) will be at the location x, y of the parent surface
 * coordinate system. The coordinates are not restricted to the parent
 * surface area. Negative values are allowed.
 *
 * The scheduled coordinates will take effect whenever the state of the
 * parent surface is applied. When this happens depends on whether the
 * parent surface is in synchronized mode or not. See
 * wl_subsurface.set_sync and wl_subsurface.set_desync for details.
 *
 * If more than one set_position request is invoked by the client before
 * the commit of the parent surface, the position of a new request always
 * replaces the scheduled position from any previous request.
 *
 * The initial position is 0, 0.
 * This state is double-buffered, and is applied on the next wl_surface.commit.
 */
static inline void
augmented_sub_surface_set_position(struct augmented_sub_surface *augmented_sub_surface, wl_fixed_t x, wl_fixed_t y)
{}

/**
 * @ingroup iface_augmented_sub_surface
 *
 * [Deprecated] Use set_clip_rect on augmented_surface instead.
 * This schedules a clip rect to be applied when drawing this sub-surface.
 * The clip will be placed with its origin (top left corner pixel) at the
 * location x, y of the parent surface coordinate system. The coordinates are not
 * restricted to the parent surface area. Negative x and y values are allowed.
 *
 * If all of x, y, width and height are -1.0, the clip rect is unset instead.
 *
 * Initially, surfaces have no clip set.
 * This state is double-buffered, and is applied on the next wl_surface.commit.
 */
static inline void
augmented_sub_surface_set_clip_rect(struct augmented_sub_surface *augmented_sub_surface, wl_fixed_t x, wl_fixed_t y, wl_fixed_t width, wl_fixed_t height)
{}

/**
 * @ingroup iface_augmented_sub_surface
 *
 * This schedules a transform to be applied when drawing this sub-surface.
 * This transform does not apply to any child surfaces of this sub-surface.
 *
 * The matrix should be passed as an array of 6 floats in column major
 * order. An empty array can be sent to set the transform to the identity
 * matrix.
 *
 * The initial transform is identity.
 * This state is double-buffered, and is applied on the next
 * wl_surface.commit.
 */
static inline void
augmented_sub_surface_set_transform(struct augmented_sub_surface *augmented_sub_surface, struct wl_array *matrix)
{}

#ifdef  __cplusplus
}
#endif

#endif