From 9ee7c284e63fc419f70ffc3c53eb23590767ee08 Mon Sep 17 00:00:00 2001 From: Andrew Hannam Date: Sun, 7 Apr 2013 16:02:10 +1000 Subject: 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. --- include/gwin/button.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'include/gwin/button.h') diff --git a/include/gwin/button.h b/include/gwin/button.h index 2df540da..3d54afbb 100644 --- a/include/gwin/button.h +++ b/include/gwin/button.h @@ -180,30 +180,28 @@ void gwinSetButtonCustom(GHandle gh, GButtonDrawFunction fn, void *param); */ #define gwinGetButtonSource(gh) ((GSourceHandle)(gh)) -#if defined(GINPUT_NEED_MOUSE) && GINPUT_NEED_MOUSE +#if GFX_USE_GINPUT && GINPUT_NEED_MOUSE /** - * @brief Attach a mouse source - * @details Attach a mouse source to a given button + * @brief Attach a mouse to a button * - * @param[in] gh The button handle - * @param[in] gsh The source handle + * @param[in] gh The button handle + * @param[in] instance The mouse instance * * @api */ - bool_t gwinAttachButtonMouseSource(GHandle gh, GSourceHandle gsh); + bool_t gwinAttachButtonMouse(GHandle gh, uint16_t instance); #endif -#if defined(GINPUT_NEED_TOGGLE) && GINPUT_NEED_TOGGLE +#if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE /** - * @brief Attach a toggle source - * @details Attach a toggle source to this button + * @brief Attach a toggle to a button * - * @param[in] gh The button handle - * @param[in] gsh The source handle + * @param[in] gh The button handle + * @param[in] instance The toggle instance * * @api */ - bool_t gwinAttachButtonToggleSource(GHandle gh, GSourceHandle gsh); + bool_t gwinAttachButtonToggle(GHandle gh, uint16_t instance); #endif /** -- cgit v1.2.3