IInputManager.aidl revision 9f25b7fdf216c9ef0bd2322cd223eeaf0d60f77f
1/*
2 * Copyright (C) 2012 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 android.hardware.input;
18
19import android.hardware.input.KeyboardLayout;
20import android.view.InputDevice;
21import android.view.InputEvent;
22
23/** @hide */
24interface IInputManager {
25    // Gets input device information.
26    InputDevice getInputDevice(int deviceId);
27    int[] getInputDeviceIds();
28
29    // Reports whether the hardware supports the given keys; returns true if successful
30    boolean hasKeys(int deviceId, int sourceMask, in int[] keyCodes, out boolean[] keyExists);
31
32    // Temporarily changes the pointer speed.
33    void tryPointerSpeed(int speed);
34
35    // Injects an input event into the system.  To inject into windows owned by other
36    // applications, the caller must have the INJECT_EVENTS permission.
37    boolean injectInputEvent(in InputEvent ev, int mode);
38
39    // Keyboard layouts configuration.
40    KeyboardLayout[] getKeyboardLayouts();
41    KeyboardLayout getKeyboardLayout(String keyboardLayoutDescriptor);
42    String getKeyboardLayoutForInputDevice(String inputDeviceDescriptor);
43    void setKeyboardLayoutForInputDevice(String inputDeviceDescriptor,
44            String keyboardLayoutDescriptor);
45}
46