X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Event.html-inc;h=de04a03c6b8d8c9d400efe062be0a22bf70856cf;hb=0b221bb4fce84647a6cb9d7343de7330fb561c71;hp=b1f25a9e24c1fa3c4669e9414727433c69695409;hpb=46beffd8f76fe150d946bf61c780e61de2affbdf;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc index b1f25a9..de04a03 100644 --- a/pages/SDL-Event.html-inc +++ b/pages/SDL-Event.html-inc @@ -78,7 +78,7 @@
use SDL::Event; # for the event object itself - use SDL::Events qw(pump_events poll_event); # functions for event queue handling +use SDL::Event; # for the event object itself + use SDL::Events; # functions for event queue handling SDL::init(SDL_INIT_VIDEO); my $event = SDL::Event->new(); while(1) { - pump_events(); + SDL::Events::pump_events(); - if(poll_event($event)) + if(SDL::Events::poll_event($event)) { if($event->type == SDL_MOUSEBUTTONDOWN) { @@ -165,22 +165,22 @@ which union member relates to which eventtype
.Available type constants:
Event types are grouped by masks. SDL_EVENTMASK($type)
will return the proper mask for the given type
.
type=SDL_KEYDOWN
or key_state=SDL_
then an SDL_RELEASED
when released and pressed again. For these keys KEYUP
and KEYDOWN
events are therefore
analogous to the state of the caps lock and num lock LEDs rather than the keys themselves.
These special cases are required for compatibility with Sun workstations.
-Note: Repeating SDL_KEYDOWN
events will occur if key repeat is enabled (see SDL_EnableKeyRepeat
).
+Note: Repeating SDL_KEYDOWN
events will occur if key repeat is enabled (see enable_key_repeat).
The unicode
field is only used when UNICODE translation is enabled with SDL_EnableUNICODE.
+
The unicode
field is only used when UNICODE translation is enabled with enable_unicode.
If unicode
is non-zero then this is the UNICODE character corresponding to the keypress.
If the high 9 bits of the character are 0, then this maps to the equivalent ASCII character:
my $char;
@@ -332,7 +332,7 @@ button states (motion_state
).
The button state can be interpreted using the SDL_BUTTON
macro (see SDL_GetMouseState).
The button state can be interpreted using the SDL_BUTTON
macro (see get_mouse_state).