• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_IMC_PROJECT_INPUTMETHODCOREPROXY_H
17 #define FM_IMC_PROJECT_INPUTMETHODCOREPROXY_H
18 
19 #include "iremote_proxy.h"
20 #include "iremote_object.h"
21 #include "message_parcel.h"
22 #include "message_option.h"
23 #include "i_input_method_core.h"
24 #include "i_input_control_channel.h"
25 #include "i_input_data_channel.h"
26 #include "input_attribute.h"
27 
28 namespace OHOS {
29 namespace MiscServices {
30     class InputMethodCoreProxy : public IRemoteProxy<IInputMethodCore> {
31     public:
32         explicit InputMethodCoreProxy(const sptr<IRemoteObject>& object);
33         ~InputMethodCoreProxy();
34 
35         DISALLOW_COPY_AND_MOVE(InputMethodCoreProxy);
36 
37         virtual int32_t initializeInput(sptr<IRemoteObject>& startInputToken, int32_t displayId,
38             sptr<IInputControlChannel>& inputControlChannel) override;
39         virtual bool startInput(const sptr<IInputDataChannel>& inputDataChannel,
40                                 const InputAttribute& editorAttribute,
41                                 bool supportPhysicalKbd) override;
42         virtual int32_t stopInput() override;
43         virtual bool showKeyboard(const sptr<IInputDataChannel>& inputDataChannel) override;
44         virtual bool hideKeyboard(int32_t flags) override;
45         virtual int32_t setKeyboardType(const KeyboardType& type) override;
46         virtual int32_t getKeyboardWindowHeight(int32_t retHeight) override;
47         virtual int32_t InitInputControlChannel(sptr<IInputControlChannel> &inputControlChannel) override;
48         virtual void SetClientState(bool state) override;
49         virtual void StopInputService(std::string imeId) override;
50     private:
51         static inline BrokerDelegator<InputMethodCoreProxy> delegator_;
52     };
53 }
54 }
55 #endif // FM_IMC_PROJECT_INPUTMETHODCOREPROXY_H