aboutsummaryrefslogtreecommitdiffstats
path: root/include/gwin/gwidget.h
diff options
context:
space:
mode:
authorinmarket <andrewh@inmarket.com.au>2013-06-10 17:18:01 +1000
committerinmarket <andrewh@inmarket.com.au>2013-06-10 17:18:01 +1000
commit2cb35d6815a0a12035f4792c266b688c77085620 (patch)
tree292ebc4760767d67b41f7f0e0022185afcf05067 /include/gwin/gwidget.h
parent777ec6af7c1b594f7b7a9cbaaf7ead90d8fb7e8f (diff)
downloaduGFX-2cb35d6815a0a12035f4792c266b688c77085620.tar.gz
uGFX-2cb35d6815a0a12035f4792c266b688c77085620.tar.bz2
uGFX-2cb35d6815a0a12035f4792c266b688c77085620.zip
Clean up GWIN Event assignment. Optimise event efficiency.
Diffstat (limited to 'include/gwin/gwidget.h')
-rw-r--r--include/gwin/gwidget.h14
1 files changed, 6 insertions, 8 deletions
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