/* Generated by wayland-scanner 1.24.0 */

#ifndef WPE_VIDEO_PLANE_DISPLAY_DMABUF_SERVER_PROTOCOL_H
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_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_wpe_video_plane_display_dmabuf The wpe_video_plane_display_dmabuf protocol
 * @section page_ifaces_wpe_video_plane_display_dmabuf Interfaces
 * - @subpage page_iface_wpe_video_plane_display_dmabuf - 
 * - @subpage page_iface_wpe_video_plane_display_dmabuf_update - 
 * @section page_copyright_wpe_video_plane_display_dmabuf Copyright
 * <pre>
 *
 * Copyright © 2019 Igalia S.L.
 *
 * Permission to use, copy, modify, distribute, and sell this
 * software and its documentation for any purpose is hereby granted
 * without fee, provided that the above copyright notice appear in
 * all copies and that both that copyright notice and this permission
 * notice appear in supporting documentation, and that the name of
 * the copyright holders not be used in advertising or publicity
 * pertaining to distribution of the software without specific,
 * written prior permission.  The copyright holders make no
 * representations about the suitability of this software for any
 * purpose.  It is provided "as is" without express or implied
 * warranty.
 *
 * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
 * SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
 * FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
 * SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
 * THIS SOFTWARE.
 * </pre>
 */
struct wpe_video_plane_display_dmabuf;
struct wpe_video_plane_display_dmabuf_update;

#ifndef WPE_VIDEO_PLANE_DISPLAY_DMABUF_INTERFACE
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_INTERFACE
/**
 * @page page_iface_wpe_video_plane_display_dmabuf wpe_video_plane_display_dmabuf
 * @section page_iface_wpe_video_plane_display_dmabuf_api API
 * See @ref iface_wpe_video_plane_display_dmabuf.
 */
/**
 * @defgroup iface_wpe_video_plane_display_dmabuf The wpe_video_plane_display_dmabuf interface
 */
extern const struct wl_interface wpe_video_plane_display_dmabuf_interface;
#endif
#ifndef WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_INTERFACE
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_INTERFACE
/**
 * @page page_iface_wpe_video_plane_display_dmabuf_update wpe_video_plane_display_dmabuf_update
 * @section page_iface_wpe_video_plane_display_dmabuf_update_api API
 * See @ref iface_wpe_video_plane_display_dmabuf_update.
 */
/**
 * @defgroup iface_wpe_video_plane_display_dmabuf_update The wpe_video_plane_display_dmabuf_update interface
 */
extern const struct wl_interface wpe_video_plane_display_dmabuf_update_interface;
#endif

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf
 * @struct wpe_video_plane_display_dmabuf_interface
 */
struct wpe_video_plane_display_dmabuf_interface {
	/**
	 * @param video_id video element unique identifier
	 * @param fd dmabuf fd
	 * @param x video x position coordinate
	 * @param y video y position coordinate
	 * @param width width in pixels
	 * @param height height in pixels
	 * @param stride stride in bytes
	 */
	void (*create_update)(struct wl_client *client,
			      struct wl_resource *resource,
			      uint32_t id,
			      uint32_t video_id,
			      int32_t fd,
			      int32_t x,
			      int32_t y,
			      int32_t width,
			      int32_t height,
			      uint32_t stride);
	/**
	 * @param video_id video element unique identifier
	 */
	void (*end_of_stream)(struct wl_client *client,
			      struct wl_resource *resource,
			      uint32_t video_id);
};


/**
 * @ingroup iface_wpe_video_plane_display_dmabuf
 */
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_CREATE_UPDATE_SINCE_VERSION 1
/**
 * @ingroup iface_wpe_video_plane_display_dmabuf
 */
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_END_OF_STREAM_SINCE_VERSION 1

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 * @struct wpe_video_plane_display_dmabuf_update_interface
 */
struct wpe_video_plane_display_dmabuf_update_interface {
	/**
	 */
	void (*destroy)(struct wl_client *client,
			struct wl_resource *resource);
};

#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_RELEASE 0

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 */
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_RELEASE_SINCE_VERSION 1

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 */
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_DESTROY_SINCE_VERSION 1

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 * Sends an release event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
wpe_video_plane_display_dmabuf_update_send_release(struct wl_resource *resource_)
{
	wl_resource_post_event(resource_, WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_RELEASE);
}

#ifdef  __cplusplus
}
#endif

#endif
