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; |
satok | f9f0100 | 2011-05-19 21:31:50 +0900 | [diff] [blame] | 20 | import android.text.style.SuggestionSpan; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 21 | import android.view.inputmethod.InputMethodInfo; |
satok | 04d5020 | 2010-10-25 22:20:12 +0900 | [diff] [blame] | 22 | import android.view.inputmethod.InputMethodSubtype; |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 23 | import android.view.inputmethod.EditorInfo; |
| 24 | import com.android.internal.view.InputBindResult; |
| 25 | import com.android.internal.view.IInputContext; |
| 26 | import com.android.internal.view.IInputMethodClient; |
| 27 | |
| 28 | /** |
| 29 | * Public interface to the global input method manager, used by all client |
| 30 | * applications. |
Satoshi Kataoka | b3c21ac | 2013-08-07 15:43:29 +0900 | [diff] [blame] | 31 | * You need to update BridgeIInputMethodManager.java as well when changing |
| 32 | * this file. |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 33 | */ |
| 34 | interface IInputMethodManager { |
| 35 | List<InputMethodInfo> getInputMethodList(); |
| 36 | List<InputMethodInfo> getEnabledInputMethodList(); |
Satoshi Kataoka | b3c21ac | 2013-08-07 15:43:29 +0900 | [diff] [blame] | 37 | List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in String imiId, |
satok | 16331c8 | 2010-12-20 23:48:46 +0900 | [diff] [blame] | 38 | boolean allowsImplicitlySelectedSubtypes); |
satok | 68f1b78 | 2011-04-11 14:26:04 +0900 | [diff] [blame] | 39 | InputMethodSubtype getLastInputMethodSubtype(); |
satok | 4e4569d | 2010-11-19 18:45:53 +0900 | [diff] [blame] | 40 | // TODO: We should change the return type from List to List<Parcelable> |
| 41 | // Currently there is a bug that aidl doesn't accept List<Parcelable> |
| 42 | List getShortcutInputMethodsAndSubtypes(); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 43 | void addClient(in IInputMethodClient client, |
| 44 | in IInputContext inputContext, int uid, int pid); |
| 45 | void removeClient(in IInputMethodClient client); |
| 46 | |
| 47 | InputBindResult startInput(in IInputMethodClient client, |
Dianne Hackborn | 7663d80 | 2012-02-24 13:08:49 -0800 | [diff] [blame] | 48 | IInputContext inputContext, in EditorInfo attribute, int controlFlags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 49 | void finishInput(in IInputMethodClient client); |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 50 | boolean showSoftInput(in IInputMethodClient client, int flags, |
| 51 | in ResultReceiver resultReceiver); |
| 52 | boolean hideSoftInput(in IInputMethodClient client, int flags, |
| 53 | in ResultReceiver resultReceiver); |
Dianne Hackborn | 7663d80 | 2012-02-24 13:08:49 -0800 | [diff] [blame] | 54 | // Report that a window has gained focus. If 'attribute' is non-null, |
| 55 | // this will also do a startInput. |
| 56 | InputBindResult windowGainedFocus(in IInputMethodClient client, in IBinder windowToken, |
| 57 | int controlFlags, int softInputMode, int windowFlags, |
| 58 | in EditorInfo attribute, IInputContext inputContext); |
Satoshi Kataoka | 2b10b52 | 2013-08-21 20:39:12 +0900 | [diff] [blame] | 59 | |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 60 | void showInputMethodPickerFromClient(in IInputMethodClient client); |
satok | 47a4491 | 2010-10-06 16:03:58 +0900 | [diff] [blame] | 61 | void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 62 | void setInputMethod(in IBinder token, String id); |
satok | 2820351 | 2010-11-24 11:06:49 +0900 | [diff] [blame] | 63 | 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] | 64 | void hideMySoftInput(in IBinder token, int flags); |
The Android Open Source Project | 4df2423 | 2009-03-05 14:34:35 -0800 | [diff] [blame] | 65 | void showMySoftInput(in IBinder token, int flags); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 66 | void updateStatusIcon(in IBinder token, String packageName, int iconId); |
Joe Onorato | 857fd9b | 2011-01-27 15:08:35 -0800 | [diff] [blame] | 67 | void setImeWindowStatus(in IBinder token, int vis, int backDisposition); |
satok | f9f0100 | 2011-05-19 21:31:50 +0900 | [diff] [blame] | 68 | void registerSuggestionSpansForNotification(in SuggestionSpan[] spans); |
| 69 | boolean notifySuggestionPicked(in SuggestionSpan span, String originalString, int index); |
satok | 04d5020 | 2010-10-25 22:20:12 +0900 | [diff] [blame] | 70 | InputMethodSubtype getCurrentInputMethodSubtype(); |
satok | b66d287 | 2010-11-10 01:04:04 +0900 | [diff] [blame] | 71 | boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype); |
satok | 735cf38 | 2010-11-11 20:40:09 +0900 | [diff] [blame] | 72 | boolean switchToLastInputMethod(in IBinder token); |
satok | 688bd47 | 2012-02-09 20:09:17 +0900 | [diff] [blame] | 73 | boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme); |
Satoshi Kataoka | 2b10b52 | 2013-08-21 20:39:12 +0900 | [diff] [blame] | 74 | boolean shouldOfferSwitchingToNextInputMethod(in IBinder token); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 75 | boolean setInputMethodEnabled(String id, boolean enabled); |
satok | ee5e77c | 2011-09-02 18:50:15 +0900 | [diff] [blame] | 76 | oneway void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes); |
The Android Open Source Project | 9066cfe | 2009-03-03 19:31:44 -0800 | [diff] [blame] | 77 | } |