diff options
author | inmarket <andrewh@inmarket.com.au> | 2014-05-09 21:46:32 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2014-05-09 21:46:32 +1000 |
commit | 21aac3d8532c9aa1decab30c00d9f5a37067aa13 (patch) | |
tree | c874ac8494028f09461e4329f0bcfae8c0e5adb8 /src/gwin/gwidget.h | |
parent | f7fa0dd78f3b807578d99cc0eefe40996b1f9037 (diff) | |
parent | 1478fdf41e3731cafacd22ff6f530fb724c02df3 (diff) | |
download | uGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.tar.gz uGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.tar.bz2 uGFX-21aac3d8532c9aa1decab30c00d9f5a37067aa13.zip |
Merge branch 'master' into gwin
Diffstat (limited to 'src/gwin/gwidget.h')
-rw-r--r-- | src/gwin/gwidget.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gwin/gwidget.h b/src/gwin/gwidget.h index 6568859d..8795a95b 100644 --- a/src/gwin/gwidget.h +++ b/src/gwin/gwidget.h @@ -78,6 +78,10 @@ typedef void (*CustomWidgetDrawFunction)(struct GWidgetObject *gw, void *param); * @brief The structure to initialise a widget. * * @note Some widgets may have extra parameters. + * @note If you create this structure on the stack, you should always memset + * it to all zero's first in case a future version of the software + * add's extra fields. Alternatively you can use @p gwinWidgetClearInit() + * to clear it. * @note The text element must be static string (not stack allocated). If you want to use * a dynamic string (eg a stack allocated string) use NULL for this member and then call * @p gwinSetText() with useAlloc set to TRUE. @@ -127,6 +131,18 @@ extern "C" { #endif /** + * @brief Clear a GWidgetInit structure to all zero's + * @note This function is provided just to prevent problems + * on operating systems where using memset() causes issues + * in the users application. + * + * @param[in] pwi The GWidgetInit structure to clear + * + * @api + */ +void gwinWidgetClearInit(GWidgetInit *pwi); + +/** * @brief Set the default style for widgets created hereafter. * * @param[in] pstyle The default style. Passing NULL uses the system compiled style. |