flip_world.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <font/font.h>
  3. #include <flipper_http/flipper_http.h>
  4. #include <easy_flipper/easy_flipper.h>
  5. #include <furi.h>
  6. #include <furi_hal.h>
  7. #include <gui/gui.h>
  8. #include <gui/view.h>
  9. #include <gui/modules/submenu.h>
  10. #include <gui/view_dispatcher.h>
  11. #include <notification/notification.h>
  12. #include <dialogs/dialogs.h>
  13. #define TAG "FlipWorld"
  14. #define VERSION_TAG "FlipWorld v0.1"
  15. // Define the submenu items for our FlipWorld application
  16. typedef enum
  17. {
  18. FlipWorldSubmenuIndexRun, // Click to run the FlipWorld application
  19. FlipWorldSubmenuIndexAbout,
  20. FlipWorldSubmenuIndexSettings,
  21. } FlipWorldSubmenuIndex;
  22. // Define a single view for our FlipWorld application
  23. typedef enum
  24. {
  25. FlipWorldViewMain, // The main screen
  26. FlipWorldViewSubmenu, // The submenu
  27. FlipWorldViewAbout, // The about screen
  28. FlipWorldViewSettings, // The settings screen
  29. FlipWorldViewTextInput, // The text input screen
  30. FlipWorldlViewDialog, // The dialog screen
  31. } FlipWorldView;
  32. // Each screen will have its own view
  33. typedef struct
  34. {
  35. // necessary
  36. ViewDispatcher *view_dispatcher; // Switches between our views
  37. View *view_main; // The game screen
  38. View *view_about; // The about screen
  39. Submenu *submenu; // The submenu
  40. VariableItemList *variable_item_list; // The variable item list (settngs)
  41. VariableItem *variable_item_ssid; // The variable item
  42. VariableItem *variable_item_pass; // The variable item
  43. UART_TextInput *text_input; // The text input
  44. char *text_input_buffer; // Buffer for the text input
  45. char *text_input_temp_buffer; // Temporary buffer for the text input
  46. uint32_t text_input_buffer_size; // Size of the text input buffer
  47. } FlipWorldApp;