diff options
| author | inmarket <andrewh@inmarket.com.au> | 2014-02-03 18:23:53 +1000 |
|---|---|---|
| committer | inmarket <andrewh@inmarket.com.au> | 2014-02-03 18:23:53 +1000 |
| commit | f26581dc7e85f77393143a44c0c3eb3eef0da8b4 (patch) | |
| tree | 9a83c5eaf1abe2cc61b216012f997e6891840a19 /src/gwin/gwin.c | |
| parent | b6daaabf32bf2092689e0732ca4486f25e80317f (diff) | |
| parent | d869d9b3b80cb9ab2314840b2fa274e89e5342db (diff) | |
| download | uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.gz uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.tar.bz2 uGFX-f26581dc7e85f77393143a44c0c3eb3eef0da8b4.zip | |
Merge branch 'master' into freertos
Diffstat (limited to 'src/gwin/gwin.c')
| -rw-r--r-- | src/gwin/gwin.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index 6b9cb81e..485ccaaa 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -84,7 +84,8 @@ static color_t defaultBgColor = Black; * Class Routines *-----------------------------------------------*/ -void _gwinInit(void) { +void _gwinInit(void) +{ #if GWIN_NEED_WIDGET extern void _gwidgetInit(void); @@ -97,12 +98,26 @@ void _gwinInit(void) { #endif } +void _gwinDeinit(void) +{ + #if GWIN_NEED_WIDGET + extern void _gwidgetDeinit(void); + + _gwidgetDeinit(); + #endif + #if GWIN_NEED_WINDOWMANAGER + extern void _gwmDeinit(void); + + _gwmDeinit(); + #endif +} + // 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) { // Allocate the structure if necessary if (!pgw) { - if (!(pgw = (GWindowObject *)gfxAlloc(vmt->size))) + if (!(pgw = gfxAlloc(vmt->size))) return 0; pgw->flags = flags|GWIN_FLG_DYNAMIC; } else @@ -167,7 +182,9 @@ color_t gwinGetDefaultBgColor(void) { GHandle gwinGWindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit) { if (!(pgw = _gwindowCreate(g, pgw, pInit, &basegwinVMT, 0))) return 0; + gwinSetVisible(pgw, pInit->show); + return pgw; } |
