blob: 325a27d70a3cf0fe3c2a5c68d6f10049c898c822 [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;
satokf9f01002011-05-19 21:31:50 +090020import android.text.style.SuggestionSpan;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080021import android.view.inputmethod.InputMethodInfo;
satok04d50202010-10-25 22:20:12 +090022import android.view.inputmethod.InputMethodSubtype;
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080023import android.view.inputmethod.EditorInfo;
24import com.android.internal.view.InputBindResult;
25import com.android.internal.view.IInputContext;
26import com.android.internal.view.IInputMethodClient;
27
28/**
29 * Public interface to the global input method manager, used by all client
30 * applications.
Satoshi Kataokab3c21ac2013-08-07 15:43:29 +090031 * You need to update BridgeIInputMethodManager.java as well when changing
32 * this file.
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080033 */
34interface IInputMethodManager {
35 List<InputMethodInfo> getInputMethodList();
36 List<InputMethodInfo> getEnabledInputMethodList();
Satoshi Kataokab3c21ac2013-08-07 15:43:29 +090037 List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in String imiId,
satok16331c82010-12-20 23:48:46 +090038 boolean allowsImplicitlySelectedSubtypes);
satok68f1b782011-04-11 14:26:04 +090039 InputMethodSubtype getLastInputMethodSubtype();
satok4e4569d2010-11-19 18:45:53 +090040 // 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 Project9066cfe2009-03-03 19:31:44 -080043 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 Hackborn7663d802012-02-24 13:08:49 -080048 IInputContext inputContext, in EditorInfo attribute, int controlFlags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080049 void finishInput(in IInputMethodClient client);
The Android Open Source Project4df24232009-03-05 14:34:35 -080050 boolean showSoftInput(in IInputMethodClient client, int flags,
51 in ResultReceiver resultReceiver);
52 boolean hideSoftInput(in IInputMethodClient client, int flags,
53 in ResultReceiver resultReceiver);
Dianne Hackborn7663d802012-02-24 13:08:49 -080054 // 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 Kataoka2b10b522013-08-21 20:39:12 +090059
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080060 void showInputMethodPickerFromClient(in IInputMethodClient client);
satok47a44912010-10-06 16:03:58 +090061 void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080062 void setInputMethod(in IBinder token, String id);
satok28203512010-11-24 11:06:49 +090063 void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080064 void hideMySoftInput(in IBinder token, int flags);
The Android Open Source Project4df24232009-03-05 14:34:35 -080065 void showMySoftInput(in IBinder token, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080066 void updateStatusIcon(in IBinder token, String packageName, int iconId);
Joe Onorato857fd9b2011-01-27 15:08:35 -080067 void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
satokf9f01002011-05-19 21:31:50 +090068 void registerSuggestionSpansForNotification(in SuggestionSpan[] spans);
69 boolean notifySuggestionPicked(in SuggestionSpan span, String originalString, int index);
satok04d50202010-10-25 22:20:12 +090070 InputMethodSubtype getCurrentInputMethodSubtype();
satokb66d2872010-11-10 01:04:04 +090071 boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype);
satok735cf382010-11-11 20:40:09 +090072 boolean switchToLastInputMethod(in IBinder token);
satok688bd472012-02-09 20:09:17 +090073 boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme);
Satoshi Kataoka2b10b522013-08-21 20:39:12 +090074 boolean shouldOfferSwitchingToNextInputMethod(in IBinder token);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080075 boolean setInputMethodEnabled(String id, boolean enabled);
satokee5e77c2011-09-02 18:50:15 +090076 oneway void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes);
Satoshi Kataoka658c7b82013-10-10 17:03:51 +090077 int getInputMethodWindowVisibleHeight();
Satoshi Kataokad7443c82013-10-15 17:45:43 +090078 oneway void notifyTextCommitted();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080079}