scene_director.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #pragma once
  2. #include <gui/gui.h>
  3. #include "../types/plugin_state.h"
  4. #include "../types/plugin_event.h"
  5. #include "totp_scenes_enum.h"
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9. /**
  10. * @brief Activates scene
  11. * @param plugin_state application state
  12. * @param scene scene to be activated
  13. * @param context scene context to be passed to the scene activation method
  14. */
  15. void totp_scene_director_activate_scene(PluginState* const plugin_state, Scene scene);
  16. /**
  17. * @brief Deactivate current scene
  18. * @param plugin_state application state
  19. */
  20. void totp_scene_director_deactivate_active_scene(PluginState* const plugin_state);
  21. /**
  22. * @brief Renders current scene
  23. * @param canvas canvas to render at
  24. * @param plugin_state application state
  25. */
  26. void totp_scene_director_render(Canvas* const canvas, PluginState* const plugin_state);
  27. /**
  28. * @brief Handles application event for the current scene
  29. * @param event event to be handled
  30. * @param plugin_state application state
  31. * @return \c true if event handled and applilcation should continue; \c false if application should be closed
  32. */
  33. bool totp_scene_director_handle_event(PluginEvent* const event, PluginState* const plugin_state);
  34. /**
  35. * @brief Forces screen to be redraw\updated
  36. * @param plugin_state application state
  37. */
  38. void totp_scene_director_force_redraw(PluginState* const plugin_state);
  39. #ifdef __cplusplus
  40. }
  41. #endif