aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Bodenmann <joel@unormal.org>2013-06-02 18:52:42 +0200
committerJoel Bodenmann <joel@unormal.org>2013-06-02 18:52:42 +0200
commit446f41297d914c6e624e2095264fb67edc0b9d69 (patch)
tree340ec144daa043abe027d466fd26dd16e247413d
parent809b8ccc60f16255d6c5b2b228a1463f2123ea4c (diff)
downloaduGFX-446f41297d914c6e624e2095264fb67edc0b9d69.tar.gz
uGFX-446f41297d914c6e624e2095264fb67edc0b9d69.tar.bz2
uGFX-446f41297d914c6e624e2095264fb67edc0b9d69.zip
some more checkbox fixes
-rw-r--r--include/gwin/checkbox.h5
-rw-r--r--src/gwin/checkbox.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/include/gwin/checkbox.h b/include/gwin/checkbox.h
index 0289a50a..ba8f3b2f 100644
--- a/include/gwin/checkbox.h
+++ b/include/gwin/checkbox.h
@@ -36,8 +36,9 @@
/*===========================================================================*/
typedef struct GEventGWinCheckbox_t {
- GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX)
- GHandle checkbox; // The checkbox that has been depressed (actually triggered on release)
+ GEventType type; // The type of this event (GEVENT_GWIN_CHECKBOX)
+ GHandle checkbox; // The checkbox that has been depressed (actually triggered on release)
+ bool_t state // Is the checkbox currently checked or unchecked?
} GEventGWinCheckbox;
typedef enum GCheckboxShape_e {
diff --git a/src/gwin/checkbox.c b/src/gwin/checkbox.c
index a0d281c9..f12c0ee3 100644
--- a/src/gwin/checkbox.c
+++ b/src/gwin/checkbox.c
@@ -88,6 +88,7 @@ static void gwinCheckboxCallback(void *param, GEvent *pe) {
continue;
pbe->type = GEVENT_GWIN_CHECKBOX;
pbe->checkbox = gh;
+ pbe->state = gbw->state;
geventSendEvent(psl);
}