app_i.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /**
  2. * @file app_i.h
  3. * @brief Main application header file.
  4. *
  5. * Contains defines, structure definitions and function prototypes
  6. * used throughout the whole application.
  7. */
  8. #pragma once
  9. #include <gui/scene_manager.h>
  10. #include <gui/view_dispatcher.h>
  11. #include <gui/modules/widget.h>
  12. #include <gui/modules/submenu.h>
  13. #include <storage/storage.h>
  14. #include <notification/notification.h>
  15. #include "scenes/scene.h"
  16. #include "views/progress.h"
  17. #include "flasher/flasher.h"
  18. #define VGM_TOOL_TAG "VgmTool"
  19. // This can be set by the build system to avoid manual code editing
  20. #ifndef VGM_FW_VERSION
  21. #define VGM_FW_VERSION "0.1.0"
  22. #endif
  23. #define VGM_FW_FILE_EXTENSION ".uf2"
  24. #define VGM_FW_FILE_NAME "vgm-fw-" VGM_FW_VERSION VGM_FW_FILE_EXTENSION
  25. #define VGM_DEFAULT_FW_FILE APP_ASSETS_PATH(VGM_FW_FILE_NAME)
  26. #define VGM_FW_DEFAULT_PATH EXT_PATH("")
  27. typedef struct {
  28. SceneManager* scene_manager;
  29. ViewDispatcher* view_dispatcher;
  30. Widget* widget;
  31. Submenu* submenu;
  32. Progress* progress;
  33. NotificationApp* notification;
  34. FuriString* file_path;
  35. FlasherError flasher_error;
  36. } App;
  37. typedef enum {
  38. ViewIdWidget,
  39. ViewIdSubmenu,
  40. ViewIdProgress,
  41. ViewIdMax,
  42. } ViewId;
  43. void submenu_item_common_callback(void* context, uint32_t index);