1 USING: windows.kernel32 windows.ole32 windows.com windows.com.syntax
2 alien alien.c-types alien.syntax kernel system namespaces math ;
7 [ "dinput" "dinput8.dll" "stdcall" add-library ]
13 TYPEDEF: void* LPDIENUMDEVICESCALLBACKW
14 : LPDIENUMDEVICESCALLBACKW ( quot -- alien )
15 [ "BOOL" { "LPCDIDEVICEINSTANCEW" "LPVOID" } "stdcall" ]
16 dip alien-callback ; inline
17 TYPEDEF: void* LPDIENUMDEVICESBYSEMANTICSCBW
18 : LPDIENUMDEVICESBYSEMANTICSCBW ( quot -- alien )
19 [ "BOOL" { "LPCDIDEVICEINSTANCEW" "IDirectInputDevice8W*" "DWORD" "DWORD" "LPVOID" } "stdcall" ]
20 dip alien-callback ; inline
21 TYPEDEF: void* LPDICONFIGUREDEVICESCALLBACK
22 : LPDICONFIGUREDEVICESCALLBACK ( quot -- alien )
23 [ "BOOL" { "IUnknown*" "LPVOID" } "stdcall" ]
24 dip alien-callback ; inline
25 TYPEDEF: void* LPDIENUMEFFECTSCALLBACKW
26 : LPDIENUMEFFECTSCALLBACKW ( quot -- alien )
27 [ "BOOL" { "LPCDIEFFECTINFOW" "LPVOID" } "stdcall" ]
28 dip alien-callback ; inline
29 TYPEDEF: void* LPDIENUMCREATEDEFFECTOBJECTSCALLBACK
30 : LPDIENUMCREATEDEFFECTOBJECTSCALLBACK
31 [ "BOOL" { "LPDIRECTINPUTEFFECT" "LPVOID" } "stdcall" ]
32 dip alien-callback ; inline
33 TYPEDEF: void* LPDIENUMEFFECTSINFILECALLBACK
34 : LPDIENUMEFFECTSINFILECALLBACK
35 [ "BOOL" { "LPCDIFILEEFFECT" "LPVOID" } "stdcall" ]
36 dip alien-callback ; inline
37 TYPEDEF: void* LPDIENUMDEVICEOBJECTSCALLBACKW
38 : LPDIENUMDEVICEOBJECTSCALLBACKW
39 [ "BOOL" { "LPCDIDEVICEOBJECTINSTANCEW" "LPVOID" } "stdcall" ]
40 dip alien-callback ; inline
42 TYPEDEF: DWORD D3DCOLOR
44 C-STRUCT: DIDEVICEINSTANCEW
46 { "GUID" "guidInstance" }
47 { "GUID" "guidProduct" }
48 { "DWORD" "dwDevType" }
49 { "WCHAR[260]" "tszInstanceName" }
50 { "WCHAR[260]" "tszProductName" }
51 { "GUID" "guidFFDriver" }
52 { "WORD" "wUsagePage" }
54 TYPEDEF: DIDEVICEINSTANCEW* LPDIDEVICEINSTANCEW
55 TYPEDEF: DIDEVICEINSTANCEW* LPCDIDEVICEINSTANCEW
56 C-UNION: DIACTION-union "LPCWSTR" "UINT" ;
58 { "UINT_PTR" "uAppData" }
59 { "DWORD" "dwSemantic" }
61 { "DIACTION-union" "lptszActionName-or-uResIdString" }
62 { "GUID" "guidInstance" }
65 TYPEDEF: DIACTIONW* LPDIACTIONW
66 TYPEDEF: DIACTIONW* LPCDIACTIONW
67 C-STRUCT: DIACTIONFORMATW
69 { "DWORD" "dwActionSize" }
70 { "DWORD" "dwDataSize" }
71 { "DWORD" "dwNumActions" }
72 { "LPDIACTIONW" "rgoAction" }
73 { "GUID" "guidActionMap" }
75 { "DWORD" "dwBufferSize" }
78 { "HINSTANCE" "hInstString" }
79 { "FILETIME" "ftTimeStamp" }
81 { "WCHAR[260]" "tszActionMap" } ;
82 TYPEDEF: DIACTIONFORMATW* LPDIACTIONFORMATW
83 TYPEDEF: DIACTIONFORMATW* LPCDIACTIONFORMATW
86 { "D3DCOLOR" "cTextFore" }
87 { "D3DCOLOR" "cTextHighlight" }
88 { "D3DCOLOR" "cCalloutLine" }
89 { "D3DCOLOR" "cCalloutHighlight" }
90 { "D3DCOLOR" "cBorder" }
91 { "D3DCOLOR" "cControlFill" }
92 { "D3DCOLOR" "cHighlightFill" }
93 { "D3DCOLOR" "cAreaFill" } ;
94 TYPEDEF: DICOLORSET* LPDICOLORSET
95 TYPEDEF: DICOLORSET* LPCDICOLORSET
97 C-STRUCT: DICONFIGUREDEVICESPARAMSW
99 { "DWORD" "dwcUsers" }
100 { "LPWSTR" "lptszUserNames" }
101 { "DWORD" "dwcFormats" }
102 { "LPDIACTIONFORMATW" "lprgFormats" }
104 { "DICOLORSET" "dics" }
105 { "IUnknown*" "lpUnkDDSTarget" } ;
106 TYPEDEF: DICONFIGUREDEVICESPARAMSW* LPDICONFIGUREDEVICESPARAMSW
107 TYPEDEF: DICONFIGUREDEVICESPARAMSW* LPDICONFIGUREDEVICESPARAMSW
111 { "DWORD" "dwFlags" }
112 { "DWORD" "dwDevType" }
114 { "DWORD" "dwButtons" }
116 { "DWORD" "dwFFSamplePeriod" }
117 { "DWORD" "dwFFMinTimeResolution" }
118 { "DWORD" "dwFirmwareRevision" }
119 { "DWORD" "dwHardwareRevision" }
120 { "DWORD" "dwFFDriverVersion" } ;
121 TYPEDEF: DIDEVCAPS* LPDIDEVCAPS
122 TYPEDEF: DIDEVCAPS* LPCDIDEVCAPS
123 C-STRUCT: DIDEVICEOBJECTINSTANCEW
125 { "GUID" "guidType" }
128 { "DWORD" "dwFlags" }
129 { "WCHAR[260]" "tszName" }
130 { "DWORD" "dwFFMaxForce" }
131 { "DWORD" "dwFFForceResolution" }
132 { "WORD" "wCollectionNumber" }
133 { "WORD" "wDesignatorIndex" }
134 { "WORD" "wUsagePage" }
136 { "DWORD" "dwDimension" }
137 { "WORD" "wExponent" }
138 { "WORD" "wReportId" } ;
139 TYPEDEF: DIDEVICEOBJECTINSTANCEW* LPDIDEVICEOBJECTINSTANCEW
140 TYPEDEF: DIDEVICEOBJECTINSTANCEW* LPCDIDEVICEOBJECTINSTANCEW
141 C-STRUCT: DIDEVICEOBJECTDATA
144 { "DWORD" "dwTimeStamp" }
145 { "DWORD" "dwSequence" }
146 { "UINT_PTR" "uAppData" } ;
147 TYPEDEF: DIDEVICEOBJECTDATA* LPDIDEVICEOBJECTDATA
148 TYPEDEF: DIDEVICEOBJECTDATA* LPCDIDEVICEOBJECTDATA
149 C-STRUCT: DIOBJECTDATAFORMAT
153 { "DWORD" "dwFlags" } ;
154 TYPEDEF: DIOBJECTDATAFORMAT* LPDIOBJECTDATAFORMAT
155 TYPEDEF: DIOBJECTDATAFORMAT* LPCDIOBJECTDATAFORMAT
156 C-STRUCT: DIDATAFORMAT
158 { "DWORD" "dwObjSize" }
159 { "DWORD" "dwFlags" }
160 { "DWORD" "dwDataSize" }
161 { "DWORD" "dwNumObjs" }
162 { "LPDIOBJECTDATAFORMAT" "rgodf" } ;
163 TYPEDEF: DIDATAFORMAT* LPDIDATAFORMAT
164 TYPEDEF: DIDATAFORMAT* LPCDIDATAFORMAT
165 C-STRUCT: DIPROPHEADER
167 { "DWORD" "dwHeaderSize" }
169 { "DWORD" "dwHow" } ;
170 TYPEDEF: DIPROPHEADER* LPDIPROPHEADER
171 TYPEDEF: DIPROPHEADER* LPCDIPROPHEADER
172 C-STRUCT: DIPROPDWORD
173 { "DIPROPHEADER" "diph" }
174 { "DWORD" "dwData" } ;
175 TYPEDEF: DIPROPDWORD* LPDIPROPDWORD
176 TYPEDEF: DIPROPDWORD* LPCDIPROPDWORD
177 C-STRUCT: DIPROPPOINTER
178 { "DIPROPHEADER" "diph" }
179 { "UINT_PTR" "uData" } ;
180 TYPEDEF: DIPROPPOINTER* LPDIPROPPOINTER
181 TYPEDEF: DIPROPPOINTER* LPCDIPROPPOINTER
182 C-STRUCT: DIPROPRANGE
183 { "DIPROPHEADER" "diph" }
186 TYPEDEF: DIPROPRANGE* LPDIPROPRANGE
187 TYPEDEF: DIPROPRANGE* LPCDIPROPRANGE
189 { "DIPROPHEADER" "diph" }
193 TYPEDEF: DIPROPCAL* LPDIPROPCAL
194 TYPEDEF: DIPROPCAL* LPCDIPROPCAL
195 C-STRUCT: DIPROPGUIDANDPATH
196 { "DIPROPHEADER" "diph" }
197 { "GUID" "guidClass" }
198 { "WCHAR[260]" "wszPath" } ;
199 TYPEDEF: DIPROPGUIDANDPATH* LPDIPROPGUIDANDPATH
200 TYPEDEF: DIPROPGUIDANDPATH* LPCDIPROPGUIDANDPATH
201 C-STRUCT: DIPROPSTRING
202 { "DIPROPHEADER" "diph" }
203 { "WCHAR[260]" "wsz" } ;
204 TYPEDEF: DIPROPSTRING* LPDIPROPSTRING
205 TYPEDEF: DIPROPSTRING* LPCDIPROPSTRING
208 { "DWORD" "dwLog" } ;
209 C-STRUCT: DIPROPCPOINTS
210 { "DIPROPHEADER" "diph" }
211 { "DWORD" "dwCPointsNum" }
212 { "CPOINT[8]" "cp" } ;
213 TYPEDEF: DIPROPCPOINTS* LPDIPROPCPOINTS
214 TYPEDEF: DIPROPCPOINTS* LPCDIPROPCPOINTS
217 { "DWORD" "dwAttackLevel" }
218 { "DWORD" "dwAttackTime" }
219 { "DWORD" "dwFadeLevel" }
220 { "DWORD" "dwFadeTime" } ;
221 TYPEDEF: DIENVELOPE* LPDIENVELOPE
222 TYPEDEF: DIENVELOPE* LPCDIENVELOPE
225 { "DWORD" "dwFlags" }
226 { "DWORD" "dwDuration" }
227 { "DWORD" "dwSamplePeriod" }
229 { "DWORD" "dwTriggerButton" }
230 { "DWORD" "dwTriggerRepeatInterval" }
232 { "LPDWORD" "rgdwAxes" }
233 { "LPLONG" "rglDirection" }
234 { "LPDIENVELOPE" "lpEnvelope" }
235 { "DWORD" "cbTypeSpecificParams" }
236 { "LPVOID" "lpvTypeSpecificParams" }
237 { "DWORD" "dwStartDelay" } ;
238 TYPEDEF: DIEFFECT* LPDIEFFECT
239 TYPEDEF: DIEFFECT* LPCDIEFFECT
240 C-STRUCT: DIEFFECTINFOW
243 { "DWORD" "dwEffType" }
244 { "DWORD" "dwStaticParams" }
245 { "DWORD" "dwDynamicParams" }
246 { "WCHAR[260]" "tszName" } ;
247 TYPEDEF: DIEFFECTINFOW* LPDIEFFECTINFOW
248 TYPEDEF: DIEFFECTINFOW* LPCDIEFFECTINFOW
249 C-STRUCT: DIEFFESCAPE
251 { "DWORD" "dwCommand" }
252 { "LPVOID" "lpvInBuffer" }
253 { "DWORD" "cbInBuffer" }
254 { "LPVOID" "lpvOutBuffer" }
255 { "DWORD" "cbOutBuffer" } ;
256 TYPEDEF: DIEFFESCAPE* LPDIEFFESCAPE
257 TYPEDEF: DIEFFESCAPE* LPCDIEFFESCAPE
258 C-STRUCT: DIFILEEFFECT
260 { "GUID" "GuidEffect" }
261 { "LPCDIEFFECT" "lpDiEffect" }
262 { "CHAR[260]" "szFriendlyName" } ;
263 TYPEDEF: DIFILEEFFECT* LPDIFILEEFFECT
264 TYPEDEF: DIFILEEFFECT* LPCDIFILEEFFECT
265 C-STRUCT: DIDEVICEIMAGEINFOW
266 { "WCHAR[260]" "tszImagePath" }
267 { "DWORD" "dwFlags" }
268 { "DWORD" "dwViewID" }
269 { "RECT" "rcOverlay" }
270 { "DWORD" "dwObjID" }
271 { "DWORD" "dwcValidPts" }
272 { "POINT[5]" "rgptCalloutLine" }
273 { "RECT" "rcCalloutRect" }
274 { "DWORD" "dwTextAlign" } ;
275 TYPEDEF: DIDEVICEIMAGEINFOW* LPDIDEVICEIMAGEINFOW
276 TYPEDEF: DIDEVICEIMAGEINFOW* LPCDIDEVICEIMAGEINFOW
277 C-STRUCT: DIDEVICEIMAGEINFOHEADERW
279 { "DWORD" "dwSizeImageInfo" }
280 { "DWORD" "dwcViews" }
281 { "DWORD" "dwcButtons" }
282 { "DWORD" "dwcAxes" }
283 { "DWORD" "dwcPOVs" }
284 { "DWORD" "dwBufferSize" }
285 { "DWORD" "dwBufferUsed" }
286 { "DIDEVICEIMAGEINFOW*" "lprgImageInfoArray" } ;
287 TYPEDEF: DIDEVICEIMAGEINFOHEADERW* LPDIDEVICEIMAGEINFOHEADERW
288 TYPEDEF: DIDEVICEIMAGEINFOHEADERW* LPCDIDEVICEIMAGEINFOHEADERW
290 C-STRUCT: DIMOUSESTATE2
294 { "BYTE[8]" "rgbButtons" } ;
295 TYPEDEF: DIMOUSESTATE2* LPDIMOUSESTATE2
296 TYPEDEF: DIMOUSESTATE2* LPCDIMOUSESTATE2
298 C-STRUCT: DIJOYSTATE2
305 { "LONG[2]" "rglSlider" }
306 { "DWORD[4]" "rgdwPOV" }
307 { "BYTE[128]" "rgbButtons" }
314 { "LONG[2]" "rglVSlider" }
321 { "LONG[2]" "rglASlider" }
328 { "LONG[2]" "rglFSlider" } ;
329 TYPEDEF: DIJOYSTATE2* LPDIJOYSTATE2
330 TYPEDEF: DIJOYSTATE2* LPCDIJOYSTATE2
332 COM-INTERFACE: IDirectInputEffect IUnknown {E7E1F7C0-88D2-11D0-9AD0-00A0C9A06E35}
333 HRESULT Initialize ( HINSTANCE hinst, DWORD dwVersion, REFGUID rguid )
334 HRESULT GetEffectGuid ( LPGUID pguid )
335 HRESULT GetParameters ( LPDIEFFECT peff, DWORD dwFlags )
336 HRESULT SetParameters ( LPCDIEFFECT peff, DWORD dwFlags )
337 HRESULT Start ( DWORD dwIterations, DWORD dwFlags )
339 HRESULT GetEffectStatus ( LPDWORD pdwFlags )
342 HRESULT Escape ( LPDIEFFESCAPE pesc ) ;
344 COM-INTERFACE: IDirectInputDevice8W IUnknown {54D41081-DC15-4833-A41B-748F73A38179}
345 HRESULT GetCapabilities ( LPDIDEVCAPS lpDIDeviceCaps )
346 HRESULT EnumObjects ( LPDIENUMDEVICEOBJECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags )
347 HRESULT GetProperty ( REFGUID rguidProp, LPDIPROPHEADER pdiph )
348 HRESULT SetProperty ( REFGUID rguidProp, LPCDIPROPHEADER pdiph )
350 HRESULT Unacquire ( )
351 HRESULT GetDeviceState ( DWORD cbData, LPVOID lpvData )
352 HRESULT GetDeviceData ( DWORD cbObjectData, LPDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD dwFlags )
353 HRESULT SetDataFormat ( LPCDIDATAFORMAT lpdf )
354 HRESULT SetEventNotification ( HANDLE hEvent )
355 HRESULT SetCooperativeLevel ( HWND hwnd, DWORD dwFlags )
356 HRESULT GetObjectInfo ( LPDIDEVICEOBJECTINSTANCEW rdidoi, DWORD dwObj, DWORD dwHow )
357 HRESULT GetDeviceInfo ( LPDIDEVICEINSTANCEW pdidi )
358 HRESULT RunControlPanel ( HWND hwndOwner, DWORD dwFlags )
359 HRESULT Initialize ( HINSTANCE hinst, DWORD dwVersion, REFGUID rguid )
360 HRESULT CreateEffect ( REFGUID rguid, LPCDIEFFECT lpeff, IDirectInputEffect** ppdeff, LPUNKNOWN punkOuter )
361 HRESULT EnumEffects ( LPDIENUMEFFECTSCALLBACKW lpCallback, LPVOID pvRef, DWORD dwEffType )
362 HRESULT GetEffectInfo ( LPDIEFFECTINFOW pdei, REFGUID rguid )
363 HRESULT GetForceFeedbackState ( LPDWORD pdwOut )
364 HRESULT SendForceFeedbackCommand ( DWORD dwFlags )
365 HRESULT EnumCreatedEffectObjects ( LPDIENUMCREATEDEFFECTOBJECTSCALLBACK lpCallback, LPVOID pvRef, DWORD fl )
366 HRESULT Escape ( LPDIEFFESCAPE pesc )
368 HRESULT SendDeviceData ( DWORD cbObjectData, LPCDIDEVICEOBJECTDATA rgdod, LPDWORD pdwInOut, DWORD fl )
369 HRESULT EnumEffectsInFile ( LPCWSTR lpszFileName, LPDIENUMEFFECTSINFILECALLBACK lpCallback, LPVOID pvRef, DWORD dwFlags )
370 HRESULT WriteEffectToFile ( LPCWSTR lpszFileName, DWORD dwEntries, LPDIFILEEFFECT rgDiFileEffect, DWORD dwFlags )
371 HRESULT BuildActionMap ( LPDIACTIONFORMATW lpdiaf, LPCWSTR lpszUserName, DWORD dwFlags )
372 HRESULT SetActionMap ( LPDIACTIONFORMATW lpdiActionFormat, LPCWSTR lpwszUserName, DWORD dwFlags )
373 HRESULT GetImageInfo ( LPDIDEVICEIMAGEINFOHEADERW lpdiDeviceImageInfoHeader ) ;
375 COM-INTERFACE: IDirectInput8W IUnknown {BF798031-483A-4DA2-AA99-5D64ED369700}
376 HRESULT CreateDevice ( REFGUID rguid, IDirectInputDevice8W** lplpDevice, LPUNKNOWN pUnkOuter )
377 HRESULT EnumDevices ( DWORD dwDevType, LPDIENUMDEVICESCALLBACKW lpCallback, LPVOID pvRef, DWORD dwFlags )
378 HRESULT GetDeviceStatus ( REFGUID rguidInstance )
379 HRESULT RunControlPanel ( HWND hwndOwner, DWORD dwFlags )
380 HRESULT Initialize ( HINSTANCE hinst, DWORD dwVersion )
381 HRESULT FindDevice ( REFGUID rguidClass, LPCWSTR pwszName, LPGUID pguidInstance )
382 HRESULT EnumDevicesBySemantics ( LPCWSTR pwszUserName, LPDIACTIONFORMATW lpdiActionFormat, LPDIENUMDEVICESBYSEMANTICSCBW lpCallback, LPVOID pvRef, DWORD dwFlags )
383 HRESULT ConfigureDevices ( LPDICONFIGUREDEVICESCALLBACK lpdiCallback, LPDICONFIGUREDEVICESPARAMSW lpdiCDParams, DWORD dwFlags, LPVOID pvRefData ) ;
385 FUNCTION: HRESULT DirectInput8Create ( HINSTANCE hinst, DWORD dwVersion, REFIID riidtlf, LPVOID* ppvOut, LPUNKNOWN punkOuter ) ;
387 CONSTANT: DIRECTINPUT_VERSION HEX: 0800
389 CONSTANT: DI8DEVCLASS_ALL 0
390 CONSTANT: DI8DEVCLASS_DEVICE 1
391 CONSTANT: DI8DEVCLASS_POINTER 2
392 CONSTANT: DI8DEVCLASS_KEYBOARD 3
393 CONSTANT: DI8DEVCLASS_GAMECTRL 4
395 CONSTANT: DIEDFL_ALLDEVICES HEX: 00000000
396 CONSTANT: DIEDFL_ATTACHEDONLY HEX: 00000001
397 CONSTANT: DIEDFL_FORCEFEEDBACK HEX: 00000100
398 CONSTANT: DIEDFL_INCLUDEALIASES HEX: 00010000
399 CONSTANT: DIEDFL_INCLUDEPHANTOMS HEX: 00020000
400 CONSTANT: DIEDFL_INCLUDEHIDDEN HEX: 00040000
402 CONSTANT: DIENUM_STOP 0
403 CONSTANT: DIENUM_CONTINUE 1
405 CONSTANT: DIDF_ABSAXIS 1
406 CONSTANT: DIDF_RELAXIS 2
408 CONSTANT: DIDFT_ALL HEX: 00000000
410 CONSTANT: DIDFT_RELAXIS HEX: 00000001
411 CONSTANT: DIDFT_ABSAXIS HEX: 00000002
412 CONSTANT: DIDFT_AXIS HEX: 00000003
414 CONSTANT: DIDFT_PSHBUTTON HEX: 00000004
415 CONSTANT: DIDFT_TGLBUTTON HEX: 00000008
416 CONSTANT: DIDFT_BUTTON HEX: 0000000C
418 CONSTANT: DIDFT_POV HEX: 00000010
419 CONSTANT: DIDFT_COLLECTION HEX: 00000040
420 CONSTANT: DIDFT_NODATA HEX: 00000080
422 CONSTANT: DIDFT_ANYINSTANCE HEX: 00FFFF00
423 ALIAS: DIDFT_INSTANCEMASK DIDFT_ANYINSTANCE
424 : DIDFT_MAKEINSTANCE ( n -- instance ) 8 shift ; inline
425 : DIDFT_GETTYPE ( n -- type ) HEX: FF bitand ; inline
426 : DIDFT_GETINSTANCE ( n -- instance ) -8 shift HEX: FFFF bitand ; inline
427 CONSTANT: DIDFT_FFACTUATOR HEX: 01000000
428 CONSTANT: DIDFT_FFEFFECTTRIGGER HEX: 02000000
429 CONSTANT: DIDFT_OUTPUT HEX: 10000000
430 CONSTANT: DIDFT_VENDORDEFINED HEX: 04000000
431 CONSTANT: DIDFT_ALIAS HEX: 08000000
432 CONSTANT: DIDFT_OPTIONAL HEX: 80000000
434 : DIDFT_ENUMCOLLECTION ( n -- instance ) 8 shift HEX: FFFF bitand ; inline
435 CONSTANT: DIDFT_NOCOLLECTION HEX: 00FFFF00
437 CONSTANT: DIDOI_FFACTUATOR HEX: 00000001
438 CONSTANT: DIDOI_FFEFFECTTRIGGER HEX: 00000002
439 CONSTANT: DIDOI_POLLED HEX: 00008000
440 CONSTANT: DIDOI_ASPECTPOSITION HEX: 00000100
441 CONSTANT: DIDOI_ASPECTVELOCITY HEX: 00000200
442 CONSTANT: DIDOI_ASPECTACCEL HEX: 00000300
443 CONSTANT: DIDOI_ASPECTFORCE HEX: 00000400
444 CONSTANT: DIDOI_ASPECTMASK HEX: 00000F00
445 CONSTANT: DIDOI_GUIDISUSAGE HEX: 00010000
447 CONSTANT: DISCL_EXCLUSIVE HEX: 00000001
448 CONSTANT: DISCL_NONEXCLUSIVE HEX: 00000002
449 CONSTANT: DISCL_FOREGROUND HEX: 00000004
450 CONSTANT: DISCL_BACKGROUND HEX: 00000008
451 CONSTANT: DISCL_NOWINKEY HEX: 00000010
453 CONSTANT: DIK_ESCAPE HEX: 01
454 CONSTANT: DIK_1 HEX: 02
455 CONSTANT: DIK_2 HEX: 03
456 CONSTANT: DIK_3 HEX: 04
457 CONSTANT: DIK_4 HEX: 05
458 CONSTANT: DIK_5 HEX: 06
459 CONSTANT: DIK_6 HEX: 07
460 CONSTANT: DIK_7 HEX: 08
461 CONSTANT: DIK_8 HEX: 09
462 CONSTANT: DIK_9 HEX: 0A
463 CONSTANT: DIK_0 HEX: 0B
464 CONSTANT: DIK_MINUS HEX: 0C
465 CONSTANT: DIK_EQUALS HEX: 0D
466 CONSTANT: DIK_BACK HEX: 0E
467 CONSTANT: DIK_TAB HEX: 0F
468 CONSTANT: DIK_Q HEX: 10
469 CONSTANT: DIK_W HEX: 11
470 CONSTANT: DIK_E HEX: 12
471 CONSTANT: DIK_R HEX: 13
472 CONSTANT: DIK_T HEX: 14
473 CONSTANT: DIK_Y HEX: 15
474 CONSTANT: DIK_U HEX: 16
475 CONSTANT: DIK_I HEX: 17
476 CONSTANT: DIK_O HEX: 18
477 CONSTANT: DIK_P HEX: 19
478 CONSTANT: DIK_LBRACKET HEX: 1A
479 CONSTANT: DIK_RBRACKET HEX: 1B
480 CONSTANT: DIK_RETURN HEX: 1C
481 CONSTANT: DIK_LCONTROL HEX: 1D
482 CONSTANT: DIK_A HEX: 1E
483 CONSTANT: DIK_S HEX: 1F
484 CONSTANT: DIK_D HEX: 20
485 CONSTANT: DIK_F HEX: 21
486 CONSTANT: DIK_G HEX: 22
487 CONSTANT: DIK_H HEX: 23
488 CONSTANT: DIK_J HEX: 24
489 CONSTANT: DIK_K HEX: 25
490 CONSTANT: DIK_L HEX: 26
491 CONSTANT: DIK_SEMICOLON HEX: 27
492 CONSTANT: DIK_APOSTROPHE HEX: 28
493 CONSTANT: DIK_GRAVE HEX: 29
494 CONSTANT: DIK_LSHIFT HEX: 2A
495 CONSTANT: DIK_BACKSLASH HEX: 2B
496 CONSTANT: DIK_Z HEX: 2C
497 CONSTANT: DIK_X HEX: 2D
498 CONSTANT: DIK_C HEX: 2E
499 CONSTANT: DIK_V HEX: 2F
500 CONSTANT: DIK_B HEX: 30
501 CONSTANT: DIK_N HEX: 31
502 CONSTANT: DIK_M HEX: 32
503 CONSTANT: DIK_COMMA HEX: 33
504 CONSTANT: DIK_PERIOD HEX: 34
505 CONSTANT: DIK_SLASH HEX: 35
506 CONSTANT: DIK_RSHIFT HEX: 36
507 CONSTANT: DIK_MULTIPLY HEX: 37
508 CONSTANT: DIK_LMENU HEX: 38
509 CONSTANT: DIK_SPACE HEX: 39
510 CONSTANT: DIK_CAPITAL HEX: 3A
511 CONSTANT: DIK_F1 HEX: 3B
512 CONSTANT: DIK_F2 HEX: 3C
513 CONSTANT: DIK_F3 HEX: 3D
514 CONSTANT: DIK_F4 HEX: 3E
515 CONSTANT: DIK_F5 HEX: 3F
516 CONSTANT: DIK_F6 HEX: 40
517 CONSTANT: DIK_F7 HEX: 41
518 CONSTANT: DIK_F8 HEX: 42
519 CONSTANT: DIK_F9 HEX: 43
520 CONSTANT: DIK_F10 HEX: 44
521 CONSTANT: DIK_NUMLOCK HEX: 45
522 CONSTANT: DIK_SCROLL HEX: 46
523 CONSTANT: DIK_NUMPAD7 HEX: 47
524 CONSTANT: DIK_NUMPAD8 HEX: 48
525 CONSTANT: DIK_NUMPAD9 HEX: 49
526 CONSTANT: DIK_SUBTRACT HEX: 4A
527 CONSTANT: DIK_NUMPAD4 HEX: 4B
528 CONSTANT: DIK_NUMPAD5 HEX: 4C
529 CONSTANT: DIK_NUMPAD6 HEX: 4D
530 CONSTANT: DIK_ADD HEX: 4E
531 CONSTANT: DIK_NUMPAD1 HEX: 4F
532 CONSTANT: DIK_NUMPAD2 HEX: 50
533 CONSTANT: DIK_NUMPAD3 HEX: 51
534 CONSTANT: DIK_NUMPAD0 HEX: 52
535 CONSTANT: DIK_DECIMAL HEX: 53
536 CONSTANT: DIK_OEM_102 HEX: 56
537 CONSTANT: DIK_F11 HEX: 57
538 CONSTANT: DIK_F12 HEX: 58
539 CONSTANT: DIK_F13 HEX: 64
540 CONSTANT: DIK_F14 HEX: 65
541 CONSTANT: DIK_F15 HEX: 66
542 CONSTANT: DIK_KANA HEX: 70
543 CONSTANT: DIK_ABNT_C1 HEX: 73
544 CONSTANT: DIK_CONVERT HEX: 79
545 CONSTANT: DIK_NOCONVERT HEX: 7B
546 CONSTANT: DIK_YEN HEX: 7D
547 CONSTANT: DIK_ABNT_C2 HEX: 7E
548 CONSTANT: DIK_NUMPADEQUALS HEX: 8D
549 CONSTANT: DIK_PREVTRACK HEX: 90
550 CONSTANT: DIK_AT HEX: 91
551 CONSTANT: DIK_COLON HEX: 92
552 CONSTANT: DIK_UNDERLINE HEX: 93
553 CONSTANT: DIK_KANJI HEX: 94
554 CONSTANT: DIK_STOP HEX: 95
555 CONSTANT: DIK_AX HEX: 96
556 CONSTANT: DIK_UNLABELED HEX: 97
557 CONSTANT: DIK_NEXTTRACK HEX: 99
558 CONSTANT: DIK_NUMPADENTER HEX: 9C
559 CONSTANT: DIK_RCONTROL HEX: 9D
560 CONSTANT: DIK_MUTE HEX: A0
561 CONSTANT: DIK_CALCULATOR HEX: A1
562 CONSTANT: DIK_PLAYPAUSE HEX: A2
563 CONSTANT: DIK_MEDIASTOP HEX: A4
564 CONSTANT: DIK_VOLUMEDOWN HEX: AE
565 CONSTANT: DIK_VOLUMEUP HEX: B0
566 CONSTANT: DIK_WEBHOME HEX: B2
567 CONSTANT: DIK_NUMPADCOMMA HEX: B3
568 CONSTANT: DIK_DIVIDE HEX: B5
569 CONSTANT: DIK_SYSRQ HEX: B7
570 CONSTANT: DIK_RMENU HEX: B8
571 CONSTANT: DIK_PAUSE HEX: C5
572 CONSTANT: DIK_HOME HEX: C7
573 CONSTANT: DIK_UP HEX: C8
574 CONSTANT: DIK_PRIOR HEX: C9
575 CONSTANT: DIK_LEFT HEX: CB
576 CONSTANT: DIK_RIGHT HEX: CD
577 CONSTANT: DIK_END HEX: CF
578 CONSTANT: DIK_DOWN HEX: D0
579 CONSTANT: DIK_NEXT HEX: D1
580 CONSTANT: DIK_INSERT HEX: D2
581 CONSTANT: DIK_DELETE HEX: D3
582 CONSTANT: DIK_LWIN HEX: DB
583 CONSTANT: DIK_RWIN HEX: DC
584 CONSTANT: DIK_APPS HEX: DD
585 CONSTANT: DIK_POWER HEX: DE
586 CONSTANT: DIK_SLEEP HEX: DF
587 CONSTANT: DIK_WAKE HEX: E3
588 CONSTANT: DIK_WEBSEARCH HEX: E5
589 CONSTANT: DIK_WEBFAVORITES HEX: E6
590 CONSTANT: DIK_WEBREFRESH HEX: E7
591 CONSTANT: DIK_WEBSTOP HEX: E8
592 CONSTANT: DIK_WEBFORWARD HEX: E9
593 CONSTANT: DIK_WEBBACK HEX: EA
594 CONSTANT: DIK_MYCOMPUTER HEX: EB
595 CONSTANT: DIK_MAIL HEX: EC
596 CONSTANT: DIK_MEDIASELECT HEX: ED
598 ALIAS: DIK_BACKSPACE DIK_BACK
599 ALIAS: DIK_NUMPADSTAR DIK_MULTIPLY
600 ALIAS: DIK_LALT DIK_LMENU
601 ALIAS: DIK_CAPSLOCK DIK_CAPITAL
602 ALIAS: DIK_NUMPADMINUS DIK_SUBTRACT
603 ALIAS: DIK_NUMPADPLUS DIK_ADD
604 ALIAS: DIK_NUMPADPERIOD DIK_DECIMAL
605 ALIAS: DIK_NUMPADSLASH DIK_DIVIDE
606 ALIAS: DIK_RALT DIK_RMENU
607 ALIAS: DIK_UPARROW DIK_UP
608 ALIAS: DIK_PGUP DIK_PRIOR
609 ALIAS: DIK_LEFTARROW DIK_LEFT
610 ALIAS: DIK_RIGHTARROW DIK_RIGHT
611 ALIAS: DIK_DOWNARROW DIK_DOWN
612 ALIAS: DIK_PGDN DIK_NEXT
614 ALIAS: DIK_CIRCUMFLEX DIK_PREVTRACK
616 CONSTANT: DI8DEVTYPE_DEVICE HEX: 11
617 CONSTANT: DI8DEVTYPE_MOUSE HEX: 12
618 CONSTANT: DI8DEVTYPE_KEYBOARD HEX: 13
619 CONSTANT: DI8DEVTYPE_JOYSTICK HEX: 14
620 CONSTANT: DI8DEVTYPE_GAMEPAD HEX: 15
621 CONSTANT: DI8DEVTYPE_DRIVING HEX: 16
622 CONSTANT: DI8DEVTYPE_FLIGHT HEX: 17
623 CONSTANT: DI8DEVTYPE_1STPERSON HEX: 18
624 CONSTANT: DI8DEVTYPE_DEVICECTRL HEX: 19
625 CONSTANT: DI8DEVTYPE_SCREENPOINTER HEX: 1A
626 CONSTANT: DI8DEVTYPE_REMOTE HEX: 1B
627 CONSTANT: DI8DEVTYPE_SUPPLEMENTAL HEX: 1C
629 : GET_DIDEVICE_TYPE ( dwType -- type ) HEX: FF bitand ; inline
631 CONSTANT: DIPROPRANGE_NOMIN HEX: 80000000
632 CONSTANT: DIPROPRANGE_NOMAX HEX: 7FFFFFFF
633 CONSTANT: MAXCPOINTSNUM 8
635 CONSTANT: DIPH_DEVICE 0
636 CONSTANT: DIPH_BYOFFSET 1
637 CONSTANT: DIPH_BYID 2
638 CONSTANT: DIPH_BYUSAGE 3
640 : DIMAKEUSAGEDWORD ( UsagePage Usage -- DWORD ) 16 shift bitor ; inline
642 : DIPROP_BUFFERSIZE ( -- alien ) 1 <alien> ; inline
643 : DIPROP_AXISMODE ( -- alien ) 2 <alien> ; inline
645 CONSTANT: DIPROPAXISMODE_ABS 0
646 CONSTANT: DIPROPAXISMODE_REL 1
648 : DIPROP_GRANULARITY ( -- alien ) 3 <alien> ; inline
649 : DIPROP_RANGE ( -- alien ) 4 <alien> ; inline
650 : DIPROP_DEADZONE ( -- alien ) 5 <alien> ; inline
651 : DIPROP_SATURATION ( -- alien ) 6 <alien> ; inline
652 : DIPROP_FFGAIN ( -- alien ) 7 <alien> ; inline
653 : DIPROP_FFLOAD ( -- alien ) 8 <alien> ; inline
654 : DIPROP_AUTOCENTER ( -- alien ) 9 <alien> ; inline
656 CONSTANT: DIPROPAUTOCENTER_OFF 0
657 CONSTANT: DIPROPAUTOCENTER_ON 1
659 : DIPROP_CALIBRATIONMODE ( -- alien ) 10 <alien> ; inline
661 CONSTANT: DIPROPCALIBRATIONMODE_COOKED 0
662 CONSTANT: DIPROPCALIBRATIONMODE_RAW 1
664 : DIPROP_CALIBRATION ( -- alien ) 11 <alien> ; inline
665 : DIPROP_GUIDANDPATH ( -- alien ) 12 <alien> ; inline
666 : DIPROP_INSTANCENAME ( -- alien ) 13 <alien> ; inline
667 : DIPROP_PRODUCTNAME ( -- alien ) 14 <alien> ; inline
668 : DIPROP_JOYSTICKID ( -- alien ) 15 <alien> ; inline
669 : DIPROP_GETPORTDISPLAYNAME ( -- alien ) 16 <alien> ; inline
670 : DIPROP_PHYSICALRANGE ( -- alien ) 18 <alien> ; inline
671 : DIPROP_LOGICALRANGE ( -- alien ) 19 <alien> ; inline
672 : DIPROP_KEYNAME ( -- alien ) 20 <alien> ; inline
673 : DIPROP_CPOINTS ( -- alien ) 21 <alien> ; inline
674 : DIPROP_APPDATA ( -- alien ) 22 <alien> ; inline
675 : DIPROP_SCANCODE ( -- alien ) 23 <alien> ; inline
676 : DIPROP_VIDPID ( -- alien ) 24 <alien> ; inline
677 : DIPROP_USERNAME ( -- alien ) 25 <alien> ; inline
678 : DIPROP_TYPENAME ( -- alien ) 26 <alien> ; inline
680 CONSTANT: GUID_XAxis GUID: {A36D02E0-C9F3-11CF-BFC7-444553540000}
681 CONSTANT: GUID_YAxis GUID: {A36D02E1-C9F3-11CF-BFC7-444553540000}
682 CONSTANT: GUID_ZAxis GUID: {A36D02E2-C9F3-11CF-BFC7-444553540000}
683 CONSTANT: GUID_RxAxis GUID: {A36D02F4-C9F3-11CF-BFC7-444553540000}
684 CONSTANT: GUID_RyAxis GUID: {A36D02F5-C9F3-11CF-BFC7-444553540000}
685 CONSTANT: GUID_RzAxis GUID: {A36D02E3-C9F3-11CF-BFC7-444553540000}
686 CONSTANT: GUID_Slider GUID: {A36D02E4-C9F3-11CF-BFC7-444553540000}
687 CONSTANT: GUID_Button GUID: {A36D02F0-C9F3-11CF-BFC7-444553540000}
688 CONSTANT: GUID_Key GUID: {55728220-D33C-11CF-BFC7-444553540000}
689 CONSTANT: GUID_POV GUID: {A36D02F2-C9F3-11CF-BFC7-444553540000}
690 CONSTANT: GUID_Unknown GUID: {A36D02F3-C9F3-11CF-BFC7-444553540000}
691 CONSTANT: GUID_SysMouse GUID: {6F1D2B60-D5A0-11CF-BFC7-444553540000}
692 CONSTANT: GUID_SysKeyboard GUID: {6F1D2B61-D5A0-11CF-BFC7-444553540000}
693 CONSTANT: GUID_Joystick GUID: {6F1D2B70-D5A0-11CF-BFC7-444553540000}
694 CONSTANT: GUID_SysMouseEm GUID: {6F1D2B80-D5A0-11CF-BFC7-444553540000}
695 CONSTANT: GUID_SysMouseEm2 GUID: {6F1D2B81-D5A0-11CF-BFC7-444553540000}
696 CONSTANT: GUID_SysKeyboardEm GUID: {6F1D2B82-D5A0-11CF-BFC7-444553540000}
697 CONSTANT: GUID_SysKeyboardEm2 GUID: {6F1D2B83-D5A0-11CF-BFC7-444553540000}