/* Generated by wayland-scanner 1.24.0 */

#ifndef WPE_VIDEO_PLANE_DISPLAY_DMABUF_CLIENT_PROTOCOL_H
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

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

#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_CREATE_UPDATE 0
#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_END_OF_STREAM 1


/**
 * @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 */
static inline void
wpe_video_plane_display_dmabuf_set_user_data(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) wpe_video_plane_display_dmabuf, user_data);
}

/** @ingroup iface_wpe_video_plane_display_dmabuf */
static inline void *
wpe_video_plane_display_dmabuf_get_user_data(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf)
{
	return wl_proxy_get_user_data((struct wl_proxy *) wpe_video_plane_display_dmabuf);
}

static inline uint32_t
wpe_video_plane_display_dmabuf_get_version(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf)
{
	return wl_proxy_get_version((struct wl_proxy *) wpe_video_plane_display_dmabuf);
}

/** @ingroup iface_wpe_video_plane_display_dmabuf */
static inline void
wpe_video_plane_display_dmabuf_destroy(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf)
{
	wl_proxy_destroy((struct wl_proxy *) wpe_video_plane_display_dmabuf);
}

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf
 */
static inline struct wpe_video_plane_display_dmabuf_update *
wpe_video_plane_display_dmabuf_create_update(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf, uint32_t video_id, int32_t fd, int32_t x, int32_t y, int32_t width, int32_t height, uint32_t stride)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) wpe_video_plane_display_dmabuf,
			 WPE_VIDEO_PLANE_DISPLAY_DMABUF_CREATE_UPDATE, &wpe_video_plane_display_dmabuf_update_interface, wl_proxy_get_version((struct wl_proxy *) wpe_video_plane_display_dmabuf), 0, NULL, video_id, fd, x, y, width, height, stride);

	return (struct wpe_video_plane_display_dmabuf_update *) id;
}

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf
 */
static inline void
wpe_video_plane_display_dmabuf_end_of_stream(struct wpe_video_plane_display_dmabuf *wpe_video_plane_display_dmabuf, uint32_t video_id)
{
	wl_proxy_marshal_flags((struct wl_proxy *) wpe_video_plane_display_dmabuf,
			 WPE_VIDEO_PLANE_DISPLAY_DMABUF_END_OF_STREAM, NULL, wl_proxy_get_version((struct wl_proxy *) wpe_video_plane_display_dmabuf), 0, video_id);
}

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 * @struct wpe_video_plane_display_dmabuf_update_listener
 */
struct wpe_video_plane_display_dmabuf_update_listener {
	/**
	 */
	void (*release)(void *data,
			struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update);
};

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 */
static inline int
wpe_video_plane_display_dmabuf_update_add_listener(struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update,
						   const struct wpe_video_plane_display_dmabuf_update_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) wpe_video_plane_display_dmabuf_update,
				     (void (**)(void)) listener, data);
}

#define WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_DESTROY 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 */
static inline void
wpe_video_plane_display_dmabuf_update_set_user_data(struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) wpe_video_plane_display_dmabuf_update, user_data);
}

/** @ingroup iface_wpe_video_plane_display_dmabuf_update */
static inline void *
wpe_video_plane_display_dmabuf_update_get_user_data(struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update)
{
	return wl_proxy_get_user_data((struct wl_proxy *) wpe_video_plane_display_dmabuf_update);
}

static inline uint32_t
wpe_video_plane_display_dmabuf_update_get_version(struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update)
{
	return wl_proxy_get_version((struct wl_proxy *) wpe_video_plane_display_dmabuf_update);
}

/**
 * @ingroup iface_wpe_video_plane_display_dmabuf_update
 */
static inline void
wpe_video_plane_display_dmabuf_update_destroy(struct wpe_video_plane_display_dmabuf_update *wpe_video_plane_display_dmabuf_update)
{
	wl_proxy_marshal_flags((struct wl_proxy *) wpe_video_plane_display_dmabuf_update,
			 WPE_VIDEO_PLANE_DISPLAY_DMABUF_UPDATE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wpe_video_plane_display_dmabuf_update), WL_MARSHAL_FLAG_DESTROY);
}

#ifdef  __cplusplus
}
#endif

#endif
