X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=sdlgit%2FSDL-Site.git;a=blobdiff_plain;f=pages%2FSDL-Event.html-inc;fp=pages%2FSDL-Event.html-inc;h=542b7b0ba9d477e7368df9c40340794182951a01;hp=24c7ecd253a6310a9c9f80427ab040ff93535969;hb=bd9f3e156952798c46df29d610af0a36ea065e89;hpb=3ca0acf80ad36dcad7c27c606985e2c5d838040b diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc index 24c7ecd..542b7b0 100644 --- a/pages/SDL-Event.html-inc +++ b/pages/SDL-Event.html-inc @@ -165,22 +165,22 @@ which union member relates to which event type.

Available type constants:

Event types are grouped by masks. SDL_EVENTMASK($type) will return the proper mask for the given type.

@@ -263,7 +263,7 @@ and when a key is pressed (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 SDL::Events::enable_key_repeat).

key_state

@@ -303,7 +303,7 @@ This field is very useful when you are checking for certain key presses, like so

key_unicode

-

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 SDL::Events::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).

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 SDL::Events::get_mouse_state).

motion_x, motion_y

@@ -350,9 +350,9 @@ This is currently only implemented on Windows and Linux/Unix-alikes.

Mouse button events

-

When a mouse button press or release is detected the number of the button pressed (from 1 to 255, -with 1 usually being the left button and 2 the right) is placed into button_button, the position of the mouse -when this event occured is stored in the button_x and the button_y fields. Like SDL_KeyboardEvent, +

When a mouse button press or release is detected, the number of the button pressed (from 1 to 255, +with 1 usually being the left button and 2 the right) is placed into button_button. The position of the mouse +when this event occured is stored in the button_x and the button_y fields. Like a keyboard event, information on whether the event was a press or a release event is stored in both the button_type and button_state fields, but this should be obvious.

Mouse wheel events are reported as buttons 4 (up) and 5 (down). Two events are generated i.e. you get @@ -525,8 +525,8 @@ the event queue using SDL::Events::push_event. The contents of the programmer, the only requirement is that type is a value from SDL_USEREVENT to SDL_NUMEVENTS-1 (inclusive)

 my $event = SDL::Event->new();
     $event->type ( SDL_USEREVENT + 3 );
-    $event->event_code(10);
-    $event->data1('hello event');
+    $event->user_code(10);
+    $event->user_data1('hello event');
 
  SDL::Events::push_event($event);
 
@@ -554,7 +554,7 @@ screen updates will still report success even though the application will no lon
 

AUTHORS

Top

-

See AUTHORS in SDL.

+

See /SDL.html#AUTHORS.

SEE ALSO

Top