• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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()22 InputMethodManager* 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)33 void InputMethodManager::OnFocusNodeChange(const RefPtr<NG::FrameNode>& curFocusNode, FocusReason focusReason)
34 {
35     isLastFocusUIExtension_ = false;
36 }
37 
ManageFocusNode(const RefPtr<NG::FrameNode> & curFocusNode,FocusReason focusReason,bool saveKeyboard)38 void InputMethodManager::ManageFocusNode(const RefPtr<NG::FrameNode>& curFocusNode, FocusReason focusReason,
39     bool saveKeyboard) {}
40 
ProcessKeyboardInWindowScene(const RefPtr<NG::FrameNode> & curFocusNode)41 void InputMethodManager::ProcessKeyboardInWindowScene(const RefPtr<NG::FrameNode>& curFocusNode) {}
42 
ProcessKeyboard(const RefPtr<NG::FrameNode> & curFocusNode)43 void InputMethodManager::ProcessKeyboard(const RefPtr<NG::FrameNode>& curFocusNode) {}
44 
SetWindowFocus(bool windowFocus)45 void InputMethodManager::SetWindowFocus(bool windowFocus) {}
46 
NeedSoftKeyboard() const47 bool InputMethodManager::NeedSoftKeyboard() const
48 {
49     return false;
50 }
51 
CloseKeyboard(bool disableNeedToRequestKeyboard)52 void InputMethodManager::CloseKeyboard(bool disableNeedToRequestKeyboard) {}
53 
CloseKeyboardInProcess()54 void InputMethodManager::CloseKeyboardInProcess() {}
55 
CloseKeyboardInPipelineDestroy()56 void InputMethodManager::CloseKeyboardInPipelineDestroy() {}
57 
CloseKeyboard(const RefPtr<NG::FrameNode> & focusNode)58 void InputMethodManager::CloseKeyboard(const RefPtr<NG::FrameNode>& focusNode) {}
59 
HideKeyboardAcrossProcesses()60 void InputMethodManager::HideKeyboardAcrossProcesses() {}
61 
ProcessModalPageScene()62 void InputMethodManager::ProcessModalPageScene() {}
63 } // namespace OHOS::Ace