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