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