/* Generated by wayland-scanner 1.25.0 */

#ifndef QT_DMABUF_SERVER_BUFFER_SERVER_PROTOCOL_H
#define QT_DMABUF_SERVER_BUFFER_SERVER_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

struct wl_client;
struct wl_resource;

/**
 * @page page_qt_dmabuf_server_buffer The qt_dmabuf_server_buffer protocol
 * @section page_ifaces_qt_dmabuf_server_buffer Interfaces
 * - @subpage page_iface_qt_dmabuf_server_buffer - internal protocol for buffer sharing
 * @section page_copyright_qt_dmabuf_server_buffer Copyright
 * <pre>
 *
 * Copyright (C) 2018 The Qt Company Ltd.
 * SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
 * </pre>
 */
struct qt_dmabuf_server_buffer;
struct qt_server_buffer;

#ifndef QT_DMABUF_SERVER_BUFFER_INTERFACE
#define QT_DMABUF_SERVER_BUFFER_INTERFACE
/**
 * @page page_iface_qt_dmabuf_server_buffer qt_dmabuf_server_buffer
 * @section page_iface_qt_dmabuf_server_buffer_desc Description
 *
 * This protocol is used internally by Qt for implementing the
 * qt_server_buffer extension on hardware that supports Linux dma-buf.
 *
 * 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_qt_dmabuf_server_buffer_api API
 * See @ref iface_qt_dmabuf_server_buffer.
 */
/**
 * @defgroup iface_qt_dmabuf_server_buffer The qt_dmabuf_server_buffer interface
 *
 * This protocol is used internally by Qt for implementing the
 * qt_server_buffer extension on hardware that supports Linux dma-buf.
 *
 * 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 qt_dmabuf_server_buffer_interface;
#endif

#define QT_DMABUF_SERVER_BUFFER_SERVER_BUFFER_CREATED 0

/**
 * @ingroup iface_qt_dmabuf_server_buffer
 */
#define QT_DMABUF_SERVER_BUFFER_SERVER_BUFFER_CREATED_SINCE_VERSION 1


/**
 * @ingroup iface_qt_dmabuf_server_buffer
 * Sends an server_buffer_created event to the client owning the resource.
 * @param resource_ The client's resource
 */
static inline void
qt_dmabuf_server_buffer_send_server_buffer_created(struct wl_resource *resource_, struct wl_resource *id, int32_t fd, int32_t width, int32_t height, int32_t stride, int32_t offset, int32_t fourcc_format)
{
	wl_resource_post_event(resource_, QT_DMABUF_SERVER_BUFFER_SERVER_BUFFER_CREATED, id, fd, width, height, stride, offset, fourcc_format);
}

#ifdef  __cplusplus
}
#endif

#endif
