g_hash_table_replace (ctx->femap, key, val);
}
}
+
+AtomID *
+atom_id_new_from_frontend (AtomCtx *ctx, char * req)
+{
+ char *id;
+ if (g_hash_table_lookup_extended (ctx->femap, req, NULL, &id))
+ return atom_id_new (id);
+ return NULL;
+}
+
+char *
+atom_id_to_backend (AtomCtx *ctx, AtomID *id)
+{
+ char *key = atom_id_string (id);
+ char *val;
+ if (g_hash_table_lookup_extended (ctx->bemap, key, NULL, &val))
+ return val;
+ return NULL;
+}
typedef struct _atom_id AtomID;
AtomID * atom_id_new (char *);
+AtomID * atom_id_new_from_frontend (AtomCtx *, char *);
+char * atom_id_to_backend (AtomCtx *, AtomID *);
void atom_id_delete (AtomID *);
char * atom_id_string (AtomID *);