diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-05-09 21:25:31 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-05-09 21:25:31 +1000 |
commit | 9e8b38ba943b339b966b1011bab899720d6305fc (patch) | |
tree | f0b169569f380857e4ed7c3927d0197bcb5ec6ae /src/gwin/gwidget.c | |
parent | ca1a83abca9ecc159ff6f0d9e27ab133fb947997 (diff) | |
download | uGFX-9e8b38ba943b339b966b1011bab899720d6305fc.tar.gz uGFX-9e8b38ba943b339b966b1011bab899720d6305fc.tar.bz2 uGFX-9e8b38ba943b339b966b1011bab899720d6305fc.zip |
Add gwinClearInit() and gwinWidgetClearInit() to clear gwin initialisation structures.
Incorporate into demo's
Diffstat (limited to 'src/gwin/gwidget.c')
-rw-r--r-- | src/gwin/gwidget.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gwin/gwidget.c b/src/gwin/gwidget.c index 181b7425..c46520ea 100644 --- a/src/gwin/gwidget.c +++ b/src/gwin/gwidget.c @@ -297,6 +297,14 @@ void _gwidgetRedraw(GHandle gh) { gw->fnDraw(gw, gw->fnParam); } +void gwinWidgetClearInit(GWidgetInit *pwi) { + char *p; + unsigned len; + + for(p = (char *)pwi, len = sizeof(GWidgetInit); len; len--) + *p++ = 0; +} + void gwinSetDefaultStyle(const GWidgetStyle *pstyle, bool_t updateAll) { if (!pstyle) pstyle = &BlackWidgetStyle; |