From 7aa8e7320d1876ef86de87ea6fc79cf2bd2518e3 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Sun, 22 Feb 2009 18:00:43 -0600 Subject: [PATCH] use CONSTANT: --- extra/game-input/iokit/iokit.factor | 44 ++++++++++++++--------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/extra/game-input/iokit/iokit.factor b/extra/game-input/iokit/iokit.factor index 26f2c40464..8a10535306 100755 --- a/extra/game-input/iokit/iokit.factor +++ b/extra/game-input/iokit/iokit.factor @@ -21,33 +21,33 @@ iokit-game-input-backend game-input-backend set-global [ &CFRelease NSFastEnumeration>vector ] [ f ] if* ] with-destructors ; -: game-devices-matching-seq +CONSTANT: game-devices-matching-seq { H{ { "DeviceUsage" 4 } { "DeviceUsagePage" 1 } } ! joysticks H{ { "DeviceUsage" 5 } { "DeviceUsagePage" 1 } } ! gamepads H{ { "DeviceUsage" 6 } { "DeviceUsagePage" 1 } } ! keyboards - } ; inline + } -: buttons-matching-hash - H{ { "UsagePage" 9 } { "Type" 2 } } ; inline -: keys-matching-hash - H{ { "UsagePage" 7 } { "Type" 2 } } ; inline -: x-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 30 } { "Type" 1 } } ; inline -: y-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 31 } { "Type" 1 } } ; inline -: z-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 32 } { "Type" 1 } } ; inline -: rx-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 33 } { "Type" 1 } } ; inline -: ry-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 34 } { "Type" 1 } } ; inline -: rz-axis-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 35 } { "Type" 1 } } ; inline -: slider-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 36 } { "Type" 1 } } ; inline -: hat-switch-matching-hash - H{ { "UsagePage" 1 } { "Usage" HEX: 39 } { "Type" 1 } } ; inline +CONSTANT: buttons-matching-hash + H{ { "UsagePage" 9 } { "Type" 2 } } +CONSTANT: keys-matching-hash + H{ { "UsagePage" 7 } { "Type" 2 } } +CONSTANT: x-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 30 } { "Type" 1 } } +CONSTANT: y-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 31 } { "Type" 1 } } +CONSTANT: z-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 32 } { "Type" 1 } } +CONSTANT: rx-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 33 } { "Type" 1 } } +CONSTANT: ry-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 34 } { "Type" 1 } } +CONSTANT: rz-axis-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 35 } { "Type" 1 } } +CONSTANT: slider-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 36 } { "Type" 1 } } +CONSTANT: hat-switch-matching-hash + H{ { "UsagePage" 1 } { "Usage" HEX: 39 } { "Type" 1 } } : device-elements-matching ( device matching-hash -- vector ) [