org-kde-kwin-server-decoration-manager-client-protocol.h
Go to the documentation of this file.
/* Generated by wayland-scanner 1.18.0 */
#ifndef SERVER_DECORATION_CLIENT_PROTOCOL_H
#define SERVER_DECORATION_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_server_decoration The server_decoration protocol
* @section page_ifaces_server_decoration Interfaces
* - @subpage page_iface_org_kde_kwin_server_decoration_manager - Server side window decoration manager
* - @subpage page_iface_org_kde_kwin_server_decoration -
* @section page_copyright_server_decoration Copyright
* <pre>
*
* Copyright (C) 2015 Martin Gräßlin
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* </pre>
*/
struct org_kde_kwin_server_decoration;
struct org_kde_kwin_server_decoration_manager;
struct wl_surface;
/**
* @page page_iface_org_kde_kwin_server_decoration_manager org_kde_kwin_server_decoration_manager
* @section page_iface_org_kde_kwin_server_decoration_manager_desc Description
*
* This interface allows to coordinate whether the server should create
* a server-side window decoration around a wl_surface representing a
* shell surface (wl_shell_surface or similar). By announcing support
* for this interface the server indicates that it supports server
* side decorations.
* @section page_iface_org_kde_kwin_server_decoration_manager_api API
* See @ref iface_org_kde_kwin_server_decoration_manager.
*/
/**
* @defgroup iface_org_kde_kwin_server_decoration_manager The org_kde_kwin_server_decoration_manager interface
*
* This interface allows to coordinate whether the server should create
* a server-side window decoration around a wl_surface representing a
* shell surface (wl_shell_surface or similar). By announcing support
* for this interface the server indicates that it supports server
* side decorations.
*/
extern const struct wl_interface org_kde_kwin_server_decoration_manager_interface;
/**
* @page page_iface_org_kde_kwin_server_decoration org_kde_kwin_server_decoration
* @section page_iface_org_kde_kwin_server_decoration_api API
* See @ref iface_org_kde_kwin_server_decoration.
*/
/**
* @defgroup iface_org_kde_kwin_server_decoration The org_kde_kwin_server_decoration interface
*/
extern const struct wl_interface org_kde_kwin_server_decoration_interface;
#ifndef ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM
#define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
* Possible values to use in request_mode and the event mode.
*/
enum org_kde_kwin_server_decoration_manager_mode {
/**
* Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE = 0,
/**
* Client-side decoration: The decoration is part of the surface and the client.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_CLIENT = 1,
/**
* Server-side decoration: The server embeds the surface into a decoration frame.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER = 2,
};
#endif /* ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_ENUM */
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
* @struct org_kde_kwin_server_decoration_manager_listener
*/
struct org_kde_kwin_server_decoration_manager_listener {
/**
* The default mode used on the server
*
* This event is emitted directly after binding the interface. It
* contains the default mode for the decoration. When a new server
* decoration object is created this new object will be in the
* default mode until the first request_mode is requested.
*
* The server may change the default mode at any time.
* @param mode The default decoration mode applied to newly created server decorations.
*/
void (*default_mode)(void *data,
struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager,
uint32_t mode);
};
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
*/
static inline int
org_kde_kwin_server_decoration_manager_add_listener(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager,
const struct org_kde_kwin_server_decoration_manager_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) org_kde_kwin_server_decoration_manager,
(void (**)(void)) listener, data);
}
#define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE 0
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
*/
#define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_DEFAULT_MODE_SINCE_VERSION 1
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
*/
#define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE_SINCE_VERSION 1
/** @ingroup iface_org_kde_kwin_server_decoration_manager */
static inline void
org_kde_kwin_server_decoration_manager_set_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) org_kde_kwin_server_decoration_manager, user_data);
}
/** @ingroup iface_org_kde_kwin_server_decoration_manager */
static inline void *
org_kde_kwin_server_decoration_manager_get_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
{
return wl_proxy_get_user_data((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
}
static inline uint32_t
org_kde_kwin_server_decoration_manager_get_version(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
{
return wl_proxy_get_version((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
}
/** @ingroup iface_org_kde_kwin_server_decoration_manager */
static inline void
org_kde_kwin_server_decoration_manager_destroy(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
{
wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration_manager);
}
/**
* @ingroup iface_org_kde_kwin_server_decoration_manager
*
* When a client creates a server-side decoration object it indicates
* that it supports the protocol. The client is supposed to tell the
* server whether it wants server-side decorations or will provide
* client-side decorations.
*
* If the client does not create a server-side decoration object for
* a surface the server interprets this as lack of support for this
* protocol and considers it as client-side decorated. Nevertheless a
* client-side decorated surface should use this protocol to indicate
* to the server that it does not want a server-side deco.
*/
static inline struct org_kde_kwin_server_decoration *
org_kde_kwin_server_decoration_manager_create(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, struct wl_surface *surface)
{
struct wl_proxy *id;
id = wl_proxy_marshal_constructor((struct wl_proxy *) org_kde_kwin_server_decoration_manager,
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE, &org_kde_kwin_server_decoration_interface, NULL, surface);
return (struct org_kde_kwin_server_decoration *) id;
}
#ifndef ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM
#define ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM
/**
* @ingroup iface_org_kde_kwin_server_decoration
* Possible values to use in request_mode and the event mode.
*/
enum org_kde_kwin_server_decoration_mode {
/**
* Undecorated: The surface is not decorated at all, neither server nor client-side. An example is a popup surface which should not be decorated.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MODE_NONE = 0,
/**
* Client-side decoration: The decoration is part of the surface and the client.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MODE_CLIENT = 1,
/**
* Server-side decoration: The server embeds the surface into a decoration frame.
*/
ORG_KDE_KWIN_SERVER_DECORATION_MODE_SERVER = 2,
};
#endif /* ORG_KDE_KWIN_SERVER_DECORATION_MODE_ENUM */
/**
* @ingroup iface_org_kde_kwin_server_decoration
* @struct org_kde_kwin_server_decoration_listener
*/
struct org_kde_kwin_server_decoration_listener {
/**
* The new decoration mode applied by the server
*
* This event is emitted directly after the decoration is created
* and represents the base decoration policy by the server. E.g. a
* server which wants all surfaces to be client-side decorated will
* send Client, a server which wants server-side decoration will
* send Server.
*
* The client can request a different mode through the decoration
* request. The server will acknowledge this by another event with
* the same mode. So even if a server prefers server-side
* decoration it's possible to force a client-side decoration.
*
* The server may emit this event at any time. In this case the
* client can again request a different mode. It's the
* responsibility of the server to prevent a feedback loop.
* @param mode The decoration mode applied to the surface by the server.
*/
void (*mode)(void *data,
struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration,
uint32_t mode);
};
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
static inline int
org_kde_kwin_server_decoration_add_listener(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration,
const struct org_kde_kwin_server_decoration_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) org_kde_kwin_server_decoration,
(void (**)(void)) listener, data);
}
#define ORG_KDE_KWIN_SERVER_DECORATION_RELEASE 0
#define ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE 1
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
#define ORG_KDE_KWIN_SERVER_DECORATION_MODE_SINCE_VERSION 1
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
#define ORG_KDE_KWIN_SERVER_DECORATION_RELEASE_SINCE_VERSION 1
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
#define ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE_SINCE_VERSION 1
/** @ingroup iface_org_kde_kwin_server_decoration */
static inline void
org_kde_kwin_server_decoration_set_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) org_kde_kwin_server_decoration, user_data);
}
/** @ingroup iface_org_kde_kwin_server_decoration */
static inline void *
org_kde_kwin_server_decoration_get_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
{
return wl_proxy_get_user_data((struct wl_proxy *) org_kde_kwin_server_decoration);
}
static inline uint32_t
org_kde_kwin_server_decoration_get_version(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
{
return wl_proxy_get_version((struct wl_proxy *) org_kde_kwin_server_decoration);
}
/** @ingroup iface_org_kde_kwin_server_decoration */
static inline void
org_kde_kwin_server_decoration_destroy(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
{
wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration);
}
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
static inline void
org_kde_kwin_server_decoration_release(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
{
wl_proxy_marshal((struct wl_proxy *) org_kde_kwin_server_decoration,
ORG_KDE_KWIN_SERVER_DECORATION_RELEASE);
wl_proxy_destroy((struct wl_proxy *) org_kde_kwin_server_decoration);
}
/**
* @ingroup iface_org_kde_kwin_server_decoration
*/
static inline void
org_kde_kwin_server_decoration_request_mode(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, uint32_t mode)
{
wl_proxy_marshal((struct wl_proxy *) org_kde_kwin_server_decoration,
ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE, mode);
}
#ifdef __cplusplus
}
#endif
#endif
ORG_KDE_KWIN_SERVER_DECORATION_MODE_CLIENT
@ ORG_KDE_KWIN_SERVER_DECORATION_MODE_CLIENT
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:206
org_kde_kwin_server_decoration_listener::mode
void(* mode)(void *data, struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, uint32_t mode)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:238
org_kde_kwin_server_decoration_listener
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:218
NULL
#define NULL
Definition: begin_code.h:167
surface
EGLSurface surface
Definition: eglext.h:248
ORG_KDE_KWIN_SERVER_DECORATION_MODE_SERVER
@ ORG_KDE_KWIN_SERVER_DECORATION_MODE_SERVER
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:210
mode
GLenum mode
Definition: SDL_opengl_glext.h:1122
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER
@ ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_SERVER
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:92
org_kde_kwin_server_decoration_manager_listener
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:100
org_kde_kwin_server_decoration_manager_destroy
static void org_kde_kwin_server_decoration_manager_destroy(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:162
org_kde_kwin_server_decoration_manager_get_version
static uint32_t org_kde_kwin_server_decoration_manager_get_version(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:155
org_kde_kwin_server_decoration_set_user_data
static void org_kde_kwin_server_decoration_set_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, void *user_data)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:273
org_kde_kwin_server_decoration_manager_mode
org_kde_kwin_server_decoration_manager_mode
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:80
org_kde_kwin_server_decoration_destroy
static void org_kde_kwin_server_decoration_destroy(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:293
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE
@ ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_NONE
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:84
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE
#define ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_CREATE
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:128
org_kde_kwin_server_decoration_mode
org_kde_kwin_server_decoration_mode
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:198
ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE
#define ORG_KDE_KWIN_SERVER_DECORATION_REQUEST_MODE
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:255
org_kde_kwin_server_decoration_manager_create
static struct org_kde_kwin_server_decoration * org_kde_kwin_server_decoration_manager_create(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, struct wl_surface *surface)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:182
org_kde_kwin_server_decoration_get_user_data
static void * org_kde_kwin_server_decoration_get_user_data(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:280
ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_CLIENT
@ ORG_KDE_KWIN_SERVER_DECORATION_MANAGER_MODE_CLIENT
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:88
ORG_KDE_KWIN_SERVER_DECORATION_MODE_NONE
@ ORG_KDE_KWIN_SERVER_DECORATION_MODE_NONE
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:202
id
GLuint id
Definition: SDL_opengl_glext.h:528
org_kde_kwin_server_decoration_release
static void org_kde_kwin_server_decoration_release(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:302
uint32_t
unsigned int uint32_t
Definition: SDL_config_windows.h:63
org_kde_kwin_server_decoration_manager_add_listener
static int org_kde_kwin_server_decoration_manager_add_listener(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, const struct org_kde_kwin_server_decoration_manager_listener *listener, void *data)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:121
org_kde_kwin_server_decoration_get_version
static uint32_t org_kde_kwin_server_decoration_get_version(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:286
org_kde_kwin_server_decoration_interface
const struct wl_interface org_kde_kwin_server_decoration_interface
Definition: org-kde-kwin-server-decoration-manager-protocol.c:56
org_kde_kwin_server_decoration_manager_interface
const struct wl_interface org_kde_kwin_server_decoration_manager_interface
Definition: org-kde-kwin-server-decoration-manager-protocol.c:41
org_kde_kwin_server_decoration_manager_listener::default_mode
void(* default_mode)(void *data, struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, uint32_t mode)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:112
ORG_KDE_KWIN_SERVER_DECORATION_RELEASE
#define ORG_KDE_KWIN_SERVER_DECORATION_RELEASE
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:254
org_kde_kwin_server_decoration_manager_get_user_data
static void * org_kde_kwin_server_decoration_manager_get_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:149
void
const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char int const SDL_PRINTF_FORMAT_STRING char const char const SDL_SCANF_FORMAT_STRING char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
Definition: SDL_dynapi_procs.h:89
org_kde_kwin_server_decoration_add_listener
static int org_kde_kwin_server_decoration_add_listener(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, const struct org_kde_kwin_server_decoration_listener *listener, void *data)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:247
org_kde_kwin_server_decoration_manager_set_user_data
static void org_kde_kwin_server_decoration_manager_set_user_data(struct org_kde_kwin_server_decoration_manager *org_kde_kwin_server_decoration_manager, void *user_data)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:142
org_kde_kwin_server_decoration_request_mode
static void org_kde_kwin_server_decoration_request_mode(struct org_kde_kwin_server_decoration *org_kde_kwin_server_decoration, uint32_t mode)
Definition: org-kde-kwin-server-decoration-manager-client-protocol.h:314