chromium/out/Default/gen/third_party/wayland-protocols/unstable/extended-drag/extended-drag-unstable-v1-client-protocol.h

/* Generated by wayland-scanner 1.23.0 */

#ifndef EXTENDED_DRAG_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define EXTENDED_DRAG_UNSTABLE_V1_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_extended_drag_unstable_v1 The extended_drag_unstable_v1 protocol
 * @section page_ifaces_extended_drag_unstable_v1 Interfaces
 * - @subpage page_iface_zcr_extended_drag_v1 - extends DnD protocol with some advanced features
 * - @subpage page_iface_zcr_extended_drag_source_v1 - extensions for the standard drag data source
 * - @subpage page_iface_zcr_extended_drag_offer_v1 - extensions for the standard drag data offer.
 * @section page_copyright_extended_drag_unstable_v1 Copyright
 * <pre>
 *
 * Copyright 2020 The Chromium Authors
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 * </pre>
 */
struct wl_data_offer;
struct wl_data_source;
struct wl_surface;
struct zcr_extended_drag_offer_v1;
struct zcr_extended_drag_source_v1;
struct zcr_extended_drag_v1;

#ifndef ZCR_EXTENDED_DRAG_V1_INTERFACE
#define ZCR_EXTENDED_DRAG_V1_INTERFACE
/**
 * @page page_iface_zcr_extended_drag_v1 zcr_extended_drag_v1
 * @section page_iface_zcr_extended_drag_v1_desc Description
 *
 * The zcr_extended_drag_v1 interface extends the Wayland drag-and-drop with
 * features unsurpported by the core protocol. Such as, making toplevel shell
 * surfaces "draggable", as well as making them "snappable" into and out of
 * other surfaces as they are dragged around.
 *
 * A common use case for this is a Chromium-like tab/window dragging UX,
 * where the user is able to drag a tab (or any other kind of UI piece) out
 * of its original window, into a new surface anchored to the pointer cursor,
 * similar to a regular drag icon but with enhanced and more configurable
 * capabilities.
 *
 * Warning! The protocol described in this file is experimental and
 * backward incompatible changes may be made. Backward compatible changes
 * may be added together with the corresponding uinterface version bump.
 * Backward incompatible changes are done by bumping the version number in
 * the protocol and uinterface names and resetting the interface version.
 * Once the protocol is to be declared stable, the 'z' prefix and the
 * version number in the protocol and interface names are removed and the
 * interface version number is reset.
 * @section page_iface_zcr_extended_drag_v1_api API
 * See @ref iface_zcr_extended_drag_v1.
 */
/**
 * @defgroup iface_zcr_extended_drag_v1 The zcr_extended_drag_v1 interface
 *
 * The zcr_extended_drag_v1 interface extends the Wayland drag-and-drop with
 * features unsurpported by the core protocol. Such as, making toplevel shell
 * surfaces "draggable", as well as making them "snappable" into and out of
 * other surfaces as they are dragged around.
 *
 * A common use case for this is a Chromium-like tab/window dragging UX,
 * where the user is able to drag a tab (or any other kind of UI piece) out
 * of its original window, into a new surface anchored to the pointer cursor,
 * similar to a regular drag icon but with enhanced and more configurable
 * capabilities.
 *
 * Warning! The protocol described in this file is experimental and
 * backward incompatible changes may be made. Backward compatible changes
 * may be added together with the corresponding uinterface version bump.
 * Backward incompatible changes are done by bumping the version number in
 * the protocol and uinterface names and resetting the interface version.
 * Once the protocol is to be declared stable, the 'z' prefix and the
 * version number in the protocol and interface names are removed and the
 * interface version number is reset.
 */
extern const struct wl_interface zcr_extended_drag_v1_interface;
#endif
#ifndef ZCR_EXTENDED_DRAG_SOURCE_V1_INTERFACE
#define ZCR_EXTENDED_DRAG_SOURCE_V1_INTERFACE
/**
 * @page page_iface_zcr_extended_drag_source_v1 zcr_extended_drag_source_v1
 * @section page_iface_zcr_extended_drag_source_v1_desc Description
 *
 * The zcr_extended_drag_source_v1 interface extends the wl_data_source with
 * features unsurpported by the standard drag-and-drop protocol.
 * @section page_iface_zcr_extended_drag_source_v1_api API
 * See @ref iface_zcr_extended_drag_source_v1.
 */
/**
 * @defgroup iface_zcr_extended_drag_source_v1 The zcr_extended_drag_source_v1 interface
 *
 * The zcr_extended_drag_source_v1 interface extends the wl_data_source with
 * features unsurpported by the standard drag-and-drop protocol.
 */
extern const struct wl_interface zcr_extended_drag_source_v1_interface;
#endif
#ifndef ZCR_EXTENDED_DRAG_OFFER_V1_INTERFACE
#define ZCR_EXTENDED_DRAG_OFFER_V1_INTERFACE
/**
 * @page page_iface_zcr_extended_drag_offer_v1 zcr_extended_drag_offer_v1
 * @section page_iface_zcr_extended_drag_offer_v1_desc Description
 *
 * The zcr_extended_drag_offer_v1 interface extends the wl_data_offer with
 * features unsurpported by the standard drag-and-drop protocol.
 * @section page_iface_zcr_extended_drag_offer_v1_api API
 * See @ref iface_zcr_extended_drag_offer_v1.
 */
/**
 * @defgroup iface_zcr_extended_drag_offer_v1 The zcr_extended_drag_offer_v1 interface
 *
 * The zcr_extended_drag_offer_v1 interface extends the wl_data_offer with
 * features unsurpported by the standard drag-and-drop protocol.
 */
extern const struct wl_interface zcr_extended_drag_offer_v1_interface;
#endif

#ifndef ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM
#define ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM
/**
 * @ingroup iface_zcr_extended_drag_v1
 * extended drag configuration flags.
 *
 * Bitmask flags that can be used to configure how the drag session will
 * operate. By default no additional option is set.
 *
 * Source client might set allow_swallow option to tell the compositor that
 * the dragged UI item can be snapped out and into other surfaces
 * (swallowed/unswallowed), eg: Chromium's tab dragging UX.
 *
 * allow_drop_no_target controls how source and destination clients are
 * notified when the drop happens, if it is set the DnD operation is
 * considered successfully finished regardless the drop location (eg:
 * outside any shell surface or there is no target that can accept it).
 *
 * lock_cursor might be used to keep the cursor shape locked during the
 * extended drag session, regardless current the mime types, dnd action
 * negotiation status.
 */
enum zcr_extended_drag_v1_options {};
#endif /* ZCR_EXTENDED_DRAG_V1_OPTIONS_ENUM */

#define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_SOURCE
#define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_OFFER


/**
 * @ingroup iface_zcr_extended_drag_v1
 */
#define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_SOURCE_SINCE_VERSION
/**
 * @ingroup iface_zcr_extended_drag_v1
 */
#define ZCR_EXTENDED_DRAG_V1_GET_EXTENDED_DRAG_OFFER_SINCE_VERSION

/** @ingroup iface_zcr_extended_drag_v1 */
static inline void
zcr_extended_drag_v1_set_user_data(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, void *user_data)
{}

/** @ingroup iface_zcr_extended_drag_v1 */
static inline void *
zcr_extended_drag_v1_get_user_data(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
{}

static inline uint32_t
zcr_extended_drag_v1_get_version(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
{}

/** @ingroup iface_zcr_extended_drag_v1 */
static inline void
zcr_extended_drag_v1_destroy(struct zcr_extended_drag_v1 *zcr_extended_drag_v1)
{}

/**
 * @ingroup iface_zcr_extended_drag_v1
 *
 * Create an extended drag source object. See zcr_extended_drag_source_v1
 * interface for details.
 */
static inline struct zcr_extended_drag_source_v1 *
zcr_extended_drag_v1_get_extended_drag_source(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, struct wl_data_source *data_source, uint32_t options)
{}

/**
 * @ingroup iface_zcr_extended_drag_v1
 *
 * Create an extended drag offer object. See zcr_extended_drag_offer_v1
 * interface for details.
 */
static inline struct zcr_extended_drag_offer_v1 *
zcr_extended_drag_v1_get_extended_drag_offer(struct zcr_extended_drag_v1 *zcr_extended_drag_v1, struct wl_data_offer *data_offer)
{}

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 * @struct zcr_extended_drag_source_v1_listener
 */
struct zcr_extended_drag_source_v1_listener {};

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
static inline int
zcr_extended_drag_source_v1_add_listener(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1,
					 const struct zcr_extended_drag_source_v1_listener *listener, void *data)
{}

#define ZCR_EXTENDED_DRAG_SOURCE_V1_DESTROY
#define ZCR_EXTENDED_DRAG_SOURCE_V1_DRAG

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
#define ZCR_EXTENDED_DRAG_SOURCE_V1_SWALLOW_SINCE_VERSION
/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
#define ZCR_EXTENDED_DRAG_SOURCE_V1_UNSWALLOW_SINCE_VERSION

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
#define ZCR_EXTENDED_DRAG_SOURCE_V1_DESTROY_SINCE_VERSION
/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
#define ZCR_EXTENDED_DRAG_SOURCE_V1_DRAG_SINCE_VERSION

/** @ingroup iface_zcr_extended_drag_source_v1 */
static inline void
zcr_extended_drag_source_v1_set_user_data(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1, void *user_data)
{}

/** @ingroup iface_zcr_extended_drag_source_v1 */
static inline void *
zcr_extended_drag_source_v1_get_user_data(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
{}

static inline uint32_t
zcr_extended_drag_source_v1_get_version(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
{}

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 */
static inline void
zcr_extended_drag_source_v1_destroy(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1)
{}

/**
 * @ingroup iface_zcr_extended_drag_source_v1
 *
 * Update the dragged surface. If null is passed, the dragged surface gets
 * unset, making it to not being moved anymore under the pointer cursor.
 * Otherwise, it will be set as the dragged surface, making it to be visually
 * anchored to the pointer cursor. surface is expected to have a toplevel
 * shell surface role assigned, which allows it to be dropped smoothly into
 * an arbitrary location of the shell, so turning it instantly into a
 * regular toplevel window, which not possible with the standard DND
 * protocol.
 *
 * x and y offsets are described in surface-local coordinates, with no
 * scale applied, that determine how the surface must be positioned
 * relative to the cursor location, similar to drag icon offsets in
 * standard DND operations.
 */
static inline void
zcr_extended_drag_source_v1_drag(struct zcr_extended_drag_source_v1 *zcr_extended_drag_source_v1, struct wl_surface *surface, int32_t x_offset, int32_t y_offset)
{}

#define ZCR_EXTENDED_DRAG_OFFER_V1_DESTROY
#define ZCR_EXTENDED_DRAG_OFFER_V1_SWALLOW
#define ZCR_EXTENDED_DRAG_OFFER_V1_UNSWALLOW


/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 */
#define ZCR_EXTENDED_DRAG_OFFER_V1_DESTROY_SINCE_VERSION
/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 */
#define ZCR_EXTENDED_DRAG_OFFER_V1_SWALLOW_SINCE_VERSION
/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 */
#define ZCR_EXTENDED_DRAG_OFFER_V1_UNSWALLOW_SINCE_VERSION

/** @ingroup iface_zcr_extended_drag_offer_v1 */
static inline void
zcr_extended_drag_offer_v1_set_user_data(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, void *user_data)
{}

/** @ingroup iface_zcr_extended_drag_offer_v1 */
static inline void *
zcr_extended_drag_offer_v1_get_user_data(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
{}

static inline uint32_t
zcr_extended_drag_offer_v1_get_version(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
{}

/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 */
static inline void
zcr_extended_drag_offer_v1_destroy(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1)
{}

/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 *
 * Requests the drag source to swallow the dragged surface. This means the
 * receiving client accepts and will incorporate the dragged surface into
 * its UI. For example, a browser tab is dragged and snapped to an icon\
 * grid.
 */
static inline void
zcr_extended_drag_offer_v1_swallow(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, uint32_t serial, const char *mime_type)
{}

/**
 * @ingroup iface_zcr_extended_drag_offer_v1
 *
 * Requests the drag source to unswallow the dragged surface. Which means
 * that the receiving client wants to undo a previously swallowed dragged
 * surface, i.e: detach it from its UI.
 *
 * X and Y offsets are expressed in surface-local coordinates, with no
 * scale applied and describe how the surface must be positioned relative
 * to the cursor location, similar to drag icon offsets in standard DND
 * operations. Note that these coordinates are local to the currently
 * focused surface, owned by the receiving client, which may differ from
 * corresponding offsets at source side (which owns the unswallowed
 * surface), for instance, when the receiving surface is on a wl_output
 * with different scale value. Compositor handles such conversion before
 * delivering the zcr_extended_drag_source_v1::swallow event counterpart
 * to the source client.
 */
static inline void
zcr_extended_drag_offer_v1_unswallow(struct zcr_extended_drag_offer_v1 *zcr_extended_drag_offer_v1, uint32_t serial, const char *mime_type, int32_t x_offset, int32_t y_offset)
{}

#ifdef  __cplusplus
}
#endif

#endif