scene_director.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. /**
  7. * @brief Activates scene
  8. * @param plugin_state application state
  9. * @param scene scene to be activated
  10. * @param context scene context to be passed to the scene activation method
  11. */
  12. void totp_scene_director_activate_scene(
  13. PluginState* const plugin_state,
  14. Scene scene,
  15. const void* context);
  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);