From f3cbb02c3a9a199acfb04d543a8e160e83e00d49 Mon Sep 17 00:00:00 2001 From: Joel Bodenmann Date: Tue, 7 Jan 2014 00:29:56 +0100 Subject: [PATCH] GFrame code cleanup - buttons need to be implemented --- include/gwin/frame.h | 22 ++++++++++++++++------ src/gwin/frame.c | 21 --------------------- 2 files changed, 16 insertions(+), 27 deletions(-) diff --git a/include/gwin/frame.h b/include/gwin/frame.h index 885d4ad5..d5272ee6 100644 --- a/include/gwin/frame.h +++ b/include/gwin/frame.h @@ -39,15 +39,25 @@ typedef struct GFrameObject { GHandle btnMax; } GFrameObject; +/** + * @brief Create a frame widget + * + * @details This widget provides a window like we know it from desktop systems. You usually use this together with + * gwinAddChild(). + * + * @param[in] g The GDisplay to display this window on + * @param[in] fo The GFrameObject structure to initialize. If this is NULL the structure is dynamically allocated. + * @param[in] pInit The initialization parameters + * @param[in] flags Some flags, see notes. + * + * @note Possible flags are: GWIN_FRAME_BORDER, GWIN_FRAME_CLOSE_BTN, GWIN_FRAME_MINMAX_BTN. + * Whether the close or the minimize maximize buttons are used, the boarder is automatically invoked. + * + * @api + */ GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint16_t flags); #define gwinFrameCreate(fo, pInit, flags) gwinGFrameCreate(GDISP, fo, pInit, flags); -GHandle gwinFrameGetClose(GHandle gh); - -GHandle gwinFrameGetMin(GHandle gh); - -GHandle gwinFrameGetMax(GHandle gh); - #endif /* _GWIN_FRAME_H */ /** @} */ diff --git a/src/gwin/frame.c b/src/gwin/frame.c index 1699a3c2..6472663c 100644 --- a/src/gwin/frame.c +++ b/src/gwin/frame.c @@ -148,27 +148,6 @@ GHandle gwinGFrameCreate(GDisplay *g, GFrameObject *fo, GWidgetInit *pInit, uint return (GHandle)fo; } -GHandle gwinFrameGetClose(GHandle gh) { - if (gh->vmt != (gwinVMT *)&frameVMT) - return; - - return gh2obj->btnClose; -} - -GHandle gwinFrameGetMin(GHandle gh) { - if (gh->vmt != (gwinVMT *)&frameVMT) - return; - - return gh2obj->btnMin; -} - -GHandle gwinFrameGetMax(GHandle gh) { - if (gh->vmt != (gwinVMT *)&frameVMT) - return; - - return gh2obj->btnMax; -} - /////////////////////////////////////////////////////////////////////////////////////////////////// // Default render routines // ///////////////////////////////////////////////////////////////////////////////////////////////////