46 #ifndef LEGATO_TOUCHTEST_H 47 #define LEGATO_TOUCHTEST_H 51 #if LE_TOUCHTEST_WIDGET_ENABLED == 1 64 #define LE_TOUCHTEST_MEMORY_SIZE 20 94 typedef enum leTouchTestState
96 LE_TOUCHTEST_STATE_UP,
97 LE_TOUCHTEST_STATE_DOWN
100 typedef struct leTouchTestWidget leTouchTestWidget;
113 typedef void (* leTouchTestWidget_PointAddedEventCallback)(leTouchTestWidget*,
lePoint*);
116 typedef struct leTouchTestWidget leTouchTestWidget;
122 #define LE_TOUCHTESTWIDGET_VTABLE(THIS_TYPE) \ 123 LE_WIDGET_VTABLE(THIS_TYPE) \ 125 leResult (*addPoint)(THIS_TYPE* _this, lePoint* pnt); \ 126 leResult (*clearPoints)(THIS_TYPE* _this); \ 127 leTouchTestWidget_PointAddedEventCallback (*getPointAddedEventCallback)(const THIS_TYPE* _this); \ 128 leResult (*setPointAddedEventCallback)(THIS_TYPE* _this, leTouchTestWidget_PointAddedEventCallback cb); \ 130 typedef struct leTouchTestWidgetVTable
132 LE_TOUCHTESTWIDGET_VTABLE(leTouchTestWidget)
133 } leTouchTestWidgetVTable;
163 typedef struct leTouchTestWidget
167 const leTouchTestWidgetVTable* fn;
169 leTouchTestState state;
171 lePoint pnts[LE_TOUCHTEST_MEMORY_SIZE];
177 leTouchTestWidget_PointAddedEventCallback cb;
197 leTouchTestWidget* leTouchTestWidget_New(
void);
209 void leTouchTestWidget_Constructor(leTouchTestWidget* wgt);
212 #define THIS_TYPE struct leWidget 227 virtual leResult addPoint(leTouchTestWidget* _this,
241 virtual leResult clearPoints(leTouchTestWidget* _this);
257 virtual leResult setPointAddedEventCallback(leTouchTestWidget* _this,
258 leTouchTestWidget_PointAddedEventCallback cb);
267 #endif // LE_TOUCHTEST_WIDGET_ENABLED Common macros and definitions used by Legato.
leResult
This enum represents function call results.
Definition: legato_common.h:123
This structure represents a integer Cartesian point.
Definition: legato_common.h:346