libxkbcommon: Include Paths

libxkbcommon 1.8.0

Functions
Include Paths

## Functions
int | xkb_context::xkb_context_include_path_append (struct xkb_context *context, const char *path)
int | xkb_context::xkb_context_include_path_append_default (struct xkb_context *context)
int | xkb_context::xkb_context_include_path_reset_defaults (struct xkb_context *context)
void | xkb_context::xkb_context_include_path_clear (struct xkb_context *context)
unsigned int | xkb_context::xkb_context_num_include_paths (struct xkb_context *context)
const char * | xkb_context::xkb_context_include_path_get (struct xkb_context *context, unsigned int index)

## Detailed Description

Manipulating the include paths in a context.

The include paths are the file-system paths that are searched when an include statement is encountered during keymap compilation.

The default include paths are, in that lookup order:

- The path `$XDG_CONFIG_HOME/xkb`, with the usual `XDG_CONFIG_HOME` fallback to `$HOME/.config/` if unset.
- The path `$HOME/.xkb`, where $HOME is the value of the environment variable `HOME`.
- The `XKB_CONFIG_EXTRA_PATH` environment variable, if defined, otherwise the system configuration directory, defined at library configuration time (usually `/etc/xkb`).
- The `XKB_CONFIG_ROOT` environment variable, if defined, otherwise the system XKB root, defined at library configuration time.

## Function Documentation

## ◆ xkb_context_include_path_append()

int xkb_context_include_path_append | ( | struct xkb_context * | context,
|  | const char * | path )

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

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

## ◆ xkb_context_include_path_append_default()

int xkb_context_include_path_append_default | ( | struct xkb_context * | context | ) |

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

Returns
  1 on success, or 0 if the primary include path could not be added.

## ◆ xkb_context_include_path_reset_defaults()

int xkb_context_include_path_reset_defaults | ( | struct xkb_context * | context | ) |

Reset the context's include path to the default.

Removes all entries from the context's include path, and inserts the default paths.

Returns
  1 on success, or 0 if the primary include path could not be added.

## ◆ xkb_context_include_path_get()

const char * xkb_context_include_path_get | ( | struct xkb_context * | context,
|  | unsigned int | index )

Get a specific include path from the context's include path.

Returns
  The include path at the specified index. If the index is invalid, returns NULL.