Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3475572
  • 博文数量: 1450
  • 博客积分: 11163
  • 博客等级: 上将
  • 技术积分: 11101
  • 用 户 组: 普通用户
  • 注册时间: 2005-07-25 14:40
文章分类

全部博文(1450)

文章存档

2017年(5)

2014年(2)

2013年(3)

2012年(35)

2011年(39)

2010年(88)

2009年(395)

2008年(382)

2007年(241)

2006年(246)

2005年(14)

分类: LINUX

2012-05-25 00:02:03


点击(此处)折叠或打开

  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. *
  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. package android.view;

  17. /**
  18. * @hide
  19. * This really belongs in services.jar; WindowManagerPolicy should go there too.
  20. */
  21. public class RawInputEvent {
  22. // Event class as defined by EventHub.
  23. public static final int CLASS_KEYBOARD = 0x00000001;
  24. public static final int CLASS_ALPHAKEY = 0x00000002;
  25. public static final int CLASS_TOUCHSCREEN = 0x00000004;
  26. public static final int CLASS_TRACKBALL = 0x00000008;
  27. public static final int CLASS_TOUCHSCREEN_MT = 0x00000010;
  28. public static final int CLASS_DPAD = 0x00000020;

  29. // More special classes for QueuedEvent below.
  30. public static final int CLASS_CONFIGURATION_CHANGED = 0x10000000;

  31. // Event types.

  32. public static final int EV_SYN = 0x00;
  33. public static final int EV_KEY = 0x01;
  34. public static final int EV_REL = 0x02;
  35. public static final int EV_ABS = 0x03;
  36. public static final int EV_MSC = 0x04;
  37. public static final int EV_SW = 0x05;
  38. public static final int EV_LED = 0x11;
  39. public static final int EV_SND = 0x12;
  40. public static final int EV_REP = 0x14;
  41. public static final int EV_FF = 0x15;
  42. public static final int EV_PWR = 0x16;
  43. public static final int EV_FF_STATUS = 0x17;

  44. // Platform-specific event types.

  45. public static final int EV_DEVICE_ADDED = 0x10000000;
  46. public static final int EV_DEVICE_REMOVED = 0x20000000;

  47. // Special key (EV_KEY) scan codes for pointer buttons.

  48. public static final int BTN_FIRST = 0x100;

  49. public static final int BTN_MISC = 0x100;
  50. public static final int BTN_0 = 0x100;
  51. public static final int BTN_1 = 0x101;
  52. public static final int BTN_2 = 0x102;
  53. public static final int BTN_3 = 0x103;
  54. public static final int BTN_4 = 0x104;
  55. public static final int BTN_5 = 0x105;
  56. public static final int BTN_6 = 0x106;
  57. public static final int BTN_7 = 0x107;
  58. public static final int BTN_8 = 0x108;
  59. public static final int BTN_9 = 0x109;

  60. public static final int BTN_MOUSE = 0x110;
  61. public static final int BTN_LEFT = 0x110;
  62. public static final int BTN_RIGHT = 0x111;
  63. public static final int BTN_MIDDLE = 0x112;
  64. public static final int BTN_SIDE = 0x113;
  65. public static final int BTN_EXTRA = 0x114;
  66. public static final int BTN_FORWARD = 0x115;
  67. public static final int BTN_BACK = 0x116;
  68. public static final int BTN_TASK = 0x117;

  69. public static final int BTN_JOYSTICK = 0x120;
  70. public static final int BTN_TRIGGER = 0x120;
  71. public static final int BTN_THUMB = 0x121;
  72. public static final int BTN_THUMB2 = 0x122;
  73. public static final int BTN_TOP = 0x123;
  74. public static final int BTN_TOP2 = 0x124;
  75. public static final int BTN_PINKIE = 0x125;
  76. public static final int BTN_BASE = 0x126;
  77. public static final int BTN_BASE2 = 0x127;
  78. public static final int BTN_BASE3 = 0x128;
  79. public static final int BTN_BASE4 = 0x129;
  80. public static final int BTN_BASE5 = 0x12a;
  81. public static final int BTN_BASE6 = 0x12b;
  82. public static final int BTN_DEAD = 0x12f;

  83. public static final int BTN_GAMEPAD = 0x130;
  84. public static final int BTN_A = 0x130;
  85. public static final int BTN_B = 0x131;
  86. public static final int BTN_C = 0x132;
  87. public static final int BTN_X = 0x133;
  88. public static final int BTN_Y = 0x134;
  89. public static final int BTN_Z = 0x135;
  90. public static final int BTN_TL = 0x136;
  91. public static final int BTN_TR = 0x137;
  92. public static final int BTN_TL2 = 0x138;
  93. public static final int BTN_TR2 = 0x139;
  94. public static final int BTN_SELECT = 0x13a;
  95. public static final int BTN_START = 0x13b;
  96. public static final int BTN_MODE = 0x13c;
  97. public static final int BTN_THUMBL = 0x13d;
  98. public static final int BTN_THUMBR = 0x13e;

  99. public static final int BTN_DIGI = 0x140;
  100. public static final int BTN_TOOL_PEN = 0x140;
  101. public static final int BTN_TOOL_RUBBER = 0x141;
  102. public static final int BTN_TOOL_BRUSH = 0x142;
  103. public static final int BTN_TOOL_PENCIL = 0x143;
  104. public static final int BTN_TOOL_AIRBRUSH = 0x144;
  105. public static final int BTN_TOOL_FINGER = 0x145;
  106. public static final int BTN_TOOL_MOUSE = 0x146;
  107. public static final int BTN_TOOL_LENS = 0x147;
  108. public static final int BTN_TOUCH = 0x14a;
  109. public static final int BTN_STYLUS = 0x14b;
  110. public static final int BTN_STYLUS2 = 0x14c;
  111. public static final int BTN_TOOL_DOUBLETAP = 0x14d;
  112. public static final int BTN_TOOL_TRIPLETAP = 0x14e;

  113. public static final int BTN_WHEEL = 0x150;
  114. public static final int BTN_GEAR_DOWN = 0x150;
  115. public static final int BTN_GEAR_UP = 0x151;

  116. public static final int BTN_LAST = 0x15f;

  117. // Relative axes (EV_REL) scan codes.

  118. public static final int REL_X = 0x00;
  119. public static final int REL_Y = 0x01;
  120. public static final int REL_Z = 0x02;
  121. public static final int REL_RX = 0x03;
  122. public static final int REL_RY = 0x04;
  123. public static final int REL_RZ = 0x05;
  124. public static final int REL_HWHEEL = 0x06;
  125. public static final int REL_DIAL = 0x07;
  126. public static final int REL_WHEEL = 0x08;
  127. public static final int REL_MISC = 0x09;
  128. public static final int REL_MAX = 0x0f;

  129. // Absolute axes (EV_ABS) scan codes.

  130. public static final int ABS_X = 0x00;
  131. public static final int ABS_Y = 0x01;
  132. public static final int ABS_Z = 0x02;
  133. public static final int ABS_RX = 0x03;
  134. public static final int ABS_RY = 0x04;
  135. public static final int ABS_RZ = 0x05;
  136. public static final int ABS_THROTTLE = 0x06;
  137. public static final int ABS_RUDDER = 0x07;
  138. public static final int ABS_WHEEL = 0x08;
  139. public static final int ABS_GAS = 0x09;
  140. public static final int ABS_BRAKE = 0x0a;
  141. public static final int ABS_HAT0X = 0x10;
  142. public static final int ABS_HAT0Y = 0x11;
  143. public static final int ABS_HAT1X = 0x12;
  144. public static final int ABS_HAT1Y = 0x13;
  145. public static final int ABS_HAT2X = 0x14;
  146. public static final int ABS_HAT2Y = 0x15;
  147. public static final int ABS_HAT3X = 0x16;
  148. public static final int ABS_HAT3Y = 0x17;
  149. public static final int ABS_PRESSURE = 0x18;
  150. public static final int ABS_DISTANCE = 0x19;
  151. public static final int ABS_TILT_X = 0x1a;
  152. public static final int ABS_TILT_Y = 0x1b;
  153. public static final int ABS_TOOL_WIDTH = 0x1c;
  154. public static final int ABS_VOLUME = 0x20;
  155. public static final int ABS_MISC = 0x28;
  156. public static final int ABS_MT_TOUCH_MAJOR = 0x30;
  157. public static final int ABS_MT_TOUCH_MINOR = 0x31;
  158. public static final int ABS_MT_WIDTH_MAJOR = 0x32;
  159. public static final int ABS_MT_WIDTH_MINOR = 0x33;
  160. public static final int ABS_MT_ORIENTATION = 0x34;
  161. public static final int ABS_MT_POSITION_X = 0x35;
  162. public static final int ABS_MT_POSITION_Y = 0x36;
  163. public static final int ABS_MT_TOOL_TYPE = 0x37;
  164. public static final int ABS_MT_BLOB_ID = 0x38;
  165. public static final int ABS_MAX = 0x3f;

  166. // Switch events
  167. public static final int SW_LID = 0x00;

  168. public static final int SYN_REPORT = 0;
  169. public static final int SYN_CONFIG = 1;
  170. public static final int SYN_MT_REPORT = 2;

  171. public int deviceId;
  172. public int type;
  173. public int scancode;
  174. public int keycode;
  175. public int flags;
  176. public int value;
  177. public long when;
  178. }


阅读(4525) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~