1 /* 2 * Copyright (c) 2025 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 #ifndef INPUT_METHOD_TOOLS_H 17 #define INPUT_METHOD_TOOLS_H 18 19 #include "input_method_utils.h" 20 #include "input_attribute.h" 21 #include "input_client_info.h" 22 23 namespace OHOS { 24 namespace MiscServices { 25 26 class InputMethodTools { 27 public: 28 static InputMethodTools &GetInstance(); 29 ~InputMethodTools() = default; 30 InputAttributeInner AttributeToInner(const InputAttribute &attribute); 31 InputAttribute InnerToAttribute(const InputAttributeInner &inner); 32 CursorInfoInner CursorInfoToInner(const CursorInfo &cursorInfo); 33 CursorInfo InnerToCursorInfo(const CursorInfoInner &inner); 34 RangeInner RangeToInner(const Range &range); 35 Range InnerToRange(const RangeInner &inner); 36 TextSelectionInner TextSelectionToInner(const TextSelection &textSelection); 37 TextSelection InnerToSelection(const TextSelectionInner &inner); 38 TextTotalConfigInner TextTotalConfigToInner(const TextTotalConfig &textTotalConfig); 39 TextTotalConfig InnerToTextTotalConfig(const TextTotalConfigInner &inner); 40 InputClientInfoInner InputClientInfoToInner(const InputClientInfo &inputClientInfo); 41 InputClientInfo InnerToInputClientInfo(const InputClientInfoInner &inner); 42 PanelStatusInfoInner PanelStatusInfoToInner(const PanelStatusInfo &panelStatusInfo); 43 PanelStatusInfo InnerToPanelStatusInfo(const PanelStatusInfoInner &inner); 44 private: 45 InputMethodTools() = default; 46 }; 47 48 49 } // namespace MiscServices 50 } // namespace OHOS 51 52 #endif // INPUT_METHOD_TOOLS_H