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