/* Generated by wayland-scanner 1.23.0 */

#ifndef SWC_SERVER_PROTOCOL_H
#define SWC_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_swc The swc protocol
 * @section page_ifaces_swc Interfaces
 * - @subpage page_iface_swc_screen - an area in which windows may be placed
 * - @subpage page_iface_swc_panel_manager - 
 * - @subpage page_iface_swc_panel - 
 * @section page_copyright_swc Copyright
 * <pre>
 *
 * Copyright (c) 2013, 2014 Michael Forney
 *
 * 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 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 swc_panel;
struct swc_panel_manager;
struct swc_screen;
struct wl_surface;

#ifndef SWC_SCREEN_INTERFACE
#define SWC_SCREEN_INTERFACE
/**
 * @page page_iface_swc_screen swc_screen
 * @section page_iface_swc_screen_desc Description
 *
 * A screen represents an area in which windows may be placed. It
 * corresponds to one or monitors displaying the same content (in
 * mirror mode).
 * @section page_iface_swc_screen_api API
 * See @ref iface_swc_screen.
 */
/**
 * @defgroup iface_swc_screen The swc_screen interface
 *
 * A screen represents an area in which windows may be placed. It
 * corresponds to one or monitors displaying the same content (in
 * mirror mode).
 */
extern const struct wl_interface swc_screen_interface;
#endif
#ifndef SWC_PANEL_MANAGER_INTERFACE
#define SWC_PANEL_MANAGER_INTERFACE
/**
 * @page page_iface_swc_panel_manager swc_panel_manager
 * @section page_iface_swc_panel_manager_api API
 * See @ref iface_swc_panel_manager.
 */
/**
 * @defgroup iface_swc_panel_manager The swc_panel_manager interface
 */
extern const struct wl_interface swc_panel_manager_interface;
#endif
#ifndef SWC_PANEL_INTERFACE
#define SWC_PANEL_INTERFACE
/**
 * @page page_iface_swc_panel swc_panel
 * @section page_iface_swc_panel_api API
 * See @ref iface_swc_panel.
 */
/**
 * @defgroup iface_swc_panel The swc_panel interface
 */
extern const struct wl_interface swc_panel_interface;
#endif



/**
 * @ingroup iface_swc_panel_manager
 * @struct swc_panel_manager_interface
 */
struct swc_panel_manager_interface {
	/**
	 */
	void (*create_panel)(struct wl_client *client,
			     struct wl_resource *resource,
			     uint32_t id,
			     struct wl_resource *surface);
};


/**
 * @ingroup iface_swc_panel_manager
 */
#define SWC_PANEL_MANAGER_CREATE_PANEL_SINCE_VERSION 1

#ifndef SWC_PANEL_EDGE_ENUM
#define SWC_PANEL_EDGE_ENUM
enum swc_panel_edge {
	SWC_PANEL_EDGE_TOP = 0,
	SWC_PANEL_EDGE_BOTTOM = 1,
	SWC_PANEL_EDGE_LEFT = 2,
	SWC_PANEL_EDGE_RIGHT = 3,
};
/**
 * @ingroup iface_swc_panel
 * Validate a swc_panel edge value.
 *
 * @return true on success, false on error.
 * @ref swc_panel_edge
 */
static inline bool
swc_panel_edge_is_valid(uint32_t value, uint32_t version) {
	switch (value) {
	case SWC_PANEL_EDGE_TOP:
		return version >= 1;
	case SWC_PANEL_EDGE_BOTTOM:
		return version >= 1;
	case SWC_PANEL_EDGE_LEFT:
		return version >= 1;
	case SWC_PANEL_EDGE_RIGHT:
		return version >= 1;
	default:
		return false;
	}
}
#endif /* SWC_PANEL_EDGE_ENUM */

/**
 * @ingroup iface_swc_panel
 * @struct swc_panel_interface
 */
struct swc_panel_interface {
	/**
	 */
	void (*dock)(struct wl_client *client,
		     struct wl_resource *resource,
		     uint32_t edge,
		     struct wl_resource *screen,
		     uint32_t focus);
	/**
	 */
	void (*set_offset)(struct wl_client *client,
			   struct wl_resource *resource,
			   uint32_t offset);
	/**
	 */
	void (*set_strut)(struct wl_client *client,
			  struct wl_resource *resource,
			  uint32_t size,
			  uint32_t begin,
			  uint32_t end);
};

#define SWC_PANEL_DOCKED 0

/**
 * @ingroup iface_swc_panel
 */
#define SWC_PANEL_DOCKED_SINCE_VERSION 1

/**
 * @ingroup iface_swc_panel
 */
#define SWC_PANEL_DOCK_SINCE_VERSION 1
/**
 * @ingroup iface_swc_panel
 */
#define SWC_PANEL_SET_OFFSET_SINCE_VERSION 1
/**
 * @ingroup iface_swc_panel
 */
#define SWC_PANEL_SET_STRUT_SINCE_VERSION 1

/**
 * @ingroup iface_swc_panel
 * Sends an docked event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
swc_panel_send_docked(struct wl_resource *resource_, uint32_t length)
{
	wl_resource_post_event(resource_, SWC_PANEL_DOCKED, length);
}

#ifdef  __cplusplus
}
#endif

#endif
