SDL  2.0
The zxdg_toplevel_decoration_v1 interface

The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode. More...

Data Structures

struct  zxdg_toplevel_decoration_v1_listener
 

Macros

#define ZXDG_TOPLEVEL_DECORATION_V1_CONFIGURE_SINCE_VERSION   1
 
#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY_SINCE_VERSION   1
 
#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE_SINCE_VERSION   1
 
#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE_SINCE_VERSION   1
 

Enumerations

enum  zxdg_toplevel_decoration_v1_mode {
  ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE = 1,
  ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE = 2
}
 

Functions

static int zxdg_toplevel_decoration_v1_add_listener (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, const struct zxdg_toplevel_decoration_v1_listener *listener, void *data)
 
static void zxdg_toplevel_decoration_v1_set_user_data (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, void *user_data)
 
static voidzxdg_toplevel_decoration_v1_get_user_data (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
 
static void zxdg_toplevel_decoration_v1_destroy (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
 
static void zxdg_toplevel_decoration_v1_set_mode (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1, uint32_t mode)
 
static void zxdg_toplevel_decoration_v1_unset_mode (struct zxdg_toplevel_decoration_v1 *zxdg_toplevel_decoration_v1)
 

Detailed Description

The decoration object allows the compositor to toggle server-side window decorations for a toplevel surface. The client can request to switch to another mode.

The xdg_toplevel_decoration object must be destroyed before its xdg_toplevel.

Macro Definition Documentation

◆ ZXDG_TOPLEVEL_DECORATION_V1_CONFIGURE_SINCE_VERSION

#define ZXDG_TOPLEVEL_DECORATION_V1_CONFIGURE_SINCE_VERSION   1

◆ ZXDG_TOPLEVEL_DECORATION_V1_DESTROY_SINCE_VERSION

#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY_SINCE_VERSION   1

◆ ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE_SINCE_VERSION

#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE_SINCE_VERSION   1

◆ ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE_SINCE_VERSION

#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE_SINCE_VERSION   1

Enumeration Type Documentation

◆ zxdg_toplevel_decoration_v1_mode

window decoration modes

These values describe window decoration modes.

Enumerator
ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE 

no server-side window decoration

ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE 

server-side window decoration

Definition at line 225 of file xdg-decoration-unstable-v1-client-protocol.h.

225  {
226  /**
227  * no server-side window decoration
228  */
230  /**
231  * server-side window decoration
232  */
234 };

Function Documentation

◆ zxdg_toplevel_decoration_v1_add_listener()

static int zxdg_toplevel_decoration_v1_add_listener ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1,
const struct zxdg_toplevel_decoration_v1_listener listener,
void data 
)
inlinestatic

Definition at line 264 of file xdg-decoration-unstable-v1-client-protocol.h.

266 {
267  return wl_proxy_add_listener((struct wl_proxy *) zxdg_toplevel_decoration_v1,
268  (void (**)(void)) listener, data);
269 }

◆ zxdg_toplevel_decoration_v1_destroy()

static void zxdg_toplevel_decoration_v1_destroy ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1)
inlinestatic

Switch back to a mode without any server-side decorations at the next commit.

Definition at line 320 of file xdg-decoration-unstable-v1-client-protocol.h.

321 {
322  wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
324 
325  wl_proxy_destroy((struct wl_proxy *) zxdg_toplevel_decoration_v1);
326 }

References ZXDG_TOPLEVEL_DECORATION_V1_DESTROY.

◆ zxdg_toplevel_decoration_v1_get_user_data()

static void* zxdg_toplevel_decoration_v1_get_user_data ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1)
inlinestatic

Definition at line 302 of file xdg-decoration-unstable-v1-client-protocol.h.

303 {
304  return wl_proxy_get_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1);
305 }

◆ zxdg_toplevel_decoration_v1_set_mode()

static void zxdg_toplevel_decoration_v1_set_mode ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1,
uint32_t  mode 
)
inlinestatic

Set the toplevel surface decoration mode. This informs the compositor that the client prefers the provided decoration mode.

After requesting a decoration mode, the compositor will respond by emitting a xdg_surface.configure event. The client should then update its content, drawing it without decorations if the received mode is server-side decorations. The client must also acknowledge the configure when committing the new content (see xdg_surface.ack_configure).

The compositor can decide not to use the client's mode and enforce a different mode instead.

Clients whose decoration mode depend on the xdg_toplevel state may send a set_mode request in response to a xdg_surface.configure event and wait for the next xdg_surface.configure event to prevent unwanted state. Such clients are responsible for preventing configure loops and must make sure not to send multiple successive set_mode requests with the same decoration mode.

Definition at line 351 of file xdg-decoration-unstable-v1-client-protocol.h.

352 {
353  wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
355 }

References ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE.

◆ zxdg_toplevel_decoration_v1_set_user_data()

static void zxdg_toplevel_decoration_v1_set_user_data ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1,
void user_data 
)
inlinestatic

Definition at line 295 of file xdg-decoration-unstable-v1-client-protocol.h.

296 {
297  wl_proxy_set_user_data((struct wl_proxy *) zxdg_toplevel_decoration_v1, user_data);
298 }

◆ zxdg_toplevel_decoration_v1_unset_mode()

static void zxdg_toplevel_decoration_v1_unset_mode ( struct zxdg_toplevel_decoration_v1 *  zxdg_toplevel_decoration_v1)
inlinestatic

Unset the toplevel surface decoration mode. This informs the compositor that the client doesn't prefer a particular decoration mode.

This request has the same semantics as set_mode.

Definition at line 366 of file xdg-decoration-unstable-v1-client-protocol.h.

367 {
368  wl_proxy_marshal((struct wl_proxy *) zxdg_toplevel_decoration_v1,
370 }

References ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE.

ZXDG_TOPLEVEL_DECORATION_V1_MODE_CLIENT_SIDE
Definition: xdg-decoration-unstable-v1-client-protocol.h:229
ZXDG_TOPLEVEL_DECORATION_V1_DESTROY
#define ZXDG_TOPLEVEL_DECORATION_V1_DESTROY
Definition: xdg-decoration-unstable-v1-client-protocol.h:271
mode
GLenum mode
Definition: SDL_opengl_glext.h:1122
ZXDG_TOPLEVEL_DECORATION_V1_MODE_SERVER_SIDE
Definition: xdg-decoration-unstable-v1-client-protocol.h:233
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1973
ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE
#define ZXDG_TOPLEVEL_DECORATION_V1_UNSET_MODE
Definition: xdg-decoration-unstable-v1-client-protocol.h:273
ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE
#define ZXDG_TOPLEVEL_DECORATION_V1_SET_MODE
Definition: xdg-decoration-unstable-v1-client-protocol.h:272