diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-07-04 00:20:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-07-04 00:20:32 +1000 |
commit | 09a359813f0abe8f99c32dadfa1ac2c68356ddfd (patch) | |
tree | ce6bfc9861baac4ed2de9e84995f307b8fd7cffa /src/gwin/gwin.c | |
parent | 3f80e1f89dbeec06dd97a914d6851ad4596b1743 (diff) | |
download | uGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.tar.gz uGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.tar.bz2 uGFX-09a359813f0abe8f99c32dadfa1ac2c68356ddfd.zip |
Label, Image and Window Manager changes
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r-- | src/gwin/gwin.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c index f080ac64..de1673cb 100644 --- a/src/gwin/gwin.c +++ b/src/gwin/gwin.c @@ -63,6 +63,16 @@ static color_t defaultBgColor = Black; if (gh->height < MIN_WIN_HEIGHT) { gh->height = MIN_WIN_HEIGHT; } if (gh->x+gh->width > gdispGetWidth()) gh->width = gdispGetWidth() - gh->x; if (gh->y+gh->height > gdispGetHeight()) gh->height = gdispGetHeight() - gh->y; + + // Redraw the window + if ((gh->flags & GWIN_FLG_VISIBLE)) { + if (gh->vmt->Redraw) { + #if GDISP_NEED_CLIP + gdispSetClip(gh->x, gh->y, gh->width, gh->height); + #endif + gh->vmt->Redraw(gh); + } + } } #endif @@ -135,10 +145,18 @@ void gwinSetDefaultColor(color_t clr) { defaultFgColor = clr; } +color_t gwinGetDefaultColor(void) { + return defaultFgColor; +} + void gwinSetDefaultBgColor(color_t bgclr) { defaultBgColor = bgclr; } +color_t gwinGetDefaultBgColor(void) { + return defaultBgColor; +} + #if GDISP_NEED_TEXT void gwinSetDefaultFont(font_t font) { defaultFont = font; |