The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 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 | |
| 17 | package com.android.internal.view; |
| 18 | |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 19 | import android.os.ResultReceiver; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 20 | import android.view.inputmethod.InputMethodInfo; |
satok | 04d5020 | 2010-10-25 22:20:12 +0900 | [diff] [blame] | 21 | import android.view.inputmethod.InputMethodSubtype; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 22 | import android.view.inputmethod.EditorInfo; |
| 23 | import com.android.internal.view.InputBindResult; |
| 24 | import com.android.internal.view.IInputContext; |
| 25 | import com.android.internal.view.IInputMethodClient; |
| 26 | |
| 27 | /** |
| 28 | * Public interface to the global input method manager, used by all client |
| 29 | * applications. |
| 30 | */ |
| 31 | interface IInputMethodManager { |
| 32 | List<InputMethodInfo> getInputMethodList(); |
| 33 | List<InputMethodInfo> getEnabledInputMethodList(); |
satok | 16331c8 | 2010-12-20 23:48:46 +0900 | [diff] [blame] | 34 | List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in InputMethodInfo imi, |
| 35 | boolean allowsImplicitlySelectedSubtypes); |
satok | 4e4569d | 2010-11-19 18:45:53 +0900 | [diff] [blame] | 36 | // TODO: We should change the return type from List to List<Parcelable> |
| 37 | // Currently there is a bug that aidl doesn't accept List<Parcelable> |
| 38 | List getShortcutInputMethodsAndSubtypes(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 39 | void addClient(in IInputMethodClient client, |
| 40 | in IInputContext inputContext, int uid, int pid); |
| 41 | void removeClient(in IInputMethodClient client); |
| 42 | |
| 43 | InputBindResult startInput(in IInputMethodClient client, |
| 44 | IInputContext inputContext, in EditorInfo attribute, |
| 45 | boolean initial, boolean needResult); |
| 46 | void finishInput(in IInputMethodClient client); |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 47 | boolean showSoftInput(in IInputMethodClient client, int flags, |
| 48 | in ResultReceiver resultReceiver); |
| 49 | boolean hideSoftInput(in IInputMethodClient client, int flags, |
| 50 | in ResultReceiver resultReceiver); |
The Android Open Source Project | b2a3dd8 | 2009-03-09 11:52:12 -0700 | [diff] [blame] | 51 | void windowGainedFocus(in IInputMethodClient client, in IBinder windowToken, |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 52 | boolean viewHasFocus, boolean isTextEditor, |
| 53 | int softInputMode, boolean first, int windowFlags); |
| 54 | |
| 55 | void showInputMethodPickerFromClient(in IInputMethodClient client); |
satok | 47a4491 | 2010-10-06 16:03:58 +0900 | [diff] [blame] | 56 | void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 57 | void setInputMethod(in IBinder token, String id); |
satok | 2820351 | 2010-11-24 11:06:49 +0900 | [diff] [blame] | 58 | void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 59 | void hideMySoftInput(in IBinder token, int flags); |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 60 | void showMySoftInput(in IBinder token, int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 61 | void updateStatusIcon(in IBinder token, String packageName, int iconId); |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 62 | void setImeWindowStatus(in IBinder token, int vis, int backDisposition); |
satok | 04d5020 | 2010-10-25 22:20:12 +0900 | [diff] [blame] | 63 | InputMethodSubtype getCurrentInputMethodSubtype(); |
satok | b66d287 | 2010-11-10 01:04:04 +0900 | [diff] [blame] | 64 | boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); |
satok | 735cf38 | 2010-11-11 20:40:09 +0900 | [diff] [blame] | 65 | boolean switchToLastInputMethod(in IBinder token); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 66 | boolean setInputMethodEnabled(String id, boolean enabled); |
| 67 | } |