quac.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #define QUAC_NAME "Quac!"
  16. #define QUAC_VERSION "v0.8.0"
  17. #define QUAC_ABOUT \
  18. "Quick Action remote control\n" QUAC_VERSION "\n" \
  19. "github.com/rdefeo/quac"
  20. #define TAG "Quac" // log statement id
  21. // Location of our actions and folders
  22. #define QUAC_SETTINGS_FILENAME ".quac.conf"
  23. #define QUAC_SETTINGS_PATH APP_DATA_PATH(QUAC_SETTINGS_FILENAME)
  24. typedef enum {
  25. QUAC_APP_PORTRAIT,
  26. QUAC_APP_LANDSCAPE
  27. } QuacAppLayout;
  28. typedef struct App {
  29. SceneManager* scene_manager;
  30. ViewDispatcher* view_dispatcher;
  31. ActionMenu* action_menu;
  32. VariableItemList* vil_settings;
  33. DialogsApp* dialog;
  34. Submenu* sub_menu;
  35. TextInput* text_input;
  36. Popup* popup;
  37. Storage* storage;
  38. NotificationApp* notifications;
  39. ItemsView* items_view;
  40. int depth;
  41. int selected_item;
  42. FuriString* temp_str; // used for renames/etc
  43. char temp_cstr[MAX_NAME_LEN]; // used for renames/etc
  44. uint32_t temp_u32;
  45. struct {
  46. QuacAppLayout layout; // Defaults to Portrait
  47. bool show_icons; // Defaults to True
  48. bool show_headers; // Defaults to True
  49. uint32_t rfid_duration; // Defaults to 2500 ms
  50. uint32_t nfc_duration; // Defaults to 1000 ms
  51. uint32_t ibutton_duration; // Defaults to 1000 ms
  52. bool ir_use_ext_module; // Defaults to False
  53. bool show_hidden; // Defaults to False
  54. } settings;
  55. } App;
  56. App* app_alloc();
  57. void app_free(App* app);