Windows WinMM declarations for joystick state queries through caller-owned JOYINFOEX records.
Schemas
Dict schema
| Field | Schema | Role |
|---|---|---|
dwSize | Nat32 | size of this structure in bytes |
dwFlags | Nat32 | data-selection flags |
dwXpos | Nat32 | X-axis position |
dwYpos | Nat32 | Y-axis position |
dwZpos | Nat32 | Z-axis position |
dwRpos | Nat32 | R-axis position |
dwUpos | Nat32 | U-axis position |
dwVpos | Nat32 | V-axis position |
dwButtons | Nat32 | button-state bitfield |
dwButtonNumber | Nat32 | currently pressed button number |
dwPOV | Nat32 | point-of-view hat angle in hundredths of a degree, or 0xFFFFn32 when centered |
dwReserved1 | Nat32 | reserved value |
dwReserved2 | Nat32 | reserved value |
Imported functions
Stack effects list a C function's parameters with the first parameter on top; see importFunction.
joyGetPosEx
(pji uJoyID -- result) Retrieves extended information for a joystick.Inputs
pji:JOYINFOEXRefcaller-owned writable joystick-information storage withdwSizeset to its size anddwFlagsselecting the requested data; the call fills it.uJoyID:Nat32joystick identifier from 0 to 15.
Outputs
result:Nat32joystick status,0n32on success or an error code on failure.
Signature example
Printing @joyGetPosEx during compilation shows its imported Code signature.
"control" use
"windows/winmm" use
{} Int32 {} [
@joyGetPosEx printStack _:;
0
] "main" exportFunction
Expected Output During Compilation
{uJoyID: Nat32; pji: {dwSize: Nat32; dwFlags: Nat32; dwXpos: Nat32; dwYpos: Nat32; dwZpos: Nat32; dwRpos: Nat32; dwUpos: Nat32; dwVpos: Nat32; dwButtons: Nat32; dwButtonNumber: Nat32; dwPOV: Nat32; dwReserved1: Nat32; dwReserved2: Nat32;} Ref;} Nat32 {convention: "";} codeRef
See also
- windows/user32: User32 windowing, message, cursor, monitor, and device-context declarations.