 |
MPLABĀ® Harmony Graphics Suite
|
Go to the documentation of this file.
46 #ifndef LEGATO_TOUCHTEST_H
47 #define LEGATO_TOUCHTEST_H
51 #if LE_TOUCHTEST_WIDGET_ENABLED
60 #define LE_TOUCHTEST_MEMORY_SIZE 20
90 typedef enum leTouchTestState
92 LE_TOUCHTEST_STATE_UP,
93 LE_TOUCHTEST_STATE_DOWN
96 typedef struct leTouchTestWidget leTouchTestWidget;
109 typedef void (*leTouchTestWidget_PointAddedEventCallback)(leTouchTestWidget*,
lePoint*);
112 typedef struct leTouchTestWidget leTouchTestWidget;
118 #define LE_TOUCHTESTWIDGET_VTABLE(THIS_TYPE) \
119 LE_WIDGET_VTABLE(THIS_TYPE) \
121 leResult (*addPoint)(THIS_TYPE* _this, lePoint* pnt); \
122 leResult (*clearPoints)(THIS_TYPE* _this); \
123 leTouchTestWidget_PointAddedEventCallback (*getPointAddedEventCallback)(const THIS_TYPE* _this); \
124 leResult (*setPointAddedEventCallback)(THIS_TYPE* _this, leTouchTestWidget_PointAddedEventCallback cb); \
126 typedef struct leTouchTestWidgetVTable
128 LE_TOUCHTESTWIDGET_VTABLE(leTouchTestWidget)
129 } leTouchTestWidgetVTable;
159 typedef struct leTouchTestWidget
163 const leTouchTestWidgetVTable* fn;
165 leTouchTestState state;
167 lePoint pnts[LE_TOUCHTEST_MEMORY_SIZE];
173 leTouchTestWidget_PointAddedEventCallback cb;
193 LIB_EXPORT leTouchTestWidget* leTouchTestWidget_New();
205 LIB_EXPORT
void leTouchTestWidget_Constructor(leTouchTestWidget* wgt);
208 #define THIS_TYPE struct leWidget
223 virtual leResult addPoint(leTouchTestWidget* _this,
237 virtual leResult clearPoints(leTouchTestWidget* _this);
253 virtual leResult setPointAddedEventCallback(leTouchTestWidget* _this,
254 leTouchTestWidget_PointAddedEventCallback cb);
259 #endif // LE_TOUCHTEST_WIDGET_ENABLED
void leUtils_PointScreenToLocalSpace(const leWidget *widget, lePoint *pnt)
Convert point from layer space into the local space of a widget.
Definition: legato_utils.c:90
Error functions, macros and definitions.
leResult
This enum represents function call results.
Definition: legato_common.h:134
This struct represents a rectangle.
Definition: legato_common.h:405
Memory functions and definitions.
@ LE_VALIGN_MIDDLE
Definition: legato_common.h:183
This struct represents a string.
Definition: legato_string.h:108
LIB_EXPORT leEditWidget * leGetEditWidget()
Get edit widget.
Definition: legato_state.c:521
LIB_EXPORT leBool leRectContainsPoint(const leRect *rect, const lePoint *point)
Determines if a point is inside a rectangle.
Definition: legato_rect.c:31
General internal utilities for the library.
Fixed string functions and definitions.
Textfield Widget functions and definitions.
void leUtils_RectToScreenSpace(const leWidget *widget, leRect *rect)
Convert rectangle from widget local space to screen space.
Definition: legato_utils.c:151
The header file joins all header files used in the graphics object library.
LIB_EXPORT void leRectClip(const leRect *l_rect, const leRect *r_rect, leRect *result)
Clips a rectangle to the space of another rectangle.
Definition: legato_rect.c:122
leColor leScheme_GetRenderColor(const leScheme *schm, leSchemeColor clr)
Gets a scheme render color for the current layer color mode.
Definition: legato_scheme.c:68
@ LE_TRUE
Definition: legato_common.h:159
Common macros and definitions used by Legato.
const leStringVTable * fn
Definition: legato_string.h:109
virtual void destructor(leString *_this)
Destruct string.
void leUtils_ArrangeRectangleRelative(leRect *sub, leRect obj, leRect bounds, leHAlignment hAlignment, leVAlignment vAlignment, leRelativePosition position, uint8_t leftMargin, uint8_t topMargin, uint8_t rightMargin, uint8_t bottomMargin, uint16_t rectMargin)
Calculates the position of a rectangle within the given bounds.
Definition: legato_utils.c:286
This structure represents a integer Cartesian point.
Definition: legato_common.h:357