main_view.h 884 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #include <furi.h>
  2. #include <furi_hal.h>
  3. #include <gui/gui.h>
  4. #include <i2ctools_icons.h>
  5. #define APP_NAME "I2C Tools"
  6. #include <assets_icons.h>
  7. #define SCAN_MENU_TEXT "Scan"
  8. #define SCAN_MENU_X 90
  9. #define SCAN_MENU_Y 7
  10. #define SNIFF_MENU_TEXT "Sniff"
  11. #define SNIFF_MENU_X 90
  12. #define SNIFF_MENU_Y 21
  13. #define SEND_MENU_TEXT "Send"
  14. #define SEND_MENU_X 90
  15. #define SEND_MENU_Y 35
  16. #define INFOS_MENU_TEXT "Infos"
  17. #define INFOS_MENU_X 90
  18. #define INFOS_MENU_Y 49
  19. // Menu
  20. typedef enum {
  21. MAIN_VIEW,
  22. SCAN_VIEW,
  23. SNIFF_VIEW,
  24. SEND_VIEW,
  25. INFOS_VIEW,
  26. /* Know menu Size*/
  27. MENU_SIZE
  28. } i2cToolsViews;
  29. typedef struct {
  30. i2cToolsViews current_view;
  31. i2cToolsViews menu_index;
  32. } i2cMainView;
  33. void draw_main_view(Canvas* canvas, i2cMainView* main_view);
  34. i2cMainView* i2c_main_view_alloc();
  35. void i2c_main_view_free(i2cMainView* main_view);