1 package android.dvr;
2 
3 /** @hide */
4 interface IVirtualTouchpadService
5 {
6   const String SERVICE_NAME = "virtual_touchpad";
7 
8   /**
9    * Initialize the virtual touchpad.
10    */
attach()11   void attach() = 0;
12 
13   /**
14    * Shut down the virtual touchpad.
15    */
detach()16   void detach() = 1;
17 
18   /**
19    * Generate a simulated touch event.
20    *
21    * @param touchpad Selects touchpad.
22    * @param x Horizontal touch position.
23    * @param y Vertical touch position.
24    * @param pressure Touch pressure; use 0.0 for no touch (lift or hover).
25    *
26    * Position values in the range [0.0, 1.0) map to the screen.
27    */
touch(int touchpad, float x, float y, float pressure)28   void touch(int touchpad, float x, float y, float pressure) = 2;
29 
30   /**
31    * Generate a simulated touchpad button state event.
32    *
33    * @param touchpad Selects touchpad.
34    * @param buttons A union of MotionEvent BUTTON_* values.
35    */
buttonState(int touchpad, int buttons)36   void buttonState(int touchpad, int buttons) = 3;
37 
38   /**
39    * Generate a simulated scroll event.
40    *
41    * @param touchpad Selects touchpad.
42    * @param x Horizontal scroll increment.
43    * @param y Vertical scroll increment.
44    *
45    * Scroll values are in the range [-1.0, 1.0].
46    */
scroll(int touchpad, float x, float y)47   void scroll(int touchpad, float x, float y) = 4;
48 }
49