diff options
author | Andrew Hannam <andrewh@inmarket.com.au> | 2013-04-07 16:02:10 +1000 |
---|---|---|
committer | Andrew Hannam <andrewh@inmarket.com.au> | 2013-04-07 16:02:10 +1000 |
commit | 9ee7c284e63fc419f70ffc3c53eb23590767ee08 (patch) | |
tree | 57a45c0ca6e5222292bebb8445dffaff5757275b /demos/modules/ginput/touch_driver_test | |
parent | 90f5e851467e5ea14b710ada937409e506820d58 (diff) | |
download | uGFX-9ee7c284e63fc419f70ffc3c53eb23590767ee08.tar.gz uGFX-9ee7c284e63fc419f70ffc3c53eb23590767ee08.tar.bz2 uGFX-9ee7c284e63fc419f70ffc3c53eb23590767ee08.zip |
Add GINPUT Dial, simplify GWIN input assignment
Added GINPUT Dial support and a driver that uses GADC to read the dial.
Added support for Dial inputs to the GWIN slider.
Updated the slider demo for Dial Inputs.
Simplified the assigning of inputs to GWIN "widgets" button and slider.
Updated the demo's to match the new input to button assignment.
Diffstat (limited to 'demos/modules/ginput/touch_driver_test')
-rw-r--r-- | demos/modules/ginput/touch_driver_test/main.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/demos/modules/ginput/touch_driver_test/main.c b/demos/modules/ginput/touch_driver_test/main.c index 95d29d28..c7866ec3 100644 --- a/demos/modules/ginput/touch_driver_test/main.c +++ b/demos/modules/ginput/touch_driver_test/main.c @@ -201,28 +201,24 @@ StepCalibrate: gwinSetButtonText(ghNext, "Next", FALSE); gsNext = gwinGetButtonSource(ghNext); geventAttachSource(&gl, gsNext, 0); - gwinAttachButtonMouseSource(ghNext, gs); + gwinAttachButtonMouse(ghNext, 0); ghPrev = gwinCreateButton(&gPrev, swidth-100, 0, 50, 20, font, GBTN_NORMAL); gwinSetButtonText(ghPrev, "Back", FALSE); gsPrev = gwinGetButtonSource(ghPrev); geventAttachSource(&gl, gsPrev, 0); - gwinAttachButtonMouseSource(ghPrev, gs); + gwinAttachButtonMouse(ghPrev, 0); #if 0 { - GSourceHandle gsButton1, gsButton2; - // Attach a couple of hardware toggle buttons to our Next and Back buttons as well. // We can always use the mouse to trigger the buttons if you don't want to use hardware toggles. // This code depends on your hardware. Turn it on only if you have // defined a board definition for your toggle driver. Then change // the next two lines to be correct for your hardware. The values // below are correct for the Win32 toggle driver. - gsButton1 = ginputGetToggle(GINPUT_TOGGLE_MOMENTARY1); - gsButton2 = ginputGetToggle(GINPUT_TOGGLE_MOMENTARY2); - gwinAttachButtonToggleSource(ghNext, gsButton2); - gwinAttachButtonToggleSource(ghPrev, gsButton1); + gwinAttachButtonToggle(ghNext, GINPUT_TOGGLE_MOMENTARY1); + gwinAttachButtonToggle(ghPrev, GINPUT_TOGGLE_MOMENTARY2); } #endif } |