/* Generated by wayland-scanner 1.24.0 */

#ifndef ZKDE_SCREENCAST_UNSTABLE_V1_CLIENT_PROTOCOL_H
#define ZKDE_SCREENCAST_UNSTABLE_V1_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_zkde_screencast_unstable_v1 The zkde_screencast_unstable_v1 protocol
 * @section page_ifaces_zkde_screencast_unstable_v1 Interfaces
 * - @subpage page_iface_zkde_screencast_unstable_v1 - Protocol for managing PipeWire feeds of the different displays and windows
 * - @subpage page_iface_zkde_screencast_stream_unstable_v1 - 
 * @section page_copyright_zkde_screencast_unstable_v1 Copyright
 * <pre>
 *
 * SPDX-FileCopyrightText: 2020-2021 Aleix Pol Gonzalez <aleixpol@kde.org>
 *
 * SPDX-License-Identifier: LGPL-2.1-or-later
 * </pre>
 */
struct wl_output;
struct zkde_screencast_stream_unstable_v1;
struct zkde_screencast_unstable_v1;

#ifndef ZKDE_SCREENCAST_UNSTABLE_V1_INTERFACE
#define ZKDE_SCREENCAST_UNSTABLE_V1_INTERFACE
/**
 * @page page_iface_zkde_screencast_unstable_v1 zkde_screencast_unstable_v1
 * @section page_iface_zkde_screencast_unstable_v1_desc Description
 *
 * Warning! The protocol described in this file is a desktop environment
 * implementation detail. Regular clients must not use this protocol.
 * Backward incompatible changes may be added without bumping the major
 * version of the extension.
 * @section page_iface_zkde_screencast_unstable_v1_api API
 * See @ref iface_zkde_screencast_unstable_v1.
 */
/**
 * @defgroup iface_zkde_screencast_unstable_v1 The zkde_screencast_unstable_v1 interface
 *
 * Warning! The protocol described in this file is a desktop environment
 * implementation detail. Regular clients must not use this protocol.
 * Backward incompatible changes may be added without bumping the major
 * version of the extension.
 */
extern const struct wl_interface zkde_screencast_unstable_v1_interface;
#endif
#ifndef ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_INTERFACE
#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_INTERFACE
/**
 * @page page_iface_zkde_screencast_stream_unstable_v1 zkde_screencast_stream_unstable_v1
 * @section page_iface_zkde_screencast_stream_unstable_v1_api API
 * See @ref iface_zkde_screencast_stream_unstable_v1.
 */
/**
 * @defgroup iface_zkde_screencast_stream_unstable_v1 The zkde_screencast_stream_unstable_v1 interface
 */
extern const struct wl_interface zkde_screencast_stream_unstable_v1_interface;
#endif

#ifndef ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_ENUM
#define ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_ENUM
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 * Stream consumer attachment attributes
 */
enum zkde_screencast_unstable_v1_pointer {
	/**
	 * No cursor
	 */
	ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_HIDDEN = 1,
	/**
	 * Render the cursor on the stream
	 */
	ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_EMBEDDED = 2,
	/**
	 * Send metadata about where the cursor is through PipeWire
	 */
	ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_METADATA = 4,
};
#endif /* ZKDE_SCREENCAST_UNSTABLE_V1_POINTER_ENUM */

#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_OUTPUT 0
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_WINDOW 1
#define ZKDE_SCREENCAST_UNSTABLE_V1_DESTROY 2
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT 3
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_REGION 4
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT_WITH_DESCRIPTION 5


/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_OUTPUT_SINCE_VERSION 1
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_WINDOW_SINCE_VERSION 1
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT_SINCE_VERSION 2
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_REGION_SINCE_VERSION 3
/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
#define ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT_WITH_DESCRIPTION_SINCE_VERSION 4

/** @ingroup iface_zkde_screencast_unstable_v1 */
static inline void
zkde_screencast_unstable_v1_set_user_data(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zkde_screencast_unstable_v1, user_data);
}

/** @ingroup iface_zkde_screencast_unstable_v1 */
static inline void *
zkde_screencast_unstable_v1_get_user_data(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zkde_screencast_unstable_v1);
}

static inline uint32_t
zkde_screencast_unstable_v1_get_version(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1);
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
static inline struct zkde_screencast_stream_unstable_v1 *
zkde_screencast_unstable_v1_stream_output(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, struct wl_output *output, uint32_t pointer)
{
	struct wl_proxy *stream;

	stream = wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_OUTPUT, &zkde_screencast_stream_unstable_v1_interface, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), 0, NULL, output, pointer);

	return (struct zkde_screencast_stream_unstable_v1 *) stream;
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
static inline struct zkde_screencast_stream_unstable_v1 *
zkde_screencast_unstable_v1_stream_window(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, const char *window_uuid, uint32_t pointer)
{
	struct wl_proxy *stream;

	stream = wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_WINDOW, &zkde_screencast_stream_unstable_v1_interface, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), 0, NULL, window_uuid, pointer);

	return (struct zkde_screencast_stream_unstable_v1 *) stream;
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 *
 * Destroy the zkde_screencast_unstable_v1 object.
 */
static inline void
zkde_screencast_unstable_v1_destroy(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
static inline struct zkde_screencast_stream_unstable_v1 *
zkde_screencast_unstable_v1_stream_virtual_output(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, const char *name, int32_t width, int32_t height, wl_fixed_t scale, uint32_t pointer)
{
	struct wl_proxy *stream;

	stream = wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT, &zkde_screencast_stream_unstable_v1_interface, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), 0, NULL, name, width, height, scale, pointer);

	return (struct zkde_screencast_stream_unstable_v1 *) stream;
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 *
 * Since version 5, the compositor will choose the highest scale
 * factor for the region if the given scale is 0.0.
 */
static inline struct zkde_screencast_stream_unstable_v1 *
zkde_screencast_unstable_v1_stream_region(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, int32_t x, int32_t y, uint32_t width, uint32_t height, wl_fixed_t scale, uint32_t pointer)
{
	struct wl_proxy *stream;

	stream = wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_REGION, &zkde_screencast_stream_unstable_v1_interface, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), 0, NULL, x, y, width, height, scale, pointer);

	return (struct zkde_screencast_stream_unstable_v1 *) stream;
}

/**
 * @ingroup iface_zkde_screencast_unstable_v1
 */
static inline struct zkde_screencast_stream_unstable_v1 *
zkde_screencast_unstable_v1_stream_virtual_output_with_description(struct zkde_screencast_unstable_v1 *zkde_screencast_unstable_v1, const char *name, const char *description, int32_t width, int32_t height, wl_fixed_t scale, uint32_t pointer)
{
	struct wl_proxy *stream;

	stream = wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_unstable_v1,
			 ZKDE_SCREENCAST_UNSTABLE_V1_STREAM_VIRTUAL_OUTPUT_WITH_DESCRIPTION, &zkde_screencast_stream_unstable_v1_interface, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_unstable_v1), 0, NULL, name, description, width, height, scale, pointer);

	return (struct zkde_screencast_stream_unstable_v1 *) stream;
}

/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 * @struct zkde_screencast_stream_unstable_v1_listener
 */
struct zkde_screencast_stream_unstable_v1_listener {
	/**
	 * Notifies that the server has stopped the stream. Clients should now call close.
	 *
	 * 
	 */
	void (*closed)(void *data,
		       struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1);
	/**
	 * Notifies about a pipewire feed being created
	 *
	 * 
	 * @param node node of the pipewire buffer
	 */
	void (*created)(void *data,
			struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1,
			uint32_t node);
	/**
	 * Offers an error message so the client knows the created event will not arrive, and the client should close the resource.
	 *
	 * 
	 * @param error A human readable translated error message.
	 */
	void (*failed)(void *data,
		       struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1,
		       const char *error);
};

/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
static inline int
zkde_screencast_stream_unstable_v1_add_listener(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1,
						const struct zkde_screencast_stream_unstable_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) zkde_screencast_stream_unstable_v1,
				     (void (**)(void)) listener, data);
}

#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_CLOSE 0

/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_CLOSED_SINCE_VERSION 1
/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_CREATED_SINCE_VERSION 1
/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_FAILED_SINCE_VERSION 1

/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
#define ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_CLOSE_SINCE_VERSION 1

/** @ingroup iface_zkde_screencast_stream_unstable_v1 */
static inline void
zkde_screencast_stream_unstable_v1_set_user_data(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) zkde_screencast_stream_unstable_v1, user_data);
}

/** @ingroup iface_zkde_screencast_stream_unstable_v1 */
static inline void *
zkde_screencast_stream_unstable_v1_get_user_data(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) zkde_screencast_stream_unstable_v1);
}

static inline uint32_t
zkde_screencast_stream_unstable_v1_get_version(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) zkde_screencast_stream_unstable_v1);
}

/** @ingroup iface_zkde_screencast_stream_unstable_v1 */
static inline void
zkde_screencast_stream_unstable_v1_destroy(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1)
{
	wl_proxy_destroy((struct wl_proxy *) zkde_screencast_stream_unstable_v1);
}

/**
 * @ingroup iface_zkde_screencast_stream_unstable_v1
 */
static inline void
zkde_screencast_stream_unstable_v1_close(struct zkde_screencast_stream_unstable_v1 *zkde_screencast_stream_unstable_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) zkde_screencast_stream_unstable_v1,
			 ZKDE_SCREENCAST_STREAM_UNSTABLE_V1_CLOSE, NULL, wl_proxy_get_version((struct wl_proxy *) zkde_screencast_stream_unstable_v1), WL_MARSHAL_FLAG_DESTROY);
}

#ifdef  __cplusplus
}
#endif

#endif
