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