diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gwin/gwin.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/include/gwin/gwin.h b/include/gwin/gwin.h index c7b20008..d1192bc7 100644 --- a/include/gwin/gwin.h +++ b/include/gwin/gwin.h @@ -88,6 +88,15 @@ GHandle gwinCreateWindow(GWindowObject *gw, coord_t x, coord_t y, coord_t width, void gwinDestroyWindow(GHandle gh); /** + * @brief Enable or disable a widget (of any type). + * + * @param[in] gh The window handle + * + * @api + */ +void gwinSetEnabled(GHandle gh, bool_t enabled); + +/** * @brief Get the X coordinate of the window * @details Returns the X coordinate of the origin of the window. * The coordinate is relative to the physical screen zero point. @@ -138,6 +147,20 @@ void gwinDestroyWindow(GHandle gh); */ #define gwinSetBgColor(gh, bgclr) (gh)->bgcolor = (bgclr) +/** + * @brief Enable a window of any type + * + * @param[in] gh The window handle + */ +#define gwinEnable(gh) gwinSetEnabled(gh, TRUE) + +/** + * @brief Disable a window of any type + * + * @param[in] gh The window handle + */ +#define gwinDisable(gh) gwinSetEnabled(gh, FALSE) + /* Set up for text */ #if GDISP_NEED_TEXT || defined(__DOXYGEN__) |