summaryrefslogtreecommitdiff
path: root/src/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/context.c')
-rw-r--r--src/context.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/context.c b/src/context.c
index 2aaee35..190a1c5 100644
--- a/src/context.c
+++ b/src/context.c
@@ -35,6 +35,9 @@ struct xkb_context {
char **include_paths;
int num_include_paths;
int size_include_paths;
+
+ /* xkbcomp needs to assign sequential IDs to XkbFile's it creates. */
+ int file_id;
};
/**
@@ -149,6 +152,12 @@ xkb_context_include_path_get(struct xkb_context *context, unsigned int idx)
return context->include_paths[idx];
}
+int
+xkb_context_take_file_id(struct xkb_context *context)
+{
+ return context->file_id++;
+}
+
/**
* Take a new reference on the context.
*/