/* Generated by wayland-scanner 1.24.0 */

#ifndef QT_VULKAN_SERVER_BUFFER_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define QT_VULKAN_SERVER_BUFFER_UNSTABLE_V1_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_qt_vulkan_server_buffer_unstable_v1 The qt_vulkan_server_buffer_unstable_v1 protocol
 * @section page_ifaces_qt_vulkan_server_buffer_unstable_v1 Interfaces
 * - @subpage page_iface_zqt_vulkan_server_buffer_v1 - Internal protocol for buffer sharing using Vulkan external memory
 * @section page_copyright_qt_vulkan_server_buffer_unstable_v1 Copyright
 * <pre>
 *
 * Copyright (C) 2019 The Qt Company Ltd.
 * SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 * </pre>
 */
struct qt_server_buffer;
struct zqt_vulkan_server_buffer_v1;

#ifndef ZQT_VULKAN_SERVER_BUFFER_V1_INTERFACE
#define ZQT_VULKAN_SERVER_BUFFER_V1_INTERFACE
/**
 * @page page_iface_zqt_vulkan_server_buffer_v1 zqt_vulkan_server_buffer_v1
 * @section page_iface_zqt_vulkan_server_buffer_v1_desc Description
 *
 * This protocol is used internally by Qt for implementing the
 * qt_server_buffer extension on hardware that supports Vulkan external memory .
 *
 * This protocol is not part of the Qt API.  It exists purely as an
 * implementation detail and may change from version to
 * version without notice, or even be removed.
 * @section page_iface_zqt_vulkan_server_buffer_v1_api API
 * See @ref iface_zqt_vulkan_server_buffer_v1.
 */
/**
 * @defgroup iface_zqt_vulkan_server_buffer_v1 The zqt_vulkan_server_buffer_v1 interface
 *
 * This protocol is used internally by Qt for implementing the
 * qt_server_buffer extension on hardware that supports Vulkan external memory .
 *
 * This protocol is not part of the Qt API.  It exists purely as an
 * implementation detail and may change from version to
 * version without notice, or even be removed.
 */
extern const struct wl_interface zqt_vulkan_server_buffer_v1_interface;
#endif

/**
 * @ingroup iface_zqt_vulkan_server_buffer_v1
 * @struct zqt_vulkan_server_buffer_v1_listener
 */
struct zqt_vulkan_server_buffer_v1_listener {
	/**
	 * vulkan buffer information
	 *
	 * Informs the client about a newly created server buffer. The
	 * "fd" argument is a POSIX file descriptor representing the
	 * underlying resources of a Vulkan device memory object as defined
	 * in the GL_EXT_memory_object_fd extension.
	 * @param fd GL_EXT_memory_object_fd
	 * @param memory_size size in bytes
	 * @param format GL internal format
	 */
	void (*server_buffer_created)(void *data,
				      struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1,
				      struct qt_server_buffer *id,
				      int32_t fd,
				      uint32_t width,
				      uint32_t height,
				      uint32_t memory_size,
				      uint32_t format);
};

/**
 * @ingroup iface_zqt_vulkan_server_buffer_v1
 */
static inline int
zqt_vulkan_server_buffer_v1_add_listener(struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1,
					 const struct zqt_vulkan_server_buffer_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) zqt_vulkan_server_buffer_v1,
				     (void (**)(void)) listener, data);
}

/**
 * @ingroup iface_zqt_vulkan_server_buffer_v1
 */
#define ZQT_VULKAN_SERVER_BUFFER_V1_SERVER_BUFFER_CREATED_SINCE_VERSION 1


/** @ingroup iface_zqt_vulkan_server_buffer_v1 */
static inline void
zqt_vulkan_server_buffer_v1_set_user_data(struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zqt_vulkan_server_buffer_v1, user_data);
}

/** @ingroup iface_zqt_vulkan_server_buffer_v1 */
static inline void *
zqt_vulkan_server_buffer_v1_get_user_data(struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zqt_vulkan_server_buffer_v1);
}

static inline uint32_t
zqt_vulkan_server_buffer_v1_get_version(struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) zqt_vulkan_server_buffer_v1);
}

/** @ingroup iface_zqt_vulkan_server_buffer_v1 */
static inline void
zqt_vulkan_server_buffer_v1_destroy(struct zqt_vulkan_server_buffer_v1 *zqt_vulkan_server_buffer_v1)
{
	wl_proxy_destroy((struct wl_proxy *) zqt_vulkan_server_buffer_v1);
}

#ifdef  __cplusplus
}
#endif

#endif
