From 74e94d39b9b66adeaf8bcbb8789d79110102bb15 Mon Sep 17 00:00:00 2001 From: Andrew Hannam Date: Sun, 2 Dec 2012 17:10:27 +1000 Subject: 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. --- include/gwin/gwin_button.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/gwin/gwin_button.h') 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 } -- cgit v1.2.3