summaryrefslogtreecommitdiff
path: root/src/context.c
diff options
context:
space:
mode:
authorRan Benita <ran234@gmail.com>2012-09-16 14:45:32 +0300
committerRan Benita <ran234@gmail.com>2012-09-16 15:20:18 +0300
commitb21107056e0540489669bb35fcb3abe1b5b46ecd (patch)
treef718e6ef359f1d2e75e3d0723e91b7f9bf5beff1 /src/context.c
parente670d084a6b4431de2ef3b5395c1473ba4b73725 (diff)
downloadxorg-lib-libxkbcommon-b21107056e0540489669bb35fcb3abe1b5b46ecd.tar.gz
Organize src/ and test/ headers
- Add context.h and move context-related functions from xkb-priv.h to it. - Move xkb_context definition back to context.c. - Add keysym.h and move keysym upper/lower/keypad from xkb-priv.h to it. - Rename xkb-priv.h to map.h since it only contains keymap-related definitions and declarations now. - Remove unnecessary includes and some and some other small cleanups. Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/context.c')
-rw-r--r--src/context.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/context.c b/src/context.c
index b116884..6710fe2 100644
--- a/src/context.c
+++ b/src/context.c
@@ -28,12 +28,30 @@
#include <sys/stat.h>
#include <ctype.h>
#include <errno.h>
-#include <stdarg.h>
-#include <stdio.h>
#include <unistd.h>
-#include "xkb-priv.h"
-#include "atom.h"
+#include "xkbcommon/xkbcommon.h"
+#include "utils.h"
+#include "context.h"
+
+struct xkb_context {
+ int refcnt;
+
+ ATTR_PRINTF(3, 0) void (*log_fn)(struct xkb_context *ctx,
+ enum xkb_log_level level,
+ const char *fmt, va_list args);
+ enum xkb_log_level log_level;
+ int log_verbosity;
+ void *user_data;
+
+ darray(char *) includes;
+ darray(char *) failed_includes;
+
+ /* xkbcomp needs to assign sequential IDs to XkbFile's it creates. */
+ unsigned file_id;
+
+ struct atom_table *atom_table;
+};
/**
* Append one directory to the context's include path.