/* Generated by wayland-scanner 1.25.0 */

#ifndef WAYFIRE_SHELL_UNSTABLE_V2_SERVER_PROTOCOL_H
#define WAYFIRE_SHELL_UNSTABLE_V2_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_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

/**
 * @ingroup iface_zwf_shell_manager_v2
 * @struct zwf_shell_manager_v2_interface
 */
struct zwf_shell_manager_v2_interface {
	/**
	 * Create a zwf_output_v2 for the given wl_output
	 *
	 * 
	 */
	void (*get_wf_output)(struct wl_client *client,
			      struct wl_resource *resource,
			      struct wl_resource *output,
			      uint32_t id);
	/**
	 * Create a zwf_surface_v2 for the given wl_surface
	 *
	 * 
	 */
	void (*get_wf_surface)(struct wl_client *client,
			       struct wl_resource *resource,
			       struct wl_resource *surface,
			       uint32_t id);
};


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

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

#ifndef ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM_IS_VALID
#define ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM_IS_VALID
/**
 * @ingroup iface_zwf_output_v2
 * Validate a zwf_output_v2 hotspot_edge value.
 *
 * @return true on success, false on error.
 * @ref zwf_output_v2_hotspot_edge
 */
static inline bool
zwf_output_v2_hotspot_edge_is_valid(uint32_t value, uint32_t version) {
	switch (value) {
	case ZWF_OUTPUT_V2_HOTSPOT_EDGE_TOP:
		return version >= 1;
	case ZWF_OUTPUT_V2_HOTSPOT_EDGE_BOTTOM:
		return version >= 1;
	case ZWF_OUTPUT_V2_HOTSPOT_EDGE_LEFT:
		return version >= 1;
	case ZWF_OUTPUT_V2_HOTSPOT_EDGE_RIGHT:
		return version >= 1;
	default:
		return false;
	}
}
#endif /* ZWF_OUTPUT_V2_HOTSPOT_EDGE_ENUM_IS_VALID */

/**
 * @ingroup iface_zwf_output_v2
 * @struct zwf_output_v2_interface
 */
struct zwf_output_v2_interface {
	/**
	 * Don't render the output
	 *
	 * 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.
	 */
	void (*inhibit_output)(struct wl_client *client,
			       struct wl_resource *resource);
	/**
	 * Render the output
	 *
	 * 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.
	 */
	void (*inhibit_output_done)(struct wl_client *client,
				    struct wl_resource *resource);
	/**
	 * Create a hotspot on the output edge or corner
	 *
	 * 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.
	 * @param hotspot bitwise or of the edges (1-2 edges)
	 * @param threshold distance from the edge or corner of the output in pixels
	 * @param timeout minimum time for input to be in the hotspot (ms)
	 */
	void (*create_hotspot)(struct wl_client *client,
			       struct wl_resource *resource,
			       uint32_t hotspot,
			       uint32_t threshold,
			       uint32_t timeout,
			       uint32_t id);
	/**
	 * Create an arbitrary rectangular hotspot
	 *
	 * 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.
	 * @param x X position of rectangle (output-local)
	 * @param y Y position of rectangle (output-local)
	 * @param width Width of rectangle in pixels
	 * @param height Height of rectangle in pixels
	 * @param threshold Distance from rectangle boundary that triggers hotspot
	 * @param timeout Timeout in milliseconds
	 * @since 3
	 */
	void (*create_custom_hotspot)(struct wl_client *client,
				      struct wl_resource *resource,
				      uint32_t x,
				      uint32_t y,
				      uint32_t width,
				      uint32_t height,
				      uint32_t threshold,
				      uint32_t timeout,
				      uint32_t id);
};

#define ZWF_OUTPUT_V2_ENTER_FULLSCREEN 0
#define ZWF_OUTPUT_V2_LEAVE_FULLSCREEN 1
#define ZWF_OUTPUT_V2_TOGGLE_MENU 2

/**
 * @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
 * Sends an enter_fullscreen event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
zwf_output_v2_send_enter_fullscreen(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, ZWF_OUTPUT_V2_ENTER_FULLSCREEN);
}

/**
 * @ingroup iface_zwf_output_v2
 * Sends an leave_fullscreen event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
zwf_output_v2_send_leave_fullscreen(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, ZWF_OUTPUT_V2_LEAVE_FULLSCREEN);
}

/**
 * @ingroup iface_zwf_output_v2
 * Sends an toggle_menu event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
zwf_output_v2_send_toggle_menu(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, ZWF_OUTPUT_V2_TOGGLE_MENU);
}

#define ZWF_HOTSPOT_V2_ENTER 0
#define ZWF_HOTSPOT_V2_LEAVE 1
#define ZWF_HOTSPOT_V2_PROXIMITY_CHANGED 2

/**
 * @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
 * Sends an enter event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
zwf_hotspot_v2_send_enter(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, ZWF_HOTSPOT_V2_ENTER);
}

/**
 * @ingroup iface_zwf_hotspot_v2
 * Sends an leave event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
zwf_hotspot_v2_send_leave(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, ZWF_HOTSPOT_V2_LEAVE);
}

/**
 * @ingroup iface_zwf_hotspot_v2
 * Sends an proximity_changed event to the client owning the resource.
 * @param resource_ The client's resource
 * @param proximity Shortest distance in pixels to trigger geometry (0 = at trigger, threshold = at edge)
 */
static inline void
zwf_hotspot_v2_send_proximity_changed(struct wl_resource *resource_, uint32_t proximity)
{
	wl_resource_post_event(resource_, ZWF_HOTSPOT_V2_PROXIMITY_CHANGED, proximity);
}

/**
 * @ingroup iface_zwf_surface_v2
 * @struct zwf_surface_v2_interface
 */
struct zwf_surface_v2_interface {
	/**
	 * Start an interactive move of the surface
	 *
	 * 
	 */
	void (*interactive_move)(struct wl_client *client,
				 struct wl_resource *resource);
};


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

#ifdef  __cplusplus
}
#endif

#endif
