From 2cb35d6815a0a12035f4792c266b688c77085620 Mon Sep 17 00:00:00 2001 From: inmarket Date: Mon, 10 Jun 2013 17:18:01 +1000 Subject: Clean up GWIN Event assignment. Optimise event efficiency. --- include/gwin/gwidget.h | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'include/gwin/gwidget.h') diff --git a/include/gwin/gwidget.h b/include/gwin/gwidget.h index 21cfd4ac..a022ab13 100644 --- a/include/gwin/gwidget.h +++ b/include/gwin/gwidget.h @@ -46,7 +46,6 @@ typedef void (*CustomWidgetDrawFunction)(struct GWidgetObject *gw, void *param); */ typedef struct GWidgetObject { GWindowObject g; // @< This is still a GWIN - GListener listener; // @< The widget listener const char * txt; // @< The widget text CustomWidgetDrawFunction fnDraw; // @< The current draw function void * fnParam; // @< A parameter for the current draw function @@ -120,28 +119,27 @@ const char *gwinGetText(GHandle gh); void gwinSetCustomDraw(GHandle gh, CustomWidgetDrawFunction fn, void *param); /** - * @brief Attach a Listener to this widget + * @brief Attach a Listener to listen for widget events * @return TRUE on success * - * @param[in] gh The widget handle * @param[in] pl The listener - * @param[in] flags Flags to use for listening. For most widgets this should be 0. * * @api */ -bool_t gwinAttachListener(GHandle gh, GListener *pl, unsigned flags); +bool_t gwinAttachListener(GListener *pl); #if GFX_USE_GINPUT && GINPUT_NEED_MOUSE /** - * @brief Attach a mouse to a widget + * @brief Set the mouse to be used to control the widgets * @return TRUE on success * - * @param[in] gh The widget handle * @param[in] instance The mouse instance * + * @note Every widget uses the same mouse. + * * @api */ - bool_t gwinAttachMouse(GHandle gh, uint16_t instance); + bool_t gwinAttachMouse(uint16_t instance); #endif #if GFX_USE_GINPUT && GINPUT_NEED_TOGGLE -- cgit v1.2.3