Skip to content

Component

Igor Usenko edited this page Aug 28, 2021 · 28 revisions

The part of the UI screen.
An array of the components represents the UI screen.
Maintain the state.
The state can be changed from some FreeRTOS tasks or from other components

Properties

  • bounding box (x, y, w, h)
  • state

Render API

  • newState(component, watchState) - compares the new state with previous. returns true if render needed
  • render(component, watchState, tftApi) - renders the component`s state

Touch Event API

typedef void (*TouchEventHandler)(Component *component, signed short x, signed short y);

  • onTouch(component) (async) - changes the component`s state

Clone this wiki locally