Remove atom functions from public API They're no longer needed since we don't expose any atoms in the published API anymore. As a result, we don't need to support external atom implementations either. Result! Signed-off-by: Daniel Stone <daniel@fooishbar.org>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
diff --git a/include/xkbcommon/xkbcommon.h b/include/xkbcommon/xkbcommon.h
index a8f6738..fcc9b62 100644
--- a/include/xkbcommon/xkbcommon.h
+++ b/include/xkbcommon/xkbcommon.h
@@ -532,15 +532,6 @@ struct xkb_state {
_XFUNCPROTOBEGIN
-typedef uint32_t (*InternAtomFuncPtr)(const char *val);
-typedef const char *(*GetAtomValueFuncPtr)(uint32_t atom);
-
-_X_EXPORT extern void
-xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value);
-
-_X_EXPORT extern uint32_t
-xkb_intern_atom(const char *name);
-
_X_EXPORT extern struct xkb_desc *
xkb_compile_keymap_from_rules(const struct xkb_rule_names *rules);
diff --git a/src/atom.c b/src/atom.c
index 09ff9ad..43e8fad 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -92,28 +92,12 @@ static uint32_t lastAtom = None;
static NodePtr atomRoot = NULL;
static unsigned long tableLength;
static NodePtr *nodeTable = NULL;
-static InternAtomFuncPtr do_intern_atom = NULL;
-static GetAtomValueFuncPtr do_get_atom_value = NULL;
-
-void
-xkb_init_atoms(InternAtomFuncPtr intern, GetAtomValueFuncPtr get_atom_value)
-{
- if (intern && get_atom_value) {
- if (do_intern_atom && do_get_atom_value)
- return;
- do_intern_atom = intern;
- do_get_atom_value = get_atom_value;
- }
-}
const char *
XkbcAtomText(uint32_t atom)
{
NodePtr node;
- if (do_get_atom_value)
- return do_get_atom_value(atom);
-
if ((atom == None) || (atom > lastAtom))
return NULL;
if (!(node = nodeTable[atom]))
@@ -140,8 +124,6 @@ xkb_intern_atom(const char *string)
if (!string)
return None;
- if (do_intern_atom)
- return do_intern_atom(string);
len = strlen(string);
np = &atomRoot;
diff --git a/src/xkbmisc.h b/src/xkbmisc.h
index 32d2382..3271f31 100644
--- a/src/xkbmisc.h
+++ b/src/xkbmisc.h
@@ -67,6 +67,9 @@ XkbcNameMatchesPattern(char *name, char *ptrn);
/***====================================================================***/
+extern uint32_t
+xkb_intern_atom(const char *string);
+
extern char *
XkbcAtomGetString(uint32_t atom);