/* Generated by wayland-scanner 1.26.0 */

#ifndef TREELAND_PRELAUNCH_SPLASH_V2_SERVER_PROTOCOL_H
#define TREELAND_PRELAUNCH_SPLASH_V2_SERVER_PROTOCOL_H

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

#ifdef  __cplusplus
extern "C" {
#endif

struct wl_client;
struct wl_resource;

/**
 * @page page_treeland_prelaunch_splash_v2 The treeland_prelaunch_splash_v2 protocol
 * prelaunch splash screen management
 *
 * @section page_desc_treeland_prelaunch_splash_v2 Description
 *
 * Warning! This protocol is EXPERIMENTAL and under active development.
 * It may change at any time, including in backward-incompatible ways,
 * without incrementing the interface major version and without prior
 * notice. No compatibility guarantees of any kind are provided. Clients
 * and compositors must track the upstream definition in treeland-protocols
 * and must not rely on the current interface names, requests, events, or
 * semantics remaining stable across releases.
 *
 * @section page_ifaces_treeland_prelaunch_splash_v2 Interfaces
 * - @subpage page_iface_treeland_prelaunch_splash_manager_v2 - prelaunch splash screen manager
 * - @subpage page_iface_treeland_prelaunch_splash_v2 - prelaunch splash screen object
 * @section page_copyright_treeland_prelaunch_splash_v2 Copyright
 * <pre>
 *
 * SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
 * SPDX-License-Identifier: MIT
 * </pre>
 */
struct treeland_prelaunch_splash_manager_v2;
struct treeland_prelaunch_splash_v2;
struct wl_buffer;

#ifndef TREELAND_PRELAUNCH_SPLASH_MANAGER_V2_INTERFACE
#define TREELAND_PRELAUNCH_SPLASH_MANAGER_V2_INTERFACE
/**
 * @page page_iface_treeland_prelaunch_splash_manager_v2 treeland_prelaunch_splash_manager_v2
 * @section page_iface_treeland_prelaunch_splash_manager_v2_desc Description
 *
 * This interface is a manager for creating prelaunch splash screens.
 * A prelaunch splash screen is a placeholder surface that is shown
 * before an application's main window is mapped. This helps to improve
 * the perceived startup time.
 *
 * It is particularly useful for application launchers to provide immediate
 * feedback to the user.
 *
 * Compared to treeland_prelaunch_splash_manager_v1, this version returns
 * a splash object from create_splash. The caller can destroy the object
 * to dismiss the splash, and the compositor can send events (e.g. timeout)
 * back to the caller through the object.
 * @section page_iface_treeland_prelaunch_splash_manager_v2_api API
 * See @ref iface_treeland_prelaunch_splash_manager_v2.
 */
/**
 * @defgroup iface_treeland_prelaunch_splash_manager_v2 The treeland_prelaunch_splash_manager_v2 interface
 *
 * This interface is a manager for creating prelaunch splash screens.
 * A prelaunch splash screen is a placeholder surface that is shown
 * before an application's main window is mapped. This helps to improve
 * the perceived startup time.
 *
 * It is particularly useful for application launchers to provide immediate
 * feedback to the user.
 *
 * Compared to treeland_prelaunch_splash_manager_v1, this version returns
 * a splash object from create_splash. The caller can destroy the object
 * to dismiss the splash, and the compositor can send events (e.g. timeout)
 * back to the caller through the object.
 */
extern const struct wl_interface treeland_prelaunch_splash_manager_v2_interface;
#endif
#ifndef TREELAND_PRELAUNCH_SPLASH_V2_INTERFACE
#define TREELAND_PRELAUNCH_SPLASH_V2_INTERFACE
/**
 * @page page_iface_treeland_prelaunch_splash_v2 treeland_prelaunch_splash_v2
 * @section page_iface_treeland_prelaunch_splash_v2_desc Description
 *
 * Represents a single prelaunch splash screen created by the manager.
 *
 * The caller can destroy this object to dismiss the corresponding splash.
 * The compositor may also send events through this object, for example
 * to notify the caller that the splash was closed due to a timeout.
 * @section page_iface_treeland_prelaunch_splash_v2_api API
 * See @ref iface_treeland_prelaunch_splash_v2.
 */
/**
 * @defgroup iface_treeland_prelaunch_splash_v2 The treeland_prelaunch_splash_v2 interface
 *
 * Represents a single prelaunch splash screen created by the manager.
 *
 * The caller can destroy this object to dismiss the corresponding splash.
 * The compositor may also send events through this object, for example
 * to notify the caller that the splash was closed due to a timeout.
 */
extern const struct wl_interface treeland_prelaunch_splash_v2_interface;
#endif

/**
 * @ingroup iface_treeland_prelaunch_splash_manager_v2
 * @struct treeland_prelaunch_splash_manager_v2_interface
 */
struct treeland_prelaunch_splash_manager_v2_interface {
	/**
	 * destroy the manager
	 *
	 * 
	 */
	void (*destroy)(struct wl_client *client,
			struct wl_resource *resource);
	/**
	 * create a new splash screen
	 *
	 * Creates a new prelaunch splash screen and returns a splash
	 * object.
	 *
	 * The `app_id` is a string that identifies the application. The
	 * compositor will use this ID together with `sandbox_engine_name`
	 * to match the splash screen with the actual application window
	 * when it appears. This matching mechanism should also work for
	 * XWayland windows.
	 *
	 * The `instance_id` identifies a specific application instance,
	 * allowing multiple splashes for non-singleton applications. The
	 * compositor can use this to associate a splash with a particular
	 * launch instance.
	 *
	 * Callers MUST provide a non-empty `sandbox_engine_name` string
	 * which identifies the sandboxing/container.
	 * @param splash new splash object
	 * @param app_id the application ID
	 * @param instance_id the application instance ID
	 * @param sandbox_engine_name the sandbox engine / security context name (required, non-empty)
	 * @param icon_buffer optional icon image as wl_buffer (e.g. wl_shm)
	 */
	void (*create_splash)(struct wl_client *client,
			      struct wl_resource *resource,
			      uint32_t splash,
			      const char *app_id,
			      const char *instance_id,
			      const char *sandbox_engine_name,
			      struct wl_resource *icon_buffer);
};


/**
 * @ingroup iface_treeland_prelaunch_splash_manager_v2
 */
#define TREELAND_PRELAUNCH_SPLASH_MANAGER_V2_DESTROY_SINCE_VERSION 1
/**
 * @ingroup iface_treeland_prelaunch_splash_manager_v2
 */
#define TREELAND_PRELAUNCH_SPLASH_MANAGER_V2_CREATE_SPLASH_SINCE_VERSION 1

/**
 * @ingroup iface_treeland_prelaunch_splash_v2
 * @struct treeland_prelaunch_splash_v2_interface
 */
struct treeland_prelaunch_splash_v2_interface {
	/**
	 * dismiss and destroy the splash
	 *
	 * Dismisses the splash screen and destroys this object.
	 */
	void (*destroy)(struct wl_client *client,
			struct wl_resource *resource);
};


/**
 * @ingroup iface_treeland_prelaunch_splash_v2
 */
#define TREELAND_PRELAUNCH_SPLASH_V2_DESTROY_SINCE_VERSION 1

#ifdef  __cplusplus
}
#endif

#endif
