From: Tobias Leich Date: Sat, 9 Oct 2010 09:35:19 +0000 (+0200) Subject: update for SDL::Event X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=471a0af80b3fe584289fe0bde4ed0b0ca253fbd5;p=sdlgit%2FSDL-Site.git update for SDL::Event --- diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc index 0ad7073..0d2db37 100644 --- a/pages/SDL-Event.html-inc +++ b/pages/SDL-Event.html-inc @@ -166,21 +166,21 @@ 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 enable_key_repeat (enable_key_repeat in SDL::EVENTS)).

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 enable_unicode (enable_unicode in SDL::EVENTS). 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 get_mouse_state (get_mouse_state in SDL::EVENTS)).

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 diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 080cc03..c218fe4 100644 --- a/pages/documentation.html-inc +++ b/pages/documentation.html-inc @@ -1,2 +1,2 @@

-

Documentation (latest development branch)

Core
thumbSDL- Simple DirectMedia Layer for Perl
thumbSDL::Credits- Authors and contributors of the SDL Perl project
thumbSDL::Deprecated- Log of Deprecated items per release
thumbSDL::Time- An SDL Perl extension for managing timers
Audio
thumbSDL::Audio- SDL Bindings for Audio
Structure
thumbSDL::AudioCVT- Audio Conversion Structure
thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
CDROM
thumbSDL::CDROM- SDL Bindings for the CDROM device
Structure
thumbSDL::CD- SDL Bindings for structure SDL_CD
thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
Events
thumbSDL::Events- Bindings to the Events Category in SDL API
Structure
thumbSDL::Event- General event structure
Joystick
thumbSDL::Joystick- SDL Bindings for the Joystick device
Mouse
thumbSDL::Mouse- SDL Bindings for the Mouse device
Structure
thumbSDL::Cursor- Mouse cursor structure
Structure
thumbSDL::Version- SDL Bindings for structure SDL_Version
Video
thumbSDL::Video- Bindings to the video category in SDL API
Structure
thumbSDL::Color- Format independent color description
thumbSDL::Overlay- YUV Video overlay
thumbSDL::Palette- Color palette for 8-bit pixel formats
thumbSDL::PixelFormat- Stores surface format information
thumbSDL::Rect- Defines a rectangular area
thumbSDL::Surface- Graphic surface structure
thumbSDL::VideoInfo- Video Target Information

Cookbook
thumbSDL::Cookbook
thumbSDL::Cookbook::OpenGL- Using SDL with OpenGL
thumbSDL::Cookbook::PDL

Extension
thumbSDLx::App- a SDL perl extension
thumbSDLx::Layer- Storage object for surface and position information
thumbSDLx::LayerManager- Extension for managing layers in a 2D world
thumbSDLx::Rect- SDL extension for storing and manipulating rectangular coordinates
thumbSDLx::SFont- Extension making fonts out of images and printing them
thumbSDLx::Sound
thumbSDLx::Sprite- interact with images quick and easily in SDL
thumbSDLx::Sprite::Animated- create animated SDL sprites easily!
thumbSDLx::Surface- Graphic surface matrix extension
Controller
thumbSDLx::Controller- Handles the loops for events, movement and rendering
thumbSDLx::Controller::Interface- Interface Physics and Rendering with the Controller with callbacks

GFX
thumbSDL::GFX::Framerate- framerate calculating functions
thumbSDL::GFX::Primitives- basic drawing functions
Structure
thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

Image
thumbSDL::Image- Bindings for the SDL_Image library

Mixer
thumbSDL::Mixer- Sound and music functions
thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
thumbSDL::Mixer::Effects- sound effect functions
thumbSDL::Mixer::Groups- Audio channel group functions
thumbSDL::Mixer::Music- functions for music
thumbSDL::Mixer::Samples- functions for loading sound samples
Structure
thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic

Pango
thumbSDL::Pango- Text rendering engine
Structure
thumbSDL::Pango::Context- Context object for SDL::Pango

TODO
thumbSDL::MPEG- a SDL perl extension
thumbSDL::SMPEG- a SDL perl extension
MultiThread
thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
Structure
thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
GFX
thumbSDL::GFX::BlitFunc- blitting functions
thumbSDL::GFX::ImageFilter- image filtering functions
thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

TTF
thumbSDL::TTF- True Type Font functions (libfreetype)
Structure
thumbSDL::TTF::Font- Font object type for SDL_ttf

Tutorials
thumbSDL::Tutorial- introduction to Perl SDL
thumbSDL::Tutorial::Animation
thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL
+

Documentation (latest development branch)

Core
thumbSDL- Simple DirectMedia Layer for Perl
thumbSDL::Credits- Authors and contributors of the SDL Perl project
thumbSDL::Deprecated- Log of Deprecated items per release
thumbSDL::Time- An SDL Perl extension for managing timers
Audio
thumbSDL::Audio- SDL Bindings for Audio
Structure
thumbSDL::AudioCVT- Audio Conversion Structure
thumbSDL::AudioSpec- SDL Bindings for structure SDL::AudioSpec
CDROM
thumbSDL::CDROM- SDL Bindings for the CDROM device
Structure
thumbSDL::CD- SDL Bindings for structure SDL_CD
thumbSDL::CDTrack- SDL Bindings for structure SDL_CDTrack
Events
thumbSDL::Events- Bindings to the Events Category in SDL API
Structure
thumbSDL::Event- General event structure
Joystick
thumbSDL::Joystick- SDL Bindings for the Joystick device
Mouse
thumbSDL::Mouse- SDL Bindings for the Mouse device
Structure
thumbSDL::Cursor- Mouse cursor structure
Structure
thumbSDL::Version- SDL Bindings for structure SDL_Version
Video
thumbSDL::Video- Bindings to the video category in SDL API
Structure
thumbSDL::Color- Format independent color description
thumbSDL::Overlay- YUV Video overlay
thumbSDL::Palette- Color palette for 8-bit pixel formats
thumbSDL::PixelFormat- Stores surface format information
thumbSDL::Rect- Defines a rectangular area
thumbSDL::Surface- Graphic surface structure
thumbSDL::VideoInfo- Video Target Information

Cookbook
thumbSDL::Cookbook
thumbSDL::Cookbook::OpenGL- Using SDL with OpenGL
thumbSDL::Cookbook::PDL

Extension
thumbSDLx::App- a SDL perl extension
thumbSDLx::Layer- Storage object for surface and position information
thumbSDLx::LayerManager- Extension for managing layers in a 2D world
thumbSDLx::Rect- SDL extension for storing and manipulating rectangular coordinates
thumbSDLx::SFont- Extension making fonts out of images and printing them
thumbSDLx::Sound
thumbSDLx::Sprite- interact with images quick and easily in SDL
thumbSDLx::Sprite::Animated- create animated SDL sprites easily!
thumbSDLx::Surface- Graphic surface matrix extension
Controller
thumbSDLx::Controller- Handles the loops for events, movement and rendering
thumbSDLx::Controller::Interface- Interface Physics and Rendering with the Controller with callbacks

GFX
thumbSDL::GFX::Framerate- framerate calculating functions
thumbSDL::GFX::Primitives- basic drawing functions
Structure
thumbSDL::GFX::FPSManager- data structure used by SDL::GFX::Framerate

Image
thumbSDL::Image- Bindings for the SDL_Image library

Mixer
thumbSDL::Mixer- Sound and music functions
thumbSDL::Mixer::Channels- SDL::Mixer channel functions and bindings
thumbSDL::Mixer::Effects- sound effect functions
thumbSDL::Mixer::Groups- Audio channel group functions
thumbSDL::Mixer::Music- functions for music
thumbSDL::Mixer::Samples- functions for loading sound samples
Structure
thumbSDL::Mixer::MixChunk- SDL Bindings for structure SDL_MixChunk
thumbSDL::Mixer::MixMusic- SDL Bindings for structure SDL_MixMusic

Pango
thumbSDL::Pango- Text rendering engine
Structure
thumbSDL::Pango::Context- Context object for SDL::Pango

TODO
thumbSDL::MPEG- a SDL perl extension
thumbSDL::SMPEG- a SDL perl extension
MultiThread
thumbSDL::MultiThread- Bindings to the MultiThread category in SDL API
Structure
thumbSDL::RWOps- SDL Bindings to SDL_RWOPs
GFX
thumbSDL::GFX::BlitFunc- blitting functions
thumbSDL::GFX::ImageFilter- image filtering functions
thumbSDL::GFX::Rotozoom- rotation and zooming functions for surfaces

TTF
thumbSDL::TTF- True Type Font functions (libfreetype)
Structure
thumbSDL::TTF::Font- Font object type for SDL_ttf

Tutorials
thumbSDL::Tutorial- introduction to Perl SDL
thumbSDL::Tutorial::Animation
thumbSDL::Tutorial::LunarLander- a small tutorial on Perl SDL