Next: Joystick, Previous: Video, Up: The (sdl *) Modules [Contents][Index]
Return a new SDL event.
Optional arg type is a symbol (see event-type enums).
If omitted, the default is SDL_NOEVENT
.
Return the symbolic type
from event.
Set type
in event to value, a symbol or integer.
The value for event:active:gain
and event:active:set-gain!
is a symbol, one of: gained
or lost
.
The value for event:active:state
and event:active:set-state!
is a (possibly empty) list of symbols from the same set used by
get-app-state
.
Return the symbolic active.gain
from event.
Return active.state
from event as a (possibly empty) list of symbols.
Set active.gain
in event to value, a symbol or integer.
Set active.state
in event to value, a (possibly empty) list of symbols.
The value for event:key:state
and event:key:set-state!
is a symbol, one of: released
or pressed
.
Return the symbolic key.keysym.sym
from event.
Set key.keysym.sym
in event to value, a symbol or integer.
Return key.keysym.mod
from event as a (possibly empty) list of symbols.
Set key.keysym.mod
in event to value, a (possibly empty) list of symbols.
Return the symbolic key.state
from event.
Get key.keysym.scancode
from event.
Get key.keysym.unicode
from event.
Set key.state
in event to value, a symbol or integer.
Set key.keysym.scancode
in event
to value.
Set key.keysym.unicode
in event
to value.
Return motion.state
from event as a (possibly empty) list of symbols.
Get motion.x
from event.
Get motion.y
from event.
Get motion.xrel
from event.
Get motion.yrel
from event.
Set motion.state
in event to value, a (possibly empty) list of symbols.
Set motion.x
in event
to value.
Set motion.y
in event
to value.
Set motion.xrel
in event
to value.
Set motion.yrel
in event
to value.
The value for event:button:button
and event:button:set-button!
is a (possibly empty) list of symbols from the set:
left middle right wheel-up wheel-down x1 x2
The value for event:button:state
and event:button:set-state!
is a symbol, one of: released
or pressed
.
Return the symbolic button.button
from event.
Return the symbolic button.state
from event.
Get button.x
from event.
Get button.y
from event.
Set button.button
in event to value, a symbol or integer.
Set button.state
in event to value, a symbol or integer.
Set button.x
in event
to value.
Set button.y
in event
to value.
The value for event:jbutton:state
and event:jbutton:set-state!
is a symbol, one of: released
or pressed
.
The value for event:jhat:value
and event:jhat:set-value!
is a list of or more symbols from the set:
centered up down left right
Specifying the empty list for event:jhat:set-value!
is
effectively the same as specifying centered
.
Get jaxis.which
from event.
Get jaxis.axis
from event.
Get jaxis.value
from event.
Set jaxis.which
in event
to value.
Set jaxis.axis
in event
to value.
Set jaxis.value
in event
to value.
Get jbutton.which
from event.
Get jbutton.button
from event.
Return the symbolic jbutton.state
from event.
Set jbutton.which
in event
to value.
Set jbutton.button
in event
to value.
Set jbutton.state
in event to value, a symbol or integer.
Get jball.which
from event.
Get jball.ball
from event.
Get jball.xrel
from event.
Get jball.yrel
from event.
Set jball.which
in event
to value.
Set jball.ball
in event
to value.
Set jball.xrel
in event
to value.
Set jball.yrel
in event
to value.
Get jhat.which
from event.
Get jhat.hat
from event.
Return jhat.value
from event as a (possibly empty) list of symbols.
Set jhat.which
in event
to value.
Set jhat.hat
in event
to value.
Set jhat.value
in event to value, a (possibly empty) list of symbols.
Get resize.w
from event.
Get resize.h
from event.
Set resize.w
in event
to value.
Set resize.h
in event
to value.
Gather events from input devices and update the event queue.
Add events
to the back of the event queue.
Return the count of succesfully added events.
Return a count (less than or equal to n) of events at
the front of the event queue that match mask,
without changing the queue. Optional arg accumulate if
non-#f
means to return the list of matched events, instead.
If there are errors, return #f
.
See event-mask flags.
Return a list (of length at most n) of
events at the front of the event queue that match
mask, removing them from the queue.
If there are errors, return #f
.
See event-mask flags.
Poll for events and return #t
if there are any pending.
Optional arg event specifies an event object (from
make-event
) to be filled in with the next event from
the queue (if available).
Wait indefinitely for and return #f
only if there were errors.
Optional arg event specifies an event object (from
make-event
) to be filled in with the next event from
the queue.
Push event onto the queue.
Return #t
on success.
Set the event filter to filter, or clear it if filter
is #f
. This is a procedure called with one arg, and whose
return value, if non-#f
, means to keep the event, otherwise
discard it. If full? is #f
, the arg the event type (a
symbol), otherwise it is an event object.
Return information on the current event filter, or #f
if none is set. If there is a filter, the value is a pair
with car the filter proc, and cdr #f
if the proc takes
an event type, or #t
if the proc takes an event object.
Return #t
if event type (see event-type enums)
is recognized and queued, or #f
if it is ignored.
If setting is specified, set the handling of
type to the truth value of setting first.
Return #t
iff UNICODE keyboard translation is enabled.
Optional arg enable? if non-#f
, enables UNICODE
keyboard translation, or disables it if #f
.
Enable or disable keyboard repeat.
delay is the initial delay in ms between the time
when a key is pressed, and keyboard repeat begins.
interval is the time in ms between keyboard repeat
events. If delay is 0, keyboard repeat is disabled.
Return #t
on success.
Return a list of pressed keys (see keysym enums).
Return the current key modifier state as a list of symbols.
Set the current key modifier state to modstate, a list of symbols. This does not change the keyboard state, only the key modifier flags.
Return #t
if buttons specified in mask are pressed,
otherwise #f
.
mask is a symbol or a list of symbols from the set returned
by get-mouse-state
.
For backward compatibility, mask can also be the (integer) logior of the buttons, using mapping:
1 left 2 middle 4 right 8 wheel-up 16 wheel-down 32 x1 64 x2
For example, a value of 5 specifies both left and right buttons,
equivalent to (left right)
.
Return three values: a (possibly empty) list of symbols
representing pressed mouse buttons (like event:button:button
),
and two integer coordinates x and y.
Optional arg relative
non-#f
means the
coordinates are relative to the last time the underlying
SDL_GetRelativeMouseState
was called.
Next: Joystick, Previous: Video, Up: The (sdl *) Modules [Contents][Index]