Embedded SDK
Embedded SDK
|
This chapter describes briefly how NBGL manages the touchscreen events and how to receive and process these events.
The low-level entry point of NBGL for Touchscreen management is nbgl_touchHandler(). This function is supposed to be called periodically by the main scheduler to provide the current state and position of the finger on the Touchscreen.
The position is always useful when the state field of nbgl_touchStatePosition_t is PRESSED, and also useful when the new state is RELEASED.
From a high-level perspective, every object can declare itself as "client" of touchscreen events.
The low-level events are:
Typically, nbgl_touchHandler() shall be called when SEPROXYHAL_TAG_FINGER_EVENT message is received by Bolos UX task or by Application's main task.