added enable and disable APIs to high level GWIN code
This commit is contained in:
parent
92883c795e
commit
757b28531f
2 changed files with 27 additions and 0 deletions
|
@ -87,6 +87,15 @@ GHandle gwinCreateWindow(GWindowObject *gw, coord_t x, coord_t y, coord_t width,
|
||||||
*/
|
*/
|
||||||
void gwinDestroyWindow(GHandle gh);
|
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
|
* @brief Get the X coordinate of the window
|
||||||
* @details Returns the X coordinate of the origin of the window.
|
* @details Returns the X coordinate of the origin of the window.
|
||||||
|
@ -138,6 +147,20 @@ void gwinDestroyWindow(GHandle gh);
|
||||||
*/
|
*/
|
||||||
#define gwinSetBgColor(gh, bgclr) (gh)->bgcolor = (bgclr)
|
#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 */
|
/* Set up for text */
|
||||||
|
|
||||||
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)
|
#if GDISP_NEED_TEXT || defined(__DOXYGEN__)
|
||||||
|
|
|
@ -55,6 +55,10 @@ GHandle gwinCreateWindow(GWindowObject *gw, coord_t x, coord_t y, coord_t width,
|
||||||
return (GHandle)gw;
|
return (GHandle)gw;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void gwinSetEnabled(GHandle gh, bool_t enabled) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
void gwinDestroyWindow(GHandle gh) {
|
void gwinDestroyWindow(GHandle gh) {
|
||||||
// Clean up any type specific dynamic memory allocations
|
// Clean up any type specific dynamic memory allocations
|
||||||
switch(gh->type) {
|
switch(gh->type) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue