1 /*
2  * Copyright (C) 2008 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.internal.view;
18 
19 import android.os.IBinder;
20 import android.os.ResultReceiver;
21 import android.view.InputChannel;
22 import android.view.inputmethod.EditorInfo;
23 import android.view.inputmethod.InputBinding;
24 import android.view.inputmethod.InputMethodSubtype;
25 import com.android.internal.inputmethod.IInputMethodPrivilegedOperations;
26 import com.android.internal.view.IInputContext;
27 import com.android.internal.view.IInputMethodSession;
28 import com.android.internal.view.IInputSessionCallback;
29 
30 /**
31  * Top-level interface to an input method component (implemented in a
32  * Service).
33  * {@hide}
34  */
35 oneway interface IInputMethod {
initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps)36     void initializeInternal(IBinder token, int displayId, IInputMethodPrivilegedOperations privOps);
37 
bindInput(in InputBinding binding)38     void bindInput(in InputBinding binding);
39 
unbindInput()40     void unbindInput();
41 
startInput(in IBinder startInputToken, in IInputContext inputContext, int missingMethods, in EditorInfo attribute, boolean restarting, boolean preRenderImeViews)42     void startInput(in IBinder startInputToken, in IInputContext inputContext, int missingMethods,
43             in EditorInfo attribute, boolean restarting, boolean preRenderImeViews);
44 
createSession(in InputChannel channel, IInputSessionCallback callback)45     void createSession(in InputChannel channel, IInputSessionCallback callback);
46 
setSessionEnabled(IInputMethodSession session, boolean enabled)47     void setSessionEnabled(IInputMethodSession session, boolean enabled);
48 
revokeSession(IInputMethodSession session)49     void revokeSession(IInputMethodSession session);
50 
showSoftInput(int flags, in ResultReceiver resultReceiver)51     void showSoftInput(int flags, in ResultReceiver resultReceiver);
52 
hideSoftInput(int flags, in ResultReceiver resultReceiver)53     void hideSoftInput(int flags, in ResultReceiver resultReceiver);
54 
changeInputMethodSubtype(in InputMethodSubtype subtype)55     void changeInputMethodSubtype(in InputMethodSubtype subtype);
56 }
57