summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-03-27 17:22:35 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-03-27 17:22:35 +0100
commit034ffce66437592856497e605cb0943d5dbaf82c (patch)
tree7be39c70dde4000edbd33e654f614ba49b5687a8 /include
parent3e9dd7512c16dd752830d9fd56d9f4cba76ee7d3 (diff)
downloadxorg-lib-libxkbcommon-034ffce66437592856497e605cb0943d5dbaf82c.tar.gz
Use xkb_contexts in keymap compilation
Primarily for the include path, but also for the logging in future. Signed-off-by: Daniel Stone <daniel@fooishbar.org>
Diffstat (limited to 'include')
-rw-r--r--include/xkbcommon/xkbcommon.h25
1 files changed, 21 insertions, 4 deletions
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index e15dbac..d5d009f 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -237,6 +237,18 @@ _X_EXPORT void
xkb_context_include_path_clear(struct xkb_context *context);
/**
+ * Returns the number of include paths currently active in the context.
+ */
+_X_EXPORT unsigned int
+xkb_context_num_include_paths(struct xkb_context *context);
+
+/**
+ * Returns the include path at the specified index within the context.
+ */
+_X_EXPORT const char *
+xkb_context_include_path_get(struct xkb_context *context, unsigned int index);
+
+/**
* Takes a new reference on an XKB context.
*/
_X_EXPORT void
@@ -265,7 +277,8 @@ xkb_context_unref(struct xkb_context *context);
* keymaps.
*/
_X_EXPORT extern struct xkb_desc *
-xkb_map_new_from_names(const struct xkb_rule_names *names);
+xkb_map_new_from_names(struct xkb_context *context,
+ const struct xkb_rule_names *names);
/**
* Deprecated entrypoint for legacy users who need to be able to compile
@@ -278,7 +291,8 @@ xkb_map_new_from_names(const struct xkb_rule_names *names);
* Geometry will be ignored since xkbcommon does not support it in any way.
*/
_X_EXPORT extern struct xkb_desc *
-xkb_map_new_from_kccgst(const struct xkb_component_names *kccgst);
+xkb_map_new_from_kccgst(struct xkb_context *context,
+ const struct xkb_component_names *kccgst);
enum xkb_keymap_format {
/** The current/classic XKB text format, as generated by xkbcomp -xkb. */
@@ -290,14 +304,17 @@ enum xkb_keymap_format {
* file descriptor.
*/
_X_EXPORT extern struct xkb_desc *
-xkb_map_new_from_fd(int fd, enum xkb_keymap_format format);
+xkb_map_new_from_fd(struct xkb_context *context,
+ int fd, enum xkb_keymap_format format);
/**
* Creates an XKB keymap from a full text XKB keymap serialised into one
* enormous string.
*/
_X_EXPORT extern struct xkb_desc *
-xkb_map_new_from_string(const char *string, enum xkb_keymap_format format);
+xkb_map_new_from_string(struct xkb_context *context,
+ const char *string,
+ enum xkb_keymap_format format);
/**
* Takes a new reference on a keymap.