X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-Events.html-inc;h=a943e9ec5f2a1b5fd81f1be6194542f29c9da38a;hb=0b221bb4fce84647a6cb9d7343de7330fb561c71;hp=dcfc02a41d5e3abea53bdc445428ee400728a487;hpb=d5943b684b1240307fbf0a103abbf18dd93998f4;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-Events.html-inc b/pages/SDL-Events.html-inc index dcfc02a..a943e9e 100644 --- a/pages/SDL-Events.html-inc +++ b/pages/SDL-Events.html-inc @@ -309,7 +309,7 @@ However, if you are not polling or waiting for events (e.g. you are filtering th
Polls for currently pending events.
If $event is not NULL, the next event is removed from the queue and stored in the SDL::Event structure pointed to by $event.
-As this function implicitly calls pump_events, you can only call this function in the thread that set the video mode with SDL::Video::set_video_mode.
+As this function implicitly calls pump_events, you can only call this function in the thread that set the video mode with SDL::Video::set_video_mode.
Waits indefinitely for the next available $event, returning 0 if there was an error while waiting for events, 1 otherwise.
If $event is not NULL, the next event is removed from the queue and stored in $event.
-As this function implicitly calls SDL_PumpEvents, you can only call this function in the thread that SDL::Video::set_video_mode.
+As this function implicitly calls SDL_PumpEvents, you can only call this function in the thread that SDL::Video::set_video_mode.
to filter the event return a 0, to pass the filter return a 1.
One Caveat is if you are filtering SDL_QUIT the event will be filtered if it is non-intterupt call ( Window closes normally ). If it is a interrupt SDL_QUIT it will be process on the next event poll.
-Events pushed onto to the queue with SDL::Events::push_events or SDL::Events::peep_events do not get filtered.
+Events pushed onto to the queue with SDL::Events::push_events or SDL::Events::peep_events do not get filtered.
This callback may run in a different thread.
@@ -373,7 +373,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi print $keys_ref->[SDLK_RETURN]; # 1 if pressed , 0 if not pressed -Use SDL::Events::pump_events to update the state array.
+Use SDL::Events::pump_events to update the state array.
This function gives you the current state after all events have been processed, so if a key or button has been pressed and released before you process events, then the pressed state will never show up in the get_key_state call.
This function doesn't take into account whether shift has been pressed or not.
@@ -437,12 +437,12 @@ The event is copied into the queue, and the caller may dispose of the memory poiGet the state of the modifier keys
-The inverse of SDL::Events::get_mod_state allows you to impose modifier key states on your application.
+The inverse of SDL::Events::get_mod_state allows you to impose modifier key states on your application.
Simply pass your desired modifier states into $modstate. This value can be a OR'd combination of any KMOD* constant.
my $modstate = KMOD_LMETA | KMOD_LSHIFT;-
Any KMOD_* constant see SDL::Events::get_mod_state for constants. +
Any KMOD_* constant see SDL::Events::get_mod_state for constants. SDL::Events::set_mod_state( $modstate );
To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently recieved key down event, the unicode member of the SDL::Event::key_sym provided structure will be then contain the corresponding character code, or otherwise zero.
+To obtain the character codes corresponding to received keyboard events, Unicode translation must first be turned on using this function. The translation incurs a slight overhead for each keyboard event and is therefore disabled by default. For each subsequently recieved key down event, the unicode member of the SDL::Event::key_sym provided structure will be then contain the corresponding character code, or otherwise zero.
A value of 1 for enabling, 0 for disabling and -1 for unchanged. -1 is usefull for querying the current translation mode.
Only key press events will be translated not release events.
Returns the previous translation mode as (1,0).