|
libxkbcommon
0.2.0
|
Creating, destroying and using library contexts. More...
Enumerations | |
| enum | xkb_context_flags { XKB_CONTEXT_NO_DEFAULT_INCLUDES = (1 << 0) } |
| Flags for context creation. More... | |
Functions | |
| struct xkb_context * | xkb_context_new (enum xkb_context_flags flags) |
| Create a new context. | |
| struct xkb_context * | xkb_context_ref (struct xkb_context *context) |
| Take a new reference on a context. | |
| void | xkb_context_unref (struct xkb_context *context) |
| Release a reference on a context, and possibly free it. | |
| void | xkb_context_set_user_data (struct xkb_context *context, void *user_data) |
| Store custom user data in the context. | |
| void * | xkb_context_get_user_data (struct xkb_context *context) |
| Retrieves stored user data from the context. | |
Creating, destroying and using library contexts.
Every keymap compilation request must have a context associated with it. The context keeps around state such as the include path.
| enum xkb_context_flags |
|
read |
Create a new context.
| flags | Optional flags for the context, or 0. |
The user may set some environment variables to affect default values in the context. See e.g. xkb_context_set_log_level() and xkb_context_set_log_verbosity().
|
read |
Take a new reference on a context.
| void xkb_context_set_user_data | ( | struct xkb_context * | context, |
| void * | user_data | ||
| ) |
Store custom user data in the context.
This may be useful in conjuction with xkb_context_set_log_fn() or other callbacks.
| void * xkb_context_get_user_data | ( | struct xkb_context * | context | ) |
Retrieves stored user data from the context.
This may be useful to access private user data from callbacks like a custom logging function.