IInputMethodManager.aidl revision 440aab54cab106030f1edafea4dec1f9d8624f9b
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.ResultReceiver;
20import android.view.inputmethod.InputMethodInfo;
21import android.view.inputmethod.InputMethodSubtype;
22import android.view.inputmethod.EditorInfo;
23import com.android.internal.view.InputBindResult;
24import com.android.internal.view.IInputContext;
25import com.android.internal.view.IInputMethodClient;
26
27/**
28 * Public interface to the global input method manager, used by all client
29 * applications.
30 */
31interface IInputMethodManager {
32    List<InputMethodInfo> getInputMethodList();
33    List<InputMethodInfo> getEnabledInputMethodList();
34    List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in InputMethodInfo imi);
35    // TODO: We should change the return type from List to List<Parcelable>
36    // Currently there is a bug that aidl doesn't accept List<Parcelable>
37    List getShortcutInputMethodsAndSubtypes();
38    void addClient(in IInputMethodClient client,
39            in IInputContext inputContext, int uid, int pid);
40    void removeClient(in IInputMethodClient client);
41
42    InputBindResult startInput(in IInputMethodClient client,
43            IInputContext inputContext, in EditorInfo attribute,
44            boolean initial, boolean needResult);
45    void finishInput(in IInputMethodClient client);
46    boolean showSoftInput(in IInputMethodClient client, int flags,
47            in ResultReceiver resultReceiver);
48    boolean hideSoftInput(in IInputMethodClient client, int flags,
49            in ResultReceiver resultReceiver);
50    void windowGainedFocus(in IInputMethodClient client, in IBinder windowToken,
51            boolean viewHasFocus, boolean isTextEditor,
52            int softInputMode, boolean first, int windowFlags);
53
54    void showInputMethodPickerFromClient(in IInputMethodClient client);
55    void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
56    void setInputMethod(in IBinder token, String id);
57    void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype);
58    void hideMySoftInput(in IBinder token, int flags);
59    void showMySoftInput(in IBinder token, int flags);
60    void updateStatusIcon(in IBinder token, String packageName, int iconId);
61    void setIMEButtonVisible(in IBinder token, boolean visible);
62    InputMethodSubtype getCurrentInputMethodSubtype();
63    boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype);
64    boolean switchToLastInputMethod(in IBinder token);
65    boolean setInputMethodEnabled(String id, boolean enabled);
66}
67