wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
xdg_decoration.c File Reference
#include "xdg_decoration.h"
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdbool.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wayland-util.h>
#include <wlr/types/wlr_xdg_decoration_v1.h>
#include "config.h"
#include "server.h"
#include "toolkit/toolkit.h"
#include "xdg_shell.h"
Include dependency graph for xdg_decoration.c:

Classes

struct  _wlmaker_xdg_decoration_manager_t
 
struct  wlmaker_xdg_decoration_t
 

Functions

static void handle_new_toplevel_decoration (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_destroy (struct wl_listener *listener_ptr, void *data_ptr)
 
static wlmaker_xdg_decoration_twlmaker_xdg_decoration_create (wlmaker_xdg_decoration_manager_t *decoration_manager_ptr, struct wlr_xdg_toplevel_decoration_v1 *wlr_xdg_toplevel_decoration_v1_ptr)
 
static void wlmaker_xdg_decoration_destroy (wlmaker_xdg_decoration_t *decoration_ptr)
 
static void handle_decoration_request_mode (struct wl_listener *listener_ptr, void *data_ptr)
 
static void handle_decoration_destroy (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_xdg_decoration_manager_twlmaker_xdg_decoration_manager_create (wlmaker_server_t *server_ptr)
 
void wlmaker_xdg_decoration_manager_destroy (wlmaker_xdg_decoration_manager_t *decoration_manager_ptr)
 

Variables

static const bspl_enum_desc_t _wlmaker_config_decoration_desc []
 
static const bspl_desc_t _wlmaker_xdg_decoration_config_desc []
 
static const char * _wlmaker_xdg_decoration_dict_name = "Decoration"
 

Detailed Description

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ handle_decoration_destroy()

void handle_decoration_destroy ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Handler for the destroy signal of wlr_xdg_toplevel_decoration_v1.

Parameters
listener_ptr
data_ptr

◆ handle_decoration_request_mode()

void handle_decoration_request_mode ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Handler for the request_mode signal of wlr_xdg_toplevel_decoration_v1.

Parameters
listener_ptr
data_ptr

◆ handle_destroy()

static void handle_destroy ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Handler for the destroy signal of wlr_xdg_decoration_manager_v1.

Parameters
listener_ptr
data_ptr

◆ handle_new_toplevel_decoration()

void handle_new_toplevel_decoration ( struct wl_listener *  listener_ptr,
void *  data_ptr 
)
static

Handler for the new_toplevel_decoration signal of wlr_xdg_decoration_manager_v1.

Parameters
listener_ptr
data_ptrPoints to wlr_xdg_toplevel_decoration_v1.

◆ wlmaker_xdg_decoration_create()

wlmaker_xdg_decoration_t * wlmaker_xdg_decoration_create ( wlmaker_xdg_decoration_manager_t decoration_manager_ptr,
struct wlr_xdg_toplevel_decoration_v1 *  wlr_xdg_toplevel_decoration_v1_ptr 
)
static

Creates a decoration handle.

Parameters
decoration_manager_ptr
wlr_xdg_toplevel_decoration_v1_ptr
Returns
The decoration handle or NULL on error.

◆ wlmaker_xdg_decoration_destroy()

void wlmaker_xdg_decoration_destroy ( wlmaker_xdg_decoration_t decoration_ptr)
static

Destroys the decoration handle.

Parameters
decoration_ptr

◆ wlmaker_xdg_decoration_manager_create()

wlmaker_xdg_decoration_manager_t * wlmaker_xdg_decoration_manager_create ( wlmaker_server_t server_ptr)

Creates a new XDG decoration manager.

Parameters
server_ptr
Returns
A decoration manager handle or NULL on error.

◆ wlmaker_xdg_decoration_manager_destroy()

void wlmaker_xdg_decoration_manager_destroy ( wlmaker_xdg_decoration_manager_t decoration_manager_ptr)

Destroys the XDG decoration manager.

Parameters
decoration_manager_ptr

Variable Documentation

◆ _wlmaker_config_decoration_desc

const bspl_enum_desc_t _wlmaker_config_decoration_desc[]
static
Initial value:
= {
BSPL_ENUM("SuggestClient", WLMAKER_CONFIG_DECORATION_SUGGEST_CLIENT),
BSPL_ENUM("SuggestServer", WLMAKER_CONFIG_DECORATION_SUGGEST_SERVER),
BSPL_ENUM("EnforceClient", WLMAKER_CONFIG_DECORATION_ENFORCE_CLIENT),
BSPL_ENUM("EnforceServer", WLMAKER_CONFIG_DECORATION_ENFORCE_SERVER),
}
@ WLMAKER_CONFIG_DECORATION_SUGGEST_CLIENT
Definition config.h:37
@ WLMAKER_CONFIG_DECORATION_SUGGEST_SERVER
Definition config.h:39
@ WLMAKER_CONFIG_DECORATION_ENFORCE_CLIENT
Definition config.h:41
@ WLMAKER_CONFIG_DECORATION_ENFORCE_SERVER
Definition config.h:43

Plist descriptor of decoration mode.

See also
wlmaker_config_decoration_t.

◆ _wlmaker_xdg_decoration_config_desc

const bspl_desc_t _wlmaker_xdg_decoration_config_desc[]
static
Initial value:
= {
BSPL_DESC_ENUM("Mode", true, wlmaker_xdg_decoration_manager_t, mode, mode,
}
Definition xdg_decoration.c:41
static const bspl_enum_desc_t _wlmaker_config_decoration_desc[]
Definition xdg_decoration.c:91

Plist descriptor of the 'Decoration' dict contents.

◆ _wlmaker_xdg_decoration_dict_name

const char* _wlmaker_xdg_decoration_dict_name = "Decoration"
static

Name of the top-level dict holding the decoration manager's config.