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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c
index db9dc9fa..75a69667 100644
--- a/src/gwin/gwidget.c
+++ b/src/gwin/gwidget.c
@@ -224,11 +224,17 @@ static void gwidgetEvent(void *param, GEvent *pe) {
}
#endif
-void _gwidgetInit(void) {
+void _gwidgetInit(void)
+{
geventListenerInit(&gl);
geventRegisterCallback(&gl, gwidgetEvent, 0);
}
+void _gwidgetDeinit(void)
+{
+ /* ToDo */
+}
+
GHandle _gwidgetCreate(GDisplay *g, GWidgetObject *pgw, const GWidgetInit *pInit, const gwidgetVMT *vmt) {
if (!(pgw = (GWidgetObject *)_gwindowCreate(g, &pgw->g, &pInit->g, &vmt->g, GWIN_FLG_WIDGET|GWIN_FLG_ENABLED)))
return 0;
@@ -338,7 +344,7 @@ void gwinSetText(GHandle gh, const char *text, bool_t useAlloc) {
else if (useAlloc) {
char *str;
- if ((str = (char *)gfxAlloc(strlen(text)+1))) {
+ if ((str = gfxAlloc(strlen(text)+1))) {
gh->flags |= GWIN_FLG_ALLOCTXT;
strcpy(str, text);
}