/* Generated by wayland-scanner 1.26.0 */

#ifndef XDG_SESSION_MANAGEMENT_V1_CLIENT_PROTOCOL_H
#define XDG_SESSION_MANAGEMENT_V1_CLIENT_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

/**
 * @page page_xdg_session_management_v1 The xdg_session_management_v1 protocol
 * Protocol for managing application sessions
 *
 * @section page_desc_xdg_session_management_v1 Description
 *
 * This description provides a high-level overview of the interplay between
 * the interfaces defined this protocol. For details, see the protocol
 * specification.
 *
 * The xdg_session_manager protocol declares interfaces necessary to
 * allow clients to restore toplevel state from previous executions. The
 * xdg_session_manager_v1.get_session request can be used to obtain a
 * xdg_session_v1 resource representing the state of a set of toplevels.
 *
 * Clients may obtain the session string to use in future calls through
 * the xdg_session_v1.created event. Compositors will use this string
 * as an identifiable token for future runs, possibly storing data about
 * the related toplevels in persistent storage. Clients that wish to
 * track sessions in multiple environments may use the $XDG_CURRENT_DESKTOP
 * environment variable.
 *
 * Toplevels are managed through the xdg_session_v1.add_toplevel and
 * xdg_session_v1.remove_toplevel pair of requests. Clients will explicitly
 * request a toplevel to be restored according to prior state through the
 * xdg_session_v1.restore_toplevel request before the toplevel is mapped.
 *
 * Compositors may store session information up to any arbitrary level, and
 * apply any limits and policies to the amount of data stored and its lifetime.
 * Clients must account for missing sessions and partial session restoration.
 *
 * Warning! The protocol described in this file is currently in the testing
 * phase. Backward compatible changes may be added together with the
 * corresponding interface version bump. Backward incompatible changes can
 * only be done by creating a new major version of the extension.
 *
 * @section page_ifaces_xdg_session_management_v1 Interfaces
 * - @subpage page_iface_xdg_session_manager_v1 - manage sessions for applications
 * - @subpage page_iface_xdg_session_v1 - A session for an application
 * - @subpage page_iface_xdg_toplevel_session_v1 - A session for an application
 * @section page_copyright_xdg_session_management_v1 Copyright
 * <pre>
 *
 * Copyright 2018 Mike Blumenkrantz
 * Copyright 2018 Samsung Electronics Co., Ltd
 * Copyright 2018 Red Hat Inc.
 *
 * 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 xdg_session_manager_v1;
struct xdg_session_v1;
struct xdg_toplevel;
struct xdg_toplevel_session_v1;

#ifndef XDG_SESSION_MANAGER_V1_INTERFACE
#define XDG_SESSION_MANAGER_V1_INTERFACE
/**
 * @page page_iface_xdg_session_manager_v1 xdg_session_manager_v1
 * @section page_iface_xdg_session_manager_v1_desc Description
 *
 * The xdg_session_manager_v1 interface defines base requests for creating and
 * managing a session for an application. Sessions persist across application
 * and compositor restarts unless explicitly destroyed. A session is created
 * for the purpose of maintaining an application's xdg_toplevel surfaces
 * across compositor or application restarts. The compositor should remember
 * as many states as possible for surfaces in a given session, but there is
 * no requirement for which states must be remembered.
 *
 * Policies such as cache eviction are declared an implementation detail of
 * the compositor. Clients should account for no longer existing sessions.
 * @section page_iface_xdg_session_manager_v1_api API
 * See @ref iface_xdg_session_manager_v1.
 */
/**
 * @defgroup iface_xdg_session_manager_v1 The xdg_session_manager_v1 interface
 *
 * The xdg_session_manager_v1 interface defines base requests for creating and
 * managing a session for an application. Sessions persist across application
 * and compositor restarts unless explicitly destroyed. A session is created
 * for the purpose of maintaining an application's xdg_toplevel surfaces
 * across compositor or application restarts. The compositor should remember
 * as many states as possible for surfaces in a given session, but there is
 * no requirement for which states must be remembered.
 *
 * Policies such as cache eviction are declared an implementation detail of
 * the compositor. Clients should account for no longer existing sessions.
 */
extern const struct wl_interface xdg_session_manager_v1_interface;
#endif
#ifndef XDG_SESSION_V1_INTERFACE
#define XDG_SESSION_V1_INTERFACE
/**
 * @page page_iface_xdg_session_v1 xdg_session_v1
 * @section page_iface_xdg_session_v1_desc Description
 *
 * A xdg_session_v1 object represents a session for an application. While the
 * object exists, all surfaces which have been added to the session will
 * have states stored by the compositor which can be reapplied at a later
 * time. Two sessions cannot exist for the same identifier string.
 *
 * States for surfaces added to a session are automatically updated by the
 * compositor when they are changed.
 * @section page_iface_xdg_session_v1_api API
 * See @ref iface_xdg_session_v1.
 */
/**
 * @defgroup iface_xdg_session_v1 The xdg_session_v1 interface
 *
 * A xdg_session_v1 object represents a session for an application. While the
 * object exists, all surfaces which have been added to the session will
 * have states stored by the compositor which can be reapplied at a later
 * time. Two sessions cannot exist for the same identifier string.
 *
 * States for surfaces added to a session are automatically updated by the
 * compositor when they are changed.
 */
extern const struct wl_interface xdg_session_v1_interface;
#endif
#ifndef XDG_TOPLEVEL_SESSION_V1_INTERFACE
#define XDG_TOPLEVEL_SESSION_V1_INTERFACE
/**
 * @page page_iface_xdg_toplevel_session_v1 xdg_toplevel_session_v1
 * @section page_iface_xdg_toplevel_session_v1_desc Description
 *
 * A xdg_toplevel_session_v1 resource acts as a handle for the given
 * toplevel in the session. It allows for receiving events after a
 * toplevel state was restored, and has the requests to manage them.
 * @section page_iface_xdg_toplevel_session_v1_api API
 * See @ref iface_xdg_toplevel_session_v1.
 */
/**
 * @defgroup iface_xdg_toplevel_session_v1 The xdg_toplevel_session_v1 interface
 *
 * A xdg_toplevel_session_v1 resource acts as a handle for the given
 * toplevel in the session. It allows for receiving events after a
 * toplevel state was restored, and has the requests to manage them.
 */
extern const struct wl_interface xdg_toplevel_session_v1_interface;
#endif

#ifndef XDG_SESSION_MANAGER_V1_ERROR_ENUM
#define XDG_SESSION_MANAGER_V1_ERROR_ENUM
enum xdg_session_manager_v1_error {
	/**
	 * a requested session is already in use
	 */
	XDG_SESSION_MANAGER_V1_ERROR_IN_USE = 1,
	/**
	 * invalid session identifier
	 */
	XDG_SESSION_MANAGER_V1_ERROR_INVALID_SESSION_ID = 2,
	/**
	 * invalid reason
	 */
	XDG_SESSION_MANAGER_V1_ERROR_INVALID_REASON = 3,
};
#endif /* XDG_SESSION_MANAGER_V1_ERROR_ENUM */

#ifndef XDG_SESSION_MANAGER_V1_REASON_ENUM
#define XDG_SESSION_MANAGER_V1_REASON_ENUM
/**
 * @ingroup iface_xdg_session_manager_v1
 * reason for getting a session
 *
 * The reason may determine in what way a session restores the window
 * management state of associated toplevels.
 *
 * For example newly launched applications might be launched on the active
 * workspace with restored size and position, while a recovered
 * application might restore additional state such as active workspace and
 * stacking order.
 */
enum xdg_session_manager_v1_reason {
	/**
	 * an app is newly launched
	 *
	 * A new app instance is launched, for example from an app
	 * launcher.
	 */
	XDG_SESSION_MANAGER_V1_REASON_LAUNCH = 1,
	/**
	 * an app recovered
	 *
	 * An app instance is recovering from for example a compositor or
	 * app crash.
	 */
	XDG_SESSION_MANAGER_V1_REASON_RECOVER = 2,
	/**
	 * an app restored
	 *
	 * An app instance is restored, for example part of a restored
	 * session, or restored from having been temporarily terminated due
	 * to resource constraints.
	 */
	XDG_SESSION_MANAGER_V1_REASON_SESSION_RESTORE = 3,
};
#endif /* XDG_SESSION_MANAGER_V1_REASON_ENUM */

#define XDG_SESSION_MANAGER_V1_DESTROY 0
#define XDG_SESSION_MANAGER_V1_GET_SESSION 1


/**
 * @ingroup iface_xdg_session_manager_v1
 */
#define XDG_SESSION_MANAGER_V1_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_manager_v1
 */
#define XDG_SESSION_MANAGER_V1_GET_SESSION_SINCE_VERSION 1

/** @ingroup iface_xdg_session_manager_v1 */
static inline void
xdg_session_manager_v1_set_user_data(struct xdg_session_manager_v1 *xdg_session_manager_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) xdg_session_manager_v1, user_data);
}

/** @ingroup iface_xdg_session_manager_v1 */
static inline void *
xdg_session_manager_v1_get_user_data(struct xdg_session_manager_v1 *xdg_session_manager_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) xdg_session_manager_v1);
}

static inline uint32_t
xdg_session_manager_v1_get_version(struct xdg_session_manager_v1 *xdg_session_manager_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) xdg_session_manager_v1);
}

/**
 * @ingroup iface_xdg_session_manager_v1
 *
 * Destroy the manager object. The existing session objects will be
 * unaffected.
 */
static inline void
xdg_session_manager_v1_destroy(struct xdg_session_manager_v1 *xdg_session_manager_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_manager_v1,
			 XDG_SESSION_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_session_manager_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_xdg_session_manager_v1
 *
 * Create a session object corresponding to either an existing session
 * identified by the given session identifier string or a new session.
 * While the session object exists, the session is considered to be "in
 * use".
 *
 * If an identifier string represents a session that is currently actively
 * in use by the the same client, an 'in_use' error is raised. If some
 * other client is currently using the same session, the new session will
 * replace managing the associated state.
 *
 * If the reason is not a valid enum entry, the 'invalid_reason' protocol
 * error is raised.
 *
 * NULL is passed to initiate a new session. If a session_id is passed
 * which does not represent a valid session, the compositor treats it as if
 * NULL had been passed.
 *
 * The session id string must be UTF-8 encoded. It is also limited by the
 * maximum length of wayland messages (around 4KB). The 'invalid_session_id'
 * protocol error will be raised if an invalid string is provided.
 *
 * A client is allowed to have any number of in use sessions at the same
 * time.
 */
static inline struct xdg_session_v1 *
xdg_session_manager_v1_get_session(struct xdg_session_manager_v1 *xdg_session_manager_v1, uint32_t reason, const char *session_id)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_manager_v1,
			 XDG_SESSION_MANAGER_V1_GET_SESSION, &xdg_session_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_session_manager_v1), 0, NULL, reason, session_id);

	return (struct xdg_session_v1 *) id;
}

#ifndef XDG_SESSION_V1_ERROR_ENUM
#define XDG_SESSION_V1_ERROR_ENUM
enum xdg_session_v1_error {
	/**
	 * toplevel name is already in use
	 */
	XDG_SESSION_V1_ERROR_NAME_IN_USE = 1,
	/**
	 * toplevel was already mapped when restored
	 */
	XDG_SESSION_V1_ERROR_ALREADY_MAPPED = 2,
	/**
	 * provided toplevel name is invalid
	 */
	XDG_SESSION_V1_ERROR_INVALID_NAME = 3,
	/**
	 * toplevel already added
	 */
	XDG_SESSION_V1_ERROR_ALREADY_ADDED = 4,
};
#endif /* XDG_SESSION_V1_ERROR_ENUM */

/**
 * @ingroup iface_xdg_session_v1
 * @struct xdg_session_v1_listener
 */
struct xdg_session_v1_listener {
	/**
	 * newly-created session id
	 *
	 * Emitted at most once some time after getting a new session
	 * object. It means that no previous state was restored, and a new
	 * session was created. The passed id can be persistently stored
	 * and used to restore previous sessions.
	 */
	void (*created)(void *data,
			struct xdg_session_v1 *xdg_session_v1,
			const char *session_id);
	/**
	 * the session has been restored
	 *
	 * Emitted at most once some time after getting a new session
	 * object. It means that previous state was at least partially
	 * restored. The same id can again be used to restore previous
	 * sessions.
	 */
	void (*restored)(void *data,
			 struct xdg_session_v1 *xdg_session_v1);
	/**
	 * the session has been replaced
	 *
	 * Emitted at most once, if the session was taken over by some
	 * other client. When this happens, the session and all its
	 * toplevel session objects become inert, and should be destroyed.
	 */
	void (*replaced)(void *data,
			 struct xdg_session_v1 *xdg_session_v1);
};

/**
 * @ingroup iface_xdg_session_v1
 */
static inline int
xdg_session_v1_add_listener(struct xdg_session_v1 *xdg_session_v1,
			    const struct xdg_session_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) xdg_session_v1,
				     (void (**)(void)) listener, data);
}

#define XDG_SESSION_V1_DESTROY 0
#define XDG_SESSION_V1_REMOVE 1
#define XDG_SESSION_V1_ADD_TOPLEVEL 2
#define XDG_SESSION_V1_RESTORE_TOPLEVEL 3
#define XDG_SESSION_V1_REMOVE_TOPLEVEL 4

/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_CREATED_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_RESTORED_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_REPLACED_SINCE_VERSION 1

/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_REMOVE_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_ADD_TOPLEVEL_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_RESTORE_TOPLEVEL_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_session_v1
 */
#define XDG_SESSION_V1_REMOVE_TOPLEVEL_SINCE_VERSION 1

/** @ingroup iface_xdg_session_v1 */
static inline void
xdg_session_v1_set_user_data(struct xdg_session_v1 *xdg_session_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) xdg_session_v1, user_data);
}

/** @ingroup iface_xdg_session_v1 */
static inline void *
xdg_session_v1_get_user_data(struct xdg_session_v1 *xdg_session_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) xdg_session_v1);
}

static inline uint32_t
xdg_session_v1_get_version(struct xdg_session_v1 *xdg_session_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) xdg_session_v1);
}

/**
 * @ingroup iface_xdg_session_v1
 *
 * Destroy a session object, preserving the current state but not continuing
 * to make further updates if state changes occur. This makes the associated
 * xdg_toplevel_session_v1 objects inert.
 */
static inline void
xdg_session_v1_destroy(struct xdg_session_v1 *xdg_session_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_v1,
			 XDG_SESSION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_session_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_xdg_session_v1
 *
 * Remove the session, making it no longer available for restoration. A
 * compositor should in response to this request remove the data related to
 * this session from its storage.
 */
static inline void
xdg_session_v1_remove(struct xdg_session_v1 *xdg_session_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_v1,
			 XDG_SESSION_V1_REMOVE, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_session_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_xdg_session_v1
 *
 * Attempt to add a given surface to the session. The passed name is used
 * to identify what window is being restored, and may be used to store
 * window specific state within the session.
 *
 * The name given to the toplevel must not correspond to any previously
 * existing toplevel names in the session. If the name matches an already
 * known toplevel name in the session, a 'name_in_use' protocol error will
 * be raised.
 *
 * The toplevel object must not be added more than once to any session
 * created by the client, otherwise the 'already_added' protocol error
 * will be raised.
 *
 * This request will return a xdg_toplevel_session_v1 for later
 * manipulation. As this resource is created from an empty initial state,
 * compositors must not emit a xdg_toplevel_session_v1.restored event for
 * resources created through this request.
 *
 * The name string must be UTF-8 encoded. It is also limited by the maximum
 * length of wayland messages (around 4KB). The 'invalid_name' protocol
 * error will be raised if an invalid string is provided.
 */
static inline struct xdg_toplevel_session_v1 *
xdg_session_v1_add_toplevel(struct xdg_session_v1 *xdg_session_v1, struct xdg_toplevel *toplevel, const char *name)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_v1,
			 XDG_SESSION_V1_ADD_TOPLEVEL, &xdg_toplevel_session_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_session_v1), 0, NULL, toplevel, name);

	return (struct xdg_toplevel_session_v1 *) id;
}

/**
 * @ingroup iface_xdg_session_v1
 *
 * Inform the compositor that the toplevel associated with the passed name
 * should have its window management state restored.
 *
 * If the toplevel name was previously granted to another xdg_toplevel,
 * the 'name_in_use' protocol error will be raised.
 *
 * The toplevel object must not be added more than once to any session
 * created by the client, otherwise the 'already_added' protocol error
 * will be raised.
 *
 * This request must be called prior to the first commit on the associated
 * wl_surface after creating the toplevel, otherwise an 'already_mapped'
 * error is raised.
 *
 * As part of the initial configure sequence, if the toplevel was
 * successfully restored, a xdg_toplevel_session_v1.restored event is
 * emitted. If the toplevel name was not known in the session, this request
 * will be equivalent to the xdg_toplevel_session_v1.add_toplevel request,
 * and no such event will be emitted. See the xdg_toplevel_session_v1.restored
 * event for further details.
 *
 * The name string must be UTF-8 encoded. It is also limited by the maximum
 * length of wayland messages (around 4KB). The 'invalid_name' protocol
 * error will be raised if an invalid string is provided.
 */
static inline struct xdg_toplevel_session_v1 *
xdg_session_v1_restore_toplevel(struct xdg_session_v1 *xdg_session_v1, struct xdg_toplevel *toplevel, const char *name)
{
	struct wl_proxy *id;

	id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_v1,
			 XDG_SESSION_V1_RESTORE_TOPLEVEL, &xdg_toplevel_session_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_session_v1), 0, NULL, toplevel, name);

	return (struct xdg_toplevel_session_v1 *) id;
}

/**
 * @ingroup iface_xdg_session_v1
 *
 * Remove a specified surface from the session and render any related
 * xdg_toplevel_session_v1 object inert. The compositor should remove any
 * data related to the toplevel in the corresponding session from its internal
 * storage.
 *
 * The window is specified by its name in the session. The name string
 * must be encoded in UTF-8, and it is limited in size by the maximum
 * length of wayland messages (around 4KB).
 */
static inline void
xdg_session_v1_remove_toplevel(struct xdg_session_v1 *xdg_session_v1, const char *name)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_session_v1,
			 XDG_SESSION_V1_REMOVE_TOPLEVEL, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_session_v1), 0, name);
}

/**
 * @ingroup iface_xdg_toplevel_session_v1
 * @struct xdg_toplevel_session_v1_listener
 */
struct xdg_toplevel_session_v1_listener {
	/**
	 * a toplevel's session has been restored
	 *
	 * The "restored" event is emitted prior to the first
	 * xdg_toplevel.configure for the toplevel. It will only be emitted
	 * after xdg_session_v1.restore_toplevel, and the initial empty
	 * surface state has been applied, and it indicates that the
	 * surface's session is being restored with this configure event.
	 */
	void (*restored)(void *data,
			 struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1);
};

/**
 * @ingroup iface_xdg_toplevel_session_v1
 */
static inline int
xdg_toplevel_session_v1_add_listener(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1,
				     const struct xdg_toplevel_session_v1_listener *listener, void *data)
{
	return wl_proxy_add_listener((struct wl_proxy *) xdg_toplevel_session_v1,
				     (void (**)(void)) listener, data);
}

#define XDG_TOPLEVEL_SESSION_V1_DESTROY 0
#define XDG_TOPLEVEL_SESSION_V1_RENAME 1

/**
 * @ingroup iface_xdg_toplevel_session_v1
 */
#define XDG_TOPLEVEL_SESSION_V1_RESTORED_SINCE_VERSION 1

/**
 * @ingroup iface_xdg_toplevel_session_v1
 */
#define XDG_TOPLEVEL_SESSION_V1_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_xdg_toplevel_session_v1
 */
#define XDG_TOPLEVEL_SESSION_V1_RENAME_SINCE_VERSION 1

/** @ingroup iface_xdg_toplevel_session_v1 */
static inline void
xdg_toplevel_session_v1_set_user_data(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1, void *user_data)
{
	wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_session_v1, user_data);
}

/** @ingroup iface_xdg_toplevel_session_v1 */
static inline void *
xdg_toplevel_session_v1_get_user_data(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1)
{
	return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_session_v1);
}

static inline uint32_t
xdg_toplevel_session_v1_get_version(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1)
{
	return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_session_v1);
}

/**
 * @ingroup iface_xdg_toplevel_session_v1
 *
 * Destroy the object. This has no effect over window management of the
 * associated toplevel.
 */
static inline void
xdg_toplevel_session_v1_destroy(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_session_v1,
			 XDG_TOPLEVEL_SESSION_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_session_v1), WL_MARSHAL_FLAG_DESTROY);
}

/**
 * @ingroup iface_xdg_toplevel_session_v1
 *
 * Renames the toplevel session. The new name can be used in subsequent requests
 * to identify this session object. The state associated with this toplevel
 * session will be preserved.
 *
 * If the xdg_session_v1 already contains a toplevel with the specified name,
 * the 'name_in_use' protocol error will be raised.
 */
static inline void
xdg_toplevel_session_v1_rename(struct xdg_toplevel_session_v1 *xdg_toplevel_session_v1, const char *name)
{
	wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_session_v1,
			 XDG_TOPLEVEL_SESSION_V1_RENAME, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_session_v1), 0, name);
}

#ifdef  __cplusplus
}
#endif

#endif
