blob: 4ffa4e1dfbeca8142e8bdd9d002a106d939352df [file] [log] [blame]
The Android Open Source Project9066cfe2009-03-03 19:31:44 -08001/*
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
The Android Open Source Project4df24232009-03-05 14:34:35 -080019import android.os.ResultReceiver;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080020import android.view.inputmethod.InputMethodInfo;
satok04d50202010-10-25 22:20:12 +090021import android.view.inputmethod.InputMethodSubtype;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080022import 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();
satok16331c82010-12-20 23:48:46 +090034 List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in InputMethodInfo imi,
35 boolean allowsImplicitlySelectedSubtypes);
satok68f1b782011-04-11 14:26:04 +090036 InputMethodSubtype getLastInputMethodSubtype();
satok4e4569d2010-11-19 18:45:53 +090037 // TODO: We should change the return type from List to List<Parcelable>
38 // Currently there is a bug that aidl doesn't accept List<Parcelable>
39 List getShortcutInputMethodsAndSubtypes();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080040 void addClient(in IInputMethodClient client,
41 in IInputContext inputContext, int uid, int pid);
42 void removeClient(in IInputMethodClient client);
43
44 InputBindResult startInput(in IInputMethodClient client,
45 IInputContext inputContext, in EditorInfo attribute,
46 boolean initial, boolean needResult);
47 void finishInput(in IInputMethodClient client);
The Android Open Source Project4df24232009-03-05 14:34:35 -080048 boolean showSoftInput(in IInputMethodClient client, int flags,
49 in ResultReceiver resultReceiver);
50 boolean hideSoftInput(in IInputMethodClient client, int flags,
51 in ResultReceiver resultReceiver);
The Android Open Source Projectb2a3dd82009-03-09 11:52:12 -070052 void windowGainedFocus(in IInputMethodClient client, in IBinder windowToken,
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080053 boolean viewHasFocus, boolean isTextEditor,
54 int softInputMode, boolean first, int windowFlags);
55
56 void showInputMethodPickerFromClient(in IInputMethodClient client);
satok47a44912010-10-06 16:03:58 +090057 void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080058 void setInputMethod(in IBinder token, String id);
satok28203512010-11-24 11:06:49 +090059 void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080060 void hideMySoftInput(in IBinder token, int flags);
The Android Open Source Project4df24232009-03-05 14:34:35 -080061 void showMySoftInput(in IBinder token, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062 void updateStatusIcon(in IBinder token, String packageName, int iconId);
Joe Onorato857fd9b2011-01-27 15:08:35 -080063 void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
satok04d50202010-10-25 22:20:12 +090064 InputMethodSubtype getCurrentInputMethodSubtype();
satokb66d2872010-11-10 01:04:04 +090065 boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype);
satok735cf382010-11-11 20:40:09 +090066 boolean switchToLastInputMethod(in IBinder token);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080067 boolean setInputMethodEnabled(String id, boolean enabled);
68}