xremote.h 2.4 KB

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