aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gwin/gwidget.c')
-rw-r--r--src/gwin/gwidget.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c
index 8ccb47fc..a2e6f472 100644
--- a/src/gwin/gwidget.c
+++ b/src/gwin/gwidget.c
@@ -242,6 +242,9 @@ GHandle _gwidgetCreate(GDisplay *g, GWidgetObject *pgw, const GWidgetInit *pInit
pgw->fnDraw = pInit->customDraw ? pInit->customDraw : vmt->DefaultDraw;
pgw->fnParam = pInit->customParam;
pgw->pstyle = pInit->customStyle ? pInit->customStyle : defaultStyle;
+ #if GWIN_WIDGET_TAGS
+ pgw->tag = pInit->tag;
+ #endif
return &pgw->g;
}
@@ -473,5 +476,16 @@ bool_t gwinAttachListener(GListener *pl) {
}
#endif
+#if GWIN_WIDGET_TAGS
+ void gwinSetTag(GHandle gh, WidgetTag tag) {
+ if ((gh->flags & GWIN_FLG_WIDGET))
+ gw->tag = tag;
+ }
+
+ WidgetTag gwinGetTag(GHandle gh) {
+ return ((gh->flags & GWIN_FLG_WIDGET)) ? gw->tag : 0;
+ }
+#endif
+
#endif /* GFX_USE_GWIN && GWIN_NEED_WIDGET */
/** @} */