summaryrefslogtreecommitdiff
path: root/src/managers/input/InputMethodRelay.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-05-01 16:41:17 +0100
committerVaxry <vaxry@vaxry.net>2024-05-01 16:41:17 +0100
commit8bcccf9f0f0f69986e315d4288dfdbf119dd19db (patch)
treeeebb6714fc1e41a0df2784ed22752f0efe2bbdc1 /src/managers/input/InputMethodRelay.hpp
parent4ed6b69b68a544a81cec583a1ad8aff218f7db5d (diff)
ime-v2: move to new impl
Diffstat (limited to 'src/managers/input/InputMethodRelay.hpp')
-rw-r--r--src/managers/input/InputMethodRelay.hpp45
1 files changed, 20 insertions, 25 deletions
diff --git a/src/managers/input/InputMethodRelay.hpp b/src/managers/input/InputMethodRelay.hpp
index 1b2cb07a..2896e8e8 100644
--- a/src/managers/input/InputMethodRelay.hpp
+++ b/src/managers/input/InputMethodRelay.hpp
@@ -11,39 +11,36 @@
class CInputManager;
class CHyprRenderer;
struct STextInputV1;
+class CInputMethodV2;
class CInputMethodRelay {
public:
CInputMethodRelay();
- void onNewIME(wlr_input_method_v2*);
- void onNewTextInput(std::any tiv3);
- void onNewTextInput(STextInputV1* pTIV1);
+ void onNewIME(SP<CInputMethodV2>);
+ void onNewTextInput(std::any tiv3);
+ void onNewTextInput(STextInputV1* pTIV1);
- wlr_input_method_v2* m_pWLRIME = nullptr;
+ void activateIME(CTextInput* pInput);
+ void deactivateIME(CTextInput* pInput);
+ void commitIMEState(CTextInput* pInput);
+ void removeTextInput(CTextInput* pInput);
- void activateIME(CTextInput* pInput);
- void deactivateIME(CTextInput* pInput);
- void commitIMEState(CTextInput* pInput);
- void removeTextInput(CTextInput* pInput);
+ void onKeyboardFocus(wlr_surface*);
- void onKeyboardFocus(wlr_surface*);
+ CTextInput* getFocusedTextInput();
- CTextInput* getFocusedTextInput();
+ void setIMEPopupFocus(CInputPopup*, wlr_surface*);
+ void removePopup(CInputPopup*);
- SIMEKbGrab* getIMEKeyboardGrab(SKeyboard*);
+ CInputPopup* popupFromCoords(const Vector2D& point);
+ CInputPopup* popupFromSurface(const wlr_surface* surface);
- void setIMEPopupFocus(CInputPopup*, wlr_surface*);
- void removePopup(CInputPopup*);
+ void updateAllPopups();
- CInputPopup* popupFromCoords(const Vector2D& point);
- CInputPopup* popupFromSurface(const wlr_surface* surface);
-
- void updateAllPopups();
+ WP<CInputMethodV2> m_pIME;
private:
- std::unique_ptr<SIMEKbGrab> m_pKeyboardGrab;
-
std::vector<std::unique_ptr<CTextInput>> m_vTextInputs;
std::vector<std::unique_ptr<CInputPopup>> m_vIMEPopups;
@@ -51,14 +48,12 @@ class CInputMethodRelay {
struct {
CHyprSignalListener newTIV3;
+ CHyprSignalListener newIME;
+ CHyprSignalListener commitIME;
+ CHyprSignalListener destroyIME;
+ CHyprSignalListener newPopup;
} listeners;
- DYNLISTENER(textInputNew);
- DYNLISTENER(IMECommit);
- DYNLISTENER(IMEDestroy);
- DYNLISTENER(IMEGrab);
- DYNLISTENER(IMENewPopup);
-
friend class CHyprRenderer;
friend class CInputManager;
friend class CTextInputV1ProtocolManager;