diff options
author | Joel Bodenmann <joel@unormal.org> | 2014-01-04 15:12:06 +0100 |
---|---|---|
committer | Joel Bodenmann <joel@unormal.org> | 2014-01-04 15:12:06 +0100 |
commit | 12a7d7957b0d264ab44f2f17075a9cc3a524da43 (patch) | |
tree | eddb4c2b6a0770cc5fedd87789826f72f6ced74f | |
parent | abe6a47c1f59941faac719770aa654d2c79cacef (diff) | |
download | uGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.tar.gz uGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.tar.bz2 uGFX-12a7d7957b0d264ab44f2f17075a9cc3a524da43.zip |
added experimental gwinGetEnabled()
-rw-r--r-- | src/gwin/gwin.c | 12 |
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) { |