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
17package com.android.internal.view;
18
19import android.graphics.Rect;
20import android.os.IBinder;
21import android.os.ResultReceiver;
22import android.view.KeyEvent;
23import android.view.MotionEvent;
24import android.view.inputmethod.EditorInfo;
25import android.view.inputmethod.InputBinding;
26import android.view.inputmethod.InputMethodSubtype;
27import com.android.internal.view.IInputContext;
28import com.android.internal.view.IInputMethodCallback;
29import com.android.internal.view.IInputMethodSession;
30
31/**
32 * Top-level interface to an input method component (implemented in a
33 * Service).
34 * {@hide}
35 */
36oneway interface IInputMethod {
37    void attachToken(IBinder token);
38
39    void bindInput(in InputBinding binding);
40
41    void unbindInput();
42
43    void startInput(in IInputContext inputContext, in EditorInfo attribute);
44
45    void restartInput(in IInputContext inputContext, in EditorInfo attribute);
46
47    void createSession(IInputMethodCallback callback);
48
49    void setSessionEnabled(IInputMethodSession session, boolean enabled);
50
51    void revokeSession(IInputMethodSession session);
52
53    void showSoftInput(int flags, in ResultReceiver resultReceiver);
54
55    void hideSoftInput(int flags, in ResultReceiver resultReceiver);
56
57    void changeInputMethodSubtype(in InputMethodSubtype subtype);
58}
59