aboutsummaryrefslogtreecommitdiffstats
path: root/src/gwin/gwin.c
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2014-01-04 15:12:06 +0100
committerJoel Bodenmann <joel@unormal.org>2014-01-04 15:12:06 +0100
commit12a7d7957b0d264ab44f2f17075a9cc3a524da43 (patch)
treeeddb4c2b6a0770cc5fedd87789826f72f6ced74f /src/gwin/gwin.c
parentabe6a47c1f59941faac719770aa654d2c79cacef (diff)
downloaduGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.tar.gz
uGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.tar.bz2
uGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.zip
added experimental gwinGetEnabled()
Diffstat (limited to 'src/gwin/gwin.c')
-rw-r--r--src/gwin/gwin.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gwin/gwin.c b/src/gwin/gwin.c
index 3a4ae5b5..057fd6e0 100644
--- a/src/gwin/gwin.c
+++ b/src/gwin/gwin.c
@@ -237,7 +237,17 @@ void gwinSetEnabled(GHandle gh, bool_t enabled) {
}
bool_t gwinGetEnabled(GHandle gh) {
- return (gh->flags & GWIN_FLG_ENABLED) ? TRUE : FALSE;
+ #if GWIN_NEED_HIERARCHY
+ GHandle e = gh;
+ while (e) {
+ if ( e->flags & GWIN_FLG_ENABLED);
+ return TRUE;
+ e = e->parent;
+ };
+ return FALSE;
+ #else
+ return (gh->flags & GWIN_FLG_ENABLED) ? TRUE : FALSE;
+ #endif
}
void gwinMove(GHandle gh, coord_t x, coord_t y) {