IInputMethod.aidl revision 4df2423a947bcd3f024cc3d3a1a315a8dc428598
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
17package com.android.internal.view;
18
19import android.graphics.Rect;
20import android.os.IBinder;
21import android.os.ResultReceiver;
22import android.view.KeyEvent;
23import android.view.MotionEvent;
24import android.view.inputmethod.EditorInfo;
25import android.view.inputmethod.InputBinding;
26import com.android.internal.view.IInputContext;
27import com.android.internal.view.IInputMethodCallback;
28import com.android.internal.view.IInputMethodSession;
29
30/**
31 * Top-level interface to an input method component (implemented in a
32 * Service).
33 * {@hide}
34 */
35oneway interface IInputMethod {
36    void attachToken(IBinder token);
37
38    void bindInput(in InputBinding binding);
39
40    void unbindInput();
41
42    void startInput(in IInputContext inputContext, in EditorInfo attribute);
43
44    void restartInput(in IInputContext inputContext, in EditorInfo attribute);
45
46    void createSession(IInputMethodCallback callback);
47
48    void setSessionEnabled(IInputMethodSession session, boolean enabled);
49
50    void revokeSession(IInputMethodSession session);
51
52    void showSoftInput(int flags, in ResultReceiver resultReceiver);
53
54    void hideSoftInput(int flags, in ResultReceiver resultReceiver);
55}
56