GFXprim
2D bitmap graphics library with emphasis on speed and correctness
Loading...
Searching...
No Matches
Functions
gp_widget_uid.h File Reference

Widget by unique id lookup. More...

#include <utils/gp_htable.h>
#include <widgets/gp_widget.h>

Go to the source code of this file.

Functions

gp_widgetgp_widget_by_uid (gp_htable *uids, const char *uid, enum gp_widget_type type)
 Gets a widget pointer given UIDs hash, an id and type.
 
gp_widgetgp_widget_by_cuid (gp_htable *uids, const char *uid, enum gp_widget_class widget_class)
 Gets a widget pointer given UIDs hash, an id and widget_class.
 

Detailed Description

Widget by unique id lookup.

In the JSON layout widgets can have an unique name. All widgets with unique name are put into a hash table when JSON layout is loaded and can be later looked up by these functions once layout has been loaded.

Definition in file gp_widget_uid.h.

Function Documentation

◆ gp_widget_by_cuid()

gp_widget * gp_widget_by_cuid ( gp_htable uids,
const char *  uid,
enum gp_widget_class  widget_class 
)

Gets a widget pointer given UIDs hash, an id and widget_class.

Parameters
uidsAnd UIDs hash filled in the JSON parser.
uidA widget unique id.
widget_classWidget class.
Returns
A widget pointer or NULL if not found.

◆ gp_widget_by_uid()

gp_widget * gp_widget_by_uid ( gp_htable uids,
const char *  uid,
enum gp_widget_type  type 
)

Gets a widget pointer given UIDs hash, an id and type.

Parameters
uidsAnd UIDs hash filled in the JSON parser.
uidA widget unique id.
typeWidget type.
Returns
A widget pointer or NULL if not found.