From aae423fd7f3b8adb6e96ce94fd1fb4cdf2745bbe Mon Sep 17 00:00:00 2001 From: Aram Date: Thu, 22 Jun 2017 00:36:04 +0200 Subject: Added gwinDetachToggle method interface --- src/gwin/gwin_widget.c | 1 - src/gwin/gwin_widget.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) (limited to 'src/gwin') diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c index 476ee6ba..00a783d9 100644 --- a/src/gwin/gwin_widget.c +++ b/src/gwin/gwin_widget.c @@ -99,7 +99,6 @@ static void gwidgetEvent(void *param, GEvent *pe) { #define pte ((GEventToggle *)pe) #define pde ((GEventDial *)pe) - GHandle h; GHandle gh; #if GFX_USE_GINPUT && (GINPUT_NEED_TOGGLE || GINPUT_NEED_DIAL) uint16_t role; diff --git a/src/gwin/gwin_widget.h b/src/gwin/gwin_widget.h index ece98a06..ce7490cd 100644 --- a/src/gwin/gwin_widget.h +++ b/src/gwin/gwin_widget.h @@ -356,6 +356,20 @@ bool_t gwinAttachListener(GListener *pl); * @api */ bool_t gwinAttachToggle(GHandle gh, uint16_t role, uint16_t instance); + /** + * @brief Detach a toggle from a widget + * @return TRUE on success + * + * @param[in] gh The widget handle + * @param[in] role The function the toggle will perform for the widget + * + * @note See the documentation on the specific widget to see the possible + * values for the role parameter. If it is out of range, this function + * will return FALSE + * + * @api + */ + bool_t gwinDetachToggle(GHandle gh, uint16_t role); #endif #if (GFX_USE_GINPUT && GINPUT_NEED_DIAL) || defined(__DOXYGEN__) -- cgit v1.2.3 From e68c9c09e261eae56e4ea4cc55203f43bdaa9bd4 Mon Sep 17 00:00:00 2001 From: Aram Date: Thu, 22 Jun 2017 00:41:10 +0200 Subject: Oops --- src/gwin/gwin_widget.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/gwin') diff --git a/src/gwin/gwin_widget.c b/src/gwin/gwin_widget.c index 00a783d9..476ee6ba 100644 --- a/src/gwin/gwin_widget.c +++ b/src/gwin/gwin_widget.c @@ -99,6 +99,7 @@ static void gwidgetEvent(void *param, GEvent *pe) { #define pte ((GEventToggle *)pe) #define pde ((GEventDial *)pe) + GHandle h; GHandle gh; #if GFX_USE_GINPUT && (GINPUT_NEED_TOGGLE || GINPUT_NEED_DIAL) uint16_t role; -- cgit v1.2.3