xremote.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. #pragma once
  2. #include "scenes/xremote_scene.h"
  3. #include "views/xremote_infoscreen.h"
  4. #include "views/xremote_transmit.h"
  5. #include "views/xremote_pause_set.h"
  6. #include "helpers/xremote_storage.h"
  7. #include "models/infrared/xremote_ir_remote.h"
  8. #include "models/cross/xremote_cross_remote.h"
  9. #include "helpers/subghz/subghz_types.h"
  10. #include "helpers/subghz/subghz.h"
  11. #include "xremote_i.h"
  12. typedef struct SubGhz SubGhz;
  13. typedef struct {
  14. Gui* gui;
  15. DialogsApp* dialogs;
  16. FuriString* file_path;
  17. NotificationApp* notification;
  18. SubGhzNotificationState state_notifications;
  19. ViewDispatcher* view_dispatcher;
  20. Submenu* submenu;
  21. Submenu* editmenu;
  22. ButtonMenu* button_menu_create;
  23. ButtonMenu* button_menu_create_add;
  24. ButtonMenu* button_menu_ir;
  25. TextInput* text_input;
  26. Popup* popup;
  27. Loading* loading;
  28. ViewStack* view_stack;
  29. SceneManager* scene_manager;
  30. VariableItemList* variable_item_list;
  31. XRemoteInfoscreen* xremote_infoscreen;
  32. XRemoteTransmit* xremote_transmit;
  33. XRemotePauseSet* xremote_pause_set;
  34. InfraredRemote* ir_remote_buffer;
  35. InfraredWorker* ir_worker;
  36. SubGhzRemote* sg_remote_buffer;
  37. CrossRemote* cross_remote;
  38. uint32_t haptic;
  39. uint32_t speaker;
  40. uint32_t led;
  41. uint32_t save_settings;
  42. uint32_t edit_item;
  43. uint32_t ir_timing;
  44. char* ir_timing_char;
  45. bool transmitting;
  46. bool stop_transmit;
  47. char text_store[XREMOTE_TEXT_STORE_NUM][XREMOTE_TEXT_STORE_SIZE + 1];
  48. SubGhz* subghz;
  49. } XRemote;
  50. typedef enum {
  51. XRemoteViewIdInfoscreen,
  52. XRemoteViewIdMenu,
  53. XRemoteViewIdEditItem,
  54. XRemoteViewIdCreate,
  55. XRemoteViewIdCreateAdd,
  56. XRemoteViewIdSettings,
  57. XRemoteViewIdWip,
  58. XRemoteViewIdIrRemote,
  59. XRemoteViewIdStack,
  60. XRemoteViewIdTextInput,
  61. XRemoteViewIdTransmit,
  62. XRemoteViewIdPauseSet,
  63. } XRemoteViewId;
  64. typedef enum {
  65. XRemoteHapticOff,
  66. XRemoteHapticOn,
  67. } XRemoteHapticState;
  68. typedef enum {
  69. XRemoteSpeakerOff,
  70. XRemoteSpeakerOn,
  71. } XRemoteSpeakerState;
  72. typedef enum {
  73. XRemoteLedOff,
  74. XRemoteLedOn,
  75. } XRemoteLedState;
  76. typedef enum {
  77. XRemoteSettingsOff,
  78. XRemoteSettingsOn,
  79. } XRemoteSettingsStoreState;
  80. void xremote_popup_closed_callback(void* context);
  81. void xremote_text_input_callback(void* context);