Embedded SDK
Embedded SDK
Macros | Functions
nbgl_touch.h File Reference
#include "nbgl_types.h"
#include "nbgl_obj.h"
Include dependency graph for nbgl_touch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define SHORT_TOUCH_DURATION   0
 
#define LONG_TOUCH_DURATION   1500
 

Functions

void nbgl_touchHandler (nbgl_touchStatePosition_t *touchEvent, uint32_t currentTimeMs)
 Function to be called periodically to check touchscreen state and coordinates. More...
 
bool nbgl_touchGetTouchedPosition (nbgl_obj_t *obj, nbgl_touchStatePosition_t **firstPos, nbgl_touchStatePosition_t **lastPos)
 
uint32_t nbgl_touchGetTouchDuration (nbgl_obj_t *obj)
 
nbgl_obj_tnbgl_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 found. More...
 

Detailed Description

TouchScreen management of the new BOLOS Graphical Library

Definition in file nbgl_touch.h.

Macro Definition Documentation

◆ LONG_TOUCH_DURATION

#define LONG_TOUCH_DURATION   1500

Definition at line 26 of file nbgl_touch.h.

◆ SHORT_TOUCH_DURATION

#define SHORT_TOUCH_DURATION   0

Definition at line 24 of file nbgl_touch.h.

Function Documentation

◆ nbgl_touchGetObjectFromId()

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 found.

Parameters
objparent of the touched object
idid of the touched object to find
Returns
the concerned object or NULL if not found

Definition at line 393 of file nbgl_touch.c.

◆ nbgl_touchGetTouchDuration()

uint32_t nbgl_touchGetTouchDuration ( nbgl_obj_t obj)

Definition at line 377 of file nbgl_touch.c.

◆ nbgl_touchGetTouchedPosition()

bool nbgl_touchGetTouchedPosition ( nbgl_obj_t obj,
nbgl_touchStatePosition_t **  firstPos,
nbgl_touchStatePosition_t **  lastPos 
)

Definition at line 364 of file nbgl_touch.c.

◆ nbgl_touchHandler()

void nbgl_touchHandler ( nbgl_touchStatePosition_t touchStatePosition,
uint32_t  currentTime 
)

Function to be called periodically to check touchscreen state and coordinates.

Parameters
touchStatePositionstate and position read from touch screen
currentTimecurrent time in ms

Definition at line 265 of file nbgl_touch.c.