Handbook
Glossary
get-input-device ( sender -- device )
Vocabulary
game
.
input
.
iokit
Inputs
sender
an
object
Outputs
device
an
object
Definition
USING:
combinators
core-foundation.data
core-foundation.strings
iokit.hid
kernel
sequences
;
IN:
game.input.iokit
:
get-input-device
( sender -- device )
dup
CFGetTypeID
{
{
[
dup
IOHIDDeviceGetTypeID
=
]
[
drop
]
}
{
[
dup
IOHIDQueueGetTypeID
=
]
[
drop
IOHIDQueueGetDevice
]
}
[
drop
"input callback doesn't know how to deal with "
swap
CF>description
append
throw
]
}
cond
;