return found;
}
+xkb_atom_t
+atom_lookup(struct atom_table *table, const char *string)
+{
+ struct atom_node **np;
+ unsigned int fp;
+
+ if (!string)
+ return XKB_ATOM_NONE;
+
+ if (!find_node_pointer(table, string, &np, &fp))
+ return XKB_ATOM_NONE;
+
+ return (*np)->atom;
+}
+
/*
* If steal is true, we do not strdup @string; therefore it must be
* dynamically allocated, not be free'd by the caller and not be used
atom_table_free(struct atom_table *table);
xkb_atom_t
+atom_lookup(struct atom_table *table, const char *string);
+
+xkb_atom_t
atom_intern(struct atom_table *table, const char *string,
bool steal);
}
xkb_atom_t
+xkb_atom_lookup(struct xkb_context *ctx, const char *string)
+{
+ return atom_lookup(ctx->atom_table, string);
+}
+
+xkb_atom_t
xkb_atom_intern(struct xkb_context *ctx, const char *string)
{
return atom_intern(ctx->atom_table, string, false);
struct xkb_keymap *
xkb_map_new(struct xkb_context *ctx);
+/*
+ * Returns XKB_ATOM_NONE if @string was not previously interned,
+ * otherwise returns the atom.
+ */
+xkb_atom_t
+xkb_atom_lookup(struct xkb_context *ctx, const char *string);
+
xkb_atom_t
xkb_atom_intern(struct xkb_context *ctx, const char *string);