Windows WinMM declarations for joystick state queries through caller-owned JOYINFOEX records.
JOYINFOEX combines request-side and result-side fields for joyGetPosEx.
dwSize and dwFlags are supplied before the call.dwXpos, dwYpos, dwZpos, dwRpos, dwUpos, and dwVpos hold queried axis positions.dwButtons and dwButtonNumber hold button-state results.dwPOV holds the point-of-view hat result.dwReserved1 and dwReserved2 are reserved fields carried in the same record."windows/winmm" use
"control" use
{} () {} [
JOYINFOEX fieldCount printStack _:;
JOYINFOEX 0 fieldName printStack _:;
JOYINFOEX 12 fieldName printStack _:;
] "main" exportFunction
13
"dwSize"
"dwReserved2"
(uJoyID pji -- result)Fills one caller-supplied JOYINFOEX record with the current state of the selected joystick identifier and returns one Nat32 status.
uJoyID selects the joystick identifier.pji is one mutable JOYINFOEX Ref and remains caller-owned storage throughout the call.JOYINFOEX before the call.Printing imported names during compilation shows the exact imported signatures.
"windows/winmm" use
"control" use
{} Int32 {} [
@joyGetPosEx printStack _:;
0
] "main" exportFunction
{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