| 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.MotionEvent; |
| 23 |
import android.view.inputmethod.EditorInfo; |
| 24 |
import android.view.inputmethod.InputBinding; |
| 25 |
import android.view.inputmethod.InputMethodSubtype; |
| 26 |
import android.window.ImeOnBackInvokedDispatcher; |
| 27 |
import com.android.internal.inputmethod.IInputMethodPrivilegedOperations; |
| 28 |
import com.android.internal.view.IInlineSuggestionsRequestCallback; |
| 29 |
import com.android.internal.view.IInputContext; |
| 30 |
import com.android.internal.view.IInputMethodSession; |
| 31 |
import com.android.internal.view.IInputSessionCallback; |
| 32 |
import com.android.internal.view.InlineSuggestionsRequestInfo; |
| 33 |
|
| 34 |
/** |
| 35 |
* Top-level interface to an input method component (implemented in a |
| 36 |
* Service). |
| 37 |
* {@hide} |
| 38 |
*/ |
| 39 |
oneway interface IInputMethod { |
| 40 |
void initializeInternal(IBinder token, IInputMethodPrivilegedOperations privOps, |
| 41 |
int configChanges, boolean stylusHwSupported, int navigationBarFlags); |
| 42 |
|
| 43 |
void onCreateInlineSuggestionsRequest(in InlineSuggestionsRequestInfo requestInfo, |
| 44 |
in IInlineSuggestionsRequestCallback cb); |
| 45 |
|
| 46 |
void bindInput(in InputBinding binding); |
| 47 |
|
| 48 |
void unbindInput(); |
| 49 |
|
| 50 |
void startInput(in IBinder startInputToken, in IInputContext inputContext, |
| 51 |
in EditorInfo attribute, boolean restarting, int navigationBarFlags, |
| 52 |
in ImeOnBackInvokedDispatcher imeDispatcher); |
| 53 |
|
| 54 |
void onNavButtonFlagsChanged(int navButtonFlags); |
| 55 |
|
| 56 |
void createSession(in InputChannel channel, IInputSessionCallback callback); |
| 57 |
|
| 58 |
void setSessionEnabled(IInputMethodSession session, boolean enabled); |
| 59 |
|
| 60 |
void showSoftInput(in IBinder showInputToken, int flags, in ResultReceiver resultReceiver); |
| 61 |
|
| 62 |
void hideSoftInput(in IBinder hideInputToken, int flags, in ResultReceiver resultReceiver); |
| 63 |
|
| 64 |
void changeInputMethodSubtype(in InputMethodSubtype subtype); |
| 65 |
|
| 66 |
void canStartStylusHandwriting(int requestId); |
| 67 |
|
| 68 |
void startStylusHandwriting(int requestId, in InputChannel channel, |
| 69 |
in List<MotionEvent> events); |
| 70 |
|
| 71 |
void initInkWindow(); |
| 72 |
|
| 73 |
void finishStylusHandwriting(); |
| 74 |
} |