1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #include "core/common/ime/input_method_manager.h" 17 18 namespace OHOS::Ace { 19 std::unique_ptr<InputMethodManager> InputMethodManager::instance_ = nullptr; 20 std::mutex InputMethodManager::mtx_; 21 GetInstance()22InputMethodManager* InputMethodManager::GetInstance() 23 { 24 if (instance_ == nullptr) { 25 std::lock_guard<std::mutex> lock(mtx_); 26 if (instance_ == nullptr) { 27 instance_.reset(new InputMethodManager); 28 } 29 } 30 return instance_.get(); 31 } 32 OnFocusNodeChange(const RefPtr<NG::FrameNode> & curFocusNode,FocusReason focusReason)33void InputMethodManager::OnFocusNodeChange(const RefPtr<NG::FrameNode>& curFocusNode, FocusReason focusReason) {} 34 ProcessKeyboardInWindowScene(const RefPtr<NG::FrameNode> & curFocusNode)35void InputMethodManager::ProcessKeyboardInWindowScene(const RefPtr<NG::FrameNode>& curFocusNode) {} 36 ProcessKeyboard(const RefPtr<NG::FrameNode> & curFocusNode)37void InputMethodManager::ProcessKeyboard(const RefPtr<NG::FrameNode>& curFocusNode) {} 38 SetWindowFocus(bool windowFocus)39void InputMethodManager::SetWindowFocus(bool windowFocus) {} 40 NeedSoftKeyboard() const41bool InputMethodManager::NeedSoftKeyboard() const 42 { 43 return false; 44 } 45 CloseKeyboard()46void InputMethodManager::CloseKeyboard() {} 47 CloseKeyboardInProcess()48void InputMethodManager::CloseKeyboardInProcess() {} 49 CloseKeyboardInPipelineDestroy()50void InputMethodManager::CloseKeyboardInPipelineDestroy() {} 51 CloseKeyboard(const RefPtr<NG::FrameNode> & focusNode)52void InputMethodManager::CloseKeyboard(const RefPtr<NG::FrameNode>& focusNode) {} 53 HideKeyboardAcrossProcesses()54void InputMethodManager::HideKeyboardAcrossProcesses() {} 55 ProcessModalPageScene()56void InputMethodManager::ProcessModalPageScene() {} 57 } // namespace OHOS::Ace