#pragma once #include #include "../../defines.hpp" #include "../../helpers/WLClasses.hpp" #include "../../helpers/signal/Signal.hpp" #include "TextInput.hpp" #include "InputMethodPopup.hpp" #include class CInputManager; class CHyprRenderer; class CTextInputV1; class CInputMethodV2; class CInputMethodRelay { public: CInputMethodRelay(); void onNewIME(SP); void onNewTextInput(WP tiv3); void onNewTextInput(WP pTIV1); void activateIME(CTextInput* pInput, bool shouldCommit = true); void deactivateIME(CTextInput* pInput, bool shouldCommit = true); void commitIMEState(CTextInput* pInput); void removeTextInput(CTextInput* pInput); void onKeyboardFocus(SP); CTextInput* getFocusedTextInput(); void removePopup(CInputPopup*); CInputPopup* popupFromCoords(const Vector2D& point); CInputPopup* popupFromSurface(const SP surface); void updateAllPopups(); WP m_pIME; private: std::vector> m_vTextInputs; std::vector> m_vIMEPopups; WP m_pLastKbFocus; struct { CHyprSignalListener newTIV3; CHyprSignalListener newTIV1; CHyprSignalListener newIME; CHyprSignalListener commitIME; CHyprSignalListener destroyIME; CHyprSignalListener newPopup; } listeners; friend class CHyprRenderer; friend class CInputManager; friend class CTextInputV1ProtocolManager; friend class CTextInput; friend class CHyprRenderer; };