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/gwin.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/gwin.h')
-rw-r--r-- | include/gwin/gwin.h | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h index efce49fc..2a03c125 100644 --- a/include/gwin/gwin.h +++ b/include/gwin/gwin.h @@ -50,6 +50,21 @@ typedef struct GWindowObject { /* @} */ /** + * @brief The structure to initialise a GWIN. + * + * @note Some gwin's will need extra parameters. + * @note The dimensions and position may be changed to fit on the real screen. + * + * @{ + */ +typedef struct GWindowInit { + coord_t x, y; // @< The initial screen position + coord_t width, height; // @< The initial dimension + bool_t show; // @< Should the window be visible initially +} GWindowInit; +/* @} */ + +/** * @brief A window's minimized, maximized or normal size */ typedef enum { GWIN_NORMAL, GWIN_MAXIMIZE, GWIN_MINIMIZE } GWindowMinMax; @@ -128,22 +143,18 @@ extern "C" { * @return NULL if there is no resultant drawing area, otherwise a window handle. * * @param[in] pgw The window structure to initialize. If this is NULL the structure is dynamically allocated. - * @param[in] x,y The screen coordinates for the top left corner of the window - * @param[in] width The width of the window - * @param[in] height The height of the window + * @param[in] pInit How to initialise the window * * @note The drawing color and the background color get set to the current defaults. If you haven't called * @p gwinSetDefaultColor() or @p gwinSetDefaultBgColor() then these are White and Black respectively. * @note The font gets set to the current default font. If you haven't called @p gwinSetDefaultFont() then there * is no default font and text drawing operations will no nothing. - * @note The dimensions and position may be changed to fit on the real screen. - * @note On creation the window is marked as visible. * @note A basic window does not save the drawing state. It is not automatically redrawn if the window is moved or * its visibility state is changed. * * @api */ - GHandle gwinCreateWindow(GWindowObject *pgw, coord_t x, coord_t y, coord_t width, coord_t height); + GHandle gwinCreateWindow(GWindowObject *pgw, GWindowInit *pInit); /** * @brief Destroy a window (of any type). Releases any dynamically allocated memory. |