aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/gwin_button.h
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 /include/gwin/gwin_button.h
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 'include/gwin/gwin_button.h')
-rw-r--r--include/gwin/gwin_button.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/include/gwin/gwin_button.h b/include/gwin/gwin_button.h
index 69a2474c..e95628e4 100644
--- a/include/gwin/gwin_button.h
+++ b/include/gwin/gwin_button.h
@@ -129,8 +129,15 @@ extern "C" {
// Get the source handle so the application can listen for events
#define gwinGetButtonSource(gh) ((GSourceHandle)(gh))
- // Attach a source to this button. Sources recognised: Mouse, Touch and Toggle - others are ignored (returns false).
- bool_t gwinAttachButtonSource(GHandle gh, GSourceHandle gsh, GEventType type);
+ #if defined(GINPUT_NEED_MOUSE) && GINPUT_NEED_MOUSE
+ // Attach a mouse source to this button.
+ bool_t gwinAttachButtonMouseSource(GHandle gh, GSourceHandle gsh);
+ #endif
+
+ #if defined(GINPUT_NEED_TOGGLE) && GINPUT_NEED_TOGGLE
+ // Attach a toggle source to this button.
+ bool_t gwinAttachButtonToggleSource(GHandle gh, GSourceHandle gsh);
+ #endif
#ifdef __cplusplus
}