app_state.h 544 B

123456789101112131415161718192021222324252627
  1. #ifndef APP_HEADERS
  2. #define APP_HEADERS
  3. #include "flipper.h"
  4. #include "resistor_logic.h"
  5. typedef struct AppState {
  6. uint8_t edit_selection;
  7. ResistorType resistor_type;
  8. BandColour resistor_bands[6];
  9. } AppState;
  10. typedef struct App {
  11. SceneManager* scene_manager;
  12. ViewDispatcher* view_dispatcher;
  13. Submenu* submenu;
  14. Widget* widget;
  15. AppState* state;
  16. } App;
  17. App* app_alloc();
  18. AppState* app_state_alloc();
  19. void app_quit(App* app);
  20. void app_free(App* app);
  21. void app_init_resistor(App* app, ResistorType rtype);
  22. #endif