1 /* 2 * Copyright (C) 2022 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 <mutex> 17 #include <thread> 18 #include <vector> 19 20 #ifndef INPUTMETHOD_IMF_INPUT_METHOD_PROPERTY_H 21 #define INPUTMETHOD_IMF_INPUT_METHOD_PROPERTY_H 22 23 namespace OHOS { 24 namespace MiscServices { 25 struct Property { 26 std::string name; // the bundleName of inputMethod 27 std::string id; // the extensionName of inputMethod 28 std::string label; // the label of inputMethod 29 uint32_t labelId = 0; // the labelId of inputMethod 30 std::string icon; // the icon of inputMethod 31 uint32_t iconId = 0; // the icon id of inputMethod 32 }; 33 34 struct SubProperty { 35 std::string label; // the label of subtype 36 uint32_t labelId = 0; // the labelId of subtype 37 std::string name; // the bundleName of inputMethod 38 std::string id; // the name of subtype 39 std::string mode; // the mode of subtype, containing "upper" and "lower" 40 std::string locale; // the tongues of subtype, such as "zh_CN", "en_US", etc. 41 std::string language; // the language of subtype 42 std::string icon; // the icon of subtype 43 uint32_t iconId = 0; // the icon id of subtype 44 }; 45 46 struct FullImeInfo { 47 bool isNewIme{ false }; 48 uint32_t tokenId{ 0 }; 49 std::string appId; 50 uint32_t versionCode; 51 Property prop; 52 std::vector<SubProperty> subProps; 53 }; 54 55 struct ImeInfo : public FullImeInfo { 56 SubProperty subProp; 57 bool isSpecificSubName{ true }; 58 }; 59 } // namespace MiscServices 60 } // namespace OHOS 61 62 #endif // INPUTMETHOD_IMF_INPUT_METHOD_PROPERTY_H 63