scene_director.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  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(PluginState* const plugin_state, Scene scene);
  13. /**
  14. * @brief Deactivate current scene
  15. * @param plugin_state application state
  16. */
  17. void totp_scene_director_deactivate_active_scene(PluginState* const plugin_state);
  18. /**
  19. * @brief Renders current scene
  20. * @param canvas canvas to render at
  21. * @param plugin_state application state
  22. */
  23. void totp_scene_director_render(Canvas* const canvas, PluginState* const plugin_state);
  24. /**
  25. * @brief Handles application event for the current scene
  26. * @param event event to be handled
  27. * @param plugin_state application state
  28. * @return \c true if event handled and applilcation should continue; \c false if application should be closed
  29. */
  30. bool totp_scene_director_handle_event(PluginEvent* const event, PluginState* const plugin_state);