blob: db3ecc6f2dc8f4297bf148c973cd90ea459b6ec5 [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 {
Yohei Yukawaf0656952014-03-03 15:38:18 +090035 // TODO: Use ParceledListSlice instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080036 List<InputMethodInfo> getInputMethodList();
Yohei Yukawaf0656952014-03-03 15:38:18 +090037 // TODO: Use ParceledListSlice instead
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080038 List<InputMethodInfo> getEnabledInputMethodList();
Satoshi Kataokab3c21ac2013-08-07 15:43:29 +090039 List<InputMethodSubtype> getEnabledInputMethodSubtypeList(in String imiId,
satok16331c82010-12-20 23:48:46 +090040 boolean allowsImplicitlySelectedSubtypes);
satok68f1b782011-04-11 14:26:04 +090041 InputMethodSubtype getLastInputMethodSubtype();
satok4e4569d2010-11-19 18:45:53 +090042 // TODO: We should change the return type from List to List<Parcelable>
43 // Currently there is a bug that aidl doesn't accept List<Parcelable>
44 List getShortcutInputMethodsAndSubtypes();
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080045 void addClient(in IInputMethodClient client,
46 in IInputContext inputContext, int uid, int pid);
47 void removeClient(in IInputMethodClient client);
Yohei Yukawa35d3f372015-11-25 11:07:19 -080048
49 InputBindResult startInput(/* @InputMethodClient.StartInputReason */ int startInputReason,
50 in IInputMethodClient client, IInputContext inputContext, in EditorInfo attribute,
51 int controlFlags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080052 void finishInput(in IInputMethodClient client);
The Android Open Source Project4df24232009-03-05 14:34:35 -080053 boolean showSoftInput(in IInputMethodClient client, int flags,
54 in ResultReceiver resultReceiver);
55 boolean hideSoftInput(in IInputMethodClient client, int flags,
56 in ResultReceiver resultReceiver);
Dianne Hackborn7663d802012-02-24 13:08:49 -080057 // Report that a window has gained focus. If 'attribute' is non-null,
58 // this will also do a startInput.
Yohei Yukawa35d3f372015-11-25 11:07:19 -080059 InputBindResult windowGainedFocus(
60 /* @InputMethodClient.StartInputReason */ int startInputReason,
61 in IInputMethodClient client, in IBinder windowToken, int controlFlags,
62 int softInputMode, int windowFlags, in EditorInfo attribute,
63 IInputContext inputContext);
Satoshi Kataoka2b10b522013-08-21 20:39:12 +090064
Seigo Nonaka14e13912015-05-06 21:04:13 -070065 void showInputMethodPickerFromClient(in IInputMethodClient client,
66 int auxiliarySubtypeMode);
satok47a44912010-10-06 16:03:58 +090067 void showInputMethodAndSubtypeEnablerFromClient(in IInputMethodClient client, String topId);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080068 void setInputMethod(in IBinder token, String id);
satok28203512010-11-24 11:06:49 +090069 void setInputMethodAndSubtype(in IBinder token, String id, in InputMethodSubtype subtype);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080070 void hideMySoftInput(in IBinder token, int flags);
The Android Open Source Project4df24232009-03-05 14:34:35 -080071 void showMySoftInput(in IBinder token, int flags);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080072 void updateStatusIcon(in IBinder token, String packageName, int iconId);
Joe Onorato857fd9b2011-01-27 15:08:35 -080073 void setImeWindowStatus(in IBinder token, int vis, int backDisposition);
satokf9f01002011-05-19 21:31:50 +090074 void registerSuggestionSpansForNotification(in SuggestionSpan[] spans);
75 boolean notifySuggestionPicked(in SuggestionSpan span, String originalString, int index);
satok04d50202010-10-25 22:20:12 +090076 InputMethodSubtype getCurrentInputMethodSubtype();
satokb66d2872010-11-10 01:04:04 +090077 boolean setCurrentInputMethodSubtype(in InputMethodSubtype subtype);
satok735cf382010-11-11 20:40:09 +090078 boolean switchToLastInputMethod(in IBinder token);
satok688bd472012-02-09 20:09:17 +090079 boolean switchToNextInputMethod(in IBinder token, boolean onlyCurrentIme);
Satoshi Kataoka2b10b522013-08-21 20:39:12 +090080 boolean shouldOfferSwitchingToNextInputMethod(in IBinder token);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080081 boolean setInputMethodEnabled(String id, boolean enabled);
Yohei Yukawa9e9fbb22014-03-05 14:53:01 +090082 void setAdditionalInputMethodSubtypes(String id, in InputMethodSubtype[] subtypes);
Satoshi Kataoka658c7b82013-10-10 17:03:51 +090083 int getInputMethodWindowVisibleHeight();
Yohei Yukawa3d1e8122014-06-06 19:12:47 +090084 oneway void notifyUserAction(int sequenceNumber);
The Android Open Source Project9066cfe2009-03-03 19:31:44 -080085}