aboutsummaryrefslogtreecommitdiffstats
path: root/demos/modules
diff options
context:
space:
mode:
authorAndrew Hannam <andrewh@inmarket.com.au>2012-12-02 17:10:27 +1000
committerAndrew Hannam <andrewh@inmarket.com.au>2012-12-02 17:10:27 +1000
commit74e94d39b9b66adeaf8bcbb8789d79110102bb15 (patch)
treec15ea2d56eb73f3664680ea045f7146d9ba19d2b /demos/modules
parenta2c192ffd0f28c2d992b18a77cee123924bbad65 (diff)
downloaduGFX-74e94d39b9b66adeaf8bcbb8789d79110102bb15.tar.gz
uGFX-74e94d39b9b66adeaf8bcbb8789d79110102bb15.tar.bz2
uGFX-74e94d39b9b66adeaf8bcbb8789d79110102bb15.zip
Split Attaching Sources to a GWIN button
Split Attaching Sources to a GWIN button to allow for new input types that require a parameter in future eg. Keyboard will require a parameter.
Diffstat (limited to 'demos/modules')
-rw-r--r--demos/modules/ginput_touch_driver_test/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/demos/modules/ginput_touch_driver_test/main.c b/demos/modules/ginput_touch_driver_test/main.c
index 8a31ec74..dc8bb0f9 100644
--- a/demos/modules/ginput_touch_driver_test/main.c
+++ b/demos/modules/ginput_touch_driver_test/main.c
@@ -201,13 +201,13 @@ StepCalibrate:
gwinSetButtonText(ghNext, "Next", FALSE);
gsNext = gwinGetButtonSource(ghNext);
geventAttachSource(&gl, gsNext, 0);
- gwinAttachButtonSource(ghNext, gs, GEVENT_MOUSE);
+ gwinAttachButtonMouseSource(ghNext, gs);
ghPrev = gwinCreateButton(&gPrev, swidth-100, 0, 50, 20, &fontUI2, GBTN_NORMAL);
gwinSetButtonText(ghPrev, "Back", FALSE);
gsPrev = gwinGetButtonSource(ghPrev);
geventAttachSource(&gl, gsPrev, 0);
- gwinAttachButtonSource(ghPrev, gs, GEVENT_MOUSE);
+ gwinAttachButtonMouseSource(ghPrev, gs);
#if 0
{
@@ -221,8 +221,8 @@ StepCalibrate:
// below are correct for the Win32 toggle driver.
gsButton1 = ginputGetToggle(GINPUT_TOGGLE_MOMENTARY1);
gsButton2 = ginputGetToggle(GINPUT_TOGGLE_MOMENTARY2);
- gwinAttachButtonSource(ghNext, gsButton2, GEVENT_TOGGLE);
- gwinAttachButtonSource(ghPrev, gsButton1, GEVENT_TOGGLE);
+ gwinAttachButtonToggleSource(ghNext, gsButton2);
+ gwinAttachButtonToggleSource(ghPrev, gsButton1);
}
#endif
}