libxkbcommon 1.11.0 Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state

Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
Query for available RMLVO

## Data Structures
struct | rxkb_context
struct | rxkb_model
struct | rxkb_layout
struct | rxkb_option_group
struct | rxkb_option
struct | rxkb_iso639_code
struct | rxkb_iso3166_code

## Enumerations
enum | rxkb_popularity { RXKB_POPULARITY_STANDARD = 1 , RXKB_POPULARITY_EXOTIC }
enum | rxkb_context_flags { RXKB_CONTEXT_NO_FLAGS = 0 , RXKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0) , RXKB_CONTEXT_LOAD_EXOTIC_RULES = (1 << 1) , RXKB_CONTEXT_NO_SECURE_GETENV = (1 << 2) }
enum | rxkb_log_level { RXKB_LOG_LEVEL_CRITICAL = 10 , RXKB_LOG_LEVEL_ERROR = 20 , RXKB_LOG_LEVEL_WARNING = 30 , RXKB_LOG_LEVEL_INFO = 40 , RXKB_LOG_LEVEL_DEBUG = 50 }

## Functions
RXKB_EXPORT struct rxkb_context * | rxkb_context_new (enum rxkb_context_flags flags)
RXKB_EXPORT void | rxkb_context_set_log_level (struct rxkb_context *ctx, enum rxkb_log_level level)
RXKB_EXPORT enum rxkb_log_level | rxkb_context_get_log_level (struct rxkb_context *ctx)
RXKB_EXPORT void | rxkb_context_set_log_fn (struct rxkb_context *ctx, void(*log_fn)(struct rxkb_context *ctx, enum rxkb_log_level level, const char *format, va_list args))
RXKB_EXPORT bool | rxkb_context_parse (struct rxkb_context *ctx, const char *ruleset)
RXKB_EXPORT bool | rxkb_context_parse_default_ruleset (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_context * | rxkb_context_ref (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_context * | rxkb_context_unref (struct rxkb_context *ctx)
RXKB_EXPORT void | rxkb_context_set_user_data (struct rxkb_context *ctx, void *user_data)
RXKB_EXPORT void * | rxkb_context_get_user_data (struct rxkb_context *ctx)
RXKB_EXPORT bool | rxkb_context_include_path_append (struct rxkb_context *ctx, const char *path)
RXKB_EXPORT bool | rxkb_context_include_path_append_default (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_model * | rxkb_model_first (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_model * | rxkb_model_next (struct rxkb_model *m)
RXKB_EXPORT struct rxkb_model * | rxkb_model_ref (struct rxkb_model *m)
RXKB_EXPORT struct rxkb_model * | rxkb_model_unref (struct rxkb_model *m)
RXKB_EXPORT const char * | rxkb_model_get_name (struct rxkb_model *m)
RXKB_EXPORT const char * | rxkb_model_get_description (struct rxkb_model *m)
RXKB_EXPORT const char * | rxkb_model_get_vendor (struct rxkb_model *m)
RXKB_EXPORT enum rxkb_popularity | rxkb_model_get_popularity (struct rxkb_model *m)
RXKB_EXPORT struct rxkb_layout * | rxkb_layout_first (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_layout * | rxkb_layout_next (struct rxkb_layout *l)
RXKB_EXPORT struct rxkb_layout * | rxkb_layout_ref (struct rxkb_layout *l)
RXKB_EXPORT struct rxkb_layout * | rxkb_layout_unref (struct rxkb_layout *l)
RXKB_EXPORT const char * | rxkb_layout_get_name (struct rxkb_layout *l)
RXKB_EXPORT const char * | rxkb_layout_get_variant (struct rxkb_layout *l)
RXKB_EXPORT const char * | rxkb_layout_get_brief (struct rxkb_layout *l)
RXKB_EXPORT const char * | rxkb_layout_get_description (struct rxkb_layout *l)
RXKB_EXPORT enum rxkb_popularity | rxkb_layout_get_popularity (struct rxkb_layout *l)
RXKB_EXPORT struct rxkb_option_group * | rxkb_option_group_first (struct rxkb_context *ctx)
RXKB_EXPORT struct rxkb_option_group * | rxkb_option_group_next (struct rxkb_option_group *g)
RXKB_EXPORT struct rxkb_option_group * | rxkb_option_group_ref (struct rxkb_option_group *g)
RXKB_EXPORT struct rxkb_option_group * | rxkb_option_group_unref (struct rxkb_option_group *g)
RXKB_EXPORT const char * | rxkb_option_group_get_name (struct rxkb_option_group *m)
RXKB_EXPORT const char * | rxkb_option_group_get_description (struct rxkb_option_group *m)
RXKB_EXPORT bool | rxkb_option_group_allows_multiple (struct rxkb_option_group *g)
RXKB_EXPORT enum rxkb_popularity | rxkb_option_group_get_popularity (struct rxkb_option_group *g)
RXKB_EXPORT struct rxkb_option * | rxkb_option_first (struct rxkb_option_group *group)
RXKB_EXPORT struct rxkb_option * | rxkb_option_next (struct rxkb_option *o)
RXKB_EXPORT struct rxkb_option * | rxkb_option_ref (struct rxkb_option *o)
RXKB_EXPORT struct rxkb_option * | rxkb_option_unref (struct rxkb_option *o)
RXKB_EXPORT const char * | rxkb_option_get_name (struct rxkb_option *o)
RXKB_EXPORT const char * | rxkb_option_get_brief (struct rxkb_option *o)
RXKB_EXPORT const char * | rxkb_option_get_description (struct rxkb_option *o)
RXKB_EXPORT enum rxkb_popularity | rxkb_option_get_popularity (struct rxkb_option *o)
RXKB_EXPORT bool | rxkb_option_is_layout_specific (struct rxkb_option *o)
RXKB_EXPORT struct rxkb_iso639_code * | rxkb_iso639_code_ref (struct rxkb_iso639_code *iso639)
RXKB_EXPORT struct rxkb_iso639_code * | rxkb_iso639_code_unref (struct rxkb_iso639_code *iso639)
RXKB_EXPORT const char * | rxkb_iso639_code_get_code (struct rxkb_iso639_code *iso639)
RXKB_EXPORT struct rxkb_iso639_code * | rxkb_layout_get_iso639_first (struct rxkb_layout *layout)
RXKB_EXPORT struct rxkb_iso639_code * | rxkb_iso639_code_next (struct rxkb_iso639_code *iso639)
RXKB_EXPORT struct rxkb_iso3166_code * | rxkb_iso3166_code_ref (struct rxkb_iso3166_code *iso3166)
RXKB_EXPORT struct rxkb_iso3166_code * | rxkb_iso3166_code_unref (struct rxkb_iso3166_code *iso3166)
RXKB_EXPORT const char * | rxkb_iso3166_code_get_code (struct rxkb_iso3166_code *iso3166)
RXKB_EXPORT struct rxkb_iso3166_code * | rxkb_layout_get_iso3166_first (struct rxkb_layout *layout)
RXKB_EXPORT struct rxkb_iso3166_code * | rxkb_iso3166_code_next (struct rxkb_iso3166_code *iso3166)

## Detailed Description

The libxkbregistry API to query for available rules, models, layouts, variants and options (RMLVO).

libxkbregistry is a separate library to libxkbcommon.

This library is the replacement for clients currently parsing evdev.xml directly. The library is intended to provide easy access to the set of possible MLVO configurations for a given ruleset. It is not a library to apply these configurations, merely to enumerate them. The intended users of this library are the configuration UIs that allow a user to select their keyboard layout of choice.

## Enumeration Type Documentation

## ◆ rxkb_popularity

enum rxkb_popularity

Describes the popularity of an item.

Historically, some highly specialized or experimental definitions are excluded from the default list and shipped in separate files. If these extra definitions are loaded (see RXKB_CONTEXT_LOAD_EXOTIC_RULES), the popularity of the item is set accordingly.

If the exotic items are not loaded, all items will have the standard popularity.

## ◆ rxkb_context_flags

enum rxkb_context_flags

Flags for context creation.

Enumerator
RXKB_CONTEXT_NO_DEFAULT_INCLUDES | Skip the default include paths. This requires the caller to call rxkb_context_include_path_append() or rxkb_context_include_path_append_default().
RXKB_CONTEXT_LOAD_EXOTIC_RULES | Load the extra items that are considered too exotic for the default list. For historical reasons, xkeyboard-config ships those exotic rules in a separate file (e.g. evdev.extras.xml). Where the exotic rules are requested, libxkbregistry will look for and load $ruleset.extras.xml in the include paths, see rxkb_context_include_path_append() for details on the lookup behavior.
RXKB_CONTEXT_NO_SECURE_GETENV | Disable the use of secure_getenv() for this context, so that privileged processes can use environment variables. Client uses at their own risk. Since 1.5.0

## ◆ rxkb_log_level

enum rxkb_log_level

Specifies a logging level.

Enumerator
RXKB_LOG_LEVEL_CRITICAL | Log critical internal errors only.
RXKB_LOG_LEVEL_ERROR | Log all errors.
RXKB_LOG_LEVEL_WARNING | Log warnings and errors.
RXKB_LOG_LEVEL_INFO | Log information, warnings, and errors.
RXKB_LOG_LEVEL_DEBUG | Log everything.

## Function Documentation

## ◆ rxkb_context_new()

RXKB_EXPORT struct rxkb_context * rxkb_context_new | ( | enum rxkb_context_flags | flags | ) |

Create a new xkb registry context.

The context has an initial refcount of 1. Use rxkb_context_unref() to release memory associated with this context.

Creating a context does not parse the files yet, use rxkb_context_parse().

Parameters

  flags | Flags affecting context behavior

Returns
  A new xkb registry context or NULL on failure

## ◆ rxkb_context_set_log_level()

RXKB_EXPORT void rxkb_context_set_log_level | ( | struct rxkb_context * | ctx,
|  | enum rxkb_log_level | level )

Set the current logging level.

Parameters

  ctx | The context in which to set the logging level.
  level | The logging level to use. Only messages from this level and below will be logged.

The default level is RXKB_LOG_LEVEL_ERROR. The environment variable RXKB_LOG_LEVEL, if set at the time the context was created, overrides the default value. It may be specified as a level number or name.

## ◆ rxkb_context_set_log_fn()

RXKB_EXPORT void rxkb_context_set_log_fn | ( | struct rxkb_context * | ctx,
|  | void(* | log_fn )(struct rxkb_context *ctx, enum rxkb_log_level level, const char *format, va_list args) )

Set a custom function to handle logging messages.

Parameters

  ctx | The context in which to use the set logging function.
  log_fn | The function that will be called for logging messages. Passing NULL restores the default function, which logs to stderr.

By default, log messages from this library are printed to stderr. This function allows you to replace the default behavior with a custom handler. The handler is only called with messages which match the current logging level and verbosity settings for the context. level is the logging level of the message. format and args are the same as in the vprintf(3) function.

You may use rxkb_context_set_user_data() on the context, and then call rxkb_context_get_user_data() from within the logging function to provide it with additional private context.

## ◆ rxkb_context_parse()

RXKB_EXPORT bool rxkb_context_parse | ( | struct rxkb_context * | ctx,
|  | const char * | ruleset )

Parse the given ruleset.

This can only be called once per context and once parsed the data in the context is considered constant and will never change.

This function parses all files with the given ruleset name. See rxkb_context_include_path_append() for details.

If this function returns false, libxkbregistry failed to parse the xml files. This is usually caused by invalid files on the host and should be debugged by the host’s administrator using external tools. Callers should reduce the include paths to known good paths and/or fall back to a default RMLVO set.

If this function returns false, the context should be be considered dead and must be released with rxkb_context_unref().

Parameters

  ctx | The xkb registry context
  ruleset | The ruleset to parse, e.g. evdev

Returns
  true on success or false on failure

## ◆ rxkb_context_parse_default_ruleset()

RXKB_EXPORT bool rxkb_context_parse_default_ruleset | ( | struct rxkb_context * | ctx | ) |

Parse the default ruleset as configured at build time.

See rxkb_context_parse() for details.

## ◆ rxkb_context_ref()

RXKB_EXPORT struct rxkb_context * rxkb_context_ref | ( | struct rxkb_context * | ctx | ) |

Increases the refcount of this object by one and returns the object.

Parameters

  ctx | The xkb registry context

Returns
  The passed in object

## ◆ rxkb_context_unref()

RXKB_EXPORT struct rxkb_context * rxkb_context_unref | ( | struct rxkb_context * | ctx | ) |

Decreases the refcount of this object by one.

Where the refcount of an object hits zero, associated resources will be freed.

Parameters

  ctx | The xkb registry context

Returns
  always NULL

## ◆ rxkb_context_set_user_data()

RXKB_EXPORT void rxkb_context_set_user_data | ( | struct rxkb_context * | ctx,
|  | void * | user_data )

Assign user-specific data.

libxkbregistry will not look at or modify the data, it will merely return the same pointer in rxkb_context_get_user_data().

Parameters

  ctx | The xkb registry context
  user_data | User-specific data pointer

## ◆ rxkb_context_get_user_data()

RXKB_EXPORT void * rxkb_context_get_user_data | ( | struct rxkb_context * | ctx | ) |

Return the pointer passed into rxkb_context_get_user_data().

Parameters

  ctx | The xkb registry context

Returns
  User-specific data pointer

## ◆ rxkb_context_include_path_append()

RXKB_EXPORT bool rxkb_context_include_path_append | ( | struct rxkb_context * | ctx,
|  | const char * | path )

Append a new entry to the context’s include path.

The include path handling is optimized for the most common use-case: a set of system files that provide a complete set of MLVO and some custom MLVO provided by a user in addition to the system set.

The include paths should be given so that the least complete path is specified first and the most complete path is appended last. For example:

ctx = rxkb_context_new(RXKB_CONTEXT_NO_DEFAULT_INCLUDES);
rxkb_context_include_path_append(ctx, `/home/user/.config/xkb`);
rxkb_context_include_path_append(ctx, `/usr/share/X11/xkb`);
rxkb_context_parse(ctx, `evdev`);
rxkb_context_new
RXKB_EXPORT struct rxkb_context * rxkb_context_new(enum rxkb_context_flags flags)
Create a new xkb registry context.
rxkb_context_parse
RXKB_EXPORT bool rxkb_context_parse(struct rxkb_context *ctx, const char *ruleset)
Parse the given ruleset.
rxkb_context_include_path_append
RXKB_EXPORT bool rxkb_context_include_path_append(struct rxkb_context *ctx, const char *path)
Append a new entry to the context’s include path.
RXKB_CONTEXT_NO_DEFAULT_INCLUDES
@ RXKB_CONTEXT_NO_DEFAULT_INCLUDES
Skip the default include paths.
Definition xkbregistry.h:144

The above example reflects the default behavior unless RXKB_CONTEXT_NO_DEFAULT_INCLUDES is provided.

Loading of the files is in reverse order, i.e. the last path appended is loaded first - in this case the /usr/share/X11/xkb path. Any models, layouts, variants and options defined in the evdev ruleset are loaded into the context. Then, any RMLVO found in the evdev ruleset of the user’s path (/home/user/.config/xkb in this example) are appended to the existing set.

Note that data from previously loaded include paths is never overwritten, only appended to. It is not not possible to change the system-provided data, only to append new models, layouts, variants and options to it.

In other words, to define a new variant of the us layout called banana, the following XML is sufficient.

<xkbConfigRegistry version="1.1">
<layoutList>
<layout>
<configItem>
<name>us</name>
</configItem>
<variantList>
<variant>
<configItem>
<name>banana</name>
<description>English (Banana)</description>
</configItem>
</variant>
</layout>
</layoutList>
</xkbConfigRegistry>

The list of models, options and all other layouts (including us and its variants) is taken from the system files. The resulting list of layouts will thus have a us keyboard layout with the variant banana and all other system-provided variants (dvorak, colemak, intl, etc.)

This function must be called before rxkb_context_parse() or rxkb_context_parse_default_ruleset().

Returns
  true on success, or false if the include path could not be added or is inaccessible.

## ◆ rxkb_context_include_path_append_default()

RXKB_EXPORT bool rxkb_context_include_path_append_default | ( | struct rxkb_context * | ctx | ) |

Append the default include paths to the context’s include path.

See rxkb_context_include_path_append() for details about the merge order.

This function must be called before rxkb_context_parse() or rxkb_context_parse_default_ruleset().

Returns
  true on success, or false if the include path could not be added or is inaccessible.

## ◆ rxkb_model_first()

RXKB_EXPORT struct rxkb_model * rxkb_model_first | ( | struct rxkb_context * | ctx | ) |

Return the first model for this context.

Use this to start iterating over the models, followed by calls to rxkb_model_next(). Models are not sorted.

The refcount of the returned model is not increased. Use rxkb_model_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first model in the model list.

## ◆ rxkb_model_next()

RXKB_EXPORT struct rxkb_model * rxkb_model_next | ( | struct rxkb_model * | m | ) |

Return the next model for this context.

Returns NULL when no more models are available.

The refcount of the returned model is not increased. Use rxkb_model_ref() if you need to keep this struct outside the immediate scope.

Returns
  the next model or NULL at the end of the list

## ◆ rxkb_model_ref()

RXKB_EXPORT struct rxkb_model * rxkb_model_ref | ( | struct rxkb_model * | m | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_model_unref()

RXKB_EXPORT struct rxkb_model * rxkb_model_unref | ( | struct rxkb_model * | m | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_model_get_name()

RXKB_EXPORT const char * rxkb_model_get_name | ( | struct rxkb_model * | m | ) |

Return the name of this model.

This is the value for M in RMLVO, to be used with libxkbcommon.

## ◆ rxkb_model_get_description()

RXKB_EXPORT const char * rxkb_model_get_description | ( | struct rxkb_model * | m | ) |

Return a human-readable description of this model.

This function may return NULL.

## ◆ rxkb_model_get_vendor()

RXKB_EXPORT const char * rxkb_model_get_vendor | ( | struct rxkb_model * | m | ) |

Return the vendor name for this model.

This function may return NULL.

## ◆ rxkb_layout_first()

RXKB_EXPORT struct rxkb_layout * rxkb_layout_first | ( | struct rxkb_context * | ctx | ) |

Return the first layout for this context.

Use this to start iterating over the layouts, followed by calls to rxkb_layout_next().

Note
  Layouts are not sorted.

The refcount of the returned layout is not increased. Use rxkb_layout_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first layout in the layout list.

## ◆ rxkb_layout_next()

RXKB_EXPORT struct rxkb_layout * rxkb_layout_next | ( | struct rxkb_layout * | l | ) |

Return the next layout for this context.

Returns NULL when no more layouts are available.

The refcount of the returned layout is not increased. Use rxkb_layout_ref() if you need to keep this struct outside the immediate scope.

Returns
  the next layout or NULL at the end of the list

## ◆ rxkb_layout_ref()

RXKB_EXPORT struct rxkb_layout * rxkb_layout_ref | ( | struct rxkb_layout * | l | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_layout_unref()

RXKB_EXPORT struct rxkb_layout * rxkb_layout_unref | ( | struct rxkb_layout * | l | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_layout_get_name()

RXKB_EXPORT const char * rxkb_layout_get_name | ( | struct rxkb_layout * | l | ) |

Return the name of this layout.

This is the value for L in RMLVO, to be used with libxkbcommon.

## ◆ rxkb_layout_get_variant()

RXKB_EXPORT const char * rxkb_layout_get_variant | ( | struct rxkb_layout * | l | ) |

Return the variant of this layout.

This is the value for V in RMLVO, to be used with libxkbcommon.

A variant does not stand on its own, it always depends on the base layout. e.g. there may be multiple variants called intl but there is only one us(intl).

Where the variant is NULL, the layout is the base layout (e.g. us).

## ◆ rxkb_layout_get_brief()

RXKB_EXPORT const char * rxkb_layout_get_brief | ( | struct rxkb_layout * | l | ) |

Return a short (one-word) description of this layout.

This function may return NULL.

## ◆ rxkb_layout_get_description()

RXKB_EXPORT const char * rxkb_layout_get_description | ( | struct rxkb_layout * | l | ) |

Return a human-readable description of this layout.

This function may return NULL.

## ◆ rxkb_option_group_first()

RXKB_EXPORT struct rxkb_option_group * rxkb_option_group_first | ( | struct rxkb_context * | ctx | ) |

Return the first option group for this context.

Use this to start iterating over the option groups, followed by calls to rxkb_option_group_next(). Option groups are not sorted.

The refcount of the returned option group is not increased. Use rxkb_option_group_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first option group in the option group list.

## ◆ rxkb_option_group_next()

RXKB_EXPORT struct rxkb_option_group * rxkb_option_group_next | ( | struct rxkb_option_group * | g | ) |

Return the next option group for this context.

Returns NULL when no more option groups are available.

The refcount of the returned option group is not increased. Use rxkb_option_group_ref() if you need to keep this struct outside the immediate scope.

Returns
  the next option group or NULL at the end of the list

## ◆ rxkb_option_group_ref()

RXKB_EXPORT struct rxkb_option_group * rxkb_option_group_ref | ( | struct rxkb_option_group * | g | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_option_group_unref()

RXKB_EXPORT struct rxkb_option_group * rxkb_option_group_unref | ( | struct rxkb_option_group * | g | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_option_group_get_name()

RXKB_EXPORT const char * rxkb_option_group_get_name | ( | struct rxkb_option_group * | m | ) |

Return the name of this option group.

This is not the value for O in RMLVO, the name can be used for internal sorting in the caller. This function may return NULL.

## ◆ rxkb_option_group_get_description()

RXKB_EXPORT const char * rxkb_option_group_get_description | ( | struct rxkb_option_group * | m | ) |

Return a human-readable description of this option group.

This function may return NULL.

## ◆ rxkb_option_group_allows_multiple()

RXKB_EXPORT bool rxkb_option_group_allows_multiple | ( | struct rxkb_option_group * | g | ) |

Returns
  true if multiple options within this option group can be selected simultaneously, false if all options within this option group are mutually exclusive.

## ◆ rxkb_option_first()

RXKB_EXPORT struct rxkb_option * rxkb_option_first | ( | struct rxkb_option_group * | group | ) |

Return the first option for this option group.

Use this to start iterating over the options, followed by calls to rxkb_option_next(). Options are not sorted.

The refcount of the returned option is not increased. Use rxkb_option_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first option in the option list.

## ◆ rxkb_option_next()

RXKB_EXPORT struct rxkb_option * rxkb_option_next | ( | struct rxkb_option * | o | ) |

Return the next option for this option group.

Returns NULL when no more options are available.

The refcount of the returned options is not increased. Use rxkb_option_ref() if you need to keep this struct outside the immediate scope.

Returns
  The next option or NULL at the end of the list

## ◆ rxkb_option_ref()

RXKB_EXPORT struct rxkb_option * rxkb_option_ref | ( | struct rxkb_option * | o | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_option_unref()

RXKB_EXPORT struct rxkb_option * rxkb_option_unref | ( | struct rxkb_option * | o | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_option_get_name()

RXKB_EXPORT const char * rxkb_option_get_name | ( | struct rxkb_option * | o | ) |

Return the name of this option.

This is the value for O in RMLVO, to be used with libxkbcommon.

## ◆ rxkb_option_get_brief()

RXKB_EXPORT const char * rxkb_option_get_brief | ( | struct rxkb_option * | o | ) |

Return a short (one-word) description of this option.

This function may return NULL.

## ◆ rxkb_option_get_description()

RXKB_EXPORT const char * rxkb_option_get_description | ( | struct rxkb_option * | o | ) |

Return a human-readable description of this option.

This function may return NULL.

## ◆ rxkb_option_is_layout_specific()

RXKB_EXPORT bool rxkb_option_is_layout_specific | ( | struct rxkb_option * | o | ) |

Return true if the given option accepts layout index specifiers to restrict its application to the corresponding layouts, false otherwise.

See also
  xkb_rmlvo_builder::xkb_rmlvo_builder_append_layout()
  xkb_rule_names::options

## ◆ rxkb_iso639_code_ref()

RXKB_EXPORT struct rxkb_iso639_code * rxkb_iso639_code_ref | ( | struct rxkb_iso639_code * | iso639 | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_iso639_code_unref()

RXKB_EXPORT struct rxkb_iso639_code * rxkb_iso639_code_unref | ( | struct rxkb_iso639_code * | iso639 | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_iso639_code_get_code()

RXKB_EXPORT const char * rxkb_iso639_code_get_code | ( | struct rxkb_iso639_code * | iso639 | ) |

Return the ISO 639-3 code for this code.

E.g. eng, fra.

## ◆ rxkb_layout_get_iso639_first()

RXKB_EXPORT struct rxkb_iso639_code * rxkb_layout_get_iso639_first | ( | struct rxkb_layout * | layout | ) |

Return the first ISO 639 for this layout.

Use this to start iterating over the codes, followed by calls to rxkb_iso639_code_next(). Codes are not sorted.

The refcount of the returned code is not increased. Use rxkb_iso639_code_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first code in the code list.

## ◆ rxkb_iso639_code_next()

RXKB_EXPORT struct rxkb_iso639_code * rxkb_iso639_code_next | ( | struct rxkb_iso639_code * | iso639 | ) |

Return the next code in the list.

Returns NULL when no more codes are available.

The refcount of the returned codes is not increased. Use rxkb_iso639_code_ref() if you need to keep this struct outside the immediate scope.

Returns
  The next code or NULL at the end of the list

## ◆ rxkb_iso3166_code_ref()

RXKB_EXPORT struct rxkb_iso3166_code * rxkb_iso3166_code_ref | ( | struct rxkb_iso3166_code * | iso3166 | ) |

Increase the refcount of the argument by one.

Returns
  The argument passed in to this function.

## ◆ rxkb_iso3166_code_unref()

RXKB_EXPORT struct rxkb_iso3166_code * rxkb_iso3166_code_unref | ( | struct rxkb_iso3166_code * | iso3166 | ) |

Decrease the refcount of the argument by one.

When the refcount hits zero, all memory associated with this struct is freed.

Returns
  always NULL

## ◆ rxkb_iso3166_code_get_code()

RXKB_EXPORT const char * rxkb_iso3166_code_get_code | ( | struct rxkb_iso3166_code * | iso3166 | ) |

Return the ISO 3166 Alpha 2 code for this code (e.g.

US, FR).

## ◆ rxkb_layout_get_iso3166_first()

RXKB_EXPORT struct rxkb_iso3166_code * rxkb_layout_get_iso3166_first | ( | struct rxkb_layout * | layout | ) |

Return the first ISO 3166 for this layout.

Use this to start iterating over the codes, followed by calls to rxkb_iso3166_code_next(). Codes are not sorted.

The refcount of the returned code is not increased. Use rxkb_iso3166_code_ref() if you need to keep this struct outside the immediate scope.

Returns
  The first code in the code list.

## ◆ rxkb_iso3166_code_next()

RXKB_EXPORT struct rxkb_iso3166_code * rxkb_iso3166_code_next | ( | struct rxkb_iso3166_code * | iso3166 | ) |

Return the next code in the list.

Returns NULL when no more codes are available.

The refcount of the returned codes is not increased. Use rxkb_iso3166_code_ref() if you need to keep this struct outside the immediate scope.

Returns
  The next code or NULL at the end of the list