flip_store_e.h 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. FlipStoreSubmenuIndexDownloadApp,
  23. //
  24. FlipStoreSubmenuIndexStartAppList
  25. } FlipStoreSubmenuIndex;
  26. // Define a single view for our FlipStore application
  27. typedef enum
  28. {
  29. FlipStoreViewMain, // The main screen
  30. FlipStoreViewSubmenu, // The submenu
  31. FlipStoreViewAbout, // The about screen
  32. FlipStoreViewSettings, // The settings screen
  33. FlipStoreViewTextInputSSID, // The text input screen for SSID
  34. FlipStoreViewTextInputPass, // The text input screen for password
  35. //
  36. FlipStoreViewPopup, // The popup screen
  37. //
  38. FlipStoreViewAppList, // The app list screen
  39. FlipStoreViewAppInfo, // The app info screen (widget) of the selected app
  40. FlipStoreViewAppDownload, // The app download screen (widget) of the selected app
  41. FlipStoreViewAppDelete, // The app delete screen (DialogEx) of the selected app
  42. //
  43. } FlipStoreView;
  44. // Each screen will have its own view
  45. typedef struct
  46. {
  47. ViewDispatcher *view_dispatcher; // Switches between our views
  48. View *view_main; // The main screen for downloading apps
  49. View *view_app_info; // The app info screen (view) of the selected app
  50. Submenu *submenu; // The submenu (main)
  51. Submenu *submenu_app_list; // The submenu (app list)
  52. Widget *widget; // The widget
  53. Popup *popup; // The popup
  54. DialogEx *dialog_delete; // The dialog for deleting an app
  55. VariableItemList *variable_item_list; // The variable item list (settngs)
  56. VariableItem *variable_item_ssid; // The variable item
  57. VariableItem *variable_item_pass; // The variable item
  58. UART_TextInput *uart_text_input_ssid; // The text input
  59. UART_TextInput *uart_text_input_pass; // The text input
  60. char *uart_text_input_buffer_ssid; // Buffer for the text input
  61. char *uart_text_input_temp_buffer_ssid; // Temporary buffer for the text input
  62. uint32_t uart_text_input_buffer_size_ssid; // Size of the text input buffer
  63. char *uart_text_input_buffer_pass; // Buffer for the text input
  64. char *uart_text_input_temp_buffer_pass; // Temporary buffer for the text input
  65. uint32_t uart_text_input_buffer_size_pass; // Size of
  66. } FlipStoreApp;
  67. #endif // FLIP_STORE_E_H