quac.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #pragma once
  2. #include <gui/gui.h>
  3. #include <gui/scene_manager.h>
  4. #include <gui/view_dispatcher.h>
  5. #include <gui/scene_manager.h>
  6. #include <gui/modules/variable_item_list.h>
  7. #include <gui/modules/submenu.h>
  8. #include <gui/modules/text_input.h>
  9. #include <gui/modules/popup.h>
  10. #include <dialogs/dialogs.h>
  11. #include <storage/storage.h>
  12. #include <notification/notification_messages.h>
  13. #include "views/action_menu.h"
  14. #include "item.h"
  15. // #pragma GCC push_options
  16. // #pragma GCC optimize("O0")
  17. #define QUAC_NAME "Quac!"
  18. #define QUAC_VERSION "v0.6"
  19. #define QUAC_ABOUT \
  20. "Quick Action remote control\n" QUAC_VERSION "\n" \
  21. "github.com/rdefeo/quac"
  22. #define TAG "Quac" // log statement id
  23. // Location of our actions and folders
  24. #define QUAC_SETTINGS_FILENAME ".quac.conf"
  25. #define QUAC_SETTINGS_PATH APP_DATA_PATH(QUAC_SETTINGS_FILENAME)
  26. typedef enum { QUAC_APP_PORTRAIT, QUAC_APP_LANDSCAPE } QuacAppLayout;
  27. typedef struct App {
  28. SceneManager* scene_manager;
  29. ViewDispatcher* view_dispatcher;
  30. ActionMenu* action_menu;
  31. VariableItemList* vil_settings;
  32. DialogsApp* dialog;
  33. Submenu* sub_menu;
  34. TextInput* text_input;
  35. Popup* popup;
  36. Storage* storage;
  37. NotificationApp* notifications;
  38. ItemsView* items_view;
  39. int depth;
  40. int selected_item;
  41. FuriString* temp_str; // used for renames/etc
  42. char temp_cstr[MAX_NAME_LEN]; // used for renames/etc
  43. struct {
  44. QuacAppLayout layout; // Defaults to Portrait
  45. bool show_icons; // Defaults to True
  46. bool show_headers; // Defaults to True
  47. uint32_t rfid_duration; // Defaults to 2500 ms
  48. uint32_t nfc_duration; // Defaults to 1000 ms
  49. bool subghz_use_ext_antenna; // Defaults to False
  50. bool show_hidden; // Defaults to False
  51. } settings;
  52. } App;
  53. App* app_alloc();
  54. void app_free(App* app);