xi.pp 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  1. {
  2. $Xorg: XI.h,v 1.4 2001/02/09 02:03:23 xorgcvs Exp $
  3. ************************************************************
  4. Copyright 1989, 1998 The Open Group
  5. Permission to use, copy, modify, distribute, and sell this software and its
  6. documentation for any purpose is hereby granted without fee, provided that
  7. the above copyright notice appear in all copies and that both that
  8. copyright notice and this permission notice appear in supporting
  9. documentation.
  10. The above copyright notice and this permission notice shall be included in
  11. all copies or substantial portions of the Software.
  12. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  13. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  14. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  15. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  16. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  17. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  18. Except as contained in this notice, the name of The Open Group shall not be
  19. used in advertising or otherwise to promote the sale, use or other dealings
  20. in this Software without prior written authorization from The Open Group.
  21. Copyright 1989 by Hewlett-Packard Company, Palo Alto, California.
  22. All Rights Reserved
  23. Permission to use, copy, modify, and distribute this software and its
  24. documentation for any purpose and without fee is hereby granted,
  25. provided that the above copyright notice appear in all copies and that
  26. both that copyright notice and this permission notice appear in
  27. supporting documentation, and that the name of Hewlett-Packard not be
  28. used in advertising or publicity pertaining to distribution of the
  29. software without specific, written prior permission.
  30. HEWLETT-PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  31. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  32. HEWLETT-PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  33. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  34. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  35. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  36. SOFTWARE.
  37. ********************************************************/
  38. $XFree86: xc/include/extensions/XI.h,v 1.5 2001/12/14 19:53:28 dawes Exp $
  39. Definitions used by the server, library and client
  40. Pascal Convertion was made by Ido Kannner - [email protected]
  41. Histroy:
  42. 2004/10/15 - Fixed a bug of accessing second based records by removing "paced record" and chnaged it to
  43. "reocrd" only.
  44. 2004/10/07 - Removed the "uses X;" line. The unit does not need it.
  45. 2004/10/03 - Conversion from C header to Pascal unit.
  46. }
  47. {$PACKRECORDS C} {$MACRO ON} {$DEFINE MACROS}
  48. {$MODE OBJFPC}
  49. unit xi;
  50. interface
  51. const
  52. sz_xGetExtensionVersionReq = 8;
  53. sz_xGetExtensionVersionReply = 32;
  54. sz_xListInputDevicesReq = 4;
  55. sz_xListInputDevicesReply = 32;
  56. sz_xOpenDeviceReq = 8;
  57. sz_xOpenDeviceReply = 32;
  58. sz_xCloseDeviceReq = 8;
  59. sz_xSetDeviceModeReq = 8;
  60. sz_xSetDeviceModeReply = 32;
  61. sz_xSelectExtensionEventReq = 12;
  62. sz_xGetSelectedExtensionEventsReq = 8;
  63. sz_xGetSelectedExtensionEventsReply = 32;
  64. sz_xChangeDeviceDontPropagateListReq = 12;
  65. sz_xGetDeviceDontPropagateListReq = 8;
  66. sz_xGetDeviceDontPropagateListReply = 32;
  67. sz_xGetDeviceMotionEventsReq = 16;
  68. sz_xGetDeviceMotionEventsReply = 32;
  69. sz_xChangeKeyboardDeviceReq = 8;
  70. sz_xChangeKeyboardDeviceReply = 32;
  71. sz_xChangePointerDeviceReq = 8;
  72. sz_xChangePointerDeviceReply = 32;
  73. sz_xGrabDeviceReq = 20;
  74. sz_xGrabDeviceReply = 32;
  75. sz_xUngrabDeviceReq = 12;
  76. sz_xGrabDeviceKeyReq = 20;
  77. sz_xGrabDeviceKeyReply = 32;
  78. sz_xUngrabDeviceKeyReq = 16;
  79. sz_xGrabDeviceButtonReq = 20;
  80. sz_xGrabDeviceButtonReply = 32;
  81. sz_xUngrabDeviceButtonReq = 16;
  82. sz_xAllowDeviceEventsReq = 12;
  83. sz_xGetDeviceFocusReq = 8;
  84. sz_xGetDeviceFocusReply = 32;
  85. sz_xSetDeviceFocusReq = 16;
  86. sz_xGetFeedbackControlReq = 8;
  87. sz_xGetFeedbackControlReply = 32;
  88. sz_xChangeFeedbackControlReq = 12;
  89. sz_xGetDeviceKeyMappingReq = 8;
  90. sz_xGetDeviceKeyMappingReply = 32;
  91. sz_xChangeDeviceKeyMappingReq = 8;
  92. sz_xGetDeviceModifierMappingReq = 8;
  93. sz_xSetDeviceModifierMappingReq = 8;
  94. sz_xSetDeviceModifierMappingReply = 32;
  95. sz_xGetDeviceButtonMappingReq = 8;
  96. sz_xGetDeviceButtonMappingReply = 32;
  97. sz_xSetDeviceButtonMappingReq = 8;
  98. sz_xSetDeviceButtonMappingReply = 32;
  99. sz_xQueryDeviceStateReq = 8;
  100. sz_xQueryDeviceStateReply = 32;
  101. sz_xSendExtensionEventReq = 16;
  102. sz_xDeviceBellReq = 8;
  103. sz_xSetDeviceValuatorsReq = 8;
  104. sz_xSetDeviceValuatorsReply = 32;
  105. sz_xGetDeviceControlReq = 8;
  106. sz_xGetDeviceControlReply = 32;
  107. sz_xChangeDeviceControlReq = 8;
  108. sz_xChangeDeviceControlReply = 32;
  109. const
  110. INAME = 'XInputExtension';
  111. const
  112. XI_KEYBOARD = 'KEYBOARD';
  113. XI_MOUSE = 'MOUSE';
  114. XI_TABLET = 'TABLET';
  115. XI_TOUCHSCREEN = 'TOUCHSCREEN';
  116. XI_TOUCHPAD = 'TOUCHPAD';
  117. XI_BARCODE = 'BARCODE';
  118. XI_BUTTONBOX = 'BUTTONBOX';
  119. XI_KNOB_BOX = 'KNOB_BOX';
  120. XI_ONE_KNOB = 'ONE_KNOB';
  121. XI_NINE_KNOB = 'NINE_KNOB';
  122. XI_TRACKBALL = 'TRACKBALL';
  123. XI_QUADRATURE = 'QUADRATURE';
  124. XI_ID_MODULE = 'ID_MODULE';
  125. XI_SPACEBALL = 'SPACEBALL';
  126. XI_DATAGLOVE = 'DATAGLOVE';
  127. XI_EYETRACKER = 'EYETRACKER';
  128. XI_CURSORKEYS = 'CURSORKEYS';
  129. XI_FOOTMOUSE = 'FOOTMOUSE';
  130. const
  131. Dont_Check = 0;
  132. XInput_Initial_Release = 1;
  133. XInput_Add_XDeviceBell = 2;
  134. XInput_Add_XSetDeviceValuators = 3;
  135. XInput_Add_XChangeDeviceControl = 4;
  136. const
  137. XI_Absent = 0;
  138. XI_Present = 1;
  139. const
  140. XI_Initial_Release_Major = 1;
  141. XI_Initial_Release_Minor = 0;
  142. const
  143. XI_Add_XDeviceBell_Major = 1;
  144. XI_Add_XDeviceBell_Minor = 1;
  145. const
  146. XI_Add_XSetDeviceValuators_Major = 1;
  147. XI_Add_XSetDeviceValuators_Minor = 2;
  148. const
  149. XI_Add_XChangeDeviceControl_Major = 1;
  150. XI_Add_XChangeDeviceControl_Minor = 3;
  151. const
  152. DEVICE_RESOLUTION = 1;
  153. const
  154. NoSuchExtension = 1;
  155. const
  156. COUNT = 0;
  157. CREATE = 1;
  158. const
  159. NewPointer = 0;
  160. NewKeyboard = 1;
  161. const
  162. XPOINTER = 0;
  163. XKEYBOARD = 1;
  164. const
  165. UseXKeyboard = $FF;
  166. const
  167. IsXPointer = 0;
  168. IsXKeyboard = 1;
  169. IsXExtensionDevice = 2;
  170. const
  171. AsyncThisDevice = 0;
  172. SyncThisDevice = 1;
  173. ReplayThisDevice = 2;
  174. AsyncOtherDevices = 3;
  175. AsyncAll = 4;
  176. SyncAll = 5;
  177. const
  178. FollowKeyboard = 3;
  179. {$ifndef RevertToFollowKeyboard}
  180. {$IFDEF MACROS}
  181. {$define RevertToFollowKeyboard := 3}
  182. {$ELSE}
  183. RevertToFollowKeyboard = 3;
  184. {$ENDIF}
  185. {$ENDIF}
  186. const
  187. DvAccelNum = Cardinal(1) shl 0;
  188. DvAccelDenom = Cardinal(1) shl 1;
  189. DvThreshold = Cardinal(1) shl 2;
  190. const
  191. DvKeyClickPercent = Cardinal(1) shl 0;
  192. DvPercent = Cardinal(1) shl 1;
  193. DvPitch = Cardinal(1) shl 2;
  194. DvDuration = Cardinal(1) shl 3;
  195. DvLed = Cardinal(1) shl 4;
  196. DvLedMode = Cardinal(1) shl 5;
  197. DvKey = Cardinal(1) shl 6;
  198. DvAutoRepeatMode = Cardinal(1) shl 7;
  199. const
  200. DvString = Cardinal(1) shl 0;
  201. const
  202. DvInteger = Cardinal(1) shl 0;
  203. const
  204. DeviceMode = Cardinal(1) shl 0;
  205. Relative = 0;
  206. Absolute = 1;
  207. { Merged from Metrolink tree for XINPUT stuff }
  208. TS_Raw = 57;
  209. TS_Scaled = 58;
  210. SendCoreEvents = 59;
  211. DontSendCoreEvents = 60;
  212. { End of merged section }
  213. const
  214. ProximityState = Cardinal(1) shl 1;
  215. InProximity = Cardinal(0) shl 1;
  216. OutOfProximity = Cardinal(1) shl 1;
  217. const
  218. AddToList = 0;
  219. DeleteFromList = 1;
  220. const
  221. KeyClass = 0;
  222. ButtonClass = 1;
  223. ValuatorClass = 2;
  224. FeedbackClass = 3;
  225. ProximityClass = 4;
  226. FocusClass = 5;
  227. OtherClass = 6;
  228. const
  229. KbdFeedbackClass = 0;
  230. PtrFeedbackClass = 1;
  231. StringFeedbackClass = 2;
  232. IntegerFeedbackClass = 3;
  233. LedFeedbackClass = 4;
  234. BellFeedbackClass = 5;
  235. const
  236. _devicePointerMotionHint = 0;
  237. _deviceButton1Motion = 1;
  238. _deviceButton2Motion = 2;
  239. _deviceButton3Motion = 3;
  240. _deviceButton4Motion = 4;
  241. _deviceButton5Motion = 5;
  242. _deviceButtonMotion = 6;
  243. _deviceButtonGrab = 7;
  244. _deviceOwnerGrabButton = 8;
  245. _noExtensionEvent = 9;
  246. const
  247. XI_BadDevice = 0;
  248. XI_BadEvent = 1;
  249. XI_BadMode = 2;
  250. XI_DeviceBusy = 3;
  251. XI_BadClass = 4;
  252. { Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
  253. definition of XEventClass since that would be a library interface change.
  254. See the top of X.h for more _XSERVER64 magic.
  255. }
  256. type
  257. {$ifdef _XSERVER64}
  258. XEventClass = CARD32;
  259. {$ELSE}
  260. XEventClass = Longword;
  261. {$ENDIF}
  262. (*******************************************************************
  263. *
  264. * Extension version structure.
  265. *
  266. *)
  267. type
  268. PXExtensionVersion = ^TXExtensionVersion;
  269. TXExtensionVersion = record
  270. present : Smallint;
  271. major_version : Smallint;
  272. minor_version : Smallint;
  273. end;
  274. implementation
  275. end.