1 /* 2 * Copyright (C) 2021 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 FM_IMMS_PROJECT_IINPUTMETHODSYSTEMABILITY_H 17 #define FM_IMMS_PROJECT_IINPUTMETHODSYSTEMABILITY_H 18 19 #include <vector> 20 #include <errors.h> 21 #include "iremote_broker.h" 22 #include "i_input_client.h" 23 #include "i_input_data_channel.h" 24 #include "input_attribute.h" 25 #include "input_method_property.h" 26 #include "keyboard_type.h" 27 #include "global.h" 28 #include "message_parcel.h" 29 #include "i_input_method_core.h" 30 31 namespace OHOS { 32 namespace MiscServices { 33 class IInputMethodSystemAbility : public IRemoteBroker { 34 public: 35 enum { 36 PREPARE_INPUT = 0, 37 RELEASE_INPUT, 38 START_INPUT, 39 STOP_INPUT, 40 HIDE_CURRENT_INPUT, 41 SET_INPUT_METHOD_CORE, 42 GET_DISPLAY_MODE, 43 GET_KEYBOARD_WINDOW_HEIGHT, 44 GET_CURRENT_KEYBOARD_TYPE, 45 LIST_INPUT_METHOD_ENABLED, 46 LIST_INPUT_METHOD, 47 LIST_KEYBOARD_TYPE, 48 SET_CORE_AND_AGENT, 49 DISPLAY_OPTIONAL_INPUT_METHOD, 50 }; 51 52 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.miscservices.inputmethod.IInputMethodSystemAbility"); 53 54 virtual void prepareInput(MessageParcel& data) = 0; 55 virtual void releaseInput(MessageParcel& data) = 0; 56 virtual void startInput(MessageParcel& data) = 0; 57 virtual void stopInput(MessageParcel& data) = 0; 58 virtual void SetCoreAndAgent(MessageParcel& data) = 0; 59 virtual void HideCurrentInput(MessageParcel& data) = 0; 60 61 virtual void displayOptionalInputMethod(MessageParcel& data) = 0; 62 virtual int32_t getDisplayMode(int32_t retMode) = 0; 63 virtual int32_t getKeyboardWindowHeight(int32_t retHeight) = 0; 64 virtual int32_t getCurrentKeyboardType(KeyboardType *retType) = 0; 65 virtual int32_t listInputMethodEnabled(std::vector<InputMethodProperty*> *properties) = 0; 66 virtual int32_t listInputMethod(std::vector<InputMethodProperty*> *properties) = 0; 67 virtual int32_t listKeyboardType(const std::u16string& imeId, std::vector<KeyboardType*> *types) = 0; 68 }; 69 } 70 } 71 #endif // FM_IMMS_PROJECT_IINPUTMETHODSYSTEMABILITY_H 72