Embedded SDK
Embedded SDK
nbgl_touch.h
Go to the documentation of this file.
1 
7 #ifndef NBGL_TOUCH_H
8 #define NBGL_TOUCH_H
9 
10 #ifdef __cplusplus
11 extern "C" {
12 #endif
13 
14 /*********************
15  * INCLUDES
16  *********************/
17 #include "nbgl_types.h"
18 #include "nbgl_obj.h"
19 
20 /*********************
21  * DEFINES
22  *********************/
23 // duration of a short touch on touch panel (in ms)
24 #define SHORT_TOUCH_DURATION 0
25 // duration of a long touch on touch panel (in ms)
26 #define LONG_TOUCH_DURATION 1500
27 /**********************
28  * TYPEDEFS
29  **********************/
30 
31 /**********************
32  * GLOBAL PROTOTYPES
33  **********************/
34 void nbgl_touchHandler(nbgl_touchStatePosition_t *touchEvent, uint32_t currentTimeMs);
36  nbgl_touchStatePosition_t **firstPos,
37  nbgl_touchStatePosition_t **lastPos);
40 
41 /**********************
42  * MACROS
43  **********************/
44 
45 #ifdef __cplusplus
46 } /* extern "C" */
47 #endif
48 
49 #endif /* NBGL_TOUCH_H */
API to draw all basic graphic objects.
struct PACKED__ nbgl_obj_s nbgl_obj_t
Common structure for all graphical objects.
void nbgl_touchHandler(nbgl_touchStatePosition_t *touchEvent, uint32_t currentTimeMs)
Function to be called periodically to check touchscreen state and coordinates.
Definition: nbgl_touch.c:265
bool nbgl_touchGetTouchedPosition(nbgl_obj_t *obj, nbgl_touchStatePosition_t **firstPos, nbgl_touchStatePosition_t **lastPos)
Definition: nbgl_touch.c:364
nbgl_obj_t * nbgl_touchGetObjectFromId(nbgl_obj_t *obj, uint8_t id)
parse all the children of the given object, recursively, until an object with the given touch if is f...
Definition: nbgl_touch.c:393
uint32_t nbgl_touchGetTouchDuration(nbgl_obj_t *obj)
Definition: nbgl_touch.c:377
common types for Graphical Library
The low level Touchscreen event, coming from driver.
Definition: nbgl_obj.h:206
unsigned char uint8_t
Definition: usbd_conf.h:53