wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
wlmdock.c File Reference
#include "wlr-layer-shell-unstable-v1-client-protocol.h"
#include <basedir.h>
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/signalfd.h>
#include <sys/types.h>
#include <unistd.h>
#include <wayland-client-core.h>
#include <wayland-client-protocol.h>
#include <wayland-server-core.h>
#include <wlr/backend.h>
#include <wlr/backend/wayland.h>
#include <wlr/render/allocator.h>
#include <wlr/render/wlr_renderer.h>
#include <wlr/types/wlr_compositor.h>
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_scene.h>
#include <wlr/types/wlr_seat.h>
#include <wlr/util/box.h>
#include <wlr/util/edges.h>
#include <wlr/util/log.h>
#include "toolkit/toolkit.h"
#include "util/backtrace.h"
#include "util/files.h"
#include "util/subprocess_monitor.h"
#include "util/version.h"
#include "util/wlr_log.h"
#include "wlclient/layer_surface.h"
#include "wlclient/wlclient.h"
#include "dock/launcher.h"
#include "dock/subcompositor.h"
#include "dock/tilebox.h"
#include "dock/toplevel.h"
#include "../config.h"
Include dependency graph for wlmdock.c:

Classes

struct  wlmdock_t
 
struct  wlmdock_state
 

Functions

static wlmdock_t * _wlmdock_create (const wlmtk_dock_positioning_t positioning, wlmaker_config_style_t *style_ptr)
 
static void _wlmdock_destroy (wlmdock_t *dock_ptr)
 
static int handle_client_signal (int fd, uint32_t mask, void *data_ptr)
 
static bool _wlmdock_decode_launchers (bspl_object_t *object_ptr, const union bspl_desc_value *desc_value_ptr, void *value_ptr)
 
int main (int argc, const char **argv)
 

Variables

static char * wlmdock_arg_config_file_ptr = NULL
 
static char * wlmdock_arg_state_file_ptr = NULL
 
static char * wlmdock_arg_theme_file_ptr = NULL
 
static const bs_arg_t wlmdock_args []
 
static const bspl_enum_desc_t _wlmdock_edges []
 
const bspl_desc_t _wlmdock_plist_desc []
 

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

◆ _wlmdock_create()

wlmdock_t * _wlmdock_create ( const wlmtk_dock_positioning_t  positioning,
wlmaker_config_style_t *  style_ptr 
)
static

Creates and initializes wlmdock_t.

◆ _wlmdock_decode_launchers()

bool _wlmdock_decode_launchers ( bspl_object_t *  object_ptr,
const union bspl_desc_value *  desc_value_ptr,
void *  value_ptr 
)
static

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

◆ _wlmdock_destroy()

void _wlmdock_destroy ( wlmdock_t *  dock_ptr)
static

Destroys wlmdock_t and frees all resources.

◆ handle_client_signal()

int handle_client_signal ( int  fd,
uint32_t  mask,
void *  data_ptr 
)
static

Handles client's signal fd events.

◆ main()

int main ( int  argc,
const char **  argv 
)

The dock's main program.

Variable Documentation

◆ _wlmdock_edges

const bspl_enum_desc_t _wlmdock_edges[]
static
Initial value:
= {
BSPL_ENUM("TOP", WLR_EDGE_TOP),
BSPL_ENUM("BOTTOM", WLR_EDGE_BOTTOM),
BSPL_ENUM("LEFT", WLR_EDGE_LEFT),
BSPL_ENUM("RIGHT", WLR_EDGE_RIGHT),
BSPL_ENUM_SENTINEL(),
}

Enum descriptor for enum wlr_edges.

◆ _wlmdock_plist_desc

const bspl_desc_t _wlmdock_plist_desc[]
Initial value:
= {
BSPL_DESC_ENUM("Edge", true, struct wlmdock_state,
positioning.edge, positioning.edge,
WLR_EDGE_NONE, _wlmdock_edges),
BSPL_DESC_ENUM("Anchor", true, struct wlmdock_state,
positioning.anchor, positioning.anchor,
WLR_EDGE_NONE, _wlmdock_edges),
BSPL_DESC_CUSTOM("Launchers", true, struct wlmdock_state,
launchers_array_ptr, launchers_array_ptr,
NULL,
NULL,
NULL),
BSPL_DESC_SENTINEL(),
}
Definition wlmdock.c:107
static const bspl_enum_desc_t _wlmdock_edges[]
Definition wlmdock.c:160
static bool _wlmdock_decode_launchers(bspl_object_t *object_ptr, const union bspl_desc_value *desc_value_ptr, void *value_ptr)
Definition wlmdock.c:557

Descriptor for the dock's plist.

◆ wlmdock_arg_config_file_ptr

char* wlmdock_arg_config_file_ptr = NULL
static

Will hold the value of –config_file.

◆ wlmdock_arg_state_file_ptr

char* wlmdock_arg_state_file_ptr = NULL
static

Will hold the value of –state_file.

◆ wlmdock_arg_theme_file_ptr

char* wlmdock_arg_theme_file_ptr = NULL
static

Will hold the value of –theme_file.

◆ wlmdock_args

const bs_arg_t wlmdock_args[]
static
Initial value:
= {
BS_ARG_STRING(
"config_file",
"Optional: Path to a configuration file. If not provided, wlmaker "
"will scan default paths for a configuration file, or fall back to "
"a built-in configuration.",
NULL,
BS_ARG_STRING(
"state_file",
"Optional: Path to a state file, with state of workspaces, dock and "
"clips configured. If not provided, wlmaker will scan default paths "
"for a state file, or fall back to a built-in default.",
NULL,
BS_ARG_STRING(
"theme_file",
"Optional: Path to a \"theme\" file, configuring the visual style for "
"elements. If not provided, wlmaker will use a built-in default theme.",
NULL,
bs_arg_log_level,
}
static char * wlmdock_arg_config_file_ptr
Definition wlmdock.c:127
static char * wlmdock_arg_state_file_ptr
Definition wlmdock.c:129
static char * wlmdock_arg_theme_file_ptr
Definition wlmdock.c:131

Definition of commandline arguments.