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