/* Generated by wayland-scanner 1.25.0 */

#ifndef GAMESCOPE_PRIVATE_CLIENT_PROTOCOL_H
#define GAMESCOPE_PRIVATE_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_gamescope_private The gamescope_private protocol
 * gamescope-specific protocol
 *
 * @section page_desc_gamescope_private Description
 *
 * This is a private Gamescope protocol, mainly for debugging.
 * No stable ABI is guaranteed for this protocol, it is versioned with gamescope.
 *
 * @section page_ifaces_gamescope_private Interfaces
 * - @subpage page_iface_gamescope_private - 
 * @section page_copyright_gamescope_private Copyright
 * <pre>
 *
 * Copyright © 2023 Valve Corporation
 *
 * Permission is hereby granted, free of charge, to any person obtaining a
 * copy of this software and associated documentation files (the "Software"),
 * to deal in the Software without restriction, including without limitation
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 * and/or sell copies of the Software, and to permit persons to whom the
 * Software is furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice (including the next
 * paragraph) shall be included in all copies or substantial portions of the
 * Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 * DEALINGS IN THE SOFTWARE.
 * </pre>
 */
struct gamescope_private;

#ifndef GAMESCOPE_PRIVATE_INTERFACE
#define GAMESCOPE_PRIVATE_INTERFACE
/**
 * @page page_iface_gamescope_private gamescope_private
 * @section page_iface_gamescope_private_api API
 * See @ref iface_gamescope_private.
 */
/**
 * @defgroup iface_gamescope_private The gamescope_private interface
 */
extern const struct wl_interface gamescope_private_interface;
#endif

/**
 * @ingroup iface_gamescope_private
 * @struct gamescope_private_listener
 */
struct gamescope_private_listener {
	/**
	 * @param text Log string
	 */
	void (*log)(void *data,
		    struct gamescope_private *gamescope_private,
		    const char *text);
	/**
	 */
	void (*command_executed)(void *data,
				 struct gamescope_private *gamescope_private);
};

/**
 * @ingroup iface_gamescope_private
 */
static inline int
gamescope_private_add_listener(struct gamescope_private *gamescope_private,
			       const struct gamescope_private_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) gamescope_private,
				     (void (**)(void)) listener, data);
}

#define GAMESCOPE_PRIVATE_DESTROY 0
#define GAMESCOPE_PRIVATE_EXECUTE 1

/**
 * @ingroup iface_gamescope_private
 */
#define GAMESCOPE_PRIVATE_LOG_SINCE_VERSION 1
/**
 * @ingroup iface_gamescope_private
 */
#define GAMESCOPE_PRIVATE_COMMAND_EXECUTED_SINCE_VERSION 1

/**
 * @ingroup iface_gamescope_private
 */
#define GAMESCOPE_PRIVATE_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_gamescope_private
 */
#define GAMESCOPE_PRIVATE_EXECUTE_SINCE_VERSION 1

/** @ingroup iface_gamescope_private */
static inline void
gamescope_private_set_user_data(struct gamescope_private *gamescope_private, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) gamescope_private, user_data);
}

/** @ingroup iface_gamescope_private */
static inline void *
gamescope_private_get_user_data(struct gamescope_private *gamescope_private)
{
	return wl_proxy_get_user_data((struct wl_proxy *) gamescope_private);
}

static inline uint32_t
gamescope_private_get_version(struct gamescope_private *gamescope_private)
{
	return wl_proxy_get_version((struct wl_proxy *) gamescope_private);
}

/**
 * @ingroup iface_gamescope_private
 */
static inline void
gamescope_private_destroy(struct gamescope_private *gamescope_private)
{
	wl_proxy_marshal_flags((struct wl_proxy *) gamescope_private,
			 GAMESCOPE_PRIVATE_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) gamescope_private), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_gamescope_private
 */
static inline void
gamescope_private_execute(struct gamescope_private *gamescope_private, const char *cvar_name, const char *value)
{
	wl_proxy_marshal_flags((struct wl_proxy *) gamescope_private,
			 GAMESCOPE_PRIVATE_EXECUTE, NULL, wl_proxy_get_version((struct wl_proxy *) gamescope_private), 0, cvar_name, value);
}

#ifdef  __cplusplus
}
#endif

#endif
