diff options
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r-- | src/gwin/gwin.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index 54f42077..84443f9f 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -114,7 +114,7 @@ void _gwinDeinit(void) // Internal routine for use by GWIN components only // Initialise a window creating it dynamically if required. -GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) { +GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint32_t flags) { // Allocate the structure if necessary if (!pgw) { if (!(pgw = gfxAlloc(vmt->size))) @@ -149,6 +149,14 @@ GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit * Routines that affect all windows *-----------------------------------------------*/ +void gwinClearInit(GWindowInit *pwi) { + char *p; + unsigned len; + + for(p = (char *)pwi, len = sizeof(GWindowInit); len; len--) + *p++ = 0; +} + void gwinSetDefaultColor(color_t clr) { defaultFgColor = clr; } @@ -189,6 +197,9 @@ GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pI } void gwinDestroy(GHandle gh) { + if (!gh) + return; + // Make the window invisible gwinSetVisible(gh, FALSE); |