wlmaker
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
output_config.h File Reference
#include <libbase/libbase.h>
#include <libbase/plist.h>
#include <stdbool.h>
#include <stdint.h>
#include <wayland-client-protocol.h>
Include dependency graph for output_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  wlmbe_output_config_position_t
 
struct  wlmbe_output_config_mode_t
 
struct  wlmbe_output_description_t
 
struct  wlmbe_output_config_attributes_t
 

Typedefs

typedef struct _wlmbe_output_config_t wlmbe_output_config_t
 

Functions

wlmbe_output_config_twlmbe_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)
 
wlmbe_output_config_attributes_twlmbe_output_config_attributes (wlmbe_output_config_t *config_ptr)
 
wlmbe_output_config_twlmbe_output_config_create_from_wlr (struct wlr_output *wlr_output_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)
 
wlmbe_output_config_twlmbe_output_config_create_from_plist (bspl_dict_t *dict_ptr)
 
void wlmbe_output_config_destroy (wlmbe_output_config_t *config_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)
 

Variables

const bs_test_case_t wlmbe_output_config_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.

Typedef Documentation

◆ wlmbe_output_config_t

Forward declaration.

Function Documentation

◆ wlmbe_dlnode_from_output_config()

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.

◆ wlmbe_output_config_attributes()

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_create_from_plist()

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.

Parameters
dict_ptr
Returns
New output configuration or NULL on error.

◆ wlmbe_output_config_create_from_wlr()

wlmbe_output_config_t * wlmbe_output_config_create_from_wlr ( struct wlr_output *  wlr_output_ptr)

Creates a new output config from wlr_output.

Parameters
wlr_output_ptr
Returns
New output configuration or NULL on error.

◆ wlmbe_output_config_destroy()

void wlmbe_output_config_destroy ( wlmbe_output_config_t config_ptr)

Destroys the output configuration.

◆ wlmbe_output_config_equals()

bool wlmbe_output_config_equals ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)

Returns whether the backend configuration equals the wlr_output attributes.

Parameters
dlnode_ptrTo wlmbe_output_config_t::dlnode.
ud_ptrTo a struct wlr_output.
Returns
true if it equals.

◆ wlmbe_output_config_fnmatches()

bool wlmbe_output_config_fnmatches ( bs_dllist_node_t *  dlnode_ptr,
void *  ud_ptr 
)

Returns if the backend configuration fnmatches the wlr_output attributes.

Parameters
dlnode_ptrTo wlmbe_output_config_t::dlnode.
ud_ptrTo a struct wlr_output.
Returns
true if it matches.

◆ wlmbe_output_config_from_dlnode()

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.

◆ wlmbe_output_description_equals()

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.

Parameters
desc_ptr
wlr_output_ptr
Returns
True if all fields (Name, Manufacturer, Model, Serial) have the same presence in both description and wlr_output_ptr, and (if present) their values are equal.

◆ wlmbe_output_description_fini()

void wlmbe_output_description_fini ( wlmbe_output_description_t desc_ptr)

Un-initializes the output description.

◆ wlmbe_output_description_first_fnmatch()

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.

Parameters
desc_ptr
wlr_output_layout_ptr
Returns
A pointer to the first wlr_output found in wlr_output_layout_ptr that matches desc_ptr. See wlmbe_output_description_fnmatches for matching details.

◆ wlmbe_output_description_fnmatches()

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.

Parameters
desc_ptr
wlr_output_ptr
Returns
For all fields present in the description, returns the aggregate AND of whether a fnmatch() of the field matches the corresponding wlr_output field.

◆ wlmbe_output_description_init_from_plist()

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.

Parameters
desc_ptr
dict_ptrDictionary describing the output. It may contain keys and values beyond of what's described in _wlmbe_output_description_desc.

Variable Documentation

◆ wlmbe_output_config_test_cases

const bs_test_case_t wlmbe_output_config_test_cases[]
extern

Unit tests for the output module.