|
wlmaker
|
#include "output_config.h"#include <fnmatch.h>#include <libbase/libbase.h>#include <libbase/plist.h>#include <stdio.h>#include <stdlib.h>#include <string.h>#include <wayland-server-core.h>#include <wayland-util.h>#include <wlr/types/wlr_output.h>#include <wlr/types/wlr_output_layout.h>#include "toolkit/toolkit.h"
Classes | |
| struct | _wlmbe_output_config_t |
Functions | |
| static bool | _wlmbe_output_position_decode (bspl_object_t *object_ptr, const union bspl_desc_value *desc_value_ptr, void *value_ptr) |
| static bspl_object_t * | _wlmbe_output_position_encode (const union bspl_desc_value *desc_value_ptr, const void *value_ptr) |
| static bool | _wlmbe_output_position_decode_init (void *dest_ptr) |
| static bool | _wlmbe_output_mode_decode (bspl_object_t *object_ptr, const union bspl_desc_value *desc_value_ptr, void *value_ptr) |
| static bspl_object_t * | _wlmbe_output_mode_encode (const union bspl_desc_value *desc_value_ptr, const void *value_ptr) |
| static bool | _wlmbe_output_mode_decode_init (void *dest_ptr) |
| wlmbe_output_config_t * | wlmbe_output_config_from_dlnode (bs_dllist_node_t *dlnode_ptr) |
| bs_dllist_node_t * | wlmbe_dlnode_from_output_config (wlmbe_output_config_t *config_ptr) |
| const wlmbe_output_config_attributes_t * | wlmbe_output_config_attributes (wlmbe_output_config_t *config_ptr) |
| void | wlmbe_output_config_update_attributes (wlmbe_output_config_t *config_ptr, struct wlr_output *wlr_output_ptr, int x, int y, bool has_position) |
| void | wlmbe_output_config_apply_attributes (wlmbe_output_config_t *config_ptr, const wlmbe_output_config_attributes_t *attributes_ptr) |
| wlmbe_output_config_t * | wlmbe_output_config_create_from_wlr (struct wlr_output *wlr_output_ptr) |
| wlmbe_output_config_t * | wlmbe_output_config_create_from_plist (bspl_dict_t *dict_ptr) |
| bspl_dict_t * | wlmbe_output_config_create_into_plist (const wlmbe_output_config_t *config_ptr) |
| void | wlmbe_output_config_destroy (wlmbe_output_config_t *config_ptr) |
| bool | wlmbe_output_config_equals (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| bool | wlmbe_output_config_fnmatches (bs_dllist_node_t *dlnode_ptr, void *ud_ptr) |
| bool | wlmbe_output_description_init_from_plist (wlmbe_output_description_t *desc_ptr, bspl_dict_t *dict_ptr) |
| void | wlmbe_output_description_fini (wlmbe_output_description_t *desc_ptr) |
| bool | wlmbe_output_description_equals (wlmbe_output_description_t *desc_ptr, struct wlr_output *wlr_output_ptr) |
| bool | wlmbe_output_description_fnmatches (wlmbe_output_description_t *desc_ptr, struct wlr_output *wlr_output_ptr) |
| struct wlr_output * | wlmbe_output_description_first_fnmatch (wlmbe_output_description_t *desc_ptr, struct wlr_output_layout *wlr_output_layout_ptr) |
| static void | _wlmbe_output_test_config_parse (bs_test_t *test_ptr) |
| static void | _wlmbe_output_test_decode_position (bs_test_t *test_ptr) |
| static void | _wlmbe_output_test_encode_position (bs_test_t *test_ptr) |
| static void | _wlmbe_output_test_decode_mode (bs_test_t *test_ptr) |
| static void | _wlmbe_output_test_encode_mode (bs_test_t *test_ptr) |
| static void | _wlmbe_output_test_first_fnmatch (bs_test_t *test_ptr) |
Variables | |
| static const bspl_enum_desc_t | _wlmbe_output_transformation_desc [] |
| static const bspl_desc_t | _wlmbe_output_description_desc [] |
| static const bspl_desc_t | _wlmbe_output_config_desc [] |
| const bs_test_case_t | wlmbe_output_config_test_cases [] |
Copyright (c) 2025 by Philipp Kaeser kaese.nosp@m.r@gu.nosp@m.bbe.c.nosp@m.h
|
static |
Decodes a plist "WxH@R" string into wlmbe_output_config_mode_t.
|
static |
Initializes wlmbe_output_config_mode_t at dest_ptr.
|
static |
Decodes the mode as "WxH@R" into a plist string.
|
static |
Decodes a plist "x,y" string into wlmbe_output_config_position_t.
|
static |
Initializes wlmbe_output_config_position_t at dest_ptr.
|
static |
Encodes the output position as "x,y" into a plist string object.
|
static |
Verifies parsing.
|
static |
Tests decoding of a position field.
|
static |
Tests decoding of a position field.
|
static |
Tests encoding the mode field.
|
static |
Tests encoding of the position field.
|
static |
| bs_dllist_node_t * wlmbe_dlnode_from_output_config | ( | wlmbe_output_config_t * | config_ptr | ) |
Returns the base pointer from the wlmbe_output_config_t::dlnode.
| void wlmbe_output_config_apply_attributes | ( | wlmbe_output_config_t * | config_ptr, |
| const wlmbe_output_config_attributes_t * | attributes_ptr | ||
| ) |
Applies attributes_ptr to the configuration. Respects presence flags.
| config_ptr | |
| attributes_ptr |
| const wlmbe_output_config_attributes_t * wlmbe_output_config_attributes | ( | wlmbe_output_config_t * | config_ptr | ) |
Returns pointer to wlmbe_output_config_t::attributes.
| wlmbe_output_config_t * wlmbe_output_config_create_from_plist | ( | bspl_dict_t * | dict_ptr | ) |
Creates a new output config from the plist dictionnary dict_ptr.
| dict_ptr |
| wlmbe_output_config_t * wlmbe_output_config_create_from_wlr | ( | struct wlr_output * | wlr_output_ptr | ) |
Creates a new output config from wlr_output.
| wlr_output_ptr |
| bspl_dict_t * wlmbe_output_config_create_into_plist | ( | const wlmbe_output_config_t * | config_ptr | ) |
Creates a plist dict from the output config.
| config_ptr |
| void wlmbe_output_config_destroy | ( | wlmbe_output_config_t * | config_ptr | ) |
Destroys the output configuration.
| bool wlmbe_output_config_equals | ( | bs_dllist_node_t * | dlnode_ptr, |
| void * | ud_ptr | ||
| ) |
Returns whether the backend configuration equals the wlr_output attributes.
| dlnode_ptr | To wlmbe_output_config_t::dlnode. |
| ud_ptr | To a struct wlr_output. |
| bool wlmbe_output_config_fnmatches | ( | bs_dllist_node_t * | dlnode_ptr, |
| void * | ud_ptr | ||
| ) |
Returns if the backend configuration fnmatches the wlr_output attributes.
| dlnode_ptr | To wlmbe_output_config_t::dlnode. |
| ud_ptr | To a struct wlr_output. |
| wlmbe_output_config_t * wlmbe_output_config_from_dlnode | ( | bs_dllist_node_t * | dlnode_ptr | ) |
Returns the base pointer from the wlmbe_output_config_t::dlnode.
| void wlmbe_output_config_update_attributes | ( | wlmbe_output_config_t * | config_ptr, |
| struct wlr_output * | wlr_output_ptr, | ||
| int | x, | ||
| int | y, | ||
| bool | has_position | ||
| ) |
Updates the attributes from wlr_output_ptr and the given position info.
| bool wlmbe_output_description_equals | ( | wlmbe_output_description_t * | desc_ptr, |
| struct wlr_output * | wlr_output_ptr | ||
| ) |
Returns whether the output description equals the wlr_output's attributes.
| desc_ptr | |
| wlr_output_ptr |
wlr_output_ptr, and (if present) their values are equal. | void wlmbe_output_description_fini | ( | wlmbe_output_description_t * | desc_ptr | ) |
Un-initializes the output description.
| struct wlr_output * wlmbe_output_description_first_fnmatch | ( | wlmbe_output_description_t * | desc_ptr, |
| struct wlr_output_layout * | wlr_output_layout_ptr | ||
| ) |
Returns the first wlr_output_layout output that matches desc_ptr.
| desc_ptr | |
| wlr_output_layout_ptr |
wlr_output found in wlr_output_layout_ptr that matches desc_ptr. See wlmbe_output_description_fnmatches for matching details. | bool wlmbe_output_description_fnmatches | ( | wlmbe_output_description_t * | desc_ptr, |
| struct wlr_output * | wlr_output_ptr | ||
| ) |
Returns whether the output description matches the wlr_output's attributes.
| desc_ptr | |
| wlr_output_ptr |
wlr_output field. | bool wlmbe_output_description_init_from_plist | ( | wlmbe_output_description_t * | desc_ptr, |
| bspl_dict_t * | dict_ptr | ||
| ) |
Initializes the output description from the plist dictionary.
| desc_ptr | |
| dict_ptr | Dictionary describing the output. It may contain keys and values beyond of what's described in _wlmbe_output_description_desc. |
|
static |
Descriptor for the output configuration.
|
static |
[OutputTransformation] Plist descriptor for wlmbe_output_description_t.
|
static |
Descriptor for output transformations. [OutputTransformation]
| const bs_test_case_t wlmbe_output_config_test_cases[] |
Unit tests for the output module.