From: Tobias Leich Date: Thu, 6 May 2010 16:23:11 +0000 (+0200) Subject: fixed docs for SDL::Video::list_modes X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=sdlgit%2FSDL-Site.git;a=commitdiff_plain;h=5ce48b7ebb54cf63bf5fb7ffb7d5f9213f8d45a9 fixed docs for SDL::Video::list_modes --- diff --git a/pages/SDL-Events.html-inc b/pages/SDL-Events.html-inc index 6f5c25f..74e0c41 100644 --- a/pages/SDL-Events.html-inc +++ b/pages/SDL-Events.html-inc @@ -359,7 +359,7 @@ The event is copied into the queue, and the caller may dispose of the memory poi

to filter the event return a 0, to pass the filter return a 1.

-

One Caveat is if you are filterign SDL_QUITEVENT the event will be filtered if it is non-intterupt call ( Window closes normally ). If it is a interrupt SDL_QUITEVENT it will be process on the next event poll.

+

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.

This callback may run in a different thread.

diff --git a/pages/SDL-Video.html-inc b/pages/SDL-Video.html-inc index 91d483a..86b96b8 100644 --- a/pages/SDL-Video.html-inc +++ b/pages/SDL-Video.html-inc @@ -97,8 +97,8 @@

SYNOPSIS

Top

-
 use SDL ':init';
- use SDL::Video ':all';
+
 use SDL;
+ use SDL::Video;
  use SDL::Surface;
  use SDL::Rect;
 
@@ -275,8 +275,16 @@ word identifier like "x11", "windib" my @modes = @{ SDL::Video::list_modes( $pixel_format, $flags ) };
 
 
-

Returns a ref to an array of available screen dimensions for the given format and video flags, -or it return undef if no modes are available.

+

Returns a reference to an array:

+
+
* +of available screen dimensions (as SDL::Rect's) for the given format and video flags.
+
* +with first array element 'all'. In this case you can set all modes.
+
* +with first array element 'none' if no mode is available.
+
+

Note: <list_modes> should be called before the video_mode ist set. Otherwise you will always get 'all'.

Example:

 use SDL;
  use SDL::Video;
@@ -293,9 +301,9 @@ or it return undef if no modes are available.

if($#modes > 0) { print("available modes:\n"); - foreach my $index ( @modes ) + foreach my $mode ( @modes ) { - printf("%03d: %d x %d\n", $index, $modes[$index]->w, $modes[$index]->h ); + printf("%d x %d\n", $mode->w, $mode->h ); } } elsif($#modes == 0) diff --git a/pages/documentation.html-inc b/pages/documentation.html-inc index 74a94b0..89e6975 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::Time- a 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::PDL

Extension
thumbSDL::App- a SDL perl extension

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
Core
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

UNCATEGORIZED
thumbSDL::Credits- Authors and contributors of the SDL Perl project
thumbSDL::Game::Palette- a perl extension
thumbSDL::MPEG- a SDL perl extension
thumbSDL::Music- a perl extension
thumbSDL::OpenGL- a perl extension
thumbSDL::SMPEG- a SDL perl extension
thumbSDL::Sound- a perl extension
thumbSDL::Tool::Font- a perl extension
thumbSDL::Tool::Graphic
+

Documentation (latest development branch)

Core
thumbSDL- Simple DirectMedia Layer for Perl
thumbSDL::Time- a 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::PDL

Extension
thumbSDL::App- a SDL perl extension

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
Core
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

UNCATEGORIZED
thumbSDL::Credits- Authors and contributors of the SDL Perl project
thumbSDL::Game::Palette- a perl extension
thumbSDL::MPEG- a SDL perl extension
thumbSDL::Music- a perl extension
thumbSDL::OpenGL- a perl extension
thumbSDL::SMPEG- a SDL perl extension
thumbSDL::Sound- a perl extension
thumbSDL::Tool::Font- a perl extension
thumbSDL::Tool::Graphic