libxkbcommon  1.10.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
Data Structures | Enumerations | Functions
Rules

Data Structures

struct  xkb_rule_names
 
struct  xkb_component_names
 
struct  xkb_rmlvo_builder
 

Enumerations

enum  xkb_rmlvo_builder_flags { XKB_RMLVO_BUILDER_NO_FLAGS = 0 }
 

Functions

XKB_EXPORT struct xkb_rmlvo_builderxkb_rmlvo_builder::xkb_rmlvo_builder_new (struct xkb_context *context, const char *rules, const char *model, enum xkb_rmlvo_builder_flags flags)
 
XKB_EXPORT bool xkb_rmlvo_builder::xkb_rmlvo_builder_append_layout (struct xkb_rmlvo_builder *rmlvo, const char *layout, const char *variant, const char *const *options, size_t options_len)
 
XKB_EXPORT bool xkb_rmlvo_builder::xkb_rmlvo_builder_append_option (struct xkb_rmlvo_builder *rmlvo, const char *option)
 
XKB_EXPORT struct xkb_rmlvo_builderxkb_rmlvo_builder::xkb_rmlvo_builder_ref (struct xkb_rmlvo_builder *rmlvo)
 
XKB_EXPORT void xkb_rmlvo_builder::xkb_rmlvo_builder_unref (struct xkb_rmlvo_builder *rmlvo)
 
XKB_EXPORT bool xkb_component_names::xkb_components_names_from_rules (struct xkb_context *context, const struct xkb_rule_names *rmlvo_in, struct xkb_rule_names *rmlvo_out, struct xkb_component_names *components_out)
 

Detailed Description

Utility functions related to rules, whose purpose is introduced in: XKB the keyboard keymap configuration.

Function Documentation

◆ xkb_rmlvo_builder_new()

XKB_EXPORT struct xkb_rmlvo_builder * xkb_rmlvo_builder_new ( struct xkb_context context,
const char *  rules,
const char *  model,
enum xkb_rmlvo_builder_flags  flags 
)

Create a new RMLVO builder.

Parameters
contextThe context in which to create the builder.
rulesThe ruleset. If NULL or the empty string "", a default value is used. If the XKB_DEFAULT_RULES environment variable is set, it is used as the default. Otherwise the system default is used.
modelThe keyboard model. If NULL or the empty string "", a default value is used. If the XKB_DEFAULT_MODEL environment variable is set, it is used as the default. Otherwise the system default is used.
flagsOptional flags for the builder, or 0.
Returns
A xkb_rmlvo_builder, or NULL if the compilation failed.
See also
xkb_rule_names for a detailed description of rules and model.
Since
1.11.0

◆ xkb_rmlvo_builder_append_layout()

XKB_EXPORT bool xkb_rmlvo_builder_append_layout ( struct xkb_rmlvo_builder rmlvo,
const char *  layout,
const char *  variant,
const char *const *  options,
size_t  options_len 
)

Append a layout to the given RMLVO builder.

Parameters
rmlvoThe builder to modify.
layoutThe name of the layout.
variantThe name of the layout variant, or NULL to select the default variant.
optionsAn array of options to apply only to this layout, or NULL if there is no such options.
options_lenThe length of options.
Note
The options are only effectual if the corresponding ruleset has the proper rules to handle them as layout-specific options.
See rxkb_option_is_layout_specific() to query whether an option supports the layout-specific feature.
Returns
true if the call succeeded, otherwise false.
Since
1.11.0

◆ xkb_rmlvo_builder_append_option()

XKB_EXPORT bool xkb_rmlvo_builder_append_option ( struct xkb_rmlvo_builder rmlvo,
const char *  option 
)

Append an option to the given RMLVO builder.

Parameters
rmlvoThe builder to modify.
optionThe name of the option.
Returns
true if the call succeeded, otherwise false.
Since
1.11.0

◆ xkb_rmlvo_builder_ref()

XKB_EXPORT struct xkb_rmlvo_builder * xkb_rmlvo_builder_ref ( struct xkb_rmlvo_builder rmlvo)

Take a new reference on a RMLVO builder.

Parameters
rmlvoThe builder to reference.
Returns
The passed in builder.
Since
1.11.0

◆ xkb_rmlvo_builder_unref()

XKB_EXPORT void xkb_rmlvo_builder_unref ( struct xkb_rmlvo_builder rmlvo)

Release a reference on a RMLVO builder, and possibly free it.

Parameters
rmlvoThe builder. If it is NULL, this function does nothing.
Since
1.11.0

◆ xkb_components_names_from_rules()

XKB_EXPORT bool xkb_components_names_from_rules ( struct xkb_context context,
const struct xkb_rule_names rmlvo_in,
struct xkb_rule_names rmlvo_out,
struct xkb_component_names components_out 
)

Resolve RMLVO names to KcCGST components.

This function is used primarily for debugging. See xkb_keymap::xkb_keymap_new_from_names2() for creating keymaps from RMLVO names.

Parameters
[in]contextThe context in which to resolve the names.
[in]rmlvo_inThe RMLVO names to use.
[out]rmlvo_outThe RMLVO names actually used after resolving missing values.
[out]components_outThe KcCGST components resulting of the RMLVO resolution.

rmlvo_out and components can be omitted by using NULL, but not both.

If components is not NULL, it is filled with dynamically-allocated strings that should be freed by the caller.

Returns
true if the RMLVO names could be resolved, false otherwise.
See also
Introduction to RMLVO
Introduction to KcCGST
xkb_rule_names
xkb_component_names
xkb_keymap::xkb_keymap_new_from_names2()
Since
1.9.0