wlmaker
Loading...
Searching...
No Matches
Classes | Enumerations | Functions | Variables
config.h File Reference
#include <inttypes.h>
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stddef.h>
#include "toolkit/toolkit.h"
#include "files.h"
Include dependency graph for config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmaker_config_task_list_style_t
 
struct  wlmaker_config_clip_style_t
 
struct  wlmaker_config_cursor_style_t
 
struct  wlmaker_config_style_t
 

Enumerations

enum  wlmaker_config_decoration_t { WLMAKER_CONFIG_DECORATION_SUGGEST_CLIENT , WLMAKER_CONFIG_DECORATION_SUGGEST_SERVER , WLMAKER_CONFIG_DECORATION_ENFORCE_CLIENT , WLMAKER_CONFIG_DECORATION_ENFORCE_SERVER }
 

Functions

bspl_object_t * wlmaker_config_object_load (wlmaker_files_t *files_ptr, const char *name_ptr, const char *arg_fname_ptr, const char *xdg_config_fname_ptr, const uint8_t *default_data_ptr, size_t default_data_size)
 
bspl_dict_t * wlmaker_config_load (wlmaker_files_t *files_ptr, const char *fname_ptr)
 
bspl_dict_t * wlmaker_state_load (wlmaker_files_t *files_ptr, const char *fname_ptr)
 

Variables

const float config_output_scale
 
const bspl_desc_t wlmaker_config_style_desc []
 
const bs_test_set_t wlmaker_config_test_set
 

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 iLicense.

Enumeration Type Documentation

◆ wlmaker_config_decoration_t

Preference for decoration.

Enumerator
WLMAKER_CONFIG_DECORATION_SUGGEST_CLIENT 

Mode NONE will be set to CLIENT; but other modes left unchanged.

WLMAKER_CONFIG_DECORATION_SUGGEST_SERVER 

Mode NONE will be set to SERVER; but other modes left unchanged.

WLMAKER_CONFIG_DECORATION_ENFORCE_CLIENT 

Will set all windows to CLIENT, no matter what they requested.

WLMAKER_CONFIG_DECORATION_ENFORCE_SERVER 

Will set all windows to SERVER, no matter what they requested.

Function Documentation

◆ wlmaker_config_load()

bspl_dict_t * wlmaker_config_load ( wlmaker_files_t files_ptr,
const char *  fname_ptr 
)

Loads the configuration for wlmaker.

Parameters
files_ptr
fname_ptrOptional: Name of the file to load it from. May be NULL.
Returns
A dict object, or NULL on error. Errors will already be logged. The caller must free the associated resources by calling bspl_object_unref().

◆ wlmaker_config_object_load()

bspl_object_t * wlmaker_config_object_load ( wlmaker_files_t files_ptr,
const char *  name_ptr,
const char *  arg_fname_ptr,
const char *  xdg_config_fname_ptr,
const uint8_t *  default_data_ptr,
size_t  default_data_size 
)

Loads a plist object from the given config file or data.

Useful to load configuration files from the provided name in fname_ptr or an in-memory buffer, as a compiled-in fallback option.

Parameters
files_ptr
name_ptrName to use when logging about the plist.
arg_fname_ptrExplicit filename to use for loading the file, eg. from the commandline. Or NULL.
xdg_config_fname_ptrFile name relative to XDG config home. See wlmaker_files_xdg_config_find.
default_data_ptrPoints to in-memory plist data, or NULL. Will be used if fname_ptr was NULL.
default_data_sizeThe size of the in-memory plist data.
Returns
a bspl_object_t on success, or NULL if none of the options had data, or if there was a file or parsing error.

◆ wlmaker_state_load()

bspl_dict_t * wlmaker_state_load ( wlmaker_files_t files_ptr,
const char *  fname_ptr 
)

Loads the state for wlmaker.

Behaviour is similar to wlmaker_config_load.

Parameters
files_ptr
fname_ptr
Returns
A dict object or NULL on error.

Variable Documentation

◆ config_output_scale

const float config_output_scale
extern

Overall scale of output.

◆ wlmaker_config_style_desc

const bspl_desc_t wlmaker_config_style_desc[]
extern

Desciptor for decoding the style information from a plist.

◆ wlmaker_config_test_set

const bs_test_set_t wlmaker_config_test_set
extern

Unit test set.