Debian Codegraph @

core/java/com/android/internal/view/IInputMethodManager.aidl

raw
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.ResultReceiver;
20 import android.view.inputmethod.InputMethodInfo;
21 import android.view.inputmethod.InputMethodSubtype;
22 import android.view.inputmethod.EditorInfo;
23 import android.window.ImeOnBackInvokedDispatcher;
24
25 import com.android.internal.inputmethod.InputBindResult;
26 import com.android.internal.inputmethod.IRemoteAccessibilityInputConnection;
27 import com.android.internal.view.IInputContext;
28 import com.android.internal.view.IInputMethodClient;
29
30 /**
31 * Public interface to the global input method manager, used by all client
32 * applications.
33 */
34 interface IInputMethodManager {
35 void addClient(in IInputMethodClient client, in IInputContext inputContext,
36 int untrustedDisplayId);
37
38 // TODO: Use ParceledListSlice instead
39 List<InputMethodInfo> getInputMethodList(int userId);
40 List<InputMethodInfo> getAwareLockedInputMethodList(int userId, int directBootAwareness);
41 // TODO: Use ParceledListSlice instead
42 List<InputMethodInfo> getEnabledInputMethodList(int userId);
43 List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in String imiId,
44 boolean allowsImplicitlySelectedSubtypes);
45 InputMethodSubtype getLastInputMethodSubtype();
46
47 boolean showSoftInput(in IInputMethodClient client, IBinder windowToken, int flags,
48 in ResultReceiver resultReceiver, int reason);
49 boolean hideSoftInput(in IInputMethodClient client, IBinder windowToken, int flags,
50 in ResultReceiver resultReceiver, int reason);
51 // If windowToken is null, this just does startInput(). Otherwise this reports that a window
52 // has gained focus, and if 'attribute' is non-null then also does startInput.
53 // @NonNull
54 InputBindResult startInputOrWindowGainedFocus(
55 /* @StartInputReason */ int startInputReason,
56 in IInputMethodClient client, in IBinder windowToken,
57 /* @StartInputFlags */ int startInputFlags,
58 /* @android.view.WindowManager.LayoutParams.SoftInputModeFlags */ int softInputMode,
59 int windowFlags, in EditorInfo attribute, in IInputContext inputContext,
60 in IRemoteAccessibilityInputConnection remoteAccessibilityInputConnection,
61 int unverifiedTargetSdkVersion, in ImeOnBackInvokedDispatcher imeDispatcher);
62
63 void showInputMethodPickerFromClient(in IInputMethodClient client,
64 int auxiliarySubtypeMode);
65 void showInputMethodPickerFromSystem(in IInputMethodClient client,
66 int auxiliarySubtypeMode, int displayId);
67 void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
68 boolean isInputMethodPickerShownForTest();
69 InputMethodSubtype getCurrentInputMethodSubtype();
70 void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes);
71 // This is kept due to @UnsupportedAppUsage.
72 // TODO(Bug 113914148): Consider removing this.
73 int getInputMethodWindowVisibleHeight(in IInputMethodClient client);
74
75 oneway void reportVirtualDisplayGeometryAsync(in IInputMethodClient parentClient,
76 int childDisplayId, in float[] matrixValues);
77
78 oneway void reportPerceptibleAsync(in IBinder windowToken, boolean perceptible);
79 /** Remove the IME surface. Requires INTERNAL_SYSTEM_WINDOW permission. */
80 void removeImeSurface();
81 /** Remove the IME surface. Requires passing the currently focused window. */
82 oneway void removeImeSurfaceFromWindowAsync(in IBinder windowToken);
83 void startProtoDump(in byte[] protoDump, int source, String where);
84 boolean isImeTraceEnabled();
85
86 // Starts an ime trace.
87 void startImeTrace();
88 // Stops an ime trace.
89 void stopImeTrace();
90
91 /** Start Stylus handwriting session **/
92 void startStylusHandwriting(in IInputMethodClient client);
93 }