10#define GP_WIDGET_UID_H
13#include <widgets/gp_widget.h>
15typedef struct gp_widget_uid_map {
17 enum gp_widget_type type;
18 enum gp_widget_class cls;
22#define GP_WIDGET_UID(wuid, wtype, structure, member) \
23 {.uid = wuid, .type = wtype, .offset = offsetof(structure, member)}
25#define GP_WIDGET_CUID(wuid, wclass, structure, member) \
26 {.uid = wuid, .cls = wclass, .offset = offsetof(structure, member)}
28void gp_widgets_by_uids(
gp_htable *uids, gp_widget_uid_map *uid_map,
void *structure);
39gp_widget *gp_widget_by_uid(
gp_htable *uids,
const char *uid,
enum gp_widget_type type);
50gp_widget *gp_widget_by_cuid(
gp_htable *uids,
const char *uid,
enum gp_widget_class widget_class);
Simple hash table implementation.