wlmaker
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
wlmaker.c File Reference
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <limits.h>
#include <regex.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <wayland-server-core.h>
#include <wlr/util/log.h>
#include "../etc/root_menu.h"
#include "../etc/style.h"
#include "action.h"
#include "backend/backend.h"
#include "background.h"
#include "backtrace.h"
#include "clip.h"
#include "config.h"
#include "dock.h"
#include "root_menu.h"
#include "server.h"
#include "task_list.h"
#include "toolkit/toolkit.h"
Include dependency graph for wlmaker.c:

Classes

struct  wlmaker_workspace_style_t
 

Macros

#define _POSIX_C_SOURCE   200112L
 setenv() is a POSIX extension.
 
#define WLR_USE_UNSTABLE
 Use non-stable features of wlroots.
 

Functions

static void wlr_to_bs_log (enum wlr_log_importance importance, const char *fmt, va_list args)
 
bool start_subprocess (const char *cmdline_ptr)
 
bool create_workspaces (bspl_dict_t *state_dict_ptr, wlmaker_server_t *server_ptr)
 
int main (int argc, const char **argv)
 

Variables

static char * wlmaker_arg_config_file_ptr = NULL
 
static char * wlmaker_arg_state_file_ptr = NULL
 
static char * wlmaker_arg_style_file_ptr = NULL
 
static char * wlmaker_arg_root_menu_file_ptr = NULL
 
static wlmaker_server_options_t wlmaker_server_options
 
static const bs_arg_enum_table_t wlmaker_log_levels []
 
static const bs_arg_t wlmaker_args []
 
static bs_ptr_stack_t wlmaker_subprocess_stack
 
static bs_ptr_stack_t wlmaker_background_stack
 
static regex_t wlmaker_wlr_log_regex
 
static const char * wlmaker_wlr_log_regex_string
 
static const bspl_desc_t wlmaker_workspace_style_desc []
 
static const char * _wlmaker_root_menu_fname_ptrs []
 
static const char * _wlmaker_style_fname_ptrs []
 

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

◆ create_workspaces()

bool create_workspaces ( bspl_dict_t *  state_dict_ptr,
wlmaker_server_t server_ptr 
)

Creates workspaces as configured in the state dict.

◆ main()

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

The main program.

◆ start_subprocess()

bool start_subprocess ( const char *  cmdline_ptr)

Launches a sub-process, and keeps it on the subprocess stack.

◆ wlr_to_bs_log()

static void wlr_to_bs_log ( enum wlr_log_importance  importance,
const char *  fmt,
va_list  args 
)
static

Wraps the wlr_log calls on bs_log.

Parameters
importance
fmt
args

Variable Documentation

◆ _wlmaker_root_menu_fname_ptrs

const char* _wlmaker_root_menu_fname_ptrs[]
static
Initial value:
= {
"~/.wlmaker-root-menu.plist",
"/usr/share/wlmaker/root-menu.plist",
NULL
}

Lookup paths for the root menu config file.

◆ _wlmaker_style_fname_ptrs

const char* _wlmaker_style_fname_ptrs[]
static
Initial value:
= {
"~/.wlmaker-style.plist",
"/usr/share/wlmaker/style.plist",
NULL
}

Lookup paths for the style config file.

◆ wlmaker_arg_config_file_ptr

char* wlmaker_arg_config_file_ptr = NULL
static

Will hold the value of –config_file.

◆ wlmaker_arg_root_menu_file_ptr

char* wlmaker_arg_root_menu_file_ptr = NULL
static

Will hold the value of –root_menu_file.

◆ wlmaker_arg_state_file_ptr

char* wlmaker_arg_state_file_ptr = NULL
static

Will hold the value of –state_file.

◆ wlmaker_arg_style_file_ptr

char* wlmaker_arg_style_file_ptr = NULL
static

Will hold the value of –style_file.

◆ wlmaker_args

const bs_arg_t wlmaker_args[]
static

Definition of commandline arguments.

◆ wlmaker_background_stack

bs_ptr_stack_t wlmaker_background_stack
static

References to the created backgrounds.

◆ wlmaker_log_levels

const bs_arg_enum_table_t wlmaker_log_levels[]
static
Initial value:
= {
{ .name_ptr = "DEBUG", BS_DEBUG },
{ .name_ptr = "INFO", BS_INFO },
{ .name_ptr = "WARNING", BS_WARNING },
{ .name_ptr = "ERROR", BS_ERROR },
{ .name_ptr = NULL },
}

Log levels.

◆ wlmaker_server_options

wlmaker_server_options_t wlmaker_server_options
static
Initial value:
= {
.start_xwayland = false,
.width = 0,
.height = 0,
}

Startup options for the server.

◆ wlmaker_subprocess_stack

bs_ptr_stack_t wlmaker_subprocess_stack
static

References auto-started subprocesses.

◆ wlmaker_wlr_log_regex

regex_t wlmaker_wlr_log_regex
static

Compiled regular expression for extracting file & line no. from wlr_log.

◆ wlmaker_wlr_log_regex_string

const char* wlmaker_wlr_log_regex_string
static
Initial value:
=
"^\\[([^\\:]+)\\:([0-9]+)\\]\\ "

Regular expression string for extracting file & line no. from wlr_log.

◆ wlmaker_workspace_style_desc

const bspl_desc_t wlmaker_workspace_style_desc[]
static
Initial value:
= {
BSPL_DESC_CHARBUF(
"Name", true, wlmaker_workspace_style_t, name, name, 32, NULL),
BSPL_DESC_ARGB32(
"Color", false, wlmaker_workspace_style_t, color, color, 0),
}
Definition wlmaker.c:147

Style descriptor for the "Workspace" dict of wlmaker-state.plist.