Skip to content

Applications management

Igor Usenko edited this page May 2, 2022 · 5 revisions

Launch

The main function has an array of all available applications - applications.
The main function creates

  • ApplicationManager(applications)
  • Tiler(applicationManager)
  • TouchscreenListener(tiler)

The main function activates the first application from applications.

Application activation

The ApplicationManager finds needed application in the applications.
The ApplicationManager calls activate function of the application.
The ApplicationManager sends the application to the Tiler.
The Tiler asks the application about the active tile.
The Tiler renders the current tile.

Application deactivation

The ApplicationManager calls deactivate function of application.

Touchscreen events handling

The TouchscreenListener detects an event.
The TouchscreenListener sends the event to the Tiler.
The Tiler finds a component inside the current tile that can handle the event.
The Tiler calls an event handler of the component.
The Tiler renders the current tile.

Switch applications

The TouchscreenListener detects a vertical swipe.
The TouchscreenListener sends swipe to the Tiler.
The Tiler asks the current tile to handle the swipe.
The tile according to its own logic can initiate an application switch.
The Tiler renders the current tile.

Switch application's tile

The TouchscreenListener detects a horizontal swipe.
The TouchscreenListener sends swipe to the Tiler.
The Tiler asks the current tile to handle the swipe.
The tile according to its own logic can initiate a tile switch.
The Tiler renders the current tile.

Clone this wiki locally