/* Generated by wayland-scanner 1.24.0 */ #ifndef WMAKER_DOCKAPP_V1_CLIENT_PROTOCOL_H #define WMAKER_DOCKAPP_V1_CLIENT_PROTOCOL_H #include #include #include "wayland-client.h" #ifdef __cplusplus extern "C" { #endif /** * @page page_wmaker_dockapp_v1 The wmaker_dockapp_v1 protocol * Window Maker dock application protocol * * @section page_desc_wmaker_dockapp_v1 Description * * This protocol allows native Wayland clients to act as dock applications * (dockapps) — small, tile-sized widgets that live in the Window Maker dock. * * Traditional X11 dockapps use the withdrawn state with an icon_window hint * to embed a small rendering surface into the window manager's dock tile. * This protocol provides the Wayland-native equivalent: a client creates a * wl_surface, marks it as a dockapp via this protocol, and the compositor * places it in a dock slot. The surface supports full ARGB transparency, * eliminating the opaque-black-background problem of XWayland dockapps. * * The compositor owns the dock tile background. The dockapp surface is * composited on top of it. The client renders only its content (clock face, * system monitor graph, etc.) with transparent background pixels where the * dock tile should show through. * * @section page_ifaces_wmaker_dockapp_v1 Interfaces * - @subpage page_iface_wmaker_dockapp_manager_v1 - manager for dock application surfaces * - @subpage page_iface_wmaker_dockapp_v1 - a dock application surface * @section page_copyright_wmaker_dockapp_v1 Copyright *
 *
 * Copyright © 2026 Window Maker Team
 *
 * 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.
 * 
*/ struct wl_surface; struct wmaker_dockapp_manager_v1; struct wmaker_dockapp_v1; #ifndef WMAKER_DOCKAPP_MANAGER_V1_INTERFACE #define WMAKER_DOCKAPP_MANAGER_V1_INTERFACE /** * @page page_iface_wmaker_dockapp_manager_v1 wmaker_dockapp_manager_v1 * @section page_iface_wmaker_dockapp_manager_v1_desc Description * * Singleton global advertised by Window Maker compositors. Clients bind * to create dockapp objects for their surfaces. * @section page_iface_wmaker_dockapp_manager_v1_api API * See @ref iface_wmaker_dockapp_manager_v1. */ /** * @defgroup iface_wmaker_dockapp_manager_v1 The wmaker_dockapp_manager_v1 interface * * Singleton global advertised by Window Maker compositors. Clients bind * to create dockapp objects for their surfaces. */ extern const struct wl_interface wmaker_dockapp_manager_v1_interface; #endif #ifndef WMAKER_DOCKAPP_V1_INTERFACE #define WMAKER_DOCKAPP_V1_INTERFACE /** * @page page_iface_wmaker_dockapp_v1 wmaker_dockapp_v1 * @section page_iface_wmaker_dockapp_v1_desc Description * * Represents a dock application. The client attaches buffers to the * underlying wl_surface and commits them; the compositor displays the * surface content within a dock tile. * * The client should render at the size indicated by the configure event. * The surface supports ARGB — transparent pixels let the dock tile * background show through. * * The compositor manages the dockapp's lifecycle: it may be undocked * (closed event), moved between dock slots, or hidden when the dock * is collapsed. * @section page_iface_wmaker_dockapp_v1_api API * See @ref iface_wmaker_dockapp_v1. */ /** * @defgroup iface_wmaker_dockapp_v1 The wmaker_dockapp_v1 interface * * Represents a dock application. The client attaches buffers to the * underlying wl_surface and commits them; the compositor displays the * surface content within a dock tile. * * The client should render at the size indicated by the configure event. * The surface supports ARGB — transparent pixels let the dock tile * background show through. * * The compositor manages the dockapp's lifecycle: it may be undocked * (closed event), moved between dock slots, or hidden when the dock * is collapsed. */ extern const struct wl_interface wmaker_dockapp_v1_interface; #endif #define WMAKER_DOCKAPP_MANAGER_V1_DESTROY 0 #define WMAKER_DOCKAPP_MANAGER_V1_GET_DOCKAPP 1 /** * @ingroup iface_wmaker_dockapp_manager_v1 */ #define WMAKER_DOCKAPP_MANAGER_V1_DESTROY_SINCE_VERSION 1 /** * @ingroup iface_wmaker_dockapp_manager_v1 */ #define WMAKER_DOCKAPP_MANAGER_V1_GET_DOCKAPP_SINCE_VERSION 1 /** @ingroup iface_wmaker_dockapp_manager_v1 */ static inline void wmaker_dockapp_manager_v1_set_user_data(struct wmaker_dockapp_manager_v1 *wmaker_dockapp_manager_v1, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) wmaker_dockapp_manager_v1, user_data); } /** @ingroup iface_wmaker_dockapp_manager_v1 */ static inline void * wmaker_dockapp_manager_v1_get_user_data(struct wmaker_dockapp_manager_v1 *wmaker_dockapp_manager_v1) { return wl_proxy_get_user_data((struct wl_proxy *) wmaker_dockapp_manager_v1); } static inline uint32_t wmaker_dockapp_manager_v1_get_version(struct wmaker_dockapp_manager_v1 *wmaker_dockapp_manager_v1) { return wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_manager_v1); } /** * @ingroup iface_wmaker_dockapp_manager_v1 * * Destroy the manager. Existing dockapp objects remain valid. */ static inline void wmaker_dockapp_manager_v1_destroy(struct wmaker_dockapp_manager_v1 *wmaker_dockapp_manager_v1) { wl_proxy_marshal_flags((struct wl_proxy *) wmaker_dockapp_manager_v1, WMAKER_DOCKAPP_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_manager_v1), WL_MARSHAL_FLAG_DESTROY); } /** * @ingroup iface_wmaker_dockapp_manager_v1 * * Wrap the given wl_surface as a dock application. The surface must * not have another role (xdg_toplevel, xdg_popup, etc.) assigned. * The compositor will place this surface in the next available dock * slot or use the app_id for slot matching against saved state. */ static inline struct wmaker_dockapp_v1 * wmaker_dockapp_manager_v1_get_dockapp(struct wmaker_dockapp_manager_v1 *wmaker_dockapp_manager_v1, struct wl_surface *surface) { struct wl_proxy *id; id = wl_proxy_marshal_flags((struct wl_proxy *) wmaker_dockapp_manager_v1, WMAKER_DOCKAPP_MANAGER_V1_GET_DOCKAPP, &wmaker_dockapp_v1_interface, wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_manager_v1), 0, NULL, surface); return (struct wmaker_dockapp_v1 *) id; } #ifndef WMAKER_DOCKAPP_V1_ERROR_ENUM #define WMAKER_DOCKAPP_V1_ERROR_ENUM enum wmaker_dockapp_v1_error { /** * set_app_id called after first commit */ WMAKER_DOCKAPP_V1_ERROR_ALREADY_CONFIGURED = 0, }; #endif /* WMAKER_DOCKAPP_V1_ERROR_ENUM */ /** * @ingroup iface_wmaker_dockapp_v1 * @struct wmaker_dockapp_v1_listener */ struct wmaker_dockapp_v1_listener { /** * compositor requests a size for the dockapp * * The compositor sends this event to tell the client what size * to render at. The client must attach a buffer of this size on * its next commit. Sent once after the dockapp is created, and * again if the dock tile size changes. * @param width requested width in pixels * @param height requested height in pixels */ void (*configure)(void *data, struct wmaker_dockapp_v1 *wmaker_dockapp_v1, uint32_t width, uint32_t height); /** * dockapp was removed from the dock * * The compositor removed this dockapp (user undocked it, or dock * was destroyed). The client should destroy the dockapp object and * may exit or create a new one. */ void (*closed)(void *data, struct wmaker_dockapp_v1 *wmaker_dockapp_v1); }; /** * @ingroup iface_wmaker_dockapp_v1 */ static inline int wmaker_dockapp_v1_add_listener(struct wmaker_dockapp_v1 *wmaker_dockapp_v1, const struct wmaker_dockapp_v1_listener *listener, void *data) { return wl_proxy_add_listener((struct wl_proxy *) wmaker_dockapp_v1, (void (**)(void)) listener, data); } #define WMAKER_DOCKAPP_V1_DESTROY 0 #define WMAKER_DOCKAPP_V1_SET_APP_ID 1 /** * @ingroup iface_wmaker_dockapp_v1 */ #define WMAKER_DOCKAPP_V1_CONFIGURE_SINCE_VERSION 1 /** * @ingroup iface_wmaker_dockapp_v1 */ #define WMAKER_DOCKAPP_V1_CLOSED_SINCE_VERSION 1 /** * @ingroup iface_wmaker_dockapp_v1 */ #define WMAKER_DOCKAPP_V1_DESTROY_SINCE_VERSION 1 /** * @ingroup iface_wmaker_dockapp_v1 */ #define WMAKER_DOCKAPP_V1_SET_APP_ID_SINCE_VERSION 1 /** @ingroup iface_wmaker_dockapp_v1 */ static inline void wmaker_dockapp_v1_set_user_data(struct wmaker_dockapp_v1 *wmaker_dockapp_v1, void *user_data) { wl_proxy_set_user_data((struct wl_proxy *) wmaker_dockapp_v1, user_data); } /** @ingroup iface_wmaker_dockapp_v1 */ static inline void * wmaker_dockapp_v1_get_user_data(struct wmaker_dockapp_v1 *wmaker_dockapp_v1) { return wl_proxy_get_user_data((struct wl_proxy *) wmaker_dockapp_v1); } static inline uint32_t wmaker_dockapp_v1_get_version(struct wmaker_dockapp_v1 *wmaker_dockapp_v1) { return wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_v1); } /** * @ingroup iface_wmaker_dockapp_v1 * * Remove the dockapp from the dock and destroy this object. The * underlying wl_surface becomes inert. */ static inline void wmaker_dockapp_v1_destroy(struct wmaker_dockapp_v1 *wmaker_dockapp_v1) { wl_proxy_marshal_flags((struct wl_proxy *) wmaker_dockapp_v1, WMAKER_DOCKAPP_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_v1), WL_MARSHAL_FLAG_DESTROY); } /** * @ingroup iface_wmaker_dockapp_v1 * * Set the app_id used to match this dockapp against saved dock state * (instance.class format, e.g. "wmclock.WMClock"). Must be called * before the first surface commit. */ static inline void wmaker_dockapp_v1_set_app_id(struct wmaker_dockapp_v1 *wmaker_dockapp_v1, const char *app_id) { wl_proxy_marshal_flags((struct wl_proxy *) wmaker_dockapp_v1, WMAKER_DOCKAPP_V1_SET_APP_ID, NULL, wl_proxy_get_version((struct wl_proxy *) wmaker_dockapp_v1), 0, app_id); } #ifdef __cplusplus } #endif #endif