diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-01-29 22:58:41 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-01-29 22:58:41 +0100 |
commit | 935e949af94a3a80beb2c462ae425e4388fe2277 (patch) | |
tree | 6d6ec8b3c741f733582faff3a87ade9298cb55b2 /include | |
parent | d5c52f342fab14acdef66c85c6c7f850290dd3f5 (diff) | |
download | uGFX-935e949af94a3a80beb2c462ae425e4388fe2277.tar.gz uGFX-935e949af94a3a80beb2c462ae425e4388fe2277.tar.bz2 uGFX-935e949af94a3a80beb2c462ae425e4388fe2277.zip |
ggroup compilable
Diffstat (limited to 'include')
-rw-r--r-- | include/gwin/class_gwin.h | 40 | ||||
-rw-r--r-- | include/gwin/frame.h | 4 | ||||
-rw-r--r-- | include/gwin/ggroup.h | 1 |
3 files changed, 32 insertions, 13 deletions
diff --git a/include/gwin/class_gwin.h b/include/gwin/class_gwin.h index ae5ac756..e3fb74d6 100644 --- a/include/gwin/class_gwin.h +++ b/include/gwin/class_gwin.h @@ -23,20 +23,23 @@ #if GFX_USE_GWIN || defined(__DOXYGEN__) +#include "gwin/ggroup.h" + /** * @brief The predefined flags for a Window * @{ */ -#define GWIN_FLG_DYNAMIC 0x0001 // @< The GWIN structure is allocated -#define GWIN_FLG_VISIBLE 0x0002 // @< The window is visible -#define GWIN_FLG_MINIMIZED 0x0004 // @< The window is minimized -#define GWIN_FLG_MAXIMIZED 0x0008 // @< The window is maximized -#define GWIN_FLG_ENABLED 0x0010 // @< The window is enabled -#define GWIN_FLG_WIDGET 0x0020 // @< This is a widget -#define GWIN_FLG_ALLOCTXT 0x0040 // @< The widget text is allocated -#define GWIN_FLG_MOUSECAPTURE 0x0080 // @< The widget has captured the mouse -#define GWIN_FIRST_WM_FLAG 0x0100 // @< 4 bits free for the window manager to use -#define GWIN_FIRST_CONTROL_FLAG 0x1000 // @< 4 bits free for Windows and Widgets to use +#define GWIN_FLG_DYNAMIC 0x00000001 // @< The GWIN structure is allocated +#define GWIN_FLG_VISIBLE 0x00000002 // @< The window is visible +#define GWIN_FLG_MINIMIZED 0x00000004 // @< The window is minimized +#define GWIN_FLG_MAXIMIZED 0x00000008 // @< The window is maximized +#define GWIN_FLG_ENABLED 0x00000010 // @< The window is enabled +#define GWIN_FLG_WIDGET 0x00000020 // @< This is a widget +#define GWIN_FLG_ALLOCTXT 0x00000040 // @< The widget text is allocated +#define GWIN_FLG_MOUSECAPTURE 0x00000080 // @< The widget has captured the mouse +#define GWIN_FLG_GROUP 0x00000100 // @< This is a group +#define GWIN_FIRST_WM_FLAG 0x00100000 // @< 4 bits free for the window manager to use +#define GWIN_FIRST_CONTROL_FLAG 0x01000000 // @< 8 bits free for Windows and Widgets to use /* @} */ /** @@ -104,6 +107,18 @@ typedef struct gwinVMT { /* @} */ #endif +#if GWIN_NEED_GROUPS || defined(__DOXYGEN__) + /** + * @brief The Virtual Method Table for a group + * @note A widget must have a redraw function. It must call gwinRedrawChildren() after redrawing itself + * @{ + */ + typedef struct ggroupVMT { + struct gwinVMT g; // @< This is still a GWIN + } ggroupVMT; + /* @} */ +#endif + // These flags are needed whether or not we are running a window manager. /** * @brief Flags for redrawing after a visibility change @@ -206,6 +221,10 @@ GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit void _gwidgetRedraw(GHandle gh); #endif +#if GWIN_NEED_GROUPS || defined(__DOXYGEN__) + GHandle _ggroupCreate(GDisplay *g, GGroupObject *go, const GWindowInit *pInit, const ggroupVMT *vmt); +#endif + #ifdef __cplusplus } #endif @@ -214,3 +233,4 @@ GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit #endif /* _CLASS_GWIN_H */ /** @} */ + diff --git a/include/gwin/frame.h b/include/gwin/frame.h index 2f1b93db..6c745dc8 100644 --- a/include/gwin/frame.h +++ b/include/gwin/frame.h @@ -31,7 +31,7 @@ #define GWIN_FRAME_MINMAX_BTN (GWIN_FIRST_CONTROL_FLAG << 2) typedef struct GFrameObject { - GWidgetObject w; + GGroupObject w; GListener gl; // internal listener for the buttons // These could probably be removed... I have to think harder later @@ -60,7 +60,7 @@ typedef struct GFrameObject { * * @api */ -GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint16_t flags); +GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWindowInit *pInit, uint32_t flags); #define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags); #endif /* _GWIN_FRAME_H */ diff --git a/include/gwin/ggroup.h b/include/gwin/ggroup.h index b58f415b..353987f0 100644 --- a/include/gwin/ggroup.h +++ b/include/gwin/ggroup.h @@ -41,6 +41,5 @@ typedef struct GGroupObject { } GGroupObject; /** @} */ - #endif /* _GGROUP_H */ |