/* Generated by wayland-scanner 1.25.0 */

#ifndef WAYFIRE_SHELL_UNSTABLE_V2_CLIENT_PROTOCOL_H
#define WAYFIRE_SHELL_UNSTABLE_V2_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_wayfire_shell_unstable_v2 The wayfire_shell_unstable_v2 protocol
 * @section page_ifaces_wayfire_shell_unstable_v2 Interfaces
 * - @subpage page_iface_zwf_shell_manager_v2 - DE integration
 * - @subpage page_iface_zwf_output_v2 - A wrapper for wl_output
 * - @subpage page_iface_zwf_hotspot_v2 - A hotspot region on an output
 * - @subpage page_iface_zwf_surface_v2 - A special surface
 */
struct wl_output;
struct wl_surface;
struct zwf_hotspot_v2;
struct zwf_output_v2;
struct zwf_shell_manager_v2;
struct zwf_surface_v2;

#ifndef ZWF_SHELL_MANAGER_V2_INTERFACE
#define ZWF_SHELL_MANAGER_V2_INTERFACE
/**
 * @page page_iface_zwf_shell_manager_v2 zwf_shell_manager_v2
 * @section page_iface_zwf_shell_manager_v2_desc Description
 *
 * This protocol provides additional events and requests for special DE
 * clients like panels, docks, etc.
 *
 * It is meant as an addition for protocols like wlr-layer-shell.
 * @section page_iface_zwf_shell_manager_v2_api API
 * See @ref iface_zwf_shell_manager_v2.
 */
/**
 * @defgroup iface_zwf_shell_manager_v2 The zwf_shell_manager_v2 interface
 *
 * This protocol provides additional events and requests for special DE
 * clients like panels, docks, etc.
 *
 * It is meant as an addition for protocols like wlr-layer-shell.
 */
extern const struct wl_interface zwf_shell_manager_v2_interface;
#endif
#ifndef ZWF_OUTPUT_V2_INTERFACE
#define ZWF_OUTPUT_V2_INTERFACE
/**
 * @page page_iface_zwf_output_v2 zwf_output_v2
 * @section page_iface_zwf_output_v2_desc Description
 *
 * Represents a single output.
 * Each output is managed independently from the others.
 * @section page_iface_zwf_output_v2_api API
 * See @ref iface_zwf_output_v2.
 */
/**
 * @defgroup iface_zwf_output_v2 The zwf_output_v2 interface
 *
 * Represents a single output.
 * Each output is managed independently from the others.
 */
extern const struct wl_interface zwf_output_v2_interface;
#endif
#ifndef ZWF_HOTSPOT_V2_INTERFACE
#define ZWF_HOTSPOT_V2_INTERFACE
/**
 * @page page_iface_zwf_hotspot_v2 zwf_hotspot_v2
 * @section page_iface_zwf_hotspot_v2_desc Description
 *
 * Represents a region on an output that triggers when the input pointer
 * remains within it for a specified timeout period.
 *
 * Hotspots can be either edge-based (full edge or corner) or positioned
 * (a specific point on an edge).
 *
 * The lifecycle of a hotspot interaction is:
 * 1. Pointer enters hotspot area -> timeout timer starts
 * 2. After timeout, enter event is sent
 * 3. While pointer remains inside hotspot area, proximity_changed events
 * are sent as the pointer moves
 * 4. Pointer leaves hotspot area -> leave event is sent
 * @section page_iface_zwf_hotspot_v2_api API
 * See @ref iface_zwf_hotspot_v2.
 */
/**
 * @defgroup iface_zwf_hotspot_v2 The zwf_hotspot_v2 interface
 *
 * Represents a region on an output that triggers when the input pointer
 * remains within it for a specified timeout period.
 *
 * Hotspots can be either edge-based (full edge or corner) or positioned
 * (a specific point on an edge).
 *
 * The lifecycle of a hotspot interaction is:
 * 1. Pointer enters hotspot area -> timeout timer starts
 * 2. After timeout, enter event is sent
 * 3. While pointer remains inside hotspot area, proximity_changed events
 * are sent as the pointer moves
 * 4. Pointer leaves hotspot area -> leave event is sent
 */
extern const struct wl_interface zwf_hotspot_v2_interface;
#endif
#ifndef ZWF_SURFACE_V2_INTERFACE
#define ZWF_SURFACE_V2_INTERFACE
/**
 * @page page_iface_zwf_surface_v2 zwf_surface_v2
 * @section page_iface_zwf_surface_v2_desc Description
 * @section page_iface_zwf_surface_v2_api API
 * See @ref iface_zwf_surface_v2.
 */
/**
 * @defgroup iface_zwf_surface_v2 The zwf_surface_v2 interface
 */
extern const struct wl_interface zwf_surface_v2_interface;
#endif

#define ZWF_SHELL_MANAGER_V2_GET_WF_OUTPUT 0
#define ZWF_SHELL_MANAGER_V2_GET_WF_SURFACE 1


/**
 * @ingroup iface_zwf_shell_manager_v2
 */
#define ZWF_SHELL_MANAGER_V2_GET_WF_OUTPUT_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_shell_manager_v2
 */
#define ZWF_SHELL_MANAGER_V2_GET_WF_SURFACE_SINCE_VERSION 1

/** @ingroup iface_zwf_shell_manager_v2 */
static inline void
zwf_shell_manager_v2_set_user_data(struct zwf_shell_manager_v2 *zwf_shell_manager_v2, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zwf_shell_manager_v2, user_data);
}

/** @ingroup iface_zwf_shell_manager_v2 */
static inline void *
zwf_shell_manager_v2_get_user_data(struct zwf_shell_manager_v2 *zwf_shell_manager_v2)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zwf_shell_manager_v2);
}

static inline uint32_t
zwf_shell_manager_v2_get_version(struct zwf_shell_manager_v2 *zwf_shell_manager_v2)
{
	return wl_proxy_get_version((struct wl_proxy *) zwf_shell_manager_v2);
}

/** @ingroup iface_zwf_shell_manager_v2 */
static inline void
zwf_shell_manager_v2_destroy(struct zwf_shell_manager_v2 *zwf_shell_manager_v2)
{
	wl_proxy_destroy((struct wl_proxy *) zwf_shell_manager_v2);
}

/**
 * @ingroup iface_zwf_shell_manager_v2
 */
static inline struct zwf_output_v2 *
zwf_shell_manager_v2_get_wf_output(struct zwf_shell_manager_v2 *zwf_shell_manager_v2, struct wl_output *output)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) zwf_shell_manager_v2,
			 ZWF_SHELL_MANAGER_V2_GET_WF_OUTPUT, &zwf_output_v2_interface, wl_proxy_get_version((struct wl_proxy *) zwf_shell_manager_v2), 0, output, NULL);

	return (struct zwf_output_v2 *) id;
}

/**
 * @ingroup iface_zwf_shell_manager_v2
 */
static inline struct zwf_surface_v2 *
zwf_shell_manager_v2_get_wf_surface(struct zwf_shell_manager_v2 *zwf_shell_manager_v2, struct wl_surface *surface)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) zwf_shell_manager_v2,
			 ZWF_SHELL_MANAGER_V2_GET_WF_SURFACE, &zwf_surface_v2_interface, wl_proxy_get_version((struct wl_proxy *) zwf_shell_manager_v2), 0, surface, NULL);

	return (struct zwf_surface_v2 *) id;
}

#ifndef ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM
#define ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM
enum zwf_output_v2_hotspot_edge {
	/**
	 * Top edge of the output
	 */
	ZWF_OUTPUT_V2_HOTSPOT_EDGE_TOP = 1,
	/**
	 * Bottom edge of the output
	 */
	ZWF_OUTPUT_V2_HOTSPOT_EDGE_BOTTOM = 2,
	/**
	 * Left edge of the output
	 */
	ZWF_OUTPUT_V2_HOTSPOT_EDGE_LEFT = 4,
	/**
	 * Right edge of the output
	 */
	ZWF_OUTPUT_V2_HOTSPOT_EDGE_RIGHT = 8,
};
#endif /* ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM */

/**
 * @ingroup iface_zwf_output_v2
 * @struct zwf_output_v2_listener
 */
struct zwf_output_v2_listener {
	/**
	 * A window was fullscreened
	 *
	 * Emitted when a window gets fullscreened on the given output.
	 * In this mode, windows in the TOP layer are not visible.
	 *
	 * There will be no two consecutive enter_fullscreen calls, i.e. if
	 * fullscreen mode is entered it will be exited before going into
	 * this mode again.
	 */
	void (*enter_fullscreen)(void *data,
				 struct zwf_output_v2 *zwf_output_v2);
	/**
	 * A window was fullscreened
	 *
	 * Emitted when the output is no longer in fullscreen mode. Each
	 * leave_fullscreen has a corresponding enter_fullscreen before it.
	 */
	void (*leave_fullscreen)(void *data,
				 struct zwf_output_v2 *zwf_output_v2);
	/**
	 * Toggle menu event
	 *
	 * Tells the menu to toggle open or close.
	 *
	 * Emitted using an activator binding.
	 * @since 2
	 */
	void (*toggle_menu)(void *data,
			    struct zwf_output_v2 *zwf_output_v2);
};

/**
 * @ingroup iface_zwf_output_v2
 */
static inline int
zwf_output_v2_add_listener(struct zwf_output_v2 *zwf_output_v2,
			   const struct zwf_output_v2_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) zwf_output_v2,
				     (void (**)(void)) listener, data);
}

#define ZWF_OUTPUT_V2_INHIBIT_OUTPUT 0
#define ZWF_OUTPUT_V2_INHIBIT_OUTPUT_DONE 1
#define ZWF_OUTPUT_V2_CREATE_HOTSPOT 2
#define ZWF_OUTPUT_V2_CREATE_CUSTOM_HOTSPOT 3

/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_ENTER_FULLSCREEN_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_LEAVE_FULLSCREEN_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_TOGGLE_MENU_SINCE_VERSION 2

/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_INHIBIT_OUTPUT_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_INHIBIT_OUTPUT_DONE_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_CREATE_HOTSPOT_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_output_v2
 */
#define ZWF_OUTPUT_V2_CREATE_CUSTOM_HOTSPOT_SINCE_VERSION 3

/** @ingroup iface_zwf_output_v2 */
static inline void
zwf_output_v2_set_user_data(struct zwf_output_v2 *zwf_output_v2, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zwf_output_v2, user_data);
}

/** @ingroup iface_zwf_output_v2 */
static inline void *
zwf_output_v2_get_user_data(struct zwf_output_v2 *zwf_output_v2)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zwf_output_v2);
}

static inline uint32_t
zwf_output_v2_get_version(struct zwf_output_v2 *zwf_output_v2)
{
	return wl_proxy_get_version((struct wl_proxy *) zwf_output_v2);
}

/** @ingroup iface_zwf_output_v2 */
static inline void
zwf_output_v2_destroy(struct zwf_output_v2 *zwf_output_v2)
{
	wl_proxy_destroy((struct wl_proxy *) zwf_output_v2);
}

/**
 * @ingroup iface_zwf_output_v2
 *
 * Request the compositor to not render the output, so the output usually
 * is cleared to black color.  To enable output rendering again, call
 * inhibit_output_done.
 */
static inline void
zwf_output_v2_inhibit_output(struct zwf_output_v2 *zwf_output_v2)
{
	wl_proxy_marshal_flags((struct wl_proxy *) zwf_output_v2,
			 ZWF_OUTPUT_V2_INHIBIT_OUTPUT, NULL, wl_proxy_get_version((struct wl_proxy *) zwf_output_v2), 0);
}

/**
 * @ingroup iface_zwf_output_v2
 *
 * Stop inhibiting the output. This must be called as many times as
 * inhibit_output was called to actually uninhibit rendering.
 *
 * The inhibit/inhibit_done requests can be called multiple times, even
 * from different apps, so don't assume that a call to inhibit_done would
 * always mean actually starting the rendering process.
 */
static inline void
zwf_output_v2_inhibit_output_done(struct zwf_output_v2 *zwf_output_v2)
{
	wl_proxy_marshal_flags((struct wl_proxy *) zwf_output_v2,
			 ZWF_OUTPUT_V2_INHIBIT_OUTPUT_DONE, NULL, wl_proxy_get_version((struct wl_proxy *) zwf_output_v2), 0);
}

/**
 * @ingroup iface_zwf_output_v2
 *
 * A hotspot on the output is an edge or a corner region of the
 * output where the mouse or touch point has been residing for a given
 * amount of time.
 *
 * The hotspot can be used for example for autohiding panels, where the
 * panel is shown when the input hovers on the edge of the output for a
 * specific amount of time.
 *
 * For edge hotspots (single edge), the entire edge region of 'threshold'
 * pixels depth triggers the hotspot.
 *
 * For corner hotspots (two adjacent edges), the corner region of
 * 'threshold' pixels by 'threshold' pixels triggers the hotspot.
 */
static inline struct zwf_hotspot_v2 *
zwf_output_v2_create_hotspot(struct zwf_output_v2 *zwf_output_v2, uint32_t hotspot, uint32_t threshold, uint32_t timeout)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) zwf_output_v2,
			 ZWF_OUTPUT_V2_CREATE_HOTSPOT, &zwf_hotspot_v2_interface, wl_proxy_get_version((struct wl_proxy *) zwf_output_v2), 0, hotspot, threshold, timeout, NULL);

	return (struct zwf_hotspot_v2 *) id;
}

/**
 * @ingroup iface_zwf_output_v2
 *
 * Creates a hotspot for an arbitrary axis-aligned rectangle on the output.
 * The rectangle is defined in output-local coordinates with (x, y) as the
 * top-left corner, and (w, h) as width and height.
 *
 * The hotspot activates when the input pointer comes within 'threshold'
 * pixels of any point on the rectangle's boundary. The proximity event
 * reports the exact distance (0 to threshold) from the pointer to the
 * nearest point on the rectangle boundary.
 *
 * This is a generalization of edge and corner hotspots:
 * - A top edge hotspot is a rectangle covering the entire top edge
 * with w = output.width, h = threshold, positioned at (0, 0)
 * - A corner hotspot is a square of size threshold x threshold
 * positioned at the output corner
 *
 * Use cases include:
 * - Trigger zones that aren't aligned to output edges
 * - Complex panel layouts where activation regions are around specific UI elements
 * - Desktop widgets that expand/collapse based on pointer approach
 *
 * Note: The rectangle should be within the output bounds. The compositor
 * may clamp it to output geometry or ignore rectangles entirely outside.
 */
static inline struct zwf_hotspot_v2 *
zwf_output_v2_create_custom_hotspot(struct zwf_output_v2 *zwf_output_v2, uint32_t x, uint32_t y, uint32_t width, uint32_t height, uint32_t threshold, uint32_t timeout)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) zwf_output_v2,
			 ZWF_OUTPUT_V2_CREATE_CUSTOM_HOTSPOT, &zwf_hotspot_v2_interface, wl_proxy_get_version((struct wl_proxy *) zwf_output_v2), 0, x, y, width, height, threshold, timeout, NULL);

	return (struct zwf_hotspot_v2 *) id;
}

/**
 * @ingroup iface_zwf_hotspot_v2
 * @struct zwf_hotspot_v2_listener
 */
struct zwf_hotspot_v2_listener {
	/**
	 * Hotspot was activated after timeout
	 *
	 * Means that the mouse and/or touch finger was inside the
	 * indicated hotspot for the given amount of timeout time.
	 *
	 * After receiving this event, the client can expect
	 * proximity_changed events as the pointer moves within the
	 * hotspot, and eventually a leave event when the pointer exits.
	 *
	 * Emitted at most once for each entry of the input inside the
	 * hotspot.
	 */
	void (*enter)(void *data,
		      struct zwf_hotspot_v2 *zwf_hotspot_v2);
	/**
	 * Input left hotspot
	 *
	 * This event indicates that the mouse or touch point has left
	 * the hotspot area.
	 *
	 * After this event, no further proximity_changed events will be
	 * sent until a new enter event.
	 *
	 * Emitted only once after each enter.
	 */
	void (*leave)(void *data,
		      struct zwf_hotspot_v2 *zwf_hotspot_v2);
	/**
	 * Proximity to trigger point changed
	 *
	 * Sent after an enter event and before the corresponding leave
	 * event, whenever the input pointer moves within the hotspot area.
	 *
	 * Proximity is defined as the Euclidean distance in pixels from
	 * the input pointer to the hotspot's trigger geometry, clamped to
	 * the threshold: - 0: Input pointer is exactly at the trigger
	 * point - threshold: Input pointer is at the outer edge of the
	 * hotspot radius (just entered the hotspot area) - Values in
	 * between: Linear distance from trigger point
	 *
	 * This allows clients to implement pixel-perfect smooth feedback
	 * without needing to know the threshold value used to create the
	 * hotspot.
	 *
	 * For standard edge/corner hotspots (created via create_hotspot),
	 * the "threshold" is the distance from the edge parameter. The
	 * trigger point is defined as the closest point on the edge to the
	 * input pointer.
	 *
	 * For positioned hotspots (created via create_positioned_hotspot),
	 * the threshold is the radius parameter, and the trigger point is
	 * the exact point on the edge specified by position.
	 *
	 * The compositor should send this event at the same frequency as
	 * pointer motion events to ensure smooth animations.
	 * @param proximity Shortest distance in pixels to trigger geometry (0 = at trigger, threshold = at edge)
	 * @since 3
	 */
	void (*proximity_changed)(void *data,
				  struct zwf_hotspot_v2 *zwf_hotspot_v2,
				  uint32_t proximity);
};

/**
 * @ingroup iface_zwf_hotspot_v2
 */
static inline int
zwf_hotspot_v2_add_listener(struct zwf_hotspot_v2 *zwf_hotspot_v2,
			    const struct zwf_hotspot_v2_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) zwf_hotspot_v2,
				     (void (**)(void)) listener, data);
}

/**
 * @ingroup iface_zwf_hotspot_v2
 */
#define ZWF_HOTSPOT_V2_ENTER_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_hotspot_v2
 */
#define ZWF_HOTSPOT_V2_LEAVE_SINCE_VERSION 1
/**
 * @ingroup iface_zwf_hotspot_v2
 */
#define ZWF_HOTSPOT_V2_PROXIMITY_CHANGED_SINCE_VERSION 3


/** @ingroup iface_zwf_hotspot_v2 */
static inline void
zwf_hotspot_v2_set_user_data(struct zwf_hotspot_v2 *zwf_hotspot_v2, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zwf_hotspot_v2, user_data);
}

/** @ingroup iface_zwf_hotspot_v2 */
static inline void *
zwf_hotspot_v2_get_user_data(struct zwf_hotspot_v2 *zwf_hotspot_v2)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zwf_hotspot_v2);
}

static inline uint32_t
zwf_hotspot_v2_get_version(struct zwf_hotspot_v2 *zwf_hotspot_v2)
{
	return wl_proxy_get_version((struct wl_proxy *) zwf_hotspot_v2);
}

/** @ingroup iface_zwf_hotspot_v2 */
static inline void
zwf_hotspot_v2_destroy(struct zwf_hotspot_v2 *zwf_hotspot_v2)
{
	wl_proxy_destroy((struct wl_proxy *) zwf_hotspot_v2);
}

#define ZWF_SURFACE_V2_INTERACTIVE_MOVE 0


/**
 * @ingroup iface_zwf_surface_v2
 */
#define ZWF_SURFACE_V2_INTERACTIVE_MOVE_SINCE_VERSION 1

/** @ingroup iface_zwf_surface_v2 */
static inline void
zwf_surface_v2_set_user_data(struct zwf_surface_v2 *zwf_surface_v2, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zwf_surface_v2, user_data);
}

/** @ingroup iface_zwf_surface_v2 */
static inline void *
zwf_surface_v2_get_user_data(struct zwf_surface_v2 *zwf_surface_v2)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zwf_surface_v2);
}

static inline uint32_t
zwf_surface_v2_get_version(struct zwf_surface_v2 *zwf_surface_v2)
{
	return wl_proxy_get_version((struct wl_proxy *) zwf_surface_v2);
}

/** @ingroup iface_zwf_surface_v2 */
static inline void
zwf_surface_v2_destroy(struct zwf_surface_v2 *zwf_surface_v2)
{
	wl_proxy_destroy((struct wl_proxy *) zwf_surface_v2);
}

/**
 * @ingroup iface_zwf_surface_v2
 */
static inline void
zwf_surface_v2_interactive_move(struct zwf_surface_v2 *zwf_surface_v2)
{
	wl_proxy_marshal_flags((struct wl_proxy *) zwf_surface_v2,
			 ZWF_SURFACE_V2_INTERACTIVE_MOVE, NULL, wl_proxy_get_version((struct wl_proxy *) zwf_surface_v2), 0);
}

#ifdef  __cplusplus
}
#endif

#endif
