quac.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #pragma once
  2. #include <gui/scene_manager.h>
  3. #include <gui/view_dispatcher.h>
  4. #include <gui/modules/dialog_ex.h>
  5. #include <gui/modules/variable_item_list.h>
  6. #include <storage/storage.h>
  7. #include <notification/notification_messages.h>
  8. #include "views/action_menu.h"
  9. #include "item.h"
  10. #define QUAC_NAME "Quac!"
  11. #define TAG "Quac" // log statement id
  12. // Location of our actions and folders
  13. #define QUAC_PATH "apps_data/quac"
  14. // Full path to actions
  15. #define QUAC_DATA_PATH EXT_PATH(QUAC_PATH)
  16. typedef enum { QUAC_APP_PORTRAIT, QUAC_APP_LANDSCAPE } QuacAppLayout;
  17. typedef struct App {
  18. SceneManager* scene_manager;
  19. ViewDispatcher* view_dispatcher;
  20. ActionMenu* action_menu;
  21. VariableItemList* vil_settings;
  22. DialogEx* dialog;
  23. Storage* storage;
  24. NotificationApp* notifications;
  25. ItemsView* items_view;
  26. int depth;
  27. int selected_item;
  28. struct {
  29. QuacAppLayout layout; // Defaults to Portrait
  30. bool show_icons; // Defaults to True
  31. bool show_headers; // Defaults to True
  32. uint32_t rfid_duration; // Defaults to 2500 ms
  33. } settings;
  34. } App;
  35. App* app_alloc();
  36. void app_free(App* app);