_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);
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]))
if (!string)
return None;
- if (do_intern_atom)
- return do_intern_atom(string);
len = strlen(string);
np = &atomRoot;
/***====================================================================***/
+extern uint32_t
+xkb_intern_atom(const char *string);
+
extern char *
XkbcAtomGetString(uint32_t atom);