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.view.IInputContext;
26 import com.android.internal.view.IInputMethodSession;
27 import com.android.internal.view.IInputSessionCallback;
28 
29 /**
30  * Top-level interface to an input method component (implemented in a
31  * Service).
32  * {@hide}
33  */
34 oneway interface IInputMethod {
attachToken(IBinder token)35     void attachToken(IBinder token);
36 
bindInput(in InputBinding binding)37     void bindInput(in InputBinding binding);
38 
unbindInput()39     void unbindInput();
40 
startInput(in IBinder startInputToken, in IInputContext inputContext, int missingMethods, in EditorInfo attribute, boolean restarting)41     void startInput(in IBinder startInputToken, in IInputContext inputContext, int missingMethods,
42             in EditorInfo attribute, boolean restarting);
43 
createSession(in InputChannel channel, IInputSessionCallback callback)44     void createSession(in InputChannel channel, IInputSessionCallback callback);
45 
setSessionEnabled(IInputMethodSession session, boolean enabled)46     void setSessionEnabled(IInputMethodSession session, boolean enabled);
47 
revokeSession(IInputMethodSession session)48     void revokeSession(IInputMethodSession session);
49 
showSoftInput(int flags, in ResultReceiver resultReceiver)50     void showSoftInput(int flags, in ResultReceiver resultReceiver);
51 
hideSoftInput(int flags, in ResultReceiver resultReceiver)52     void hideSoftInput(int flags, in ResultReceiver resultReceiver);
53 
changeInputMethodSubtype(in InputMethodSubtype subtype)54     void changeInputMethodSubtype(in InputMethodSubtype subtype);
55 }
56