From 1c4d0e8c18ca0e269dd2019d50a2f1bb7deffd82 Mon Sep 17 00:00:00 2001 From: vaxerski <43317083+vaxerski@users.noreply.github.com> Date: Fri, 5 Aug 2022 13:03:37 +0200 Subject: added IME protocol support --- src/managers/input/InputMethodRelay.hpp | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 src/managers/input/InputMethodRelay.hpp (limited to 'src/managers/input/InputMethodRelay.hpp') diff --git a/src/managers/input/InputMethodRelay.hpp b/src/managers/input/InputMethodRelay.hpp new file mode 100644 index 00000000..4a9ea7b1 --- /dev/null +++ b/src/managers/input/InputMethodRelay.hpp @@ -0,0 +1,32 @@ +#pragma once + +#include "../../defines.hpp" +#include "../../helpers/WLClasses.hpp" + +class CInputMethodRelay { +public: + CInputMethodRelay(); + + void onNewIME(wlr_input_method_v2*); + void onNewTextInput(wlr_text_input_v3*); + + wlr_input_method_v2* m_pWLRIME = nullptr; + + void commitIMEState(wlr_text_input_v3*); + void removeTextInput(wlr_text_input_v3*); + + void onKeyboardFocus(wlr_surface*); + + STextInput* getFocusedTextInput(); + STextInput* getFocusableTextInput(); + +private: + + std::list m_lTextInputs; + + DYNLISTENER(textInputNew); + DYNLISTENER(IMECommit); + DYNLISTENER(IMEDestroy); + + void createNewTextInput(wlr_text_input_v3*); +}; \ No newline at end of file -- cgit v1.2.3