From 8ed9e763c0f97f2946990a911bb940f8c80ff761 Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 24 Jun 2013 22:58:37 +1000 Subject: GWIN reduce Initialisation parameters and fix visibility issues --- include/gwin/gwidget.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include/gwin/gwidget.h') 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 @@ -52,6 +52,22 @@ typedef struct GWidgetObject { } 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 -- cgit v1.2.3