libxkbcommon  0.2.0
xkb_context Struct Reference

Opaque top level library context object. More...

#include <xkbcommon.h>

Public Member Functions

struct xkb_contextxkb_context_new (enum xkb_context_flags flags)
 Create a new context.
struct xkb_contextxkb_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.
int xkb_context_include_path_append (struct xkb_context *context, const char *path)
 Append a new entry to the context's include path.
int xkb_context_include_path_append_default (struct xkb_context *context)
 Append the default include paths to the context's include path.
int xkb_context_include_path_reset_defaults (struct xkb_context *context)
 Reset the context's include path to the default.
void xkb_context_include_path_clear (struct xkb_context *context)
 Remove all entries from the context's include path.
unsigned int xkb_context_num_include_paths (struct xkb_context *context)
 Get the number of paths in the context's include path.
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.
void xkb_context_set_log_level (struct xkb_context *context, enum xkb_log_level level)
 Set the current logging level.
enum xkb_log_level xkb_context_get_log_level (struct xkb_context *context)
 Get the current logging level.
void xkb_context_set_log_verbosity (struct xkb_context *context, int verbosity)
 Sets the current logging verbosity.
int xkb_context_get_log_verbosity (struct xkb_context *context)
 Get the current logging verbosity of the context.
void xkb_context_set_log_fn (struct xkb_context *context, void(*log_fn)(struct xkb_context *context, enum xkb_log_level level, const char *format, va_list args))
 Set a custom function to handle logging messages.

Detailed Description

Opaque top level library context object.

The context contains various general library data and state, like logging level and include paths. Objects are created in a specific context, and multiple contexts may coexist simultaneously. Objects from different contexts are completely separated and do not share any memory or state. A context is created, accessed, manipulated and destroyed through the xkb_context_*() API.


The documentation for this struct was generated from the following file: