Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
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
11extern "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 3000
27/**********************
28 * TYPEDEFS
29 **********************/
30
31/**********************
32 * GLOBAL PROTOTYPES
33 **********************/
34void nbgl_touchInit(bool fromUx);
35void nbgl_touchHandler(bool fromUx, nbgl_touchStatePosition_t *touchEvent, uint32_t currentTimeMs);
41
42/**********************
43 * MACROS
44 **********************/
45
46#ifdef __cplusplus
47} /* extern "C" */
48#endif
49
50#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.
bool nbgl_touchGetTouchedPosition(nbgl_obj_t *obj, nbgl_touchStatePosition_t **firstPos, nbgl_touchStatePosition_t **lastPos)
Definition nbgl_touch.c:388
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:419
uint32_t nbgl_touchGetTouchDuration(nbgl_obj_t *obj)
Definition nbgl_touch.c:402
void nbgl_touchInit(bool fromUx)
Function to initialize the touch context.
Definition nbgl_touch.c:272
void nbgl_touchHandler(bool fromUx, nbgl_touchStatePosition_t *touchEvent, uint32_t currentTimeMs)
Function to be called periodically to check touchscreen state and coordinates.
Definition nbgl_touch.c:285
common types for Graphical Library
The low level Touchscreen event, coming from driver.
Definition nbgl_obj.h:227
unsigned char uint8_t
Definition usbd_conf.h:53