flip_store_e.h 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. #ifndef FLIP_STORE_E_H
  2. #define FLIP_STORE_E_H
  3. #include <uart_text_input.h>
  4. #include <flipper_http.h>
  5. #include <easy_flipper.h>
  6. #include <furi.h>
  7. #include <furi_hal.h>
  8. #include <gui/gui.h>
  9. #include <gui/view.h>
  10. #include <gui/modules/submenu.h>
  11. #include <gui/view_dispatcher.h>
  12. #include <notification/notification.h>
  13. #include <dialogs/dialogs.h>
  14. #define TAG "FlipStore"
  15. // Define the submenu items for our FlipStore application
  16. typedef enum
  17. {
  18. FlipStoreSubmenuIndexMain, // Click to start downloading the selected app
  19. FlipStoreSubmenuIndexAbout,
  20. FlipStoreSubmenuIndexSettings,
  21. FlipStoreSubmenuIndexAppList,
  22. //
  23. FlipStoreSubmenuIndexStartAppList
  24. } FlipStoreSubmenuIndex;
  25. // Define a single view for our FlipStore application
  26. typedef enum
  27. {
  28. FlipStoreViewMain, // The main screen
  29. FlipStoreViewSubmenu, // The submenu
  30. FlipStoreViewAbout, // The about screen
  31. FlipStoreViewSettings, // The settings screen
  32. FlipStoreViewTextInputSSID, // The text input screen for SSID
  33. FlipStoreViewTextInputPass, // The text input screen for password
  34. //
  35. FlipStoreViewPopup, // The popup screen
  36. //
  37. FlipStoreViewAppList, // The app list screen
  38. FlipStoreViewAppInfo, // The app info screen (widget) of the selected app
  39. FlipStoreViewAppDownload, // The app download screen (widget) of the selected app
  40. FlipStoreViewAppDelete, // The app delete screen (DialogEx) of the selected app
  41. //
  42. } FlipStoreView;
  43. // Each screen will have its own view
  44. typedef struct
  45. {
  46. ViewDispatcher *view_dispatcher; // Switches between our views
  47. View *view_main; // The main screen for downloading apps
  48. View *view_app_info; // The app info screen (view) of the selected app
  49. Submenu *submenu; // The submenu (main)
  50. Submenu *submenu_app_list; // The submenu (app list)
  51. Widget *widget; // The widget
  52. Popup *popup; // The popup
  53. DialogEx *dialog_delete; // The dialog for deleting an app
  54. VariableItemList *variable_item_list; // The variable item list (settngs)
  55. VariableItem *variable_item_ssid; // The variable item
  56. VariableItem *variable_item_pass; // The variable item
  57. UART_TextInput *uart_text_input_ssid; // The text input
  58. UART_TextInput *uart_text_input_pass; // The text input
  59. char *uart_text_input_buffer_ssid; // Buffer for the text input
  60. char *uart_text_input_temp_buffer_ssid; // Temporary buffer for the text input
  61. uint32_t uart_text_input_buffer_size_ssid; // Size of the text input buffer
  62. char *uart_text_input_buffer_pass; // Buffer for the text input
  63. char *uart_text_input_temp_buffer_pass; // Temporary buffer for the text input
  64. uint32_t uart_text_input_buffer_size_pass; // Size of
  65. } FlipStoreApp;
  66. #endif // FLIP_STORE_E_H