diff options
author | inmarket <andrewh@inmarket.com.au> | 2013-06-24 22:58:37 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2013-06-24 22:58:37 +1000 |
commit | 8ed9e763c0f97f2946990a911bb940f8c80ff761 (patch) | |
tree | 5f6c19677a530ddfada345242bce1190e3797dfa /include/gwin/gwidget.h | |
parent | c8300fe9c2c7facff1ad32978a5d961690473de4 (diff) | |
download | uGFX-8ed9e763c0f97f2946990a911bb940f8c80ff761.tar.gz uGFX-8ed9e763c0f97f2946990a911bb940f8c80ff761.tar.bz2 uGFX-8ed9e763c0f97f2946990a911bb940f8c80ff761.zip |
GWIN reduce Initialisation parameters and fix visibility issues
Diffstat (limited to 'include/gwin/gwidget.h')
-rw-r--r-- | include/gwin/gwidget.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/gwin/gwidget.h b/include/gwin/gwidget.h index 0c47dfde..50f19193 100644 --- a/include/gwin/gwidget.h +++ b/include/gwin/gwidget.h @@ -53,6 +53,22 @@ typedef struct GWidgetObject { /* @} */ /** + * @brief The structure to initialise a widget. + * + * @note Some widgets may have extra parameters. + * @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. + * + * @{ + */ +typedef struct GWidgetInit { + GWindowInit g; // @< The GWIN initializer + const char * text; // @< The initial text +} GWidgetInit; +/* @} */ + +/** * A comment/rant on the above structure: * We would really like the GWindowObject member to be anonymous. While this is * allowed under the C11, C99, GNU and various other standards which have been |