wlmaker
Loading...
Searching...
No Matches
Classes | Functions | Variables
dock.c File Reference
#include "dock.h"
#include <wlr/util/edges.h>
#include "toolkit/toolkit.h"
#include "config.h"
#include "launcher.h"
#include "default_state.h"
Include dependency graph for dock.c:

Classes

struct  _wlmaker_dock_t
 
struct  parse_args
 

Functions

static bool _wlmaker_dock_decode_launchers (wlmcfg_object_t *object_ptr, void *dest_ptr)
 
static void _wlmaker_dock_handle_workspace_changed (struct wl_listener *listener_ptr, void *data_ptr)
 
wlmaker_dock_twlmaker_dock_create (wlmaker_server_t *server_ptr, wlmcfg_dict_t *state_dict_ptr, const wlmaker_config_style_t *style_ptr)
 
void wlmaker_dock_destroy (wlmaker_dock_t *dock_ptr)
 
static void test_create_destroy (bs_test_t *test_ptr)
 

Variables

static const wlmcfg_enum_desc_t _wlmaker_dock_edges []
 
const wlmcfg_desc_t _wlmaker_dock_desc []
 
const bs_test_case_t wlmaker_dock_test_cases []
 

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

◆ _wlmaker_dock_decode_launchers()

bool _wlmaker_dock_decode_launchers ( wlmcfg_object_t * object_ptr,
void * dest_ptr )
static

Decoder for the "Launchers" array. Currently just stores a reference.

◆ _wlmaker_dock_handle_workspace_changed()

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

Re-attaches the dock to the new "current" workspace.

◆ test_create_destroy()

void test_create_destroy ( bs_test_t * test_ptr)
static

Tests ctor and dtor; to help fix leaks.

◆ wlmaker_dock_create()

wlmaker_dock_t * wlmaker_dock_create ( wlmaker_server_t * server_ptr,
wlmcfg_dict_t * state_dict_ptr,
const wlmaker_config_style_t * style_ptr )

Creates the Dock handle. Needs the server to be up with workspaces running.

Parameters
server_ptr
state_dict_ptr
style_ptr
Returns
Pointer to the Dock handle, or NULL on error.

◆ wlmaker_dock_destroy()

void wlmaker_dock_destroy ( wlmaker_dock_t * dock_ptr)

Destroys the Dock handle.

Parameters
dock_ptr

Variable Documentation

◆ _wlmaker_dock_desc

const wlmcfg_desc_t _wlmaker_dock_desc[]
Initial value:
= {
WLMCFG_DESC_ENUM("Edge", true, parse_args, positioning.edge,
WLR_EDGE_NONE, _wlmaker_dock_edges),
WLMCFG_DESC_ENUM("Anchor", true, parse_args, positioning.anchor,
WLR_EDGE_NONE, _wlmaker_dock_edges),
WLMCFG_DESC_CUSTOM("Launchers", true, parse_args, launchers_array_ptr,
}
#define WLMCFG_DESC_SENTINEL()
Definition decode.h:156
#define WLMCFG_DESC_ENUM(_key, _required, _base, _field, _default, _desc_ptr)
Definition decode.h:204
#define WLMCFG_DESC_CUSTOM(_key, _required, _base, _field, _d,_i, _f)
Definition decode.h:243
static const wlmcfg_enum_desc_t _wlmaker_dock_edges[]
Definition dock.c:63
static bool _wlmaker_dock_decode_launchers(wlmcfg_object_t *object_ptr, void *dest_ptr)
Definition dock.c:178
Definition clip.c:105

Descriptor for the dock's plist.

◆ _wlmaker_dock_edges

const wlmcfg_enum_desc_t _wlmaker_dock_edges[]
static
Initial value:
= {
WLMCFG_ENUM("TOP", WLR_EDGE_TOP),
WLMCFG_ENUM("BOTTOM", WLR_EDGE_BOTTOM),
WLMCFG_ENUM("LEFT", WLR_EDGE_LEFT),
WLMCFG_ENUM("RIGHT", WLR_EDGE_RIGHT),
}
#define WLMCFG_ENUM_SENTINEL()
Definition decode.h:49
#define WLMCFG_ENUM(_name, _value)
Definition decode.h:52

Enum descriptor for enum wlr_edges.

◆ wlmaker_dock_test_cases

const bs_test_case_t wlmaker_dock_test_cases[]
Initial value:
= {
{ 1, "create_destroy", test_create_destroy },
{ 0, NULL, NULL }
}
static void test_create_destroy(bs_test_t *test_ptr)
Definition dock.c:226

Unit test cases.