Debian Codegraph @

core/java/com/android/internal/view/IInputContext.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.Bundle;
20 import android.view.KeyEvent;
21 import android.view.inputmethod.CompletionInfo;
22 import android.view.inputmethod.CorrectionInfo;
23 import android.view.inputmethod.ExtractedTextRequest;
24 import android.view.inputmethod.InputContentInfo;
25 import android.view.inputmethod.TextAttribute;
26
27 import com.android.internal.infra.AndroidFuture;
28 import com.android.internal.inputmethod.InputConnectionCommandHeader;
29
30 /**
31 * Interface from an input method to the application, allowing it to perform
32 * edits on the current input field and other interactions with the application.
33 * {@hide}
34 */
35 oneway interface IInputContext {
36 void getTextBeforeCursor(in InputConnectionCommandHeader header, int length, int flags,
37 in AndroidFuture future /* T=CharSequence */);
38
39 void getTextAfterCursor(in InputConnectionCommandHeader header, int length, int flags,
40 in AndroidFuture future /* T=CharSequence */);
41
42 void getCursorCapsMode(in InputConnectionCommandHeader header, int reqModes,
43 in AndroidFuture future /* T=Integer */);
44
45 void getExtractedText(in InputConnectionCommandHeader header, in ExtractedTextRequest request,
46 int flags, in AndroidFuture future /* T=ExtractedText */);
47
48 void deleteSurroundingText(in InputConnectionCommandHeader header, int beforeLength,
49 int afterLength);
50 void deleteSurroundingTextInCodePoints(in InputConnectionCommandHeader header, int beforeLength,
51 int afterLength);
52
53 void setComposingText(in InputConnectionCommandHeader header, CharSequence text,
54 int newCursorPosition);
55
56 void setComposingTextWithTextAttribute(in InputConnectionCommandHeader header,
57 CharSequence text, int newCursorPosition, in TextAttribute textAttribute);
58
59 void finishComposingText(in InputConnectionCommandHeader header);
60
61 void commitText(in InputConnectionCommandHeader header, CharSequence text,
62 int newCursorPosition);
63
64 void commitTextWithTextAttribute(in InputConnectionCommandHeader header, CharSequence text,
65 int newCursorPosition, in TextAttribute textAttribute);
66
67 void commitCompletion(in InputConnectionCommandHeader header, in CompletionInfo completion);
68
69 void commitCorrection(in InputConnectionCommandHeader header, in CorrectionInfo correction);
70
71 void setSelection(in InputConnectionCommandHeader header, int start, int end);
72
73 void performEditorAction(in InputConnectionCommandHeader header, int actionCode);
74
75 void performContextMenuAction(in InputConnectionCommandHeader header, int id);
76
77 void beginBatchEdit(in InputConnectionCommandHeader header);
78
79 void endBatchEdit(in InputConnectionCommandHeader header);
80
81 void sendKeyEvent(in InputConnectionCommandHeader header, in KeyEvent event);
82
83 void clearMetaKeyStates(in InputConnectionCommandHeader header, int states);
84
85 void performSpellCheck(in InputConnectionCommandHeader header);
86
87 void performPrivateCommand(in InputConnectionCommandHeader header, String action,
88 in Bundle data);
89
90 void setComposingRegion(in InputConnectionCommandHeader header, int start, int end);
91
92 void setComposingRegionWithTextAttribute(in InputConnectionCommandHeader header, int start,
93 int end, in TextAttribute textAttribute);
94
95 void getSelectedText(in InputConnectionCommandHeader header, int flags,
96 in AndroidFuture future /* T=CharSequence */);
97
98 void requestCursorUpdates(in InputConnectionCommandHeader header, int cursorUpdateMode,
99 int imeDisplayId, in AndroidFuture future /* T=Boolean */);
100
101 void requestCursorUpdatesWithFilter(in InputConnectionCommandHeader header,
102 int cursorUpdateMode, int cursorUpdateFilter, int imeDisplayId,
103 in AndroidFuture future /* T=Boolean */);
104
105 void commitContent(in InputConnectionCommandHeader header, in InputContentInfo inputContentInfo,
106 int flags, in Bundle opts, in AndroidFuture future /* T=Boolean */);
107
108 void getSurroundingText(in InputConnectionCommandHeader header, int beforeLength,
109 int afterLength, int flags, in AndroidFuture future /* T=SurroundingText */);
110
111 void setImeConsumesInput(in InputConnectionCommandHeader header, boolean imeConsumesInput);
112 }