Merge remote-tracking branch 'origin/master'
abled"
This reverts commit 2c57363efc
.
This commit is contained in:
commit
3409fd29c9
3 changed files with 23 additions and 0 deletions
|
@ -32,6 +32,7 @@ FEATURE: Update GADC audio recording driver to new GAUDIO format
|
||||||
FEATURE: Added vs1053 audio play driver
|
FEATURE: Added vs1053 audio play driver
|
||||||
FEATURE: Added GAUDIO wave-play demo
|
FEATURE: Added GAUDIO wave-play demo
|
||||||
FEATURE: Added many GWIN simple demo's and updated the combined widget demo
|
FEATURE: Added many GWIN simple demo's and updated the combined widget demo
|
||||||
|
FEATURE: Added gwinEnable() and gwinDisable()
|
||||||
|
|
||||||
|
|
||||||
*** changes after 1.9 ***
|
*** changes after 1.9 ***
|
||||||
|
|
|
@ -262,6 +262,10 @@ void gwinSliderSetPosition(GHandle gh, int pos) {
|
||||||
if (gh->vmt != (gwinVMT *)&sliderVMT)
|
if (gh->vmt != (gwinVMT *)&sliderVMT)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// do not change the position if disabled
|
||||||
|
if (!gwinGetEnabled(gh))
|
||||||
|
return;
|
||||||
|
|
||||||
if (gsw->min <= gsw->max) {
|
if (gsw->min <= gsw->max) {
|
||||||
if (pos < gsw->min) gsw->pos = gsw->min;
|
if (pos < gsw->min) gsw->pos = gsw->min;
|
||||||
else if (pos > gsw->max) gsw->pos = gsw->max;
|
else if (pos > gsw->max) gsw->pos = gsw->max;
|
||||||
|
|
|
@ -336,6 +336,24 @@ extern "C" {
|
||||||
*/
|
*/
|
||||||
void gwinSetEnabled(GHandle gh, bool_t enabled);
|
void gwinSetEnabled(GHandle gh, bool_t enabled);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Enables a widget
|
||||||
|
*
|
||||||
|
* @param[in] gh The window handle
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define gwinEnable(gh) gwinSetEnabled(gh, TRUE);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Disables a widget
|
||||||
|
*
|
||||||
|
* @param[in] gh The window handle
|
||||||
|
*
|
||||||
|
* @api
|
||||||
|
*/
|
||||||
|
#define gwinDisable(gh) gwinSetEnabled(gh, FALSE);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Gets the enabled state of a window
|
* @brief Gets the enabled state of a window
|
||||||
* @return TRUE if enabled
|
* @return TRUE if enabled
|
||||||
|
|
Loading…
Add table
Reference in a new issue