#pragma once #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "views/hid_keynote.h" #include "views/hid_keyboard.h" #include "views/hid_numpad.h" #include "views/hid_media.h" #include "views/hid_music_macos.h" #include "views/hid_movie.h" #include "views/hid_mouse.h" #include "views/hid_mouse_clicker.h" #include "views/hid_mouse_jiggler.h" #include "views/hid_tikshorts.h" #include "views/hid_ptt.h" #include "views/hid_ptt_menu.h" #define HID_BT_KEYS_STORAGE_NAME ".bt_hid.keys" typedef enum { HidTransportUsb, HidTransportBle, } HidTransport; typedef struct Hid Hid; struct Hid { Bt* bt; Gui* gui; NotificationApp* notifications; ViewDispatcher* view_dispatcher; Submenu* device_type_submenu; DialogEx* dialog; HidKeynote* hid_keynote; HidKeyboard* hid_keyboard; HidNumpad* hid_numpad; HidMedia* hid_media; HidMusicMacos* hid_music_macos; HidMovie* hid_movie; HidMouse* hid_mouse; HidMouseClicker* hid_mouse_clicker; HidMouseJiggler* hid_mouse_jiggler; HidTikShorts* hid_tikshorts; HidPushToTalk* hid_ptt; HidPushToTalkMenu* hid_ptt_menu; HidTransport transport; uint32_t view_id; }; void hid_hal_keyboard_press(Hid* instance, uint16_t event); void hid_hal_keyboard_release(Hid* instance, uint16_t event); void hid_hal_keyboard_release_all(Hid* instance); void hid_hal_consumer_key_press(Hid* instance, uint16_t event); void hid_hal_consumer_key_release(Hid* instance, uint16_t event); void hid_hal_consumer_key_release_all(Hid* instance); void hid_hal_mouse_move(Hid* instance, int8_t dx, int8_t dy); void hid_hal_mouse_scroll(Hid* instance, int8_t delta); void hid_hal_mouse_press(Hid* instance, uint16_t event); void hid_hal_mouse_release(Hid* instance, uint16_t event); void hid_hal_mouse_release_all(Hid* instance);