Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 package org.chromium.chromoting; | |
| 6 | |
| 7 import org.chromium.chromoting.jni.TouchEventData; | |
| 8 | |
| 9 /** | |
| 10 * A set of functions to send client users' activities to remote host machine. T his interface | |
| 11 * represents low level functions without relationships with Android system. Con sumers can use | |
| 12 * {@link InputInjectorWrapper} to avoid conversions between Android classes and JNI types. The | |
| 13 * implementations of this interface are not required to be thread-safe. All the se functions should | |
| 14 * be called from Android UI thread. | |
| 15 */ | |
| 16 public interface InputInjector { | |
|
Sergey Ulanov
2016/06/22 06:39:01
This name is confusing because this interface does
Hzj_jie
2016/06/22 23:18:54
Done.
| |
| 17 /** Sends a mouse event. */ | |
| 18 void sendMouseEvent(int x, int y, int whichButton, boolean buttonDown); | |
| 19 | |
| 20 /** Sends a mouse wheel event. */ | |
| 21 void sendMouseWheelEvent(int deltaX, int deltaY); | |
| 22 | |
| 23 /** | |
| 24 * Sends a key event, and returns false if both scanCode and keyCode are not able to be | |
| 25 * converted to a known usb key code. Nothing will be sent to remote host, i f this function | |
| 26 * returns false. | |
| 27 */ | |
| 28 boolean sendKeyEvent(int scanCode, int keyCode, boolean keyDown); | |
| 29 | |
| 30 /** | |
| 31 * Sends a string literal. This function is useful to handle outputs from An droid input | |
| 32 * methods. | |
| 33 */ | |
| 34 void sendTextEvent(String text); | |
| 35 | |
| 36 /** Sends a set of {@link TouchEventData}. */ | |
| 37 void sendTouchEvent(TouchEventData.EventType eventType, TouchEventData[] dat a); | |
| 38 } | |
| OLD | NEW |