xi.pp 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321
  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.
  41. Histroy:
  42. 2004/10/03 - Conversion from C header to Pascal unit.
  43. }
  44. {$PACKRECORDS C} {$MACRO ON} {$DEFINE MACROS}
  45. {$MODE OBJFPC}
  46. unit xi;
  47. interface
  48. uses X;
  49. const
  50. sz_xGetExtensionVersionReq = 8;
  51. sz_xGetExtensionVersionReply = 32;
  52. sz_xListInputDevicesReq = 4;
  53. sz_xListInputDevicesReply = 32;
  54. sz_xOpenDeviceReq = 8;
  55. sz_xOpenDeviceReply = 32;
  56. sz_xCloseDeviceReq = 8;
  57. sz_xSetDeviceModeReq = 8;
  58. sz_xSetDeviceModeReply = 32;
  59. sz_xSelectExtensionEventReq = 12;
  60. sz_xGetSelectedExtensionEventsReq = 8;
  61. sz_xGetSelectedExtensionEventsReply = 32;
  62. sz_xChangeDeviceDontPropagateListReq = 12;
  63. sz_xGetDeviceDontPropagateListReq = 8;
  64. sz_xGetDeviceDontPropagateListReply = 32;
  65. sz_xGetDeviceMotionEventsReq = 16;
  66. sz_xGetDeviceMotionEventsReply = 32;
  67. sz_xChangeKeyboardDeviceReq = 8;
  68. sz_xChangeKeyboardDeviceReply = 32;
  69. sz_xChangePointerDeviceReq = 8;
  70. sz_xChangePointerDeviceReply = 32;
  71. sz_xGrabDeviceReq = 20;
  72. sz_xGrabDeviceReply = 32;
  73. sz_xUngrabDeviceReq = 12;
  74. sz_xGrabDeviceKeyReq = 20;
  75. sz_xGrabDeviceKeyReply = 32;
  76. sz_xUngrabDeviceKeyReq = 16;
  77. sz_xGrabDeviceButtonReq = 20;
  78. sz_xGrabDeviceButtonReply = 32;
  79. sz_xUngrabDeviceButtonReq = 16;
  80. sz_xAllowDeviceEventsReq = 12;
  81. sz_xGetDeviceFocusReq = 8;
  82. sz_xGetDeviceFocusReply = 32;
  83. sz_xSetDeviceFocusReq = 16;
  84. sz_xGetFeedbackControlReq = 8;
  85. sz_xGetFeedbackControlReply = 32;
  86. sz_xChangeFeedbackControlReq = 12;
  87. sz_xGetDeviceKeyMappingReq = 8;
  88. sz_xGetDeviceKeyMappingReply = 32;
  89. sz_xChangeDeviceKeyMappingReq = 8;
  90. sz_xGetDeviceModifierMappingReq = 8;
  91. sz_xSetDeviceModifierMappingReq = 8;
  92. sz_xSetDeviceModifierMappingReply = 32;
  93. sz_xGetDeviceButtonMappingReq = 8;
  94. sz_xGetDeviceButtonMappingReply = 32;
  95. sz_xSetDeviceButtonMappingReq = 8;
  96. sz_xSetDeviceButtonMappingReply = 32;
  97. sz_xQueryDeviceStateReq = 8;
  98. sz_xQueryDeviceStateReply = 32;
  99. sz_xSendExtensionEventReq = 16;
  100. sz_xDeviceBellReq = 8;
  101. sz_xSetDeviceValuatorsReq = 8;
  102. sz_xSetDeviceValuatorsReply = 32;
  103. sz_xGetDeviceControlReq = 8;
  104. sz_xGetDeviceControlReply = 32;
  105. sz_xChangeDeviceControlReq = 8;
  106. sz_xChangeDeviceControlReply = 32;
  107. const
  108. INAME = 'XInputExtension';
  109. const
  110. XI_KEYBOARD = 'KEYBOARD';
  111. XI_MOUSE = 'MOUSE';
  112. XI_TABLET = 'TABLET';
  113. XI_TOUCHSCREEN = 'TOUCHSCREEN';
  114. XI_TOUCHPAD = 'TOUCHPAD';
  115. XI_BARCODE = 'BARCODE';
  116. XI_BUTTONBOX = 'BUTTONBOX';
  117. XI_KNOB_BOX = 'KNOB_BOX';
  118. XI_ONE_KNOB = 'ONE_KNOB';
  119. XI_NINE_KNOB = 'NINE_KNOB';
  120. XI_TRACKBALL = 'TRACKBALL';
  121. XI_QUADRATURE = 'QUADRATURE';
  122. XI_ID_MODULE = 'ID_MODULE';
  123. XI_SPACEBALL = 'SPACEBALL';
  124. XI_DATAGLOVE = 'DATAGLOVE';
  125. XI_EYETRACKER = 'EYETRACKER';
  126. XI_CURSORKEYS = 'CURSORKEYS';
  127. XI_FOOTMOUSE = 'FOOTMOUSE';
  128. const
  129. Dont_Check = 0;
  130. XInput_Initial_Release = 1;
  131. XInput_Add_XDeviceBell = 2;
  132. XInput_Add_XSetDeviceValuators = 3;
  133. XInput_Add_XChangeDeviceControl = 4;
  134. const
  135. XI_Absent = 0;
  136. XI_Present = 1;
  137. const
  138. XI_Initial_Release_Major = 1;
  139. XI_Initial_Release_Minor = 0;
  140. const
  141. XI_Add_XDeviceBell_Major = 1;
  142. XI_Add_XDeviceBell_Minor = 1;
  143. const
  144. XI_Add_XSetDeviceValuators_Major = 1;
  145. XI_Add_XSetDeviceValuators_Minor = 2;
  146. const
  147. XI_Add_XChangeDeviceControl_Major = 1;
  148. XI_Add_XChangeDeviceControl_Minor = 3;
  149. const
  150. DEVICE_RESOLUTION = 1;
  151. const
  152. NoSuchExtension = 1;
  153. const
  154. COUNT = 0;
  155. CREATE = 1;
  156. const
  157. NewPointer = 0;
  158. NewKeyboard = 1;
  159. const
  160. XPOINTER = 0;
  161. XKEYBOARD = 1;
  162. const
  163. UseXKeyboard = $FF;
  164. const
  165. IsXPointer = 0;
  166. IsXKeyboard = 1;
  167. IsXExtensionDevice = 2;
  168. const
  169. AsyncThisDevice = 0;
  170. SyncThisDevice = 1;
  171. ReplayThisDevice = 2;
  172. AsyncOtherDevices = 3;
  173. AsyncAll = 4;
  174. SyncAll = 5;
  175. const
  176. FollowKeyboard = 3;
  177. {$ifndef RevertToFollowKeyboard}
  178. {$IFDEF MACROS}
  179. {$define RevertToFollowKeyboard := 3}
  180. {$ELSE}
  181. RevertToFollowKeyboard = 3;
  182. {$ENDIF}
  183. {$ENDIF}
  184. const
  185. DvAccelNum = Cardinal(1) shl 0;
  186. DvAccelDenom = Cardinal(1) shl 1;
  187. DvThreshold = Cardinal(1) shl 2;
  188. const
  189. DvKeyClickPercent = Cardinal(1) shl 0;
  190. DvPercent = Cardinal(1) shl 1;
  191. DvPitch = Cardinal(1) shl 2;
  192. DvDuration = Cardinal(1) shl 3;
  193. DvLed = Cardinal(1) shl 4;
  194. DvLedMode = Cardinal(1) shl 5;
  195. DvKey = Cardinal(1) shl 6;
  196. DvAutoRepeatMode = Cardinal(1) shl 7;
  197. const
  198. DvString = Cardinal(1) shl 0;
  199. const
  200. DvInteger = Cardinal(1) shl 0;
  201. const
  202. DeviceMode = Cardinal(1) shl 0;
  203. Relative = 0;
  204. Absolute = 1;
  205. { Merged from Metrolink tree for XINPUT stuff }
  206. TS_Raw = 57;
  207. TS_Scaled = 58;
  208. SendCoreEvents = 59;
  209. DontSendCoreEvents = 60;
  210. { End of merged section }
  211. const
  212. ProximityState = Cardinal(1) shl 1;
  213. InProximity = Cardinal(0) shl 1;
  214. OutOfProximity = Cardinal(1) shl 1;
  215. const
  216. AddToList = 0;
  217. DeleteFromList = 1;
  218. const
  219. KeyClass = 0;
  220. ButtonClass = 1;
  221. ValuatorClass = 2;
  222. FeedbackClass = 3;
  223. ProximityClass = 4;
  224. FocusClass = 5;
  225. OtherClass = 6;
  226. const
  227. KbdFeedbackClass = 0;
  228. PtrFeedbackClass = 1;
  229. StringFeedbackClass = 2;
  230. IntegerFeedbackClass = 3;
  231. LedFeedbackClass = 4;
  232. BellFeedbackClass = 5;
  233. const
  234. _devicePointerMotionHint = 0;
  235. _deviceButton1Motion = 1;
  236. _deviceButton2Motion = 2;
  237. _deviceButton3Motion = 3;
  238. _deviceButton4Motion = 4;
  239. _deviceButton5Motion = 5;
  240. _deviceButtonMotion = 6;
  241. _deviceButtonGrab = 7;
  242. _deviceOwnerGrabButton = 8;
  243. _noExtensionEvent = 9;
  244. const
  245. XI_BadDevice = 0;
  246. XI_BadEvent = 1;
  247. XI_BadMode = 2;
  248. XI_DeviceBusy = 3;
  249. XI_BadClass = 4;
  250. { Make XEventClass be a CARD32 for 64 bit servers. Don't affect client
  251. definition of XEventClass since that would be a library interface change.
  252. See the top of X.h for more _XSERVER64 magic.
  253. }
  254. type
  255. {$ifdef _XSERVER64}
  256. XEventClass = CARD32;
  257. {$ELSE}
  258. XEventClass = Longword;
  259. {$ENDIF}
  260. (*******************************************************************
  261. *
  262. * Extension version structure.
  263. *
  264. *)
  265. type
  266. PXExtensionVersion = ^TXExtensionVersion;
  267. TXExtensionVersion = packed record
  268. present : Smallint;
  269. major_version : Smallint;
  270. minor_version : Smallint;
  271. end;
  272. implementation
  273. end.