quac.h 1.2 KB

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