test includes
Tobias Leich [Fri, 13 Nov 2009 19:32:24 +0000 (20:32 +0100)]
31 files changed:
pages/SDL-App.html-inc [new file with mode: 0644]
pages/SDL-Cdrom.html-inc [new file with mode: 0644]
pages/SDL-Color.html-inc [new file with mode: 0644]
pages/SDL-Cookbook-PDL.html-inc [new file with mode: 0644]
pages/SDL-Cookbook.html-inc [new file with mode: 0644]
pages/SDL-Cursor.html-inc [new file with mode: 0644]
pages/SDL-Event.html-inc [new file with mode: 0644]
pages/SDL-Events.html-inc [new file with mode: 0644]
pages/SDL-Font.html-inc [new file with mode: 0644]
pages/SDL-Game-Palette.html-inc [new file with mode: 0644]
pages/SDL-MPEG.html-inc [new file with mode: 0644]
pages/SDL-Mixer.html-inc [new file with mode: 0644]
pages/SDL-MultiThread.html-inc [new file with mode: 0644]
pages/SDL-Music.html-inc [new file with mode: 0644]
pages/SDL-OpenGL.html-inc [new file with mode: 0644]
pages/SDL-Overlay.html-inc [new file with mode: 0644]
pages/SDL-Palette.html-inc [new file with mode: 0644]
pages/SDL-PixelFormat.html-inc [new file with mode: 0644]
pages/SDL-Rect.html-inc [new file with mode: 0644]
pages/SDL-SFont.html-inc [new file with mode: 0644]
pages/SDL-SMPEG.html-inc [new file with mode: 0644]
pages/SDL-Sound.html-inc [new file with mode: 0644]
pages/SDL-Surface.html-inc [new file with mode: 0644]
pages/SDL-TTFont.html-inc [new file with mode: 0644]
pages/SDL-Timer.html-inc [new file with mode: 0644]
pages/SDL-Tool-Font.html-inc [new file with mode: 0644]
pages/SDL-Tool-Graphic.html-inc [new file with mode: 0644]
pages/SDL-Tutorial.html-inc [new file with mode: 0644]
pages/SDL-Video.html-inc [new file with mode: 0644]
pages/SDL-VideoInfo.html-inc [new file with mode: 0644]
pages/SDL.html-inc [new file with mode: 0644]

diff --git a/pages/SDL-App.html-inc b/pages/SDL-App.html-inc
new file mode 100644 (file)
index 0000000..8d6e424
--- /dev/null
@@ -0,0 +1,195 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new">new</a></li>
+<li><a href="#title">title</a></li>
+<li><a href="#delay">delay</a></li>
+<li><a href="#ticks">ticks</a></li>
+<li><a href="#error">error</a></li>
+<li><a href="#resize">resize</a></li>
+<li><a href="#fullscreen">fullscreen</a></li>
+<li><a href="#iconify">iconify</a></li>
+<li><a href="#grab_input">grab_input</a></li>
+<li><a href="#loop">loop</a></li>
+<li><a href="#sync">sync</a></li>
+<li><a href="#attribute_attr_value">attribute ( attr, [value] )</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::App - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  use SDL;
+       use SDL::Event; 
+       use SDL::App; 
+
+       my $app = new SDL::App ( 
+       -title =&gt; 'Application Title', 
+       -width =&gt; 640, 
+       -height =&gt; 480, 
+       -depth =&gt; 32 ); 
+
+</pre>
+<p>This is the manual way of doing things      </p>
+<pre>  my $event = new SDL::Event;             # create a new event 
+
+       $event-&gt;pump();
+       $event-&gt;poll();
+
+       while ($event-&gt;wait()) { 
+         my $type = $event-&gt;type();      # get event type 
+         print $type; 
+         exit if $type == SDL_QUIT; 
+         }
+An alternative to the manual Event processing is the L&lt;SDL::App::loop&gt; .
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::App</cite> controls the root window of the of your SDL based application.
+It extends the <cite>SDL::Surface</cite> class, and provides an interface to the window
+manager oriented functions.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new">new</h2>
+<div id="new_CONTENT">
+<p><code>SDL::App::new</code> initializes the SDL, creates a new screen,
+and initializes some of the window manager properties.
+<code>SDL::App::new</code> takes a series of named parameters:</p>
+<ul>
+               <li>-title      </li>
+               <li>-icon_title </li>
+               <li>-icon       </li>
+               <li>-width      </li>
+               <li>-height     </li>
+               <li>-depth      </li>
+               <li>-flags      </li>
+               <li>-resizeable</li>
+</ul>
+
+
+</div>
+<h2 id="title">title</h2>
+<div id="title_CONTENT">
+<p><code>SDL::App::title</code> takes 0, 1, or 2  arguments.  It returns the current
+application window title.  If one parameter is passed, both the window
+title and icon title will be set to its value.  If two parameters are
+passed the window title will be set to the first, and the icon title
+to the second.</p>
+
+</div>
+<h2 id="delay">delay</h2>
+<div id="delay_CONTENT">
+<p><code>SDL::App::delay</code> takes 1 argument, and will sleep the application for
+that many ms.</p>
+
+</div>
+<h2 id="ticks">ticks</h2>
+<div id="ticks_CONTENT">
+<p><code>SDL::App::ticks</code> returns the number of ms since the application began.</p>
+
+</div>
+<h2 id="error">error</h2>
+<div id="error_CONTENT">
+<p><code>SDL::App::error</code> returns the last error message set by the SDL.</p>
+
+</div>
+<h2 id="resize">resize</h2>
+<div id="resize_CONTENT">
+<p><code>SDL::App::resize</code> takes a new height and width of the application
+if the application was originally created with the -resizable option.</p>
+
+</div>
+<h2 id="fullscreen">fullscreen</h2>
+<div id="fullscreen_CONTENT">
+<p><code>SDL::App::fullscreen</code> toggles the application in and out of fullscreen mode.</p>
+
+</div>
+<h2 id="iconify">iconify</h2>
+<div id="iconify_CONTENT">
+<p><code>SDL::App::iconify</code> iconifies the applicaiton window.</p>
+
+</div>
+<h2 id="grab_input">grab_input</h2>
+<div id="grab_input_CONTENT">
+<p><code>SDL::App::grab_input</code> can be used to change the input focus behavior of
+the application.  It takes one argument, which should be one of the following:</p>
+<dl>
+       <dt>*
+SDL_GRAB_QUERY</dt>
+       <dt>*
+SDL_GRAB_ON</dt>
+       <dt>*
+SDL_GRAB_OFF</dt>
+</dl>
+
+</div>
+<h2 id="loop">loop</h2>
+<div id="loop_CONTENT">
+<p><code>SDL::App::loop</code> is a simple event loop method which takes a reference to a hash
+of event handler subroutines.  The keys of the hash must be SDL event types such
+as SDL_QUIT(), SDL_KEYDOWN(), and the like.  The event method recieves as its parameter 
+the event object used in the loop.</p>
+<pre>  Example:
+
+       my $app = new SDL::App  -title =&gt; &quot;test.app&quot;, 
+                               -width =&gt; 800, 
+                               -height =&gt; 600, 
+                               -depth =&gt; 32;
+
+       my %actions = (
+               SDL_QUIT() =&gt; sub { exit(0); },
+               SDL_KEYDOWN() =&gt; sub { print &quot;Key Pressed&quot; },
+       );
+
+       $app-&gt;loop(\%actions);
+
+</pre>
+
+</div>
+<h2 id="sync">sync</h2>
+<div id="sync_CONTENT">
+<p><code>SDL::App::sync</code> encapsulates the various methods of syncronizing the screen with the
+current video buffer.  <code>SDL::App::sync</code> will do a fullscreen update, using the double buffer
+or OpenGL buffer if applicable.  This is prefered to calling flip on the application window.</p>
+
+</div>
+<h2 id="attribute_attr_value">attribute ( attr, [value] )</h2>
+<div id="attribute_attr_value_CONTENT">
+<p><code>SDL::App::attribute</code> allows one to set and get GL attributes.  By passing a value
+in addition to the attribute selector, the value will be set.  <code>SDL:::App::attribute</code>
+always returns the current value of the given attribute, or croaks on failure.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig
+Kartik Thakore</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Surface</cite> <cite>SDL::Event</cite>  <cite>SDL::OpenGL</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Cdrom.html-inc b/pages/SDL-Cdrom.html-inc
new file mode 100644 (file)
index 0000000..a933869
--- /dev/null
@@ -0,0 +1,151 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#EXPORTS">EXPORTS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#cd_num_drives">cd_num_drives()</a></li>
+<li><a href="#name_cd">name(cd)</a></li>
+<li><a href="#status_cd">status(cd)</a></li>
+<li><a href="#play_cd_start_length_fs_fl">play(cd,start,length,fs,fl) </a></li>
+<li><a href="#pause_cd">pause(cd)</a></li>
+<li><a href="#resume_cd">resume(cd)</a></li>
+<li><a href="#stop_cd">stop(cd)</a></li>
+<li><a href="#eject_cd">eject(cd)</a></li>
+<li><a href="#id_cd">id(cd)</a></li>
+<li><a href="#num_tracks_cd">num_tracks(cd)</a></li>
+<li><a href="#track_cd_number">track(cd,number)</a></li>
+<li><a href="#current_cd">current(cd)</a></li>
+<li><a href="#current_frame_cd">current_frame(cd)</a></li>
+</ul>
+</li>
+<li><a href="#AUTHORS">AUTHORS</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Cdrom - a SDL perl extension for managing CD-ROM drives</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  use SDL::Cdrom;
+       $cdrom = SDL::Cdrom-&gt;new(0);
+       $cdrom-&gt;play();
+
+</pre>
+
+</div>
+<h1 id="EXPORTS">EXPORTS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="EXPORTS_CONTENT">
+<ul>
+               <li><code>cd_num_drives</code>.</li>
+</ul>
+
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>Create a new SDL::Cdrom object. The passed $id is the number of the drive,
+whereas 0 is the first drive etc.</p>
+<pre>  use SDL::Cdrom;
+       my $drive =&gt; SDL::Cdrom-&gt;new($id);
+
+</pre>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="cd_num_drives">cd_num_drives()</h2>
+<div id="cd_num_drives_CONTENT">
+<p>Returns the number of CD-ROM drives present.</p>
+
+</div>
+<h2 id="name_cd">name(cd)</h2>
+<div id="name_cd_CONTENT">
+<p>Returns the system dependent name of the CD-ROM device.
+It takes a SDL::Cdrom as first parameter.</p>
+
+</div>
+<h2 id="status_cd">status(cd)</h2>
+<div id="status_cd_CONTENT">
+<p>Return the status of the drive.
+It takes a SDL::Cdrom as first parameter.</p>
+
+</div>
+<h2 id="play_cd_start_length_fs_fl">play(cd,start,length,fs,fl) </h2>
+<div id="play_cd_start_length_fs_fl_CONTENT">
+<p>Play a track from the SDL::Cdrom given as first parameter, second parameter is the frame to start, the third is the lenght to play.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="pause_cd">pause(cd)</h2>
+<div id="pause_cd_CONTENT">
+<p>Pause the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="resume_cd">resume(cd)</h2>
+<div id="resume_cd_CONTENT">
+<p>Resume the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="stop_cd">stop(cd)</h2>
+<div id="stop_cd_CONTENT">
+<p>Stop the playing of the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="eject_cd">eject(cd)</h2>
+<div id="eject_cd_CONTENT">
+<p>Eject the medium in the SDL::Cdrom given as first parameter.
+It returns 1 on succés 0 on error.</p>
+
+</div>
+<h2 id="id_cd">id(cd)</h2>
+<div id="id_cd_CONTENT">
+<p>Return the ID of the drive given as first parameter.</p>
+
+</div>
+<h2 id="num_tracks_cd">num_tracks(cd)</h2>
+<div id="num_tracks_cd_CONTENT">
+<p>Return the number of tracks on the SDL::Cdrom given as first parameter.</p>
+
+</div>
+<h2 id="track_cd_number">track(cd,number)</h2>
+<div id="track_cd_number_CONTENT">
+<p>Returns the track description of the track given as second parameter.
+the first parameter is a SDL:Cdrom.</p>
+
+</div>
+<h2 id="current_cd">current(cd)</h2>
+<div id="current_cd_CONTENT">
+<p>Return the current played track number given as first parameter.</p>
+
+</div>
+<h2 id="current_frame_cd">current_frame(cd)</h2>
+<div id="current_frame_cd_CONTENT">
+<p>Return the current frame given as first parameter.</p>
+
+</div>
+<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHORS_CONTENT">
+<p>David J. Goehrig
+Documentation by Tels &lt;http://bloodgate.com/&gt;.</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Mixer</cite> <cite>SDL::App</cite>.</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Color.html-inc b/pages/SDL-Color.html-inc
new file mode 100644 (file)
index 0000000..251ae61
--- /dev/null
@@ -0,0 +1,92 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new_r_g_b">new ( $r, $g, $b )</a></li>
+<li><a href="#r">r</a></li>
+<li><a href="#g">g</a></li>
+<li><a href="#b">b</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Color - Format independent color description</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  my $black = SDL::Color-&gt;new( 0, 0, 0);
+  my $color = SDL::Color-&gt;new(255, 0, 0);
+  my $r = $color-&gt;r; # 255
+  my $g = $color-&gt;g; # 0
+  my $b = $color-&gt;b; # 0
+  $color-&gt;g(255);
+  $color-&gt;b(255);
+  # $color is now white
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><code>SDL_Color</code> describes a color in a format independent way.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new_r_g_b">new ( $r, $g, $b )</h2>
+<div id="new_r_g_b_CONTENT">
+<p>The constructor creates a new color with the specified red, green and
+blue values:</p>
+<pre>  my $color = SDL::Color-&gt;new(255, 0, 0);
+
+</pre>
+
+</div>
+<h2 id="r">r</h2>
+<div id="r_CONTENT">
+<p>If passed a value, this method sets the red component of the color;
+if not, it returns the red component of the color:</p>
+<pre>  my $r = $color-&gt;r; # 255
+  $color-&gt;r(128);
+
+</pre>
+
+</div>
+<h2 id="g">g</h2>
+<div id="g_CONTENT">
+<p>If passed a value, this method sets the green component of the color;
+if not, it returns the green component of the color:</p>
+<pre>  my $g = $color-&gt;g; # 255
+  $color-&gt;g(128);
+
+</pre>
+
+</div>
+<h2 id="b">b</h2>
+<div id="b_CONTENT">
+<p>If passed a value, this method sets the blue component of the color;
+if not, it returns the blue component of the color:</p>
+<pre>  my $b = $color-&gt;b; # 255
+  $color-&gt;b(128);
+
+</pre>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Cookbook-PDL.html-inc b/pages/SDL-Cookbook-PDL.html-inc
new file mode 100644 (file)
index 0000000..db383f6
--- /dev/null
@@ -0,0 +1,636 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#Old_SDL_interface">Old SDL interface</a></li>
+<li><a href="#Perl_s_SDL_in_a_nutshell">Perl's SDL in a nutshell</a></li>
+<li><a href="#SDL_power_through_simplicity">SDL - power through simplicity</a></li>
+<li><a href="#Example_1_Model_of_a_2_D_Noninteract">Example 1: Model of a 2-D Noninteracting Gas</a>
+<ul><li><a href="#Computational_Logic">Computational Logic</a></li>
+<li><a href="#Animation_Logic">Animation Logic</a></li>
+<li><a href="#Disappearing_Particles_Some_of_the_p">Disappearing Particles!
+Some of the particles can drift off the screen.  This is no good. What's causing this problem?</a></li>
+<li><a href="#Disappearing_Particles_take_2">Disappearing Particles, take 2</a></li>
+</ul>
+</li>
+<li><a href="#What_s_in_a_Name_Pesky_conflicts_wit">What's in a Name?  Pesky conflicts with main::in()</a>
+<ul><li><a href="#Solution_1_Explicit_scoping_using_pa">Solution 1: Explicit scoping using packages</a></li>
+<li><a href="#Solution_2_Removing_SDL_s_in_or_PDL_">Solution 2: Removing SDL's in or PDL's in from the symbol table</a></li>
+</ul>
+</li>
+<li><a href="#Making_the_simulation_interactive">Making the simulation interactive</a>
+<ul><li><a href="#Present_state_of_the_code">Present state of the code</a></li>
+<li><a href="#Listening_to_Events">Listening to Events</a></li>
+<li><a href="#Responding_to_events">Responding to events</a></li>
+<li><a href="#Final_State_of_the_Code">Final State of the Code</a></li>
+</ul>
+</li>
+<li><a href="#Directions_for_future_work">Directions for future work</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<p>PDL provides great number crunching capabilities to Perl and SDL provides game-developer quality real-time bitmapping and sound.  You can use PDL and SDL ''together'' to create real-time, responsive animations and simulations.  In this section we will go through the pleasures and pitfalls of working with both powerhouse libraries.</p>
+<h1 id="Old_SDL_interface">Old SDL interface</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Old_SDL_interface_CONTENT">
+
+
+
+
+<p>Please be aware that much of the code in this example uses SDL Perl v 2.2.4.  The SDL Perl developers are hard at work rewriting SDL, to be released as SDL 3.0 soon.  The new version of SDL is not backwards compatible.  Check back with this page after SDL 3.0 has been released to get the updated commands.</p>
+
+</div>
+<h1 id="Perl_s_SDL_in_a_nutshell">Perl's SDL in a nutshell</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Perl_s_SDL_in_a_nutshell_CONTENT">
+
+
+
+
+<p>SDL stands for Simple DirectMedia Layer.  It's a cross-platform library written in C that's meant to handle all of the low-level graphics and sound stuff.  You can read more about SDL here: http://www.libsdl.org/.  Because SDL is focused on game programming, it has a raw but clean feel to it.  We will focus for now on using SDL to handle images for us.  Handling sound may some day be the focus of another chapter.</p>
+<p>We will be using Perl's SDL module, not SDL directly.  Fortunately, Perl's SDL module has a small collection of very simple tutorials that perfectly introduce basic usage.  You can find them here: http://sdl.perl.org/tutorials/.  Another excellent and very substantial introduction can be found here: http://arstechnica.com/gaming/news/2006/02/games-perl.ars</p>
+<p>SDL is not a Perl core module, so you'll need to install it before moving forward.  Before moving on, go through some of the tutorials and play around with SDL a little bit.  Continue on once you think you've got the hang of it.</p>
+
+</div>
+<h1 id="SDL_power_through_simplicity">SDL - power through simplicity</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SDL_power_through_simplicity_CONTENT">
+<p>One of the first questions you're bound to ask when you begin using SDL for your own work is, &quot;How do I draw a line?&quot;  As it turns out, you don't!  SDL's pixmap capabilities are just that - pixmap capabilities.  If you want to draw a line, you'll have to do it manually.</p>
+<p>For example, here is a very poorly implemented hack (read - don't do this at home) that will draw a simple sine-wave graph:</p>
+<pre>  #!/usr/bin/perl
+       use warnings;
+       use strict;
+
+       use SDL;
+       use SDL::App;
+       use SDL::Rect;
+       use SDL::Color;
+
+       # User defined pen-nib size.
+       my $nib_size = 3;
+
+       # Create the SDL App
+       my $app = SDL::App-&gt;new(
+               -width  =&gt; 640,
+               -height =&gt; 480,
+               -depth  =&gt; 16,
+               -title  =&gt; &quot;Hello, World!&quot;,
+       );
+
+       # our nib will be white
+       my $nib_color = SDL::Color-&gt;new(
+                       -r =&gt; 0xff,
+                       -g =&gt; 0xff,
+                       -b =&gt; 0xff,
+               );
+
+       # and our nib will be represented by a rectangle
+       # (Alternatively, you could use an image, which would allow
+       # for pretty anti-aliasing if you created it in GIMP with
+       # antialiasing)
+       my $nib = SDL::Rect-&gt;new(
+               -height =&gt; $nib_size,
+               -width  =&gt; $nib_size,
+       );
+
+       # now draw a sine wave (wthout covering up previously drawn rectangles)
+       my $t = 0;
+       my $t_step = 2**-4;
+       for($t = 0; $t &lt; 50; $t += $t_step) {
+               $nib-&gt;x( $t * 8 );
+               $nib-&gt;y( sin($t) * 80 + 240 );
+
+               $app-&gt;fill( $nib, $nib_color );
+       }
+
+       # Generally use the update command, but if you want to update the whole
+       # surface, use flip
+       $app-&gt;flip()
+
+       sleep 5;
+
+</pre>
+<p>Wait a second, you say, this doesn't seem either powerful or simple!  You're right, but that's not because SDL is a poor tool.  Rather, this example targets SDL's weaknesses rather than its strenghts.</p>
+<p>If you need to make a plot, use PLplot or PGPLOT.  If you need to make something move, use SDL.</p>
+
+</div>
+<h1 id="Example_1_Model_of_a_2_D_Noninteract">Example 1: Model of a 2-D Noninteracting Gas</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Example_1_Model_of_a_2_D_Noninteract-2">
+<p>In this section we'll develop a fully working animation/simulation.  We'll start with something quite simple for now and expand it as we go along.  The goal of this example is for it to work, not to be well-designed.  For a discussion of making your simulations well-designed, read below.</p>
+<p>We will separate our program into two parts: the computational logic and the animation logic.  Here's the introduction and the computational part:</p>
+
+</div>
+<h2 id="Computational_Logic">Computational Logic</h2>
+<div id="Computational_Logic_CONTENT">
+<pre>
+
+
+       #!/usr/bin/perl
+       # A simple simulation
+       use warnings;
+       use strict;
+       use PDL;
+
+       # Set up the system parameters, including random positions and velocities.
+       my $d_t = 2**-3;
+       my $side_length = 200;
+       my $numb_of_atoms = 100;
+       my $positions = random(2, $numb_of_atoms) * $side_length;
+       my $velocities = random(2, $numb_of_atoms) * 6;
+
+       sub compute {
+               $positions += $d_t * $velocities;
+       }
+
+</pre>
+<p>If you've ever written a simulation, you'll probably object that we don't have any iteration over time.  You're right, but it turns out that the timing works much better in SDL's event loop than in our computational logic.  The purpose of the computational logic is to let us focus on encoding our systems dynamics without having to worry about the application logic.  In this case, the computational logic simply updates the positions of the particles according to their velocities.</p>
+
+</div>
+<h2 id="Animation_Logic">Animation Logic</h2>
+<div id="Animation_Logic_CONTENT">
+<p>We next need to figure out how the application is actually going to run and display anything.  We'll do this in two stages, the application intialization and the run loop.</p>
+<p>Here's some initialization code to get started; put this below the code already supplied above:</p>
+<pre>  use SDL;
+       use SDL::App;
+       use SDL::Rect;
+       use SDL::Color;
+
+       # Create the SDL App
+       my $app = SDL::App-&gt;new( -width  =&gt; $side_length, -height =&gt; $side_length, 
+                                       -title  =&gt; &quot;Simple Simulation!&quot;, -depth  =&gt; 16, );
+
+       # white particles on a black background
+       my $particle_color = SDL::Color-&gt;new( -r =&gt; 0xff, -g =&gt; 0xff, -b =&gt; 0xff, );
+       my $bg_color = SDL::Color-&gt;new( -r =&gt; 0x00, -g =&gt; 0x00, -b =&gt; 0x00, );
+
+       # rectangles for the particles and the background
+       my $particle = SDL::Rect-&gt;new( -height =&gt; 5, -width  =&gt; 5, );
+       my $bg = SDL::Rect-&gt;new( -height =&gt; $side_length, -width =&gt; $side_length, );
+
+</pre>
+<p>Hopefully this is straightforward code.  We pull in our library dependencies and then create a few objects with the necessary properties.  Finally, we get to the actual application loop:</p>
+<pre>  # Run the simulation by (1) computing the updated positions, clearing the canvas, drawing the
+       # new particles, updating the visual display, and pausing before continuing:
+       for(my $t = 0; $t &lt; 20; $t += $d_t) {
+               compute();
+
+               # Clean the canvas
+               $app-&gt;fill( $bg, $bg_color);
+               for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+                       $particle-&gt;x( $positions-&gt;at(0,$i) );
+                       $particle-&gt;y( $positions-&gt;at(1,$i) );
+                       $app-&gt;fill( $particle, $particle_color );
+               }
+               $app-&gt;flip();
+               $app-&gt;delay(10);
+       }
+
+</pre>
+<p>When you run this code (combined with the code already supplied), you should get a bunch of particles slowly drifting down and to the right.  Not all that interesting, but then again, we have a simulation up and working!  Cool!.</p>
+
+</div>
+<h2 id="Disappearing_Particles_Some_of_the_p">Disappearing Particles!
+Some of the particles can drift off the screen.  This is no good. What's causing this problem?</h2>
+<div id="Disappearing_Particles_Some_of_the_p-2">
+<p>The root of the problem is that our computational code is, well, rather dumb, it doesn't check to see if the particle is about to go off the screen.  So, we need to update our computational code to look like this:</p>
+<pre>  sub compute {
+               $positions += $d_t * $velocities;
+
+               # Find all particles that are 'outside' the box, place them back in
+               # box, and reverse their directions
+               my ($bad_pos, $bad_vel)
+                       = where($positions, $velocities, $positions &gt; $side_length);
+               $bad_vel *= -1;
+               $bad_pos .= 2 * $side_length - $bad_pos;
+       }
+
+</pre>
+<p>With this change to the code, you should get particles that 'bounce' when the reach the far edge.  This is far from satisfactory, however, because the compute code is adjusting the particle's ''left'' edge, not its center, so the particles nearly go off the screen before they bounce.  To fix this, we work with an effective side length instead:</p>
+<pre>  my $effective_length = $side_length - 5;
+       sub compute {
+               $positions += $d_t * $velocities;
+
+               # Find all particles that are 'outside' the box and push them back in the
+               # opposite direction, reversing their directions, too.
+               my ($bad_pos, $bad_vel)
+                       = where($positions, $velocities, $positions &gt; $effective_length);
+               $bad_vel *= -1;
+               $bad_pos .= 2 * $effective_length - $bad_pos;
+       }
+
+</pre>
+<p>So far I've been carrying that explicit constant of 5 to represent the size of the particles.  We should put that in a variable somewhere so that it's a bitcode&gt; and put it near the top.  Also, the velocities are rather silly - we don't have any negative velocities.  Let's try using &lt;code&gt;grandom&lt;/code&gt; instead.  Now your variable initialization code should look something like this:</p>
+<pre>  # Set up the system parameters, including random positions and velocities.
+       my $d_t = 2**-3;
+       my $side_length = 200;
+       my $particle_size = 5;
+       my $numb_of_atoms = 100;
+       my $positions = random(2, $numb_of_atoms) * $side_length;
+       my $velocities = grandom(2, $numb_of_atoms) * 5;
+
+</pre>
+
+</div>
+<h2 id="Disappearing_Particles_take_2">Disappearing Particles, take 2</h2>
+<div id="Disappearing_Particles_take_2_CONTEN">
+<p>Unless you experience an unusual circumstance, all of the particles will quickly shrivel up and disappear!  What's going on?  It turns out we have a problem with our computational logic again, but we are also running into strange behavior from SDL.  We'll take a look at SDL's weird behavior first.</p>
+<p>Clearly the particle rectangle's size is not supposed to change, but somehow it does.  To confince yourself of this, modify the &lt;code&gt;for&lt;/code&gt; loop in the application loop so it looks more like this, which explicitly sets the particle size for every particle that's drawn:</p>
+<pre>  for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+               $particle-&gt;x( $positions-&gt;at(0,$i) );
+               $particle-&gt;y( $positions-&gt;at(1,$i) );
+               $particle-&gt;height( $particle_size );
+               $particle-&gt;width( $particle_size );
+               $app-&gt;fill( $particle, $particle_color );
+       }
+
+</pre>
+<p>Now it's clear that although we still have particles flying off the screen up and to the left, they are no longer shriveling away.  This strange behavior is due to SDL's response to a negative position for a rectangle - it just resizes the rectangle so that it only the portion of the rectangle that's in positive territory remains.  The upshot is that you must always be careful about how you handle drawing positons.</p>
+<p>Now that the particles are no longer disappearing, it's clear that we forgot to set up a physical boundary condition for our particles on the uppper and left edges.  To fix that, we modify the compute function:</p>
+<pre>  sub compute {
+               $positions += $d_t * $velocities;
+
+               # Find all particles that are 'outside' the box and push them back in the
+               # opposite direction, reversing their directions, too.
+               my ($bad_pos, $bad_vel)
+                       = where($positions, $velocities, $positions &gt; $effective_length);
+               $bad_vel *= -1;
+               $bad_pos .= 2 * $effective_length - $bad_pos;
+
+               ($bad_pos, $bad_vel) = where($positions, $velocities, $positions &lt; 0);
+               $bad_vel *= -1;
+               $bad_pos *= -1;
+       }
+
+</pre>
+<p>You can also remove the explicit particle-sizing that we put in before, because it's no longer a problem.</p>
+<p>And there you have it!  We have a fully fledged simulation of noninteracting particles in a box!</p>
+
+</div>
+<h1 id="What_s_in_a_Name_Pesky_conflicts_wit">What's in a Name?  Pesky conflicts with main::in()</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="What_s_in_a_Name_Pesky_conflicts_wit-2">
+<p>If you've been running your simulations along with the demo, you'll almost certainly have noticed an error looking something like this:</p>
+<pre> Prototype mismatch: sub main::in (;@) vs none at ./sdlsandbox.pl line 36
+
+</pre>
+<p>This is the unfortunate consequence of both SDL and PDL exporting their &lt;code&gt;in&lt;/code&gt; function to their enclosing namespace.  The standard solution to this is to have modify one of your &lt;code&gt;use&lt;/code&gt; lines so it looks like </p>
+<pre>   use PDL qw( !in );
+
+</pre>
+<p>Unfortunately, PDL doesn't listen you what you say when it imports functions into the namespace.  As far as I can tell, neither does SDL.  The best way to fix this problem is to encapsulate one of the two pieces of code into its own package.  We'll do that with the MyComputation package.</p>
+
+</div>
+<h2 id="Solution_1_Explicit_scoping_using_pa">Solution 1: Explicit scoping using packages</h2>
+<div id="Solution_1_Explicit_scoping_using_pa-2">
+<p>Tweak your code a bit so that you call <code>use PDL;</code> within the MyCompute package, and place all of the piddles within that package space:</p>
+<pre>  package MyCompute;
+       use PDL;
+       my $positions = random(2, $numb_of_atoms) * $side_length;
+
+       # ... and later
+       package main;
+       use SDL;
+
+       # ... and later, tweak the application loop
+       for(my $t = 0; $t &lt; 20; $t += $d_t) {
+               MyCompute::compute();
+
+</pre>
+<p>And now everything should run fine, without any more warnings!</p>
+
+</div>
+<h2 id="Solution_2_Removing_SDL_s_in_or_PDL_">Solution 2: Removing SDL's in or PDL's in from the symbol table</h2>
+<div id="Solution_2_Removing_SDL_s_in_or_PDL_-2">
+<p>Sometimes you have to mix your animation code with computational code, in which case the above solution doesn't solve your problem.  If you find that you don't need to use one of PDL's or SDL's &lt;code&gt;in&lt;/code&gt; function in your own code, go ahead and remove it from the main symbol table.  You can always get back to it later by fully qualifying the function call.  To remove SDL's &lt;code&gt;in&lt;/code&gt; function, use code like this:</p>
+<pre>  # use SDL, but remove SDL's in function before loading PDL
+       use SDL;
+       BEGIN {
+               delete $main::{in};
+       }
+       use PDL;
+
+</pre>
+<p>If you would rather have SDL's <code>in</code> function in your main symbol table, reverse the placement of &lt;code&gt;use SD<a href="#code">code</a> and &lt;code&gt;use PD<a href="#code">code</a> in the previous example:</p>
+<pre>  # use PDL, but remove its 'in' function before loading SDL
+       use PDL;
+       BEGIN {
+               delete $main::{in};
+       }
+       use SDL;
+
+</pre>
+
+</div>
+<h1 id="Making_the_simulation_interactive">Making the simulation interactive</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Making_the_simulation_interactive_CO">
+<p>As the closing portion of this chapter, we'll consider how to make the simulation interactive.  SDL captures keyboard and mouse behavior, so putting this into our simulator is straightforward.</p>
+
+</div>
+<h2 id="Present_state_of_the_code">Present state of the code</h2>
+<div id="Present_state_of_the_code_CONTENT">
+<p>Before moving into getting user interaction, I first want to be sure we're working with the same code.  In particular, I've made a couple of important modifications so that this code is slightly different from what we were working with above.  I'll point out those differences as we come to them.  Here's the program as it stands, from top to bottom:</p>
+<pre>  #!/usr/bin/perl
+       # A simple simulation
+       use warnings;
+       use strict;
+
+       ## Global Variables ##
+
+       # Set up the system parameters, including random positions and velocities.
+       my $d_t = 2**-3;
+       my $side_length = 200;
+       my $particle_size = 5;
+       my $numb_of_atoms = 100;
+
+       ## Computational Stuff ##
+
+       package MyCompute;
+       use PDL;
+       my $positions = random(2, $numb_of_atoms) * $side_length;
+       my $velocities = grandom(2, $numb_of_atoms) * 6;
+       my $effective_length;
+
+       sub compute {
+               my $effective_length = $side_length - $particle_size;
+
+               # update the a real simulation, this is the interesting part
+               $positions += $d_t * $velocities;
+
+               # Check boundary conditions.  Find all particles that are 'outside' the box,
+               # place them back in the box, and reverse their directions
+               my ($bad_pos, $bad_vel)
+                       = where($positions, $velocities, $positions &gt; $effective_length);
+               $bad_vel *= -1;
+               $bad_pos .= 2 * $effective_length - $bad_pos;
+
+               ($bad_pos, $bad_vel) = where($positions, $velocities, $positions &lt; 0);
+               $bad_vel *= -1;
+               $bad_pos *= -1;
+       }
+
+
+
+
+       ## Animation Code ##
+
+       package main;
+
+       use SDL;
+       use SDL::App;
+       use SDL::Rect;
+       use SDL::Color;
+
+       # Create the SDL App
+       my $app = SDL::App-&gt;new( -width  =&gt; $side_length, -height =&gt; $side_length, 
+                               -title  =&gt; &quot;Simple Simulation!&quot;, -depth  =&gt; 16, );
+
+       # white particles on a black background
+       my $particle_color = SDL::Color-&gt;new( -r =&gt; 0xff, -g =&gt; 0xff, -b =&gt; 0xff, );
+       my $bg_color = SDL::Color-&gt;new( -r =&gt; 0x00, -g =&gt; 0x00, -b =&gt; 0x00, );
+
+       # rectangles for the particles and the background
+       my $particle = SDL::Rect-&gt;new( -height =&gt; 5, -width  =&gt; 5, );
+       my $bg = SDL::Rect-&gt;new( -height =&gt; $side_length, -width =&gt; $side_length, );
+
+       # Run the simulation
+       for(my $t = 0; $t &lt; 20; $t += $d_t) {
+               MyCompute::compute();
+
+               # Clean the canvas
+               $app-&gt;fill( $bg, $bg_color);
+               for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+                       $particle-&gt;x( $positions-&gt;at(0,$i) );
+                       $particle-&gt;y( $positions-&gt;at(1,$i) );
+                       $app-&gt;fill( $particle, $particle_color );
+               }
+               $app-&gt;flip();
+               $app-&gt;delay(10);
+       }
+
+</pre>
+<p>So there it is, top to bottom, in about 75 lines.</p>
+
+</div>
+<h2 id="Listening_to_Events">Listening to Events</h2>
+<div id="Listening_to_Events_CONTENT">
+<p>To respond to user interactions, we have to listen to user events using an SDL::Event object.  So first, add this line with our other use statements:</p>
+<pre> use SDL::Event;
+
+</pre>
+<p>and then be sure to create an event object amongst the animation initialization code:</p>
+<pre> my $event = new SDL::Event;
+
+</pre>
+<p>Finally, we need to update the application loop so that it examines and responds to events.  Replace the current application loop with this code:</p>
+<pre>  # Run the simulation
+       while(1) {
+               MyCompute::compute();
+
+               # Clean the canvas
+               $app-&gt;fill( $bg, $bg_color);
+               for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+                       $particle-&gt;x( $positions-&gt;at(0,$i) );
+                       $particle-&gt;y( $positions-&gt;at(1,$i) );
+                       $app-&gt;fill( $particle, $particle_col10);
+
+               while($event-&gt;poll()) {
+                       if($event-&gt;type() =head1  SDL_QUIT) {
+                               exit;
+                       }
+               }
+       }
+
+</pre>
+<p>Now the animator will run indefinitely, until you explicitly tell it to close.  (You may have noticed before that the application would not close even if you told it to close.  Now we've fixed that.)</p>
+
+</div>
+<h2 id="Responding_to_events">Responding to events</h2>
+<div id="Responding_to_events_CONTENT">
+<p>When SDL gets a mouse response or a keyboard key press, it tells you with an event.  The naive way to process these event is with a series of if statements.  Don't do that.</p>
+<p>Instead, create a dispatch table, which is nothing more than a hash whose values are the subroutines you want to have run when an event happens.  Replace the application loop with the following code:</p>
+<pre>  # event dispatch table
+       my $keyname_dispatch_table = {
+               'up'    =&gt; \&amp;incr_particle_size, # up key makes particles larger
+               'down'  =&gt; \&amp;decr_particle_size, # down key makes particles smaller
+               'space' =&gt; sub { $d_t = -$d_t        },      # space-bar reverses time
+               '.'     =&gt; sub { $d_t *= 1.1 },      # right-angle-bracket fast-forwards
+               ','     =&gt; sub { $d_t /= 1.1 },      # left-angle-bracket slows down
+               'q'     =&gt; sub { exit;               },      # q exits
+       };
+
+       sub incr_particle_size {
+               $particle_size++;
+               $particle-&gt;height($particle_size);
+               $particle-&gt;width($particle_size);
+       }
+
+       sub decr_particle_size {
+               $particle_size-- if $particle_size &gt; 1;
+               $particle-&gt;height($particle_size);
+               $particle-&gt;width($particle_size);
+       }
+
+
+
+
+       # Run the simulation
+       while(1) {
+               MyCompute::compute();
+
+               # Clean the canvas
+               $app-&gt;fill( $bg, $bg_color);
+               for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+                       $particle-&gt;x( $positions-&gt;at(0,$i) );
+                       $particle-&gt;y( $positions-&gt;at(1,$i) );
+                       $app-&gt;fill( $particle, $particle_color );
+               }
+               $app-&gt;flip();
+               $app-&gt;delay(10);
+
+               while($event-&gt;poll()) {
+                       if($event-&gt;type() =head1  SDL_QUIT) {
+                               exit;
+                       } elsif($event-&gt;type() =head1  SDL_KEYDOWN) {
+                               if(exists $keyname_dispatch_table-&gt;{$event-&gt;key_name()}) {
+                                       $keyname_dispatch_table-&gt;{$event-&gt;key_name()}-&gt;();
+                               }
+                       }
+               }
+       }
+
+</pre>
+<p>Dispatch tables allow for powerful methods of abstracting your program logic.  Now adding a new event handler is as easy as updating the dispatch table!</p>
+<p>As written, you can now increase or decrease the particle size using the up and down arrow keys, you can increase ory using the right or left angle-brackets, you can reverse time using the space bar, or you can quit by pressing q.</p>
+
+</div>
+<h2 id="Final_State_of_the_Code">Final State of the Code</h2>
+<div id="Final_State_of_the_Code_CONTENT">
+<p>Just so that you've got a complete working example, here is the final state of the code, clocking in at a mere 115 lines:</p>
+<pre>  #!/usr/bin/perl
+       # A simple simulation
+       use warnings;
+       use strict;
+
+       ## Global Variables ##
+
+       # Set up the system parameters, including random positions and velocities.
+       my $d_t = 2**-3;
+       my $side_length = 200;
+       my $particle_size = 5;
+       my $numb_of_atoms = 100;
+
+       ## Computational Stuff ##
+
+       package MyCompute;
+       use PDL;
+       my $positions = random(2, $numb_of_atoms) * $side_length;
+       my $velocities = grandom(2, $numb_of_atoms) * 6;
+       my $effective_length;
+
+       sub compute {
+               my $effective_length = $side_length - $particle_size;
+
+               # update the positions.  For a real simulation, this is the interesting part
+               $positions += $d_t * $velocities;
+
+               # Check boundary conditions.  Find all particles that are 'outside' the box,
+               # place them back in the box, and reverse their directions
+               my ($bad_pos, $bad_vel)
+                       = where($positions, $velocities, $positions &gt; $effective_length);
+               $bad_vel *= -1;
+               $bad_pos .= 2 * $effective_length - $bad_pos;
+
+               ($bad_pos, $bad_vel) = where($positions, $velocities, $positions &lt; 0);
+               $bad_vel *= -1;
+               $bad_pos *= -1;
+       }
+
+
+
+
+       ## Animation Code ##
+
+       package main;
+
+       use SDL;
+       use SDL::App;
+       use SDL::Rect;
+       use SDL::Color;
+       use SDL::Event;
+
+       # Create the SDL App
+       my $app = SDL::App-&gt;new( -width  =&gt; $side_length, -height =&gt; $side_length, 
+                               -title  =&gt; &quot;Simple Simulation!&quot;, -depth  =&gt; 16, );
+
+       # white particles on a black background
+       my $particle_color = SDL::Color-&gt;new( -r =&gt; 0xff, -g =&gt; 0xff, -b =&gt; 0xff, );
+       my $bg_color = SDL::Color-&gt;new( -r =&gt; 0x00, -g =&gt; 0x00, -b =&gt; 0x00, );
+
+       # rectangles for the particles and the background
+       my $particle = SDL::Rect-&gt;new( -height =&gt; 5, -width  =&gt; 5, );
+       my $bg = SDL::Rect-&gt;new( -height =&gt; $side_length, -width =&gt; $side_length, );
+
+       # event listener
+       my $event = new SDL::Event;
+
+       # event dispatch table
+       my $keyname_dispatch_table = {
+               'up'    =&gt; \&amp;incr_particle_size, # up key makes particles large
+               'down'  =&gt; \&amp;decr_particle_size, # up key makes particles large
+               'space' =&gt; sub { $d_t = -$d_t        },      
+               '.'     =&gt; sub { $d_t *= 1.1 },      # right-arrow fast-forwards
+               ','     =&gt; sub { $d_t /= 1.1 },      # left-arrow slows down
+               'q'     =&gt; sub { exit;               },      # q exits
+       };
+
+       sub incr_particle_size {
+               $particle_size++;
+               $particle-&gt;height($particle_size);
+               $particle-&gt;width($particle_size);
+       }
+
+       sub decr_particle_size {
+               $particle_size-- if $particle_size &gt; 1;
+               $particle-&gt;height($particle_size);
+               $particle-&gt;width($particle_size);
+       }
+
+
+
+
+       # Run the simulation
+       while(1) {
+               MyCompute::compute();
+
+               # Clean the canvas
+               $app-&gt;fill( $bg, $bg_color);
+               for(my $i = 0; $i &lt; $numb_of_atoms; $i++) {
+                       $particle-&gt;x( $positions-&gt;at(0,$i) );
+                       $particle-&gt;y( $positions-&gt;at(1,$i) );
+                       $app-&gt;fill( $particle, $particle_color );
+               }
+               $app-&gt;flip();
+               $app-&gt;delay(10);
+
+               while($event-&gt;poll()) {
+                       if($event-&gt;type() =head1  SDL_QUIT) {
+                               exit;
+                       } elsif($event-&gt;type() =head1  SDL_KEYDOWN) {
+                               if(exists $keyname_dispatch_table-&gt;{$event-&gt;key_name()}) {
+                                       $keyname_dispatch_table-&gt;{$event-&gt;key_name()}-&gt;();
+                               }
+                       }
+               }
+       }
+
+</pre>
+<p>Next, if you want to model interactions among particles, you could write code in the compute function to handle that for you.  If you wanted to use little balls instead of the boxes we've used here, you could create your own images and use an SDL::Surface to load the image.  You can't resize an image using SDL, but then you'd probably be working with real interactions anyway, like a Coulomb force, in which case you'd really be adjusting the interaction strength, not the particle size.</p>
+
+</div>
+<h1 id="Directions_for_future_work">Directions for future work</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Directions_for_future_work_CONTENT">
+<p>I have a couple of ideas for future work combining PDL and SDL.</p>
+<dl>
+       <dt>PLplot driver thingy that creates plots that can be blitted onto an app.  This way, having a graph plotting along side your simulation would be straightforward.
+=item  Write a function to convert SDL::Surface to a collection of rgba piddles.  We might even be able to convince the piddle to work directly with the memory allocated for the SDL::Survace object for super-fast PDL-based image manipulations.  As an added bonus, you'd be able to slice and dice!</dt>
+</dl>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Cookbook.html-inc b/pages/SDL-Cookbook.html-inc
new file mode 100644 (file)
index 0000000..f8b8797
--- /dev/null
@@ -0,0 +1,14 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#SDL_Cookbook">SDL::Cookbook</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="SDL_Cookbook">SDL::Cookbook</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SDL_Cookbook_CONTENT">
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Cursor.html-inc b/pages/SDL-Cursor.html-inc
new file mode 100644 (file)
index 0000000..bb02e7c
--- /dev/null
@@ -0,0 +1,89 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new_data_gt_surface_data_mask_gt_sur">new( -data =&gt; $surface_data, -mask =&gt; $surface_mask, x =&gt; $x, y =&gt; $y)</a></li>
+<li><a href="#warp_cursor_x_y">warp(cursor,x, y)</a></li>
+<li><a href="#use_cursor">use(cursor)</a></li>
+<li><a href="#get">get()</a></li>
+<li><a href="#show_toggle">show($toggle)</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Cursor - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $cursor = SDL::Cursor-&gt;new(
+       -data =&gt; new SDL::Surface &quot;cursor.png&quot;,
+       -mask =&gt; new SDL::Surface &quot;mask.png&quot;,
+       -x    =&gt; 0, -y =&gt; 0 );
+  $cusor-&gt;use;
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>the SDL::Cursor module handles mouse cursors, and provide the developer to
+use custom made cursors. Note that the cursors can only be in black and
+white.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new_data_gt_surface_data_mask_gt_sur">new( -data =&gt; $surface_data, -mask =&gt; $surface_mask, x =&gt; $x, y =&gt; $y)</h2>
+<div id="new_data_gt_surface_data_mask_gt_sur-2">
+<p>Creates a new cursor. The &lt;C&gt;-data&lt;/C&gt; and &lt;C&gt;-mask&lt;/C&gt; parameters should be both black and white pictures. The height and width of these surfaces should be a multiple of 8. The &lt;C&gt;-x&lt;/C&gt; and &lt;C&gt;-y&lt;/C&gt; are the coordinates of the cursor 'hot spot'.</p>
+
+</div>
+<h2 id="warp_cursor_x_y">warp(cursor,x, y)</h2>
+<div id="warp_cursor_x_y_CONTENT">
+<p>Set the position of the SDL::Cursor given as first parameter .
+the new postion is set to &lt;C&gt;x&lt;/C&gt;, &lt;C&gt;y&lt;/C&gt; coordinates in the application window.
+SDL::warp trigger a new mouse motion event.
+It doesn't returns anything.</p>
+
+</div>
+<h2 id="use_cursor">use(cursor)</h2>
+<div id="use_cursor_CONTENT">
+<p>Set the SDL::Cursor given as first parameter to the active cursor.</p>
+
+</div>
+<h2 id="get">get()</h2>
+<div id="get_CONTENT">
+<p>When used statically &lt;C&gt;SDL::Cursor::get()&lt;/C&gt;, it will return the instance of the current cursor in use. Called as a method, it will return itself.</p>
+<p>This method can be useful if you are dealing with several cursors.</p>
+
+</div>
+<h2 id="show_toggle">show($toggle)</h2>
+<div id="show_toggle_CONTENT">
+<p>Set the visibility of the cursor. A false value will make the cursor
+invisible in the Application window. A true value will show it back.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Event.html-inc b/pages/SDL-Event.html-inc
new file mode 100644 (file)
index 0000000..9621614
--- /dev/null
@@ -0,0 +1,454 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new">new</a></li>
+<li><a href="#type">type</a></li>
+<li><a href="#active">active</a>
+<ul><li><a href="#active_type">active_type</a></li>
+<li><a href="#active_gain">active_gain</a></li>
+<li><a href="#active_state">active_state</a></li>
+</ul>
+</li>
+<li><a href="#key">key</a>
+<ul><li><a href="#key_type">key_type</a></li>
+<li><a href="#key_state">key_state</a></li>
+<li><a href="#key_keysym">key_keysym</a></li>
+<li><a href="#key_scancode">key_scancode</a></li>
+<li><a href="#key_sym">key_sym</a></li>
+<li><a href="#key_mod">key_mod</a></li>
+<li><a href="#key_unicode">key_unicode</a></li>
+</ul>
+</li>
+<li><a href="#motion">motion</a>
+<ul><li><a href="#motion_type">motion_type</a></li>
+<li><a href="#motion_state">motion_state</a></li>
+<li><a href="#motion_x_motion_y">motion_x, motion_y</a></li>
+<li><a href="#motion_xrel_motion_yrel">motion_xrel, motion_yrel</a></li>
+</ul>
+</li>
+<li><a href="#button">button</a>
+<ul><li><a href="#button_type">button_type</a></li>
+<li><a href="#button_which">button_which</a></li>
+<li><a href="#button_button">button_button</a></li>
+<li><a href="#button_state">button_state</a></li>
+<li><a href="#button_x_button_y">button_x, button_y</a></li>
+</ul>
+</li>
+<li><a href="#jaxis">jaxis</a>
+<ul><li><a href="#jaxis_type">jaxis_type</a></li>
+<li><a href="#jaxis_which">jaxis_which</a></li>
+<li><a href="#jaxis_axis">jaxis_axis</a></li>
+<li><a href="#jaxis_value">jaxis_value</a></li>
+</ul>
+</li>
+<li><a href="#jbutton">jbutton</a>
+<ul><li><a href="#jbutton_type">jbutton_type</a></li>
+<li><a href="#jbutton_which">jbutton_which</a></li>
+<li><a href="#jbutton_button">jbutton_button</a></li>
+<li><a href="#jbutton_state">jbutton_state</a></li>
+</ul>
+</li>
+<li><a href="#jhat">jhat</a>
+<ul><li><a href="#jhat_type">jhat_type</a></li>
+<li><a href="#jhat_which">jhat_which</a></li>
+<li><a href="#jhat_hat">jhat_hat</a></li>
+<li><a href="#jhat_value">jhat_value</a></li>
+</ul>
+</li>
+<li><a href="#jball">jball</a>
+<ul><li><a href="#jball_type">jball_type</a></li>
+<li><a href="#jball_which">jball_which</a></li>
+<li><a href="#jball_ball">jball_ball</a></li>
+<li><a href="#jball_xrel_jball_yrel">jball_xrel, jball_yrel</a></li>
+</ul>
+</li>
+<li><a href="#resize">resize</a>
+<ul><li><a href="#resize_type">resize_type</a></li>
+<li><a href="#resize_x_resize_y">resize_x, resize_y</a></li>
+</ul>
+</li>
+<li><a href="#expose">expose</a>
+<ul><li><a href="#expose_type">expose_type</a></li>
+</ul>
+</li>
+<li><a href="#syswm">syswm</a>
+<ul><li><a href="#syswm_type">syswm_type</a></li>
+<li><a href="#syswm_msg">syswm_msg</a></li>
+</ul>
+</li>
+<li><a href="#user">user</a>
+<ul><li><a href="#user_type">user_type</a></li>
+<li><a href="#user_code">user_code</a></li>
+<li><a href="#user_data1_user_data2">user_data1, user_data2</a></li>
+</ul>
+</li>
+<li><a href="#quit">quit</a>
+<ul><li><a href="#quit_type">quit_type</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Event - General event structure</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre> use SDL::Event;                             # for the event object itself
+ use SDL::Events qw(pump_events poll_event); # functions for event queue handling
+
+ SDL::init(SDL_INIT_VIDEO);
+ my $event = SDL::Event-&gt;new();
+
+ while(1)
+ {
+     pump_events();
+
+     if(poll_event($event))
+     {
+        if($event-&gt;type == SDL_MOUSEBUTTONDOWN)
+        {
+            # now you can handle the details
+            $event-&gt;button_which;
+            $event-&gt;button_button;
+            $event-&gt;button_x;
+            $event-&gt;button_y;
+        }
+
+        last if $event-&gt;type == SDL_QUIT;
+     }
+
+     # your screen drawing code will be here
+ }
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>Event handling allows your application to receive input from the user. 
+Event handling is initalised (along with video) with a call to:</p>
+<p><code>SDL::init(SDL_INIT_VIDEO);</code></p>
+<p>Internally, SDL stores all the events waiting to be handled in an event queue. 
+Using functions like <code>SDL::Events::poll_event()</code>, <code>SDL::Events::peep_events</code> 
+and <code>SDL::Events::wait_event()</code> you can observe and handle waiting input events.</p>
+<p>The key to event handling in SDL is the <code>SDL::Event</code> union. 
+The event queue itself is composed of a series of <code>SDL::Event</code> unions, one for each waiting event. 
+<code>SDL::Event</code> unions are read from the queue with the <code>SDL::Events::poll_event()</code> function 
+and it is then up to the application to process the information stored with them. </p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new">new</h2>
+<div id="new_CONTENT">
+<p><code>new</code> creates an empty event-object, which can be used store information. 
+Either by calling <code>poll_event($event)</code> that transferes one event from the queue into our object 
+or by setting all the needed data manually in order to push the event to the queue.</p>
+<pre> use SDL::Event;
+
+ my $event = SDL::Event-&gt;new();
+
+</pre>
+
+</div>
+<h2 id="type">type</h2>
+<div id="type_CONTENT">
+<p>SDL::Event is a union of all event structures used in SDL, using it is a simple matter of knowing 
+which union member relates to which event <code>type</code>.</p>
+<pre> print 'heureka' if $event-&gt;type = SDL_MOUSEBUTTONDOWN;
+
+</pre>
+<p>Available type constants:</p>
+<ul>
+               <li><a href="#active">SDL_ACTIVEEVENT</a> - Application visibility event structure      </li>
+               <li><a href="#active">SDL_KEYDOWN</a> - Keyboard event structure        </li>
+               <li><a href="#active">SDL_KEYUP</a> - Keyboard event structure  </li>
+               <li><a href="#active">SDL_MOUSEMOTION</a> - Mouse motion event structure        </li>
+               <li><a href="#active">SDL_MOUSEBUTTONDOWN</a> - Mouse button event structure    </li>
+               <li><a href="#button">SDL_MOUSEBUTTONUP</a> - Mouse button event structure      </li>
+               <li><a href="#active">SDL_JOYAXISMOTION</a> - Joystick axis motion event structure      </li>
+               <li><a href="#active">SDL_JOYBALLMOTION</a> - Joystick trackball motion event structure         </li>
+               <li><a href="#active">SDL_JOYHATMOTION</a> - Joystick hat position change event structure       </li>
+               <li><a href="#active">SDL_JOYBUTTONDOWN</a> - Joystick button event structure   </li>
+               <li><a href="#active">SDL_JOYBUTTONUP</a> - Joystick button event structure     </li>
+               <li><a href="#active">SDL_VIDEORESIZE</a> - Window resize event structure       </li>
+               <li><a href="#active">SDL_VIDEOEXPOSE</a> - Window expose event         </li>
+               <li><a href="#active">SDL_QUIT</a> - Quit requested event       </li>
+               <li><a href="#active">SDL_USEREVENT</a> - A user-defined event type     </li>
+               <li><a href="#active">SDL_SYSWMEVENT</a> - Platform-dependent window manager event. </li>
+</ul>
+
+<p>TODO: SDL_EVENTMASK()</p>
+
+</div>
+<h2 id="active">active</h2>
+<div id="active_CONTENT">
+<p><code>active</code> is a member of the <code>SDL::Event</code> union and is used when an event of type <code>SDL_ACTIVEEVENT</code> is reported.</p>
+<p>When the mouse leaves or enters the window area a <code>SDL_APPMOUSEFOCUS</code> type activation event occurs, 
+if the mouse entered the window then <strong>gain</strong> will be 1, otherwise <strong>gain</strong> will be 0. </p>
+<p>A <code>SDL_APPINPUTFOCUS</code> type activation event occurs when the application loses or gains keyboard focus. 
+This usually occurs when another application is made active. </p>
+<p>Finally, a <code>SDL_APPACTIVE</code> type event occurs when the application is either minimised/iconified (<strong>gain</strong>=0) or restored. </p>
+<p>A single event can have multiple values set in <strong>state</strong>.</p>
+<p><strong>Note:</strong> This event does not occur when an application window is first created. </p>
+<p>A new ActiveEvent (to fake focus loss) will be created like this:</p>
+<pre> my $event = SDL::Event-&gt;new();
+    $event-&gt;type(SDL_ACTIVEEVENT);
+    $event-&gt;active_gain(0);
+    $event-&gt;active_state(SDL_APPMOUSEFOCUS);
+
+ # I think this is wrong, -&gt;active_type() should get SDL_APPMOUSEFOCUS, but what state gets?
+
+</pre>
+
+</div>
+<h3 id="active_type">active_type</h3>
+<div id="active_type_CONTENT">
+
+</div>
+<h3 id="active_gain">active_gain</h3>
+<div id="active_gain_CONTENT">
+
+</div>
+<h3 id="active_state">active_state</h3>
+<div id="active_state_CONTENT">
+
+</div>
+<h2 id="key">key</h2>
+<div id="key_CONTENT">
+
+</div>
+<h3 id="key_type">key_type</h3>
+<div id="key_type_CONTENT">
+
+</div>
+<h3 id="key_state">key_state</h3>
+<div id="key_state_CONTENT">
+
+</div>
+<h3 id="key_keysym">key_keysym</h3>
+<div id="key_keysym_CONTENT">
+
+</div>
+<h3 id="key_scancode">key_scancode</h3>
+<div id="key_scancode_CONTENT">
+
+</div>
+<h3 id="key_sym">key_sym</h3>
+<div id="key_sym_CONTENT">
+
+</div>
+<h3 id="key_mod">key_mod</h3>
+<div id="key_mod_CONTENT">
+
+</div>
+<h3 id="key_unicode">key_unicode</h3>
+<div id="key_unicode_CONTENT">
+
+</div>
+<h2 id="motion">motion</h2>
+<div id="motion_CONTENT">
+
+</div>
+<h3 id="motion_type">motion_type</h3>
+<div id="motion_type_CONTENT">
+
+</div>
+<h3 id="motion_state">motion_state</h3>
+<div id="motion_state_CONTENT">
+
+</div>
+<h3 id="motion_x_motion_y">motion_x, motion_y</h3>
+<div id="motion_x_motion_y_CONTENT">
+
+</div>
+<h3 id="motion_xrel_motion_yrel">motion_xrel, motion_yrel</h3>
+<div id="motion_xrel_motion_yrel_CONTENT">
+
+</div>
+<h2 id="button">button</h2>
+<div id="button_CONTENT">
+
+</div>
+<h3 id="button_type">button_type</h3>
+<div id="button_type_CONTENT">
+
+</div>
+<h3 id="button_which">button_which</h3>
+<div id="button_which_CONTENT">
+
+</div>
+<h3 id="button_button">button_button</h3>
+<div id="button_button_CONTENT">
+
+</div>
+<h3 id="button_state">button_state</h3>
+<div id="button_state_CONTENT">
+
+</div>
+<h3 id="button_x_button_y">button_x, button_y</h3>
+<div id="button_x_button_y_CONTENT">
+
+</div>
+<h2 id="jaxis">jaxis</h2>
+<div id="jaxis_CONTENT">
+
+</div>
+<h3 id="jaxis_type">jaxis_type</h3>
+<div id="jaxis_type_CONTENT">
+
+</div>
+<h3 id="jaxis_which">jaxis_which</h3>
+<div id="jaxis_which_CONTENT">
+
+</div>
+<h3 id="jaxis_axis">jaxis_axis</h3>
+<div id="jaxis_axis_CONTENT">
+
+</div>
+<h3 id="jaxis_value">jaxis_value</h3>
+<div id="jaxis_value_CONTENT">
+
+</div>
+<h2 id="jbutton">jbutton</h2>
+<div id="jbutton_CONTENT">
+
+</div>
+<h3 id="jbutton_type">jbutton_type</h3>
+<div id="jbutton_type_CONTENT">
+
+</div>
+<h3 id="jbutton_which">jbutton_which</h3>
+<div id="jbutton_which_CONTENT">
+
+</div>
+<h3 id="jbutton_button">jbutton_button</h3>
+<div id="jbutton_button_CONTENT">
+
+</div>
+<h3 id="jbutton_state">jbutton_state</h3>
+<div id="jbutton_state_CONTENT">
+
+</div>
+<h2 id="jhat">jhat</h2>
+<div id="jhat_CONTENT">
+
+</div>
+<h3 id="jhat_type">jhat_type</h3>
+<div id="jhat_type_CONTENT">
+
+</div>
+<h3 id="jhat_which">jhat_which</h3>
+<div id="jhat_which_CONTENT">
+
+</div>
+<h3 id="jhat_hat">jhat_hat</h3>
+<div id="jhat_hat_CONTENT">
+
+</div>
+<h3 id="jhat_value">jhat_value</h3>
+<div id="jhat_value_CONTENT">
+
+</div>
+<h2 id="jball">jball</h2>
+<div id="jball_CONTENT">
+
+</div>
+<h3 id="jball_type">jball_type</h3>
+<div id="jball_type_CONTENT">
+
+</div>
+<h3 id="jball_which">jball_which</h3>
+<div id="jball_which_CONTENT">
+
+</div>
+<h3 id="jball_ball">jball_ball</h3>
+<div id="jball_ball_CONTENT">
+
+</div>
+<h3 id="jball_xrel_jball_yrel">jball_xrel, jball_yrel</h3>
+<div id="jball_xrel_jball_yrel_CONTENT">
+
+</div>
+<h2 id="resize">resize</h2>
+<div id="resize_CONTENT">
+
+</div>
+<h3 id="resize_type">resize_type</h3>
+<div id="resize_type_CONTENT">
+
+</div>
+<h3 id="resize_x_resize_y">resize_x, resize_y</h3>
+<div id="resize_x_resize_y_CONTENT">
+
+</div>
+<h2 id="expose">expose</h2>
+<div id="expose_CONTENT">
+
+</div>
+<h3 id="expose_type">expose_type</h3>
+<div id="expose_type_CONTENT">
+
+</div>
+<h2 id="syswm">syswm</h2>
+<div id="syswm_CONTENT">
+
+</div>
+<h3 id="syswm_type">syswm_type</h3>
+<div id="syswm_type_CONTENT">
+
+</div>
+<h3 id="syswm_msg">syswm_msg</h3>
+<div id="syswm_msg_CONTENT">
+
+</div>
+<h2 id="user">user</h2>
+<div id="user_CONTENT">
+
+</div>
+<h3 id="user_type">user_type</h3>
+<div id="user_type_CONTENT">
+
+</div>
+<h3 id="user_code">user_code</h3>
+<div id="user_code_CONTENT">
+
+</div>
+<h3 id="user_data1_user_data2">user_data1, user_data2</h3>
+<div id="user_data1_user_data2_CONTENT">
+
+</div>
+<h2 id="quit">quit</h2>
+<div id="quit_CONTENT">
+
+</div>
+<h3 id="quit_type">quit_type</h3>
+<div id="quit_type_CONTENT">
+<p>Create a new SDL::Event object.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Events.html-inc b/pages/SDL-Events.html-inc
new file mode 100644 (file)
index 0000000..b51f9fd
--- /dev/null
@@ -0,0 +1,161 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#pump_events">pump_events</a></li>
+<li><a href="#peep_events_event_num_events_action_">peep_events (event, num_events, action, mask) </a>
+<ul><li><a href="#RETURN">RETURN</a></li>
+</ul>
+</li>
+<li><a href="#poll_event_event">poll_event($event)</a>
+<ul><li><a href="#RETURN-2">RETURN</a></li>
+</ul>
+</li>
+<li><a href="#push_event_event">push_event($event)</a>
+<ul><li><a href="#RETURN-3">RETURN</a></li>
+</ul>
+</li>
+<li><a href="#wait_event_event">wait_event($event)</a>
+<ul><li><a href="#RETURN-4">RETURN</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Events - Bindings to the Events Category in SDL API</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<p>Most likely you just want to know how to get events for you app.
+  use SDL;
+  use SDL::Event;
+  use SDL::Events;</p>
+<pre>  SDL::init(SDL_INIT_VIDEO); # Event can only be grabbed in the same thread as this 
+
+  ...
+
+  my $event = SDL::Event-&gt;new(); # notices 'Event' ne 'Events'
+
+  while( 1 )
+       {
+          SDL::Events::pump_events();   
+                while(  SDL::Events::poll_event($event) )
+        {
+               #check by event type
+               on_active() if $event-&gt;type == SDL_ACTIVEEVENT; 
+               ...
+        }
+       }
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+
+
+
+
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="pump_events">pump_events</h2>
+<div id="pump_events_CONTENT">
+<p>Pumps the event loop, gathering events from the input devices.</p>
+<pre>  pump_events();
+
+</pre>
+<p>pump_events gathers all the pending input information from devices and places it on the event queue. Without calls to pump_events no events would ever be placed on the queue. 
+Often the need for calls to pump_events is hidden from the user since <cite>poll_event</cite> and <cite>wait_event</cite> implicitly call pump_events. 
+However, if you are not polling or waiting for events (e.g. you are filtering them), then you must call pump_events to force an event queue update.</p>
+
+
+
+
+
+</div>
+<h2 id="peep_events_event_num_events_action_">peep_events (event, num_events, action, mask) </h2>
+<div id="peep_events_event_num_events_action_-2">
+<p>Checks the event queue for messages and optionally returns them.  </p>
+<pre>  my $num_peep_events = SDL::Events::peep_events($event, 127, SDL_PEEKEVENT, SDL_ALLEVENTS);
+
+</pre>
+<p>If action is SDL_ADDEVENT, up to numevents events will be added to the back of the event queue.</p>
+<p>If action is SDL_PEEKEVENT, up to numevents events at the front of the event queue, matching mask, will be returned and will not be removed from the queue.</p>
+<p>If action is SDL_GETEVENT, up to numevents events at the front of the event queue, matching mask, will be returned and will be removed from the queue.</p>
+<p>The mask parameter is a bitwise OR of SDL::Events::SDL_EVENTMASK(event_type), for all event types you are interested in</p>
+<p>This function is thread-safe.</p>
+<p>You may have to call pump_events before calling this function. Otherwise, the events may not be ready to be filtered when you call peep_events.</p>
+<p>Examples of mask:</p>
+<dl>
+       <dt>SDL_EVENTMASK (SDL_KEYUP)</dt>
+       <dt>(SDL_EVENTMASK (SDL_MOUSEBUTTONDOWN) | SDL_EVENTMASK (SDL_MOUSEBUTTONUP))</dt>
+       <dt>SDL_ALLEVENTS</dt>
+       <dt>SDL_KEYUPMASK</dt>
+       <dt>SDL_ALLEVENTS ^ SDL_QUITMASK</dt>
+</dl>
+
+</div>
+<h3 id="RETURN">RETURN</h3>
+<div id="RETURN_CONTENT">
+<p>Number of Events actually stored or -1 if there was an error</p>
+
+</div>
+<h2 id="poll_event_event">poll_event($event)</h2>
+<div id="poll_event_event_CONTENT">
+<p>Polls for currently pending events. </p>
+<p>If $event is not NULL, the next event is removed from the queue and stored in the <cite>SDL::Event</cite> structure pointed to by $event.</p>
+<p>As this function implicitly calls pump_events, you can only call this function in the thread that set the video mode with <cite>SDL::Video::set_video_mode</cite>. </p>
+
+</div>
+<h3 id="RETURN-2">RETURN</h3>
+<div id="RETURN_CONTENT-2">
+<p>Returns 1 if there are any pending events, or 0 if there are none available. </p>
+
+</div>
+<h2 id="push_event_event">push_event($event)</h2>
+<div id="push_event_event_CONTENT">
+<p>Pushes an event onto the event queue </p>
+<p>The event queue can actually be used as a two way communication channel. Not only can events be read from the queue, but the user can also push their own events onto it. event is a pointer to the event structure you wish to push onto the queue. 
+The event is copied into the queue, and the caller may dispose of the memory pointed to after push_event returns.</p>
+<p>Note: Pushing device input events onto the queue doesn't modify the state of the device within SDL. </p>
+<p>This function is thread safe, and can be called from other threads safely.</p>
+
+</div>
+<h3 id="RETURN-3">RETURN</h3>
+<div id="RETURN_CONTENT-3">
+<p>Returns 0 on success or -1 if the event couldn't be pushed.</p>
+
+</div>
+<h2 id="wait_event_event">wait_event($event)</h2>
+<div id="wait_event_event_CONTENT">
+<p>Waits indefinitely for the next available $event, returning 0 if there was an error while waiting for events, 1 otherwise.</p>
+<p>If $event is not NULL, the next event is removed from the queue and stored in $event.</p>
+<p>As this function implicitly calls SDL_PumpEvents, you can only call this function in the thread that  <cite>SDL::Video::set_video_mode</cite>.  </p>
+
+</div>
+<h3 id="RETURN-4">RETURN</h3>
+<div id="RETURN_CONTENT-4">
+<p>0 if there was an error while waiting for events, 1 otherwise</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Event</cite>, <cite>SDL::Video</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Font.html-inc b/pages/SDL-Font.html-inc
new file mode 100644 (file)
index 0000000..3663a55
--- /dev/null
@@ -0,0 +1,56 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHOD">METHOD</a>
+<ul><li><a href="#use_font">use(font)</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Font - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $font = new Font &quot;Font.png&quot;;
+  $font-&gt;use();
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Font</cite> provides an interface to loading and using SFont style 
+fonts with <cite>SDL::Surface</cite> objects.  </p>
+
+</div>
+<h1 id="METHOD">METHOD</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHOD_CONTENT">
+
+</div>
+<h2 id="use_font">use(font)</h2>
+<div id="use_font_CONTENT">
+<p>Use the SDL::Font  given as first parameter.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Game-Palette.html-inc b/pages/SDL-Game-Palette.html-inc
new file mode 100644 (file)
index 0000000..696e4e9
--- /dev/null
@@ -0,0 +1,71 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#blue_index_value">blue ( index, [value] )</a></li>
+<li><a href="#green_index_value">green ( index, [value] )</a></li>
+<li><a href="#red_index_value">red ( index, [value] )</a></li>
+<li><a href="#color_index_r_g_b">color ( index, [ r, g, b ] )</a></li>
+<li><a href="#size">size</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Palette - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Palette</cite> provides an interface to the SDL_Palette structures,
+and can be used to set the color values of an existing palette's indexes.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="blue_index_value">blue ( index, [value] )</h2>
+<div id="blue_index_value_CONTENT">
+<p>Fetches and sets the blue component of the color at index.</p>
+
+</div>
+<h2 id="green_index_value">green ( index, [value] )</h2>
+<div id="green_index_value_CONTENT">
+<p>Fetches and sets the green component of the color at index.</p>
+
+</div>
+<h2 id="red_index_value">red ( index, [value] )</h2>
+<div id="red_index_value_CONTENT">
+<p>Fetches and sets the red component of the color at index.</p>
+
+</div>
+<h2 id="color_index_r_g_b">color ( index, [ r, g, b ] )</h2>
+<div id="color_index_r_g_b_CONTENT">
+<p>Fetches and sets the RGB, returns an SDL_Color *.</p>
+
+</div>
+<h2 id="size">size</h2>
+<div id="size_CONTENT">
+<p>Returns the size of the palette.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Color</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-MPEG.html-inc b/pages/SDL-MPEG.html-inc
new file mode 100644 (file)
index 0000000..35a7d30
--- /dev/null
@@ -0,0 +1,62 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a>
+<ul><li><a href="#METHODS">METHODS </a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::MPEG - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $info = new SDL::MPEG -from =&gt; $mpeg;
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><code>SDL::MPEG</code> provides an interface to quering the status
+of a SMPEG stream.  </p>
+
+</div>
+<h2 id="METHODS">METHODS </h2>
+<div id="METHODS_CONTENT">
+<ul>
+               <li><code>SDL::MPEG::has_audio</code> returns true if it has audio track        </li>
+               <li><code>SDL::MPEG::has_video</code> returns true if it has a video track      </li>
+               <li><code>SDL::MPEG::width</code> returns the width of the video in pixels      </li>
+               <li><code>SDL::MPEG::height</code> returns the height of the video in pixels    </li>
+               <li><code>SDL::MPEG::size</code> returns the total size of the clip in bytes    </li>
+               <li><code>SDL::MPEG::offset</code> returns the offset into the clip in bytes    </li>
+               <li><code>SDL::MPEG::frame</code> returns the offset into the clip in fames     </li>
+               <li><code>SDL::MPEG::fps</code> returns the play rate in frames per second      </li>
+               <li><code>SDL::MPEG::time</code> returns the current play time in seconds       </li>
+               <li><code>SDL::MPEG::length</code> returns the total play time in seconds</li>
+</ul>
+
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p>perl(1) SDL::Video(3)</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Mixer.html-inc b/pages/SDL-Mixer.html-inc
new file mode 100644 (file)
index 0000000..70e4cd4
--- /dev/null
@@ -0,0 +1,282 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new">new()</a></li>
+<li><a href="#query_spec">query_spec()</a></li>
+<li><a href="#reserve_channels">reserve_channels</a></li>
+<li><a href="#allocate_channels">allocate_channels()</a></li>
+<li><a href="#group_channel_channel_group">group_channel(channel,group)</a></li>
+<li><a href="#group_channels_from_to_group">group_channels(from,to,group)</a></li>
+<li><a href="#group_available_group">group_available(group)</a></li>
+<li><a href="#group_count_group">group_count(group)</a></li>
+<li><a href="#group_oldest">group_oldest()</a></li>
+<li><a href="#group_newer">group_newer()</a></li>
+<li><a href="#play_channel">play_channel()</a></li>
+<li><a href="#play_music">play_music()</a></li>
+<li><a href="#fade_in_channel_channel_chunk_loops_">fade_in_channel(channel,chunk,loops,ms,ticks)</a></li>
+<li><a href="#fade_in_music_music_loops_ms">fade_in_music(music,loops,ms)</a></li>
+<li><a href="#channel_volume_channel_volume">channel_volume(channel,volume)</a></li>
+<li><a href="#mucis_volume_volume">mucis_volume(volume)</a></li>
+<li><a href="#halt_channel_channel">halt_channel(channel)</a></li>
+<li><a href="#halt_group_group">halt_group(group)</a></li>
+<li><a href="#halt_music">halt_music()</a></li>
+<li><a href="#channel_expire_channel_ticks">channel_expire(channel,ticks)</a></li>
+<li><a href="#fade_out_channel_channel_ms">fade_out_channel(channel,ms)</a></li>
+<li><a href="#fade_out_group_group_ms">fade_out_group(group,ms)</a></li>
+<li><a href="#fade_out_music_ms">fade_out_music(ms)</a></li>
+<li><a href="#fading_music">fading_music()</a></li>
+<li><a href="#fading_channel">fading_channel()</a></li>
+<li><a href="#pause_channel">pause( channel )</a></li>
+<li><a href="#resume_channel">resume(channel)</a></li>
+<li><a href="#paused">paused()</a></li>
+<li><a href="#pause_music">pause_music()</a></li>
+<li><a href="#resume_music">resume_music()</a></li>
+<li><a href="#rewind_music">rewind_music()</a></li>
+<li><a href="#music_paused">music_paused()</a></li>
+<li><a href="#playing">playing()</a></li>
+<li><a href="#playing_music">playing_music ()</a></li>
+</ul>
+</li>
+<li><a href="#set_panning_channel_left_right">set_panning($channel, $left, $right)</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Mixer - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $mixer = new SDL::Mixer         -frequency =&gt; MIX_DEFAULT_FREQUENCY,
+                               -format =&gt; MIX_DEFAULT_FORMAT,
+                               -channels =&gt; MIX_DEFAULT_CHANNELS,
+                               -size =&gt; 4096;
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>SDL::Mixer allows you access to the SDL mixer library, enablig sound and
+music volume setting, playing, pausing and resuming, as well as fading
+the sound and music in and out.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new">new()</h2>
+<div id="new_CONTENT">
+<pre>  $mixer = SDL::Mixer-&gt;new(    -frequency =&gt; MIX_DEFAULT_FREQUENCY,
+                                       -format    =&gt; MIX_DEFAULT_FORMAT,
+                                       -channels  =&gt; MIX_DEFAULT_CHANNELS,
+                                       -size      =&gt; 4096);
+
+</pre>
+<p>Creates a new SDL::Mixer object. <code>$size</code> is the buffer size in bytes.</p>
+
+</div>
+<h2 id="query_spec">query_spec()</h2>
+<div id="query_spec_CONTENT">
+<pre>  my $specs = SDL::Mixer::query_spec();
+
+</pre>
+<p>Returns a hash reference, containing the following keys and their respective
+values:</p>
+<pre>  -status
+       -frequency
+       -channels
+       -format
+
+</pre>
+
+</div>
+<h2 id="reserve_channels">reserve_channels</h2>
+<div id="reserve_channels_CONTENT">
+<pre>  $mixer-&gt;reserve_channels(4);
+
+</pre>
+<p>Reserve so many channels.</p>
+
+</div>
+<h2 id="allocate_channels">allocate_channels()</h2>
+<div id="allocate_channels_CONTENT">
+<pre>  $mixer-&gt;reserve_channels(2);
+
+</pre>
+<p>Allocate so many channels.</p>
+
+</div>
+<h2 id="group_channel_channel_group">group_channel(channel,group)</h2>
+<div id="group_channel_channel_group_CONTENT">
+<p>Group the channel number <code>$channel</code> into group <code>$group</code>.</p>
+
+</div>
+<h2 id="group_channels_from_to_group">group_channels(from,to,group)</h2>
+<div id="group_channels_from_to_group_CONTENT">
+<p>Groups a range of channels</p>
+
+</div>
+<h2 id="group_available_group">group_available(group)</h2>
+<div id="group_available_group_CONTENT">
+<p>Return true when the group is available.</p>
+
+</div>
+<h2 id="group_count_group">group_count(group)</h2>
+<div id="group_count_group_CONTENT">
+<p>Returns the number of channels in the group</p>
+
+</div>
+<h2 id="group_oldest">group_oldest()</h2>
+<div id="group_oldest_CONTENT">
+
+
+
+
+
+</div>
+<h2 id="group_newer">group_newer()</h2>
+<div id="group_newer_CONTENT">
+
+
+
+
+
+</div>
+<h2 id="play_channel">play_channel()</h2>
+<div id="play_channel_CONTENT">
+
+
+
+
+
+</div>
+<h2 id="play_music">play_music()</h2>
+<div id="play_music_CONTENT">
+<p>Play <code>$music</code> <code>$loop</code> times.</p>
+
+</div>
+<h2 id="fade_in_channel_channel_chunk_loops_">fade_in_channel(channel,chunk,loops,ms,ticks)</h2>
+<div id="fade_in_channel_channel_chunk_loops_-2">
+<p>Fades a channel in</p>
+
+</div>
+<h2 id="fade_in_music_music_loops_ms">fade_in_music(music,loops,ms)</h2>
+<div id="fade_in_music_music_loops_ms_CONTENT">
+<p>Fades the music in over a number of ms, looping as it does</p>
+
+</div>
+<h2 id="channel_volume_channel_volume">channel_volume(channel,volume)</h2>
+<div id="channel_volume_channel_volume_CONTEN">
+<p>Sets the volume for a single channel</p>
+
+</div>
+<h2 id="mucis_volume_volume">mucis_volume(volume)</h2>
+<div id="mucis_volume_volume_CONTENT">
+<p>Set the volume for the music.</p>
+
+</div>
+<h2 id="halt_channel_channel">halt_channel(channel)</h2>
+<div id="halt_channel_channel_CONTENT">
+<p>Stops a specific channel</p>
+
+</div>
+<h2 id="halt_group_group">halt_group(group)</h2>
+<div id="halt_group_group_CONTENT">
+<p>Stops a group of channels</p>
+
+</div>
+<h2 id="halt_music">halt_music()</h2>
+<div id="halt_music_CONTENT">
+<p>Stops the music</p>
+
+</div>
+<h2 id="channel_expire_channel_ticks">channel_expire(channel,ticks)</h2>
+<div id="channel_expire_channel_ticks_CONTENT">
+<p>Ignores the channel after <code>ticks</code> has expired</p>
+
+</div>
+<h2 id="fade_out_channel_channel_ms">fade_out_channel(channel,ms)</h2>
+<div id="fade_out_channel_channel_ms_CONTENT">
+<p>Fade the channel number <code>$channel</code> in <code>$ms</code> ms out.</p>
+
+</div>
+<h2 id="fade_out_group_group_ms">fade_out_group(group,ms)</h2>
+<div id="fade_out_group_group_ms_CONTENT">
+<p>Fade the channel group <code>$group</code> in <code>$ms</code> ms out.</p>
+
+</div>
+<h2 id="fade_out_music_ms">fade_out_music(ms)</h2>
+<div id="fade_out_music_ms_CONTENT">
+<p>Fade the music in <code>$ms</code> ms out.</p>
+
+</div>
+<h2 id="fading_music">fading_music()</h2>
+<div id="fading_music_CONTENT">
+<p>Return true when the music is currently fading in or out.</p>
+
+</div>
+<h2 id="fading_channel">fading_channel()</h2>
+<div id="fading_channel_CONTENT">
+<p>Return true when the channel number <code>$channel</code> is currently fading in or out.</p>
+
+</div>
+<h2 id="pause_channel">pause( channel )</h2>
+<div id="pause_channel_CONTENT">
+<p>Pause the channel <code>$channel</code>.</p>
+
+</div>
+<h2 id="resume_channel">resume(channel)</h2>
+<div id="resume_channel_CONTENT">
+<p>Resume the channel <code>$channel</code>.</p>
+
+</div>
+<h2 id="paused">paused()</h2>
+<div id="paused_CONTENT">
+<p>Return true when the channel is currently paused.</p>
+
+</div>
+<h2 id="pause_music">pause_music()</h2>
+<div id="pause_music_CONTENT">
+<p>Pause the music play.</p>
+
+</div>
+<h2 id="resume_music">resume_music()</h2>
+<div id="resume_music_CONTENT">
+<p>Resume the music play.</p>
+
+</div>
+<h2 id="rewind_music">rewind_music()</h2>
+<div id="rewind_music_CONTENT">
+<p>Resets the music file to the beginning</p>
+
+</div>
+<h2 id="music_paused">music_paused()</h2>
+<div id="music_paused_CONTENT">
+<p>Return true when the music is currently paused.</p>
+
+</div>
+<h2 id="playing">playing()</h2>
+<div id="playing_CONTENT">
+<p>Return true when the channel is currently playing.</p>
+
+</div>
+<h2 id="playing_music">playing_music ()</h2>
+<div id="playing_music_CONTENT">
+<p>Return true when the music is currently playing.</p>
+
+</div>
+<h1 id="set_panning_channel_left_right">set_panning($channel, $left, $right)</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="set_panning_channel_left_right_CONTE">
+<p>Sets the volume for the left or right channels. To do true panning:</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-MultiThread.html-inc b/pages/SDL-MultiThread.html-inc
new file mode 100644 (file)
index 0000000..1863041
--- /dev/null
@@ -0,0 +1,25 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Video - Bindings to the MultiThread category in SDL API</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<p>This module is not an object. </p>
+
+
+
+
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Music.html-inc b/pages/SDL-Music.html-inc
new file mode 100644 (file)
index 0000000..c66b3e3
--- /dev/null
@@ -0,0 +1,41 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Music - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Music</cite> is used to load music files for use with <cite>SDL::Mixer</cite>.
+To load a music file one simply creates a new object passing the filename 
+to the constructor:</p>
+<pre>  my $music = new SDL::Music 'my_song.ogg';
+
+
+
+
+</pre>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Mixer</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-OpenGL.html-inc b/pages/SDL-OpenGL.html-inc
new file mode 100644 (file)
index 0000000..c6bb498
--- /dev/null
@@ -0,0 +1,86 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#CAVEATS">CAVEATS</a></li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::OpenGL - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::OpenGL</cite> is a perl module which when used by your application
+exports the gl* and glu* functions into your application's primary namespace.
+Most of the functions described in the OpenGL 1.3 specification are currently
+supported in this fashion.  As the implementation of the OpenGL bindings that
+comes with SDL_perl is largely type agnositic, there is no need to decline
+the function names in the fashion that is done in the C API. For example,
+glVertex3d is simply glVertex, and perl just does the right thing with regards
+to types.</p>
+
+</div>
+<h1 id="CAVEATS">CAVEATS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CAVEATS_CONTENT">
+<p>The following methods work different in Perl than in C:</p>
+<dl>
+       <dt>glCallLists</dt>
+       <dd>
+<pre>        glCallLists(@array_of_numbers);
+
+</pre>
+               <p>Unlike the C function, which get's passed a count, a type and a list of
+numbers, the Perl equivalent only takes a list of numbers.</p>
+               <p>Note that this is slow, since it needs to allocate memory and construct a
+list of numbers from the given scalars. For a faster version see
+<cite>glCallListsString</cite>.</p>
+       </dd>
+</dl>
+<p>The following methods exist in addition to the normal OpenGL specification:</p>
+<dl>
+       <dt>glCallListsString</dt>
+       <dd>
+<pre>        glCallListsString($string);
+
+</pre>
+               <p>Works like <cite>glCallLists</cite>(), except that it needs only one parameter, a scalar
+holding a string. The string is interpreted as a set of bytes, and each of
+these will be passed to glCallLists as GL_BYTE. This is faster than
+glCallLists, so you might want to pack your data like this:</p>
+<pre>        my $lists = pack(&quot;C&quot;, @array_of_numbers);
+
+</pre>
+               <p>And later use it like this:</p>
+<pre>        glCallListsString($lists);
+
+</pre>
+       </dd>
+</dl>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::App</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Overlay.html-inc b/pages/SDL-Overlay.html-inc
new file mode 100644 (file)
index 0000000..b6600a4
--- /dev/null
@@ -0,0 +1,80 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new_width_height_YUV_flag_display">new ( $width, $height, $YUV_flag, $display) </a>
+<ul><li><a href="#YUV_Flags">YUV_Flags</a>
+</li>
+</ul>
+</li>
+</ul>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Overlay - YUV Video overlay</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<p>First import the following modules to get access to constants and functions needed for overlay.</p>
+<pre>   use SDL;
+   use SDL::Video;
+   use SDL::Overlay;
+
+</pre>
+<p>Init the video susbsystem.</p>
+<pre>   SDL::Init(SDL_INIT_VIDEO);
+
+</pre>
+<p>Create a display to use.  </p>
+<pre>   my $display = SDL::SetVideoMore(640, 480, 32, SDL_SWSURFACE);
+
+</pre>
+<p>Create and attach the display to a new overlay
+   my $overlay = SDL::Overlay-&gt;new( 100, 100, SDL_YV12_OVERLAY, $display);</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>A <code>SDL_Overlay</code> allows for video rendering on an <code>SDL_Surface</code> which is a display.  </p>
+<p>The term 'overlay' is a misnomer since, unless the overlay is created in hardware, the contents for the display surface underneath the area where the overlay is shown will be overwritten when the overlay is displayed.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new_width_height_YUV_flag_display">new ( $width, $height, $YUV_flag, $display) </h2>
+<div id="new_width_height_YUV_flag_display_CO">
+<p>The constructor creates a SDL::Overlay of the specified width, height and format (see <code>YUV_Flags</code> list below of available formats), for the provided display.</p>
+<p>Note the 'display' argument needs to actually be the surface created by <code>SDL::Video::SetVideoMode</code> otherwise this function will segfault. </p>
+<pre>   my $overlay = SDL::Overlay-&gt;new( $width, $height, $YUV_flag, $display );
+
+</pre>
+
+</div>
+<h3 id="YUV_Flags">YUV_Flags</h3>
+<div id="YUV_Flags_CONTENT">
+<p>More information on YUV formats can be found at <a href="http://www.fourcc.org/indexyuv.htm">http://www.fourcc.org/indexyuv.htm</a> . </p>
+<dl>
+       <dt>*
+SDL_YV12_OVERLAY  0x32315659  /* Planar mode: Y + V + U */</dt>
+       <dt>*
+SDL_IYUV_OVERLAY  0x56555949  /* Planar mode: Y + U + V */</dt>
+       <dt>*
+SDL_YUY2_OVERLAY  0x32595559  /* Packed mode: Y0+U0+Y1+V0 */</dt>
+       <dt>*
+SDL_UYVY_OVERLAY  0x59565955  /* Packed mode: U0+Y0+V0+Y1 */</dt>
+       <dt>*
+SDL_YVYU_OVERLAY  0x55595659  /* Packed mode: Y0+V0+Y1+U0 */</dt>
+</dl>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Palette.html-inc b/pages/SDL-Palette.html-inc
new file mode 100644 (file)
index 0000000..b74bc6d
--- /dev/null
@@ -0,0 +1,63 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#ncolors">ncolors ( )</a></li>
+<li><a href="#colors_index">colors ( index )</a></li>
+<li><a href="#color_index_index">color_index ( index )</a></li>
+<li><a href="#size">size</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Palette - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Palette</cite> provides an interface to the <code>SDL_Palette</code> structures,
+and can be used to set the color values of an existing palette's indexes.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="ncolors">ncolors ( )</h2>
+<div id="ncolors_CONTENT">
+<p>Fetches the number of colors in palette</p>
+
+</div>
+<h2 id="colors_index">colors ( index )</h2>
+<div id="colors_index_CONTENT">
+<p>Fetches an array of colors in palette</p>
+
+</div>
+<h2 id="color_index_index">color_index ( index )</h2>
+<div id="color_index_index_CONTENT">
+<p>Fetches the SDL_Color at the provide index in palette</p>
+
+</div>
+<h2 id="size">size</h2>
+<div id="size_CONTENT">
+<p>Returns the size of the palette.</p>
+
+
+
+
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Color</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-PixelFormat.html-inc b/pages/SDL-PixelFormat.html-inc
new file mode 100644 (file)
index 0000000..d49a618
--- /dev/null
@@ -0,0 +1,140 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#palette">palette</a></li>
+<li><a href="#BitsPerPixel">BitsPerPixel </a></li>
+<li><a href="#BytesPerPixel">BytesPerPixel</a></li>
+<li><a href="#RGBA_loss">[RGBA]loss</a></li>
+<li><a href="#RGBA_shift">[RGBA]shift</a></li>
+<li><a href="#RGBA_mask">[RGBA]mask</a></li>
+<li><a href="#colorkey">colorkey</a></li>
+<li><a href="#alpha">alpha</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::PixelFormat - Stores surface format information</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  my $surface = SDL::Surface-&gt;new( ...
+       $surface-&gt;format; #this returns the PixelFormat object attached to this surface
+
+</pre>
+<p>PixelFormat is only created in a <code>SDL::Surface</code>. This module only provides getters to the surface's pixelformat. Later on we will provide setting capability.</p>
+
+
+
+
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>An <code>SDL::PixelFormat </code> stores surface format information</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="palette">palette</h2>
+<div id="palette_CONTENT">
+<pre>  $surface-&gt;format-&gt;palette;
+
+</pre>
+<p>Returns the <code>SDL_Palette</code> and <cite>SDL::Palette</cite> of the format of the surface.</p>
+
+</div>
+<h2 id="BitsPerPixel">BitsPerPixel </h2>
+<div id="BitsPerPixel_CONTENT">
+<pre>  $surface-&gt;format-&gt;BitsPerPixel;
+
+</pre>
+<p>The number of bits used to represent each pixel in a surface. Usually 8, 16, 24 or 32. (1 to 7 are not allowed when creating a surface or open a video mode</p>
+
+</div>
+<h2 id="BytesPerPixel">BytesPerPixel</h2>
+<div id="BytesPerPixel_CONTENT">
+<pre>  $surface-&gt;format-&gt;BytesPerPixel;
+
+</pre>
+<p>The number of bytes used to represent each pixel in a surface. Usually one to four.</p>
+
+</div>
+<h2 id="RGBA_loss">[RGBA]loss</h2>
+<div id="RGBA_loss_CONTENT">
+<pre>  $surface-&gt;format-&gt;Rloss; #red   loss
+       $surface-&gt;format-&gt;Bloss; #blue  loss
+       $surface-&gt;format-&gt;Gloss; #green loss      
+       $surface-&gt;format-&gt;Aloss; #alpha loss
+
+</pre>
+<p>Precision loss of each color component (2[RGBA]loss)</p>
+
+</div>
+<h2 id="RGBA_shift">[RGBA]shift</h2>
+<div id="RGBA_shift_CONTENT">
+<pre>  $surface-&gt;format-&gt;Rshift; #red   shift
+       $surface-&gt;format-&gt;Bshift; #blue  shift
+       $surface-&gt;format-&gt;Gshift; #green shift    
+       $surface-&gt;format-&gt;Ashift; #alpha shift
+
+</pre>
+<p>Binary left shift of each color component in the pixel value</p>
+
+
+
+
+
+</div>
+<h2 id="RGBA_mask">[RGBA]mask</h2>
+<div id="RGBA_mask_CONTENT">
+<pre>  $surface-&gt;format-&gt;Rmask; #red   mask
+       $surface-&gt;format-&gt;Bmask; #blue  mask
+       $surface-&gt;format-&gt;Gmask; #green mask      
+       $surface-&gt;format-&gt;Amask; #alpha mask
+
+</pre>
+<p>Binary left shift of each color component in the pixel value</p>
+
+</div>
+<h2 id="colorkey">colorkey</h2>
+<div id="colorkey_CONTENT">
+<pre>  $surface-&gt;format-&gt;colorkey;
+
+</pre>
+<p>Pixel value of transparent pixels.  </p>
+
+</div>
+<h2 id="alpha">alpha</h2>
+<div id="alpha_CONTENT">
+<pre>  $surface-&gt;format-&gt;alpha;
+
+</pre>
+<p>Overall surface alpha value</p>
+
+
+
+
+
+
+
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Rect.html-inc b/pages/SDL-Rect.html-inc
new file mode 100644 (file)
index 0000000..4ebb053
--- /dev/null
@@ -0,0 +1,104 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new_x_y_w_h">new ( $x, $y, $w, $h )</a></li>
+<li><a href="#x">x</a></li>
+<li><a href="#y">y</a></li>
+<li><a href="#w">w</a></li>
+<li><a href="#h">h</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Rect - Defines a rectangular area</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  my $rect = SDL::Rect-&gt;new( 0, 0, 0, 0 );
+  $rect-&gt;x(1);
+  $rect-&gt;y(2);
+  $rect-&gt;w(3);
+  $rect-&gt;h(4);
+  my $x = $rect-&gt;x; # 1
+  my $y = $rect-&gt;y; # 2
+  my $w = $rect-&gt;w; # 3
+  my $h = $rect-&gt;h; # 4
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>An <code>SDL_Rect</code> defines a rectangular area of pixels.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new_x_y_w_h">new ( $x, $y, $w, $h )</h2>
+<div id="new_x_y_w_h_CONTENT">
+<p>The constructor creates a new rectangle with the specified x, y, w, h
+values:</p>
+<pre>    my $rect = SDL::Rect-&gt;new( 0, 0, 0, 0 );
+
+</pre>
+
+</div>
+<h2 id="x">x</h2>
+<div id="x_CONTENT">
+<p>If passed a value, this method sets the x component of the rectangle;
+if not, it returns the x component of the rectangle:</p>
+<pre>  my $x = $rect-&gt;x; # 255
+  $rect-&gt;x(128);
+
+</pre>
+
+</div>
+<h2 id="y">y</h2>
+<div id="y_CONTENT">
+<p>If passed a value, this method sets the y component of the rectangle;
+if not, it returns the y component of the rectangle:</p>
+<pre>  my $y = $rect-&gt;y; # 255
+  $rect-&gt;y(128);
+
+</pre>
+
+</div>
+<h2 id="w">w</h2>
+<div id="w_CONTENT">
+<p>If passed a value, this method sets the w component of the rectangle;
+if not, it returns the w component of the rectangle:</p>
+<pre>  my $w = $rect-&gt;w; # 255
+  $rect-&gt;w(128);
+
+</pre>
+
+</div>
+<h2 id="h">h</h2>
+<div id="h_CONTENT">
+<p>If passed a value, this method sets the h component of the rectangle;
+if not, it returns the h component of the rectangle:</p>
+<pre>  my $h = $rect-&gt;h; # 255
+  $rect-&gt;h(128);
+
+</pre>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-SFont.html-inc b/pages/SDL-SFont.html-inc
new file mode 100644 (file)
index 0000000..a42c087
--- /dev/null
@@ -0,0 +1,46 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::SFont - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+
+
+
+
+
+
+
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::App</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-SMPEG.html-inc b/pages/SDL-SMPEG.html-inc
new file mode 100644 (file)
index 0000000..ef4328e
--- /dev/null
@@ -0,0 +1,80 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a>
+<ul><li><a href="#METHODS">METHODS </a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::SMPEG - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $video = new SDL::SMPEG ( -name =&gt; 'pr0n.mpg' );
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><code>SDL::SMPEG</code> adds support for MPEG video to your
+SDL Perl application.  SMPEGs are objects bound to
+surfaces, whose playback is controled through the
+object's interface.</p>
+
+</div>
+<h2 id="METHODS">METHODS </h2>
+<div id="METHODS_CONTENT">
+
+
+
+
+<ul>
+               <li><code>SDL::SMPEG::error()</code> returns any error messages associated with playback        </li>
+               <li><code>SDL::SMPEG::audio(bool)</code> enables or disables audio playback, (on by default)    </li>
+               <li><code>SDL::SMPEG::video(bool)</code> enables or disable video playback, (on by default)     </li>
+               <li><code>SDL::SMPEG::loop(bool)</code> enables or disable playback looping (off by default)    </li>
+               <li><code>SDL::SMPEG::volume(int)</code> set the volume as per the mixer volume </li>
+               <li><code>SDL::SMPEG:display(surface)</code> binds the clip to a display surface        </li>
+               <li><code>SDL::SMPEG::scale([x,y]|[surface]|int)</code> scales the clip by either x,y
+factors, scales to the image dimensions, or a single scalar.   </li>
+               <li><code>SDL::SMPEG::play()</code> plays the video clip, call <code>SDL::SMPEG::display()</code> before playing        </li>
+               <li><code>SDL::SMPEG::pause()</code> pauses video playback      </li>
+               <li><code>SDL::SMPEG::stop()</code> stops video playback        </li>
+               <li><code>SDL::SMPEG::rewind()</code> resets the clip to the beginning  </li>
+               <li><code>SDL::SMPEG::seek(offset)</code> seeks to a particular byte offset     </li>
+               <li><code>SDL::SMPEG::skip(time)</code> skips to a particular time      </li>
+               <li><code>SDL::SMPEG::region(rect)</code> takes a SDL::Rect and defines the display area        </li>
+               <li><code>SDL::SMPEG::frame(int)</code> renders a specific frame to the screen  </li>
+               <li><code>SDL::SMPEG::info()</code> returns a new <code>SDL::MPEG</code> object reflecting the current status   </li>
+               <li><code>SDL::SMPEG::status()</code> returns either SMPEG_PLAYING or SMPEG_STOPPED or SMPEG_ERROR</li>
+</ul>
+
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p>perl(1) SDL::Surface(3) SDL::MPEG(3)</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Sound.html-inc b/pages/SDL-Sound.html-inc
new file mode 100644 (file)
index 0000000..7a59f94
--- /dev/null
@@ -0,0 +1,58 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#volume_value">volume ( value )</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Sound - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Sound</cite> is a module for loading WAV files for sound effects.
+The file can be loaded by creating a new <cite>SDL::Sound</cite> object by
+passing the filename to the constructor;</p>
+<pre>  my $sound = new SDL::Sound 'my_sfx.wav';
+
+</pre>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="volume_value">volume ( value )</h2>
+<div id="volume_value_CONTENT">
+<p>Sets the volume of the sample.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Mixer</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Surface.html-inc b/pages/SDL-Surface.html-inc
new file mode 100644 (file)
index 0000000..5d6b428
--- /dev/null
@@ -0,0 +1,103 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</a></li>
+<li><a href="#new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</a>
+<ul><li><a href="#Construtor_Parameters">Construtor Parameters</a></li>
+</ul>
+</li>
+<li><a href="#w">w</a></li>
+<li><a href="#h">h</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Surface - Graphic surface structure. Access to <code>SDL_Surface</code>.</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<p>The main surface (display) is provided by <cite>SDL::Video::set_video_mode</cite>.
+  use SDL; #provides flags &amp; constants
+  use SDL::Video; #provides access to set_video_mode
+  use SDL::Surface; #provides access to SDL_Surface struct internals</p>
+<pre>  SDL::init(SDL_INIT_VIDEO); 
+  my $display = SDL::Video::set_video_mode(); 
+
+</pre>
+<p>All surfaces constructed from now on are attached to the $display. There are two constructors available to do this.</p>
+<pre>  my $surface  = SDL::Surface-&gt;new ( ... ); 
+  my $surface2 = SDL::Surface-&gt;new_from ( surface, ... ); 
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>An <code>SDL_Surface</code> defines a surfaceangular area of pixels.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new_flags_width_height_depth_Rmask_G">new ( flags, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
+<div id="new_flags_width_height_depth_Rmask_G-2">
+<p>The constructor creates a new surface with the specified parameter values.</p>
+<pre>    my $surface = SDL::Surface-&gt;new( ... );
+
+</pre>
+
+</div>
+<h2 id="new_from_surface_width_height_depth_">new_from ( surface, width, height, depth, Rmask, Gmask, Bmask, Amask )</h2>
+<div id="new_from_surface_width_height_depth_-2">
+<p>The constructor creates a new surface with the specified parameter values. </p>
+<pre>    my $surface = SDL::Surface-&gt;new_from( $old_surface, ... );
+
+</pre>
+<p>THIS WILL SEGFAULT!!! Read: http://sdlperl.ath.cx/projects/SDLPerl/ticket/53 </p>
+
+</div>
+<h3 id="Construtor_Parameters">Construtor Parameters</h3>
+<div id="Construtor_Parameters_CONTENT">
+
+
+
+
+
+
+
+
+</div>
+<h2 id="w">w</h2>
+<div id="w_CONTENT">
+<p>SDL::Surface width are defined at construction. Thus the following is read only. </p>
+<pre>  my $w = $surface-&gt;w; 
+
+</pre>
+
+</div>
+<h2 id="h">h</h2>
+<div id="h_CONTENT">
+<p>SDL::Surface height are defined at construction. Thus the following is read only. </p>
+<pre>  my $h = $surface-&gt;h; 
+
+</pre>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL</cite>, <cite>SDL::PixelFormat</cite>, <cite>SDL::Video</cite> </p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-TTFont.html-inc b/pages/SDL-TTFont.html-inc
new file mode 100644 (file)
index 0000000..b9714cc
--- /dev/null
@@ -0,0 +1,200 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#new">new</a>
+<ul><li><a href="#name">-name</a></li>
+<li><a href="#n">-n</a></li>
+<li><a href="#size">-size</a></li>
+<li><a href="#s">-s</a></li>
+<li><a href="#foreground">-foreground</a></li>
+<li><a href="#fg">-fg</a></li>
+<li><a href="#background">-background</a></li>
+<li><a href="#bg">-bg</a></li>
+<li><a href="#mode">-mode</a></li>
+<li><a href="#m">-m</a></li>
+</ul>
+</li>
+<li><a href="#Text_Modes">Text Modes</a></li>
+<li><a href="#Text_Style">Text Style</a></li>
+<li><a href="#Ascent_Descent_values">Ascent/Descent values</a></li>
+<li><a href="#height">height</a></li>
+<li><a href="#width_text">width(@text)</a></li>
+<li><a href="#print_surface_top_left_text">print ($surface, $top, $left, @text)</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::TTFont - a SDL perl extension</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $font = SDL::TTFont-&gt;new( -name =&gt; &quot;Utopia.ttf&quot;, -size =&gt; 18 );
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::TTFont</cite> is a module for applying true type fonts to <cite>SDL::Surface</cite>.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="new">new</h2>
+<div id="new_CONTENT">
+<p>Instanciates a new font surface. It accepts the following parameters:</p>
+
+</div>
+<h3 id="name">-name</h3>
+<div id="name_CONTENT">
+
+</div>
+<h3 id="n">-n</h3>
+<div id="n_CONTENT">
+<p>The font filename (possibly with proper path) to be used. <strong>This options is mandatory</strong>.</p>
+
+</div>
+<h3 id="size">-size</h3>
+<div id="size_CONTENT">
+
+</div>
+<h3 id="s">-s</h3>
+<div id="s_CONTENT">
+<p>The font size (height, in pixels) to be used. <strong>This option is mandatory</strong>.</p>
+
+</div>
+<h3 id="foreground">-foreground</h3>
+<div id="foreground_CONTENT">
+
+</div>
+<h3 id="fg">-fg</h3>
+<div id="fg_CONTENT">
+<p>Foreground color for the font surface (i.e. the actual font color). It expects a 
+SDL::Color value. If omitted, black is used as font color.</p>
+
+</div>
+<h3 id="background">-background</h3>
+<div id="background_CONTENT">
+
+</div>
+<h3 id="bg">-bg</h3>
+<div id="bg_CONTENT">
+<p>Background color for the font surface (i.e. the font background color). It expects 
+a SDL::Color value. If omitted , white is used for the background.</p>
+
+</div>
+<h3 id="mode">-mode</h3>
+<div id="mode_CONTENT">
+
+</div>
+<h3 id="m">-m</h3>
+<div id="m_CONTENT">
+<p>Font mode. If omitted, SDL::TEXT_SHADED is used. Note that this class provides 
+human friendly accessors for setting different modes, so you should probably use 
+them instead. See below for further details.</p>
+
+</div>
+<h2 id="Text_Modes">Text Modes</h2>
+<div id="Text_Modes_CONTENT">
+<p>The SDL::TTFont accepts three different types (shaded, solid, blended) for 
+three different encodings (text, utf8, unicode).</p>
+<pre>  $font-&gt;text_shaded;       # sets mode to SDL::TEXT_SHADED
+  $font-&gt;text_solid;        # sets mode to SDL::TEXT_SOLID
+  $font-&gt;text_blended;      # sets mode to SDL::TEXT_BLENDED
+
+  $font-&gt;utf8_shaded;       # sets mode to SDL::UTF8_SHADED
+  $font-&gt;utf8_solid;        # sets mode to SDL::UTF8_SOLID
+  $font-&gt;utf8_blended;      # sets mode to SDL::UTF8_BLENDED
+
+  $font-&gt;unicode_shaded;    # sets mode to SDL::UNICODE_SHADED
+  $font-&gt;unicode_solid;     # sets mode to SDL::UNICODE_SOLID
+  $font-&gt;unicode_blended;   # sets mode to SDL::UNICODE_BLENDED
+
+</pre>
+
+</div>
+<h2 id="Text_Style">Text Style</h2>
+<div id="Text_Style_CONTENT">
+<p>You may also smoothly change your font style by calling any of the following 
+methods:</p>
+<pre>  $font-&gt;normal;       # resets font styling, making text &quot;normal&quot;
+  $font-&gt;bold;         # sets bold style for font
+  $font-&gt;italic;       # sets italic style for font
+  $font-&gt;underline;    # sets underline style for font
+
+
+
+
+</pre>
+
+</div>
+<h2 id="Ascent_Descent_values">Ascent/Descent values</h2>
+<div id="Ascent_Descent_values_CONTENT">
+<p>Ascent is the number of pixels from the font baseline to the top of the font, while 
+descent is the number of pixels from the font baseline to the bottom of the font.</p>
+<pre>  $font-&gt;ascent;      # height in pixels of the font ascent
+  $font-&gt;descent;     # height in pixels of the font descent
+
+</pre>
+
+</div>
+<h2 id="height">height</h2>
+<div id="height_CONTENT">
+<pre>  my $height = $font-&gt;height;
+
+</pre>
+<p>Returns the height, in pixels, of the actual rendered text. This is the 
+average size for each glyph in the font.</p>
+
+</div>
+<h2 id="width_text">width(@text)</h2>
+<div id="width_text_CONTENT">
+<pre>  my $width = $font-&gt;width(&quot;Choose your destiny&quot;);
+
+</pre>
+<p>Returns the dimensions needed to render the text. This can be used to help 
+determine the positioning needed for text before it is rendered. It can also 
+be used for wordwrapping and other layout effects.</p>
+<p>Be aware that most fonts - notably, non-monospaced (&quot;ms&quot;) ones - use kerning 
+which adjusts the widths for specific letter pairs. For example, the width 
+for &quot;ae&quot; will not always match the width for &quot;a&quot; + &quot;e&quot;.</p>
+
+</div>
+<h2 id="print_surface_top_left_text">print ($surface, $top, $left, @text)</h2>
+<div id="print_surface_top_left_text_CONTENT">
+<p>Directly draws text to an existing surface. Receives the target <cite>SDL::Surface</cite> 
+object and the relative top (y) and left (x) coordinates to put the text in. 
+The last parameter may be a string or an array or strings with the text to be 
+written.</p>
+
+
+
+
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite>, <cite>SDL</cite>, <cite>SDL::Surface</cite>
+</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Timer.html-inc b/pages/SDL-Timer.html-inc
new file mode 100644 (file)
index 0000000..aa2b5ad
--- /dev/null
@@ -0,0 +1,49 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Timer - a SDL perl extension to handle timers</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  $timer = new SDL::Timer { print &quot;tick&quot;; 4000; } -delay =&gt; 4000;
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><code>SDL::Timer</code> provides an abstract interface to the SDL::Timer
+callback code.  SDL::Timer::new requires a subroutine and a delay
+at which is the initial interval between the creation of the
+timer until the first call to the subroutine.  The subroutine
+must return a value which is the delay until the it is called again.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Tool-Font.html-inc b/pages/SDL-Tool-Font.html-inc
new file mode 100644 (file)
index 0000000..0eb3a34
--- /dev/null
@@ -0,0 +1,48 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#print_surface_x_y_text">print ( surface, x, y, text ... )</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Tool::Font - a perl extension</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Tool::Font</cite> provides a unified interface for applying
+True Type and SFont fonts to various surfaces.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="print_surface_x_y_text">print ( surface, x, y, text ... )</h2>
+<div id="print_surface_x_y_text_CONTENT">
+<p><code>SDL::Tool::Font::print</code> print the given text on the supplied surface
+with the upper left hand corner starting at the specified coordinates.</p>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>David J. Goehrig</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Font</cite> <cite>SDL::TTFont</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Tool-Graphic.html-inc b/pages/SDL-Tool-Graphic.html-inc
new file mode 100644 (file)
index 0000000..43b669c
--- /dev/null
@@ -0,0 +1,75 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#zoom_surface_xzoom_yzoom_smooth">zoom ( surface, xzoom, yzoom, smooth )</a></li>
+<li><a href="#rotoZoom_surface_angle_zoom_smooth">rotoZoom ( surface, angle, zoom, smooth )</a></li>
+<li><a href="#grayScale_surface">grayScale ( surface )</a></li>
+<li><a href="#invertColor_surface">invertColor ( surface )</a></li>
+</ul>
+</li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+
+
+
+
+
+
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Tool::Graphic</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p><cite>SDL::Tool::Graphic</cite> is a module for zooming and rotating <cite>SDL::Surface</cite> objects.</p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="zoom_surface_xzoom_yzoom_smooth">zoom ( surface, xzoom, yzoom, smooth )</h2>
+<div id="zoom_surface_xzoom_yzoom_smooth_CONT">
+<p><code>SDL::Tool::Graphic::zoom</code> scales a <cite>SDL::Surface</cite> along the two axis independently.</p>
+
+</div>
+<h2 id="rotoZoom_surface_angle_zoom_smooth">rotoZoom ( surface, angle, zoom, smooth )</h2>
+<div id="rotoZoom_surface_angle_zoom_smooth_C">
+<p><code>SDL::Tool::Graphic::rotoZoom</code> rotates and fixed axis zooms a <cite>SDL::Surface</cite>.</p>
+
+</div>
+<h2 id="grayScale_surface">grayScale ( surface )</h2>
+<div id="grayScale_surface_CONTENT">
+<p><code>SDL::Tool::Graphic::grayScale</code> rotates and fixed axis zooms a <cite>SDL::Surface</cite>.</p>
+
+</div>
+<h2 id="invertColor_surface">invertColor ( surface )</h2>
+<div id="invertColor_surface_CONTENT">
+<p><code>SDL::Tool::Graphic::invertColor</code> inverts the color of a &lt;SDL::Surface&gt;.</p>
+
+
+
+
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>Russell E. Valentine</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>perl</cite> <cite>SDL::Surface</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Tutorial.html-inc b/pages/SDL-Tutorial.html-inc
new file mode 100644 (file)
index 0000000..231b226
--- /dev/null
@@ -0,0 +1,130 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#SDL_BASICS">SDL BASICS</a>
+<ul><li><a href="#Surfaces">Surfaces</a></li>
+<li><a href="#Initialization">Initialization</a></li>
+<li><a href="#Working_With_The_App">Working With The App</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a></li>
+<li><a href="#AUTHOR">AUTHOR</a></li>
+<li><a href="#COPYRIGHT">COPYRIGHT</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Tutorial - introduction to Perl SDL</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  # to read this tutorial
+       $ perldoc SDL::Tutorial
+
+       # to create a bare-bones SDL app based on this tutorial
+       $ perl -MSDL::Tutorial -e 1
+
+</pre>
+
+</div>
+<h1 id="SDL_BASICS">SDL BASICS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SDL_BASICS_CONTENT">
+<p>SDL, the Simple DirectMedia Layer, is a cross-platform multimedia library.
+These are the Perl 5 bindings.  You can find out more about SDL at
+<a href="http://www.libsdl.org/">http://www.libsdl.org/</a>.</p>
+<p>Creating an SDL application with Perl is easy.  You have to know a few basics,
+though.  Here's how to get up and running as quickly as possible.</p>
+
+</div>
+<h2 id="Surfaces">Surfaces</h2>
+<div id="Surfaces_CONTENT">
+<p>All graphics in SDL live on a surface.  You'll need at least one.  That's what
+<cite>SDL::App</cite> provides.</p>
+<p>Of course, before you can get a surface, you need to initialize your video
+mode.  SDL gives you several options, including whether to run in a window or
+take over the full screen, the size of the window, the bit depth of your
+colors, and whether to use hardware acceleration.  For now, we'll build
+something really simple.</p>
+
+</div>
+<h2 id="Initialization">Initialization</h2>
+<div id="Initialization_CONTENT">
+<p>SDL::App makes it easy to initialize video and create a surface.  Here's how to
+ask for a windowed surface with 640x480x16 resolution:</p>
+<pre>  use SDL::App;
+
+       my $app = SDL::App-&gt;new(
+               -width  =&gt; 640,
+               -height =&gt; 480,
+               -depth  =&gt; 16,
+       );
+
+</pre>
+<p>You can get more creative, especially if you use the <code>-title</code> and <code>-icon</code>
+attributes in a windowed application.  Here's how to set the window title of
+the application to <code>My SDL Program</code>:</p>
+<pre>  use SDL::App;
+
+       my $app = SDL::App-&gt;new(
+               -height =&gt; 640,
+               -width  =&gt; 480,
+               -depth  =&gt; 16,
+               -title  =&gt; 'My SDL Program',
+       );
+
+</pre>
+<p>Setting an icon is a little more involved -- you have to load an image onto a
+surface.  That's a bit more complicated, but see the <code>-name</code> parameter to
+<code>SDL::Surface-</code>new()&gt; if you want to skip ahead.</p>
+
+</div>
+<h2 id="Working_With_The_App">Working With The App</h2>
+<div id="Working_With_The_App_CONTENT">
+<p>Since <code>$app</code> from the code above is just an SDL surface with some extra sugar,
+it behaves much like <cite>SDL::Surface</cite>.  In particular, the all-important <code>blit</code>
+and <code>update</code> methods work.  You'll need to create <cite>SDL::Rect</cite> objects
+representing sources of graphics to draw onto the <code>$app</code>'s surface, <code>blit</code>
+them there, then <code>update</code> the <code>$app</code>.</p>
+<p><strong>Note:</strong>  &quot;blitting&quot; is copying a chunk of memory from one place to another.</p>
+<p>That, however, is another tutorial.</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<dl>
+       <dt><cite>SDL::Tutorial::Drawing</cite></dt>
+       <dd>
+               <p>basic drawing with rectangles</p>
+       </dd>
+       <dt><cite>SDL::Tutorial::Animation</cite></dt>
+       <dd>
+               <p>basic rectangle animation</p>
+       </dd>
+       <dt><cite>SDL::Tutorial::Images</cite></dt>
+       <dd>
+               <p>image loading and animation</p>
+       </dd>
+</dl>
+
+</div>
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
+<p>chromatic, &lt;chromatic@wgz.org&gt;.  </p>
+<p>Written for and maintained by the Perl SDL project, <a href="http://sdl.perl.org/">http://sdl.perl.org/</a>.</p>
+
+</div>
+<h1 id="COPYRIGHT">COPYRIGHT</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="COPYRIGHT_CONTENT">
+<p>Copyright (c) 2003 - 2004, chromatic.  All rights reserved.  This module is
+distributed under the same terms as Perl itself, in the hope that it is useful
+but certainly under no guarantee.
+</p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-Video.html-inc b/pages/SDL-Video.html-inc
new file mode 100644 (file)
index 0000000..2333e0e
--- /dev/null
@@ -0,0 +1,557 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#get_video_surface">get_video_surface</a></li>
+<li><a href="#get_video_info">get_video_info</a></li>
+<li><a href="#video_driver_name">video_driver_name</a></li>
+<li><a href="#list_modes_formats_flags">list_modes(formats,flags)</a></li>
+<li><a href="#video_mode_ok_width_height_bpp_flags">video_mode_ok(width,height,bpp,flags)</a></li>
+<li><a href="#set_video_mode_width_height_bpp_flag">set_video_mode(width,height,bpp,flags)</a>
+<ul>
+<li>
+<ul><li><a href="#List_of_avalaibles_flags">List of avalaibles flags</a></li>
+</ul>
+</li>
+</ul>
+</li>
+<li><a href="#update_rect_surface_x_y_width_height">update_rect(surface,x,y,width,height)</a></li>
+<li><a href="#update_rects_surface_rects">update_rects(surface,rects) </a></li>
+<li><a href="#flip_surface">flip(surface)</a></li>
+<li><a href="#set_colors_surface_start_colors">set_colors(surface,start,colors)</a></li>
+<li><a href="#set_palette_surface_flags_start_colo">set_palette(surface,flags,start,colors)</a></li>
+<li><a href="#set_gamma_r_g_b">set_gamma(r,g,b)</a></li>
+<li><a href="#get_gamma_ramp_rt_gt_bt_to_be_coded">get_gamma_ramp(rt,gt,bt) * to be coded</a></li>
+<li><a href="#set_gamma_ramp_rt_gt_bt">set_gamma_ramp(rt,gt,bt)</a></li>
+<li><a href="#map_RGB_pixel_format_r_g_b">map_RGB(pixel_format,r,g,b)</a></li>
+<li><a href="#map_RGBA_pixel_format_r_g_b_a">map_RGBA(pixel_format,r,g,b,a)</a></li>
+<li><a href="#get_RGB_pixel_format_pixel">get_RGB(pixel_format,pixel)</a></li>
+<li><a href="#get_RGBA_pixel_format_pixel">get_RGBA(pixel_format,pixel)</a></li>
+<li><a href="#create_RGB_surface_from">create_RGB_surface_from ***</a></li>
+<li><a href="#lock_surface_surface">lock_surface(surface)</a></li>
+<li><a href="#unlock_surface_surface">unlock_surface(surface)</a></li>
+<li><a href="#convert_surface_surface_format_flags">convert_surface(surface,format,flags)</a></li>
+<li><a href="#display_format">display_format</a></li>
+<li><a href="#display_format_alpha">display_format_alpha</a></li>
+<li><a href="#load_BMP_filename">load_BMP(filename)</a></li>
+<li><a href="#save_BMP_surface_filename">save_BMP(surface,filename)</a></li>
+<li><a href="#set_color_key_surface_flag_key">set_color_key(surface,flag,key)</a></li>
+<li><a href="#set_alpha_surface_flag_key">set_alpha(surface,flag,key)</a></li>
+<li><a href="#set_clip_rect_surface_rect">set_clip_rect(surface,rect)</a></li>
+<li><a href="#get_clip_rect_surface_rect">get_clip_rect(surface,rect)</a></li>
+<li><a href="#blit_surface_src_src_rect_dest_dest_">blit_surface(src,src_rect,dest,dest_rect)</a></li>
+<li><a href="#fill_rect_dest_dest_rect_pixel">fill_rect(dest,dest_rect,pixel)</a></li>
+<li><a href="#GL_load_library_path">GL_load_library(path)</a></li>
+<li><a href="#GL_get_proc_address_proc">GL_get_proc_address(proc)</a></li>
+<li><a href="#GL_get_attribute_attr">GL_get_attribute(attr)</a></li>
+<li><a href="#GL_set_attribute_attr_value">GL_set_attribute(attr,value)</a></li>
+<li><a href="#GL_swap_buffers">GL_swap_buffers</a></li>
+<li><a href="#GL_attr_to_be_coded">GL_attr *** to be coded</a></li>
+<li><a href="#lock_YUV_overlay_overlay">lock_YUV_overlay(overlay)</a></li>
+<li><a href="#unlock_YUV_overlay_overlay">unlock_YUV_overlay(overlay)</a></li>
+<li><a href="#display_YUV_overlay_overlay_dstrect">display_YUV_overlay(overlay,dstrect)</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+<ul><li><a href="#Category_Objects">Category Objects</a>
+</li>
+</ul>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::Video - Bindings to the video category in SDL API</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<p>To be done.</p>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+
+
+
+
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+</div>
+<h2 id="get_video_surface">get_video_surface</h2>
+<div id="get_video_surface_CONTENT">
+<p>It return the current SDL::Surface on succés or undef on error.
+get_video_surface doesn't take any parameters.</p>
+
+</div>
+<h2 id="get_video_info">get_video_info</h2>
+<div id="get_video_info_CONTENT">
+<p>Returns a SDL::VideoInfo about the video hardware. 
+It doesn't take any parameters.</p>
+
+</div>
+<h2 id="video_driver_name">video_driver_name</h2>
+<div id="video_driver_name_CONTENT">
+<p>Return the 1024 first char of name of the video driver. 
+It doesn't take any parameters.</p>
+
+</div>
+<h2 id="list_modes_formats_flags">list_modes(formats,flags)</h2>
+<div id="list_modes_formats_flags_CONTENT">
+<p>Returns a pointer to an array of available screen dimensions for the given format and video flags,
+or it return undef if no modes are avalaibles.</p>
+
+</div>
+<h2 id="video_mode_ok_width_height_bpp_flags">video_mode_ok(width,height,bpp,flags)</h2>
+<div id="video_mode_ok_width_height_bpp_flags-2">
+<p>Checks to see if a particular video mode of the given width,height,bpp and flags is supported. 
+It returns 0 if the mode is not supported at all, or the suggested bpp.</p>
+
+</div>
+<h2 id="set_video_mode_width_height_bpp_flag">set_video_mode(width,height,bpp,flags)</h2>
+<div id="set_video_mode_width_height_bpp_flag-2">
+<p>Sets up a video mode with the specified width, height,  bits-per-pixel and flags. 
+set_video_mode returns a SDL::Surface on succés or it returns undef on error, the error message is retrieved using <code>SDL::get_error</code>.</p>
+
+</div>
+<h4 id="List_of_avalaibles_flags">List of avalaibles flags</h4>
+<div id="List_of_avalaibles_flags_CONTENT">
+<pre>
+
+
+       SDL_SWSURFACE   Create the video surface in system memory
+       SDL_HWSURFACE   Create the video surface in video memory
+       SDL_ASYNCBLIT   Enables the use of asynchronous updates of the display surface. 
+                       This will usually slow down blitting on single CPU machines, but may provide a speed increase on SMP systems.
+       SDL_ANYFORMAT   Normally, if a video surface of the requested bits-per-pixel (bpp) is not available, SDL will emulate one with a shadow surface.
+                       Passing SDL_ANYFORMAT prevents this and causes SDL to use the video surface, regardless of its pixel depth.
+       SDL_HWPALETTE   Give SDL exclusive palette access. Without this flag you may not always get the colors you request with SDL::set_colors or SDL::set_palette.
+       SDL_DOUBLEBUF   Enable hardware double buffering; only valid with SDL_HWSURFACE. Calling SDL::flip will flip the buffers and update the screen. 
+                       All drawing will take place on the surface that is not displayed at the moment. 
+                       If double buffering could not be enabled then SDL_Flip will just perform a SDL::update_rect on the entire screen.
+       SDL_FULLSCREEN  SDL will attempt to use a fullscreen mode. If a hardware resolution change is not possible (for whatever reason), 
+                       the next higher resolution will be used and the display window centered on a black background.
+       SDL_OPENGL      Create an OpenGL rendering context. You should have previously set OpenGL video attributes with SDL::gl_setattribute.
+       SDL_OPENGLBLIT  Create an OpenGL rendering context, like above, but allow normal blitting operations. 
+                       The screen (2D) surface may have an alpha channel, and SDL::update_rects must be used for updating changes to the screen surface. 
+                       NOTE: This option is kept for compatibility only, and will be removed in next versions. Is not recommended for new code.
+       SDL_RESIZABLE   Create a resizable window. 
+                       When the window is resized by the user a SDL_VIDEORESIZE event is generated and SDL::set_video_mode  can be called again with the new size.
+       SDL_NOFRAME     If possible, SDL_NOFRAME causes SDL to create a window with no title bar or frame decoration. 
+                       Fullscreen modes automatically have this flag set.
+
+
+
+
+</pre>
+<p>Note 1: Use SDL_SWSURFACE if you plan on doing per-pixel manipulations, or blit surfaces with alpha channels, and require a high framerate. When you use hardware surfaces (by passing the flag SDL_HWSURFACE as parameter), SDL copies the surfaces from video memory to system memory when you lock them, and back when you unlock them. This can cause a major performance hit. Be aware that you may request a hardware surface, but receive a software surface because the video driver doesn't support hardware surface. Many platforms can only provide a hardware surface when using SDL_FULLSCREEN. The SDL_HWSURFACE flag is best used when the surfaces you'll be blitting can also be stored in video memory.</p>
+<p>Note 2: If you want to control the position on the screen when creating a windowed surface, you may do so by setting the environment variables SDL_VIDEO_CENTERED=center or SDL_VIDEO_WINDOW_POS=x,y. You can also set them via <code>SDL::putenv</code>.</p>
+<p>Note 3: This function should be called in the main thread of your application.</p>
+<p>User note 1: Some have found that enabling OpenGL attributes like SDL_GL_STENCIL_SIZE (the stencil buffer size) before the video mode has been set causes the application to simply ignore those attributes, while enabling attributes after the video mode has been set works fine.</p>
+<p>User note 2: Also note that, in Windows, setting the video mode resets the current OpenGL context. You must execute again the OpenGL initialization code (set the clear color or the shade model, or reload textures, for example) after calling SDL::set_video_mode. In Linux, however, it works fine, and the initialization code only needs to be executed after the first call to SDL::set_video_mode (although there is no harm in executing the initialization code after each call to SDL::set_video_mode, for example for a multiplatform application). </p>
+
+
+
+
+
+
+
+
+
+
+
+</div>
+<h2 id="update_rect_surface_x_y_width_height">update_rect(surface,x,y,width,height)</h2>
+<div id="update_rect_surface_x_y_width_height-2">
+<p>Makes sure the given area is updated on the given screen.  
+The rectangle must be confined within the screen boundaries because there's no clipping.
+update_rect doesn't returns any value.</p>
+<p>Note : This function should not be called while screen is locked by SDL::lock_surface
+Note2 : If x, y, width and height are all equal to 0, SDL_UpdateRect will update the entire screen. </p>
+
+</div>
+<h2 id="update_rects_surface_rects">update_rects(surface,rects) </h2>
+<div id="update_rects_surface_rects_CONTENT">
+<p>Makes sure the given list of rectangles is updated on the given screen. 
+The rectangle must be confined within the screen boundaries because there's no clipping.
+update_rects doesn't returns any value.</p>
+<p>Note : This function should not be called while screen is locked by SDL::lock_surface</p>
+
+</div>
+<h2 id="flip_surface">flip(surface)</h2>
+<div id="flip_surface_CONTENT">
+<p>On hardware that supports double-buffering, this function sets up a flip and returns. 
+The hardware will wait for vertical retrace, and then swap video buffers before the next video surface blit or lock will return. 
+On hardware that doesn't support double-buffering or if SDL_SWSURFACE was set, this is equivalent to calling SDL::update_rect(screen, 0, 0, 0, 0)</p>
+<p>A software screen surface is also updated automatically when parts of a SDL window are redrawn, caused by overlapping windows or by restoring from an iconified state. As a result there is no proper double buffer behavior in windowed mode for a software screen, in contrast to a full screen software mode.</p>
+<p>The SDL_DOUBLEBUF flag must have been passed to SDL::set_video_mode, when setting the video mode for this function to perform hardware flipping.
+flip returns 0 on succés or -1 on error.</p>
+<p>Note : If you want to swap the buffers of an initialized OpenGL context, use the function SDL::gl_swap_buffers instead. </p>
+
+</div>
+<h2 id="set_colors_surface_start_colors">set_colors(surface,start,colors)</h2>
+<div id="set_colors_surface_start_colors_CONT">
+<p>Sets a portion of the colormap for the given 8-bit surface. </p>
+<p>When surface is the surface associated with the current display, the display colormap will be updated with the requested colors. 
+If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_colors will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation.
+The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors.
+Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display). 
+SDL::SetColors modifies both palettes (if present), and is equivalent to calling SDL::SetPalette with the flags set to (SDL_LOGPAL | SDL_PHYSPAL). </p>
+<p>If surface is not a palettized surface, this function does nothing, returning 0. 
+If all of the colors were set as passed to SDL::set_colors, it will return 1.
+If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the actual color palette.</p>
+
+</div>
+<h2 id="set_palette_surface_flags_start_colo">set_palette(surface,flags,start,colors)</h2>
+<div id="set_palette_surface_flags_start_colo-2">
+<p>Sets a portion of the palette for the given 8-bit surface.</p>
+<p>Palettized (8-bit) screen surfaces with the SDL_HWPALETTE flag have two palettes, a logical palette that is used for mapping blits to/from the surface and a physical palette (that determines how the hardware will map the colors to the display). 
+Non screen surfaces have a logical palette only. SDL::blit_surface always uses the logical palette when blitting surfaces (if it has to convert between surface pixel formats). Because of this, it is often useful to modify only one or the other palette to achieve various special color effects (e.g., screen fading, color flashes, screen dimming).</p>
+<p>This function can modify either the logical or physical palette by specifying SDL_LOGPAL or SDL_PHYSPAL the in the flags parameter.</p>
+<p>When surface is the surface associated with the current display, the display colormap will be updated with the requested colors.
+If SDL_HWPALETTE was set in SDL::set_video_mode flags, SDL::set_palette will always return 1, and the palette is guaranteed to be set the way you desire, even if the window colormap has to be warped or run under emulation.
+The color components of a SDL::Color structure are 8-bits in size, giving you a total of 2563 = 16777216 colors. </p>
+<p>If surface is not a palettized surface, this function does nothing, returning 0. If all of the colors were set as passed to SDL_SetPalette, it will return 1. If not all the color entries were set exactly as given, it will return 0, and you should look at the surface palette to determine the actual color palette.</p>
+
+</div>
+<h2 id="set_gamma_r_g_b">set_gamma(r,g,b)</h2>
+<div id="set_gamma_r_g_b_CONTENT">
+<p>Sets the &quot;gamma function&quot; for the display of each color component. Gamma controls the brightness/contrast of colors displayed on the screen. 
+A gamma value of 1.0 is identity (i.e., no adjustment is made).</p>
+<p>This function adjusts the gamma based on the &quot;gamma function&quot; parameter, you can directly specify lookup tables for gamma adjustment with SDL::set_gamma_ramp.</p>
+<p>Not all display hardware is able to change gamma.
+SDL::set_gamma returns -1 on error.</p>
+<p>Warning: Under Linux (X.org Gnome and Xfce), gamma settings affects the entire display (including the desktop)! </p>
+
+</div>
+<h2 id="get_gamma_ramp_rt_gt_bt_to_be_coded">get_gamma_ramp(rt,gt,bt) * to be coded</h2>
+<div id="get_gamma_ramp_rt_gt_bt_to_be_coded_">
+<p>Gets the gamma translation lookup tables currently used by the display. Each table is an array of 256 Uint16 values.
+SDL::get_gamma_ramp returns -1 on error.</p>
+
+</div>
+<h2 id="set_gamma_ramp_rt_gt_bt">set_gamma_ramp(rt,gt,bt)</h2>
+<div id="set_gamma_ramp_rt_gt_bt_CONTENT">
+<p>Sets the gamma lookup tables for the display for each color component. Each table is an array of 256 Uint16 values, representing a mapping between the input and output for that channel.
+The input is the index into the array, and the output is the 16-bit gamma value at that index, scaled to the output color precision. 
+You may pass NULL to any of the channels to leave them unchanged.</p>
+<p>This function adjusts the gamma based on lookup tables, you can also have the gamma calculated based on a &quot;gamma function&quot; parameter with SDL::set_gamma.</p>
+<p>Not all display hardware is able to change gamma. 
+SDL::set_gamma_ramp returns -1 on error.</p>
+
+</div>
+<h2 id="map_RGB_pixel_format_r_g_b">map_RGB(pixel_format,r,g,b)</h2>
+<div id="map_RGB_pixel_format_r_g_b_CONTENT">
+<p>Maps the RGB color value to the specified SDL::pixel_format and returns the pixel value as a 32-bit int.
+If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
+If the specified pixel format has an alpha component it will be returned as all 1 bits (fully opaque). </p>
+<p>SDL::map_RGP returns a pixel value best approximating the given RGB color value for a given pixel format.
+If the SDL::pixel_format's  bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).</p>
+
+</div>
+<h2 id="map_RGBA_pixel_format_r_g_b_a">map_RGBA(pixel_format,r,g,b,a)</h2>
+<div id="map_RGBA_pixel_format_r_g_b_a_CONTEN">
+<p>Maps the RGBA color value to the specified SDL::pixel_format and returns the pixel value as a 32-bit int.
+If the format has a palette (8-bit) the index of the closest matching color in the palette will be returned.
+If the specified pixel format has no alpha component the alpha value will be ignored (as it will be in formats with a palette). </p>
+<p>A pixel value best approximating the given RGBA color value for a given pixel format.
+If the pixel format bpp (color depth) is less than 32-bpp then the unused upper bits of the return value can safely be ignored (e.g., with a 16-bpp format the return value can be assigned to a Uint16, and similarly a Uint8 for an 8-bpp format).</p>
+
+</div>
+<h2 id="get_RGB_pixel_format_pixel">get_RGB(pixel_format,pixel)</h2>
+<div id="get_RGB_pixel_format_pixel_CONTENT">
+<p>Returns RGB values from a pixel in the specified pixel format. 
+This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).</p>
+
+</div>
+<h2 id="get_RGBA_pixel_format_pixel">get_RGBA(pixel_format,pixel)</h2>
+<div id="get_RGBA_pixel_format_pixel_CONTENT">
+<p>Gets RGBA values from a pixel in the specified pixel format. 
+This function uses the entire 8-bit [0..255] range when converting color components from pixel formats with less than 8-bits per RGB component (e.g., a completely white pixel in 16-bit RGB565 format would return [0xff, 0xff, 0xff] not [0xf8, 0xfc, 0xf8]).</p>
+<p>If the surface has no alpha component, the alpha will be returned as 0xff (100% opaque). </p>
+
+</div>
+<h2 id="create_RGB_surface_from">create_RGB_surface_from ***</h2>
+<div id="create_RGB_surface_from_CONTENT">
+<p>Creates an empty SDL::Surface from pixel data
+Allocate an empty surface (must be called after SDL::set_video_mode)
+If bitsPerPixel is 8 an empty palette is allocated for the surface, otherwise a 'packed-pixel' SDL::pixel_format is created using the [RGBA]mask's provided (see SDL::pixel_format). The flags specifies the type of surface that should be created, it is an OR'd combination of the following possible values. </p>
+<pre>  SDL_SWSURFACE   SDL will create the surface in system memory. 
+                       This improves the performance of pixel level access, however you may not be able to take advantage of some types of hardware blitting.
+
+       SDL_HWSURFACE   SDL will attempt to create the surface in video memory. 
+                       This will allow SDL to take advantage of Video-&gt;Video blits (which are often accelerated).
+
+       SDL_SRCCOLORKEY This flag turns on color keying for blits from this surface. 
+                       If SDL_HWSURFACE is also specified and color keyed blits are hardware-accelerated, then SDL will attempt to place the surface in video memory.
+                       If the screen is a hardware surface and color keyed blits are hardware-accelerated then the SDL_HWSURFACE flag will be set. 
+                       Use SDL_SetColorKey to set or clear this flag after surface creation.
+
+       SDL_SRCALPHA    This flag turns on alpha-blending for blits from this surface. 
+                       If SDL_HWSURFACE is also specified and alpha-blending blits are hardware-accelerated, 
+                       then the surface will be placed in video memory if possible. 
+                       If the screen is a hardware surface and alpha-blending blits are hardware-accelerated then the SDL_HWSURFACE flag will be set. 
+                       Use SDL_SetAlpha to set or clear this flag after surface creation.
+
+
+
+
+</pre>
+<p>[RGBA]mask are the bitmasks used to extract that colour from a pixel.
+For instance, Rmask being FF000000 means the red data is stored in the most significant byte. 
+Using zeros for the RGB masks sets a default value, based on the depth. (e.g. SDL::create_RGB_surface(flags,w,h,32,0,0,0,0);).
+However, using zero for the Amask results in an Amask of 0.
+It returns a SDL::Surface on success or undef on error.
+Notes: If an alpha-channel is specified (that is, if Amask is nonzero), then the SDL_SRCALPHA flag is automatically set. 
+You may remove this flag by calling SDL::set_alpha after surface creation.
+Also, if the SDL_HWSURFACE flag is set on the returned surface, its format might not match the requested format. </p>
+<p>Notes: Sometimes specifying an Alpha mask value could cause strange results. 
+This can be worked around by setting the Amask parameter to 0, but still including the SDL_SRCALPHA flag, and then using SDL::set_alpha, also with the SDL_SRCALPHA flag. </p>
+
+</div>
+<h2 id="lock_surface_surface">lock_surface(surface)</h2>
+<div id="lock_surface_surface_CONTENT">
+<p>SDL::lock_surface sets up the given SDL::surface for directly accessing the pixels.
+Between calls to SDL::lock_surface and SDL::unlock_surface, you can write to and read from surface-&gt;pixels, using the pixel format stored in surface-&gt;format. 
+Once you are done accessing the surface, you should use SDL::unlock_surface to release the lock.</p>
+<p>Not all surfaces require locking. If SDL::MUSTLOCK(surface) evaluates to 0, then reading and writing pixels to the surface can be performed at any time, and the pixel format of the surface will not change.
+No operating system or library calls should be made between the lock/unlock pairs, as critical system locks may be held during this time.
+SDL::lock_surface returns 0 on succés or -1 on error.</p>
+<p>Note : Since SDL 1.1.8, the surface locks are recursive. This means that you can lock a surface multiple times, but each lock must have a matching unlock.</p>
+
+</div>
+<h2 id="unlock_surface_surface">unlock_surface(surface)</h2>
+<div id="unlock_surface_surface_CONTENT">
+<p>Surfaces that were previously locked using SDL::lock_surface must be unlocked with SDL::unlock_surface. Surfaces should be unlocked as soon as possible.
+SDL::unlock_surface doesn't return anything.</p>
+<p>Note : Since 1.1.8, the surface locks are recursive. See <code>SDL::lock_surface</code> for more information. </p>
+
+</div>
+<h2 id="convert_surface_surface_format_flags">convert_surface(surface,format,flags)</h2>
+<div id="convert_surface_surface_format_flags-2">
+<p>Creates a new SDL::surface of the specified SDL::pixel_format, and then copies and maps the given surface to it. 
+It is also useful for making a copy of a surface.</p>
+<p>The flags parameter is passed to SDL::create_RGB_surface and has those semantics.
+This function is used internally by SDL::display_format.
+This function can only be called after SDL::init. </p>
+<p>it returns a SDL::surface on succés or undef on error.</p>
+
+</div>
+<h2 id="display_format">display_format</h2>
+<div id="display_format_CONTENT">
+<p>Converts a surface to the display format </p>
+
+</div>
+<h2 id="display_format_alpha">display_format_alpha</h2>
+<div id="display_format_alpha_CONTENT">
+<p>Converts a surface to the display format </p>
+
+</div>
+<h2 id="load_BMP_filename">load_BMP(filename)</h2>
+<div id="load_BMP_filename_CONTENT">
+<p>Loads a SDL::surface from a named Windows BMP file.
+SDL::load_BMP returns a SDL::surface on succés or undef on error.</p>
+<p>Note: When loading a 24-bit Windows BMP file, pixel data points are loaded as blue, green, red, and NOT red, green, blue (as one might expect). </p>
+
+
+
+
+
+
+
+
+</div>
+<h2 id="save_BMP_surface_filename">save_BMP(surface,filename)</h2>
+<div id="save_BMP_surface_filename_CONTENT">
+<p>Saves the given SDL::Surface surface as a Windows BMP file named filename. 
+it returns 0 on succés or -1 on error.</p>
+
+</div>
+<h2 id="set_color_key_surface_flag_key">set_color_key(surface,flag,key)</h2>
+<div id="set_color_key_surface_flag_key_CONTE">
+<p>Sets the color key (transparent pixel) in a blittable surface and enables or disables RLE blit acceleration.</p>
+<p>RLE acceleration can substantially speed up blitting of images with large horizontal runs of transparent pixels (i.e., pixels that match the key value).
+The key must be of the same pixel format as the surface, SDL::map_RGB is often useful for obtaining an acceptable value.
+If flag is SDL_SRCCOLORKEY then key is the transparent pixel value in the source image of a blit.</p>
+<p>If flag is OR'd with SDL_RLEACCEL then the surface will be drawn using RLE acceleration when drawn with SDL::Blit_surface.
+The surface will actually be encoded for RLE acceleration the first time SDL::blit_surface or SDL::display_format is called on the surface.
+If flag is 0, this function clears any current color key. </p>
+<p>SDL::set_color_key returns 0 on succés or -1 on error.</p>
+
+
+
+
+
+</div>
+<h2 id="set_alpha_surface_flag_key">set_alpha(surface,flag,key)</h2>
+<div id="set_alpha_surface_flag_key_CONTENT">
+<p>SDL::set_alpha is used for setting the per-surface alpha value and/or enabling and disabling alpha blending.</p>
+<p>The surface parameter specifies which SDL::surface whose alpha attributes you wish to adjust. 
+flags is used to specify whether alpha blending should be used (SDL_SRCALPHA) and whether the surface should use RLE acceleration for blitting (SDL_RLEACCEL). 
+flags can be an OR'd combination of these two options, one of these options or 0. 
+If SDL_SRCALPHA is not passed as a flag then all alpha information is ignored when blitting the surface. 
+The alpha parameter is the per-surface alpha value; a surface need not have an alpha channel to use per-surface alpha and blitting can still be accelerated with SDL_RLEACCEL.</p>
+<p>Note: The per-surface alpha value of 128 is considered a special case and is optimised, so it's much faster than other per-surface values.</p>
+<p>Alpha affects surface blitting in the following ways: </p>
+<pre>  RGBA-&gt;RGB with SDL_SRCALPHA  The source is alpha-blended with the destination, using the alpha channel. 
+                                       SDL_SRCCOLORKEY and the per-surface alpha are ignored.
+
+       RGBA-&gt;RGB without SDL_SRCALPHA       The RGB data is copied from the source. The source alpha channel and the per-surface alpha value are ignored. 
+                                       If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+       RGB-&gt;RGBA with SDL_SRCALPHA  The source is alpha-blended with the destination using the per-surface alpha value. 
+                                       If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied. 
+                                       The alpha channel of the copied pixels is set to opaque.
+
+       RGB-&gt;RGBA without SDL_SRCALPHA       The RGB data is copied from the source and the alpha value of the copied pixels is set to opaque. 
+                                       If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+       RGBA-&gt;RGBA with SDL_SRCALPHA The source is alpha-blended with the destination using the source alpha channel. 
+                                       The alpha channel in the destination surface is left untouched. SDL_SRCCOLORKEY is ignored.
+
+       RGBA-&gt;RGBA without SDL_SRCALPHA      The RGBA data is copied to the destination surface.
+                                        If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+       RGB-&gt;RGB with SDL_SRCALPHA   The source is alpha-blended with the destination using the per-surface alpha value. 
+                                       If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+       RGB-&gt;RGB without SDL_SRCALPHA        The RGB data is copied from the source. 
+                                       If SDL_SRCCOLORKEY is set, only the pixels not matching the colorkey value are copied.
+
+
+
+
+</pre>
+<p>Note: When blitting, the presence or absence of SDL_SRCALPHA is relevant only on the source surface, not the destination.
+Note: Note that RGBA-&gt;RGBA blits (with SDL_SRCALPHA set) keep the alpha of the destination surface. This means that you cannot compose two arbitrary RGBA surfaces this way and get the result you would expect from &quot;overlaying&quot; them; the destination alpha will work as a mask.</p>
+<p>Note: Also note that per-pixel and per-surface alpha cannot be combined; the per-pixel alpha is always used if available. </p>
+<p>SDL::set_alpha returns 0 on succés or -1 on error.</p>
+
+</div>
+<h2 id="set_clip_rect_surface_rect">set_clip_rect(surface,rect)</h2>
+<div id="set_clip_rect_surface_rect_CONTENT">
+<p>Sets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip rectangle will be drawn into.
+The rectangle pointed to by rect will be clipped to the edges of the surface so that the clip rectangle for a surface can never fall outside the edges of the surface.
+If rect is NULL the clipping rectangle will be set to the full size of the surface. 
+SDL::set_clip_rect doesn't returns anything.</p>
+
+</div>
+<h2 id="get_clip_rect_surface_rect">get_clip_rect(surface,rect)</h2>
+<div id="get_clip_rect_surface_rect_CONTENT">
+<p>Gets the clipping rectangle for the given SDL::surface. When this surface is the destination of a blit, only the area within the clip rectangle is drawn into.
+The rectangle pointed to by rect will be filled with the clipping rectangle of the surface. 
+SDL::get_clip_rect doesn't returns anything;</p>
+
+
+
+
+
+</div>
+<h2 id="blit_surface_src_src_rect_dest_dest_">blit_surface(src,src_rect,dest,dest_rect)</h2>
+<div id="blit_surface_src_src_rect_dest_dest_-2">
+<p>This performs a fast blit from the given source SDL::surface to the given destination SDL::surface.
+The width and height in srcrect determine the size of the copied rectangle. Only the position is used in the dstrect (the width and height are ignored). Blits with negative dstrect coordinates will be clipped properly.
+If srcrect is NULL, the entire surface is copied. If dstrect is NULL, then the destination position (upper left corner) is (0, 0).
+The final blit rectangle is saved in dstrect after all clipping is performed (srcrect is not modified).
+The blit function should not be called on a locked surface. I.e. when you use your own drawing functions you may need to lock a surface, but this is not the case with SDL::blit_surface. Like most surface manipulation functions in SDL, it should not be used together with OpenGL.</p>
+<p>The results of blitting operations vary greatly depending on whether SDL_SRCALPHA is set or not. See SDL::set_alpha for an explanation of how this affects your results. Colorkeying and alpha attributes also interact with surface blitting.
+SDL::blit_surface doesn't returns anything.</p>
+
+</div>
+<h2 id="fill_rect_dest_dest_rect_pixel">fill_rect(dest,dest_rect,pixel)</h2>
+<div id="fill_rect_dest_dest_rect_pixel_CONTE">
+<p>This function performs a fast fill of the given SDL::rectangle with the given SDL::pixel_format. If dstrect is NULL, the whole surface will be filled with color.</p>
+<p>The color should be a pixel of the format used by the surface, and can be generated by the SDL::MapRGB or SDL::map_RGBA functions.
+If the color value contains an alpha value then the destination is simply &quot;filled&quot; with that alpha information, no blending takes place.</p>
+<p>If there is a clip rectangle set on the destination (set via SDL::set_clip_rect), then this function will clip based on the intersection of the clip rectangle and the dstrect rectangle, and the dstrect rectangle will be modified to represent the area actually filled.</p>
+<p>If you call this on the video surface (ie: the value of SDL::get_video_surface()) you may have to update the video surface to see the result. This can happen if you are using a shadowed surface that is not double buffered in Windows XP using build 1.2.9. </p>
+<p>SDL::fill_rect returns 0 on succés or -1 on error.</p>
+
+</div>
+<h2 id="GL_load_library_path">GL_load_library(path)</h2>
+<div id="GL_load_library_path_CONTENT">
+<p>If you wish, you may load the OpenGL library from the given path at runtime, this must be done before SDL::set_video_mode is called.
+The path of the GL library is passed to SDL::GL_load_library and it returns 0 on success, or -1 on an error. You must then use SDL::GL_get_proc_address to retrieve function pointers to GL functions. </p>
+<p>SDL::GL_load_library returns 0 on succés or -1 or error.</p>
+
+</div>
+<h2 id="GL_get_proc_address_proc">GL_get_proc_address(proc)</h2>
+<div id="GL_get_proc_address_proc_CONTENT">
+<p>Returns the address of the GL function proc, or NULL if the function is not found. If the GL library is loaded at runtime, with SDL::GL_load_library, then all GL functions must be retrieved this way. Usually this is used to retrieve function pointers to OpenGL extensions. Note that this function needs an OpenGL context to function properly, so it should be called after SDL::set_video_mode has been called (with the SDL_OPENGL flag).</p>
+<p>OpenGL function pointers must be declared APIENTRY . This will ensure the proper calling convention is followed on platforms where this matters (Win32) thereby avoiding stack corruption. In a Win32 build environment, APIENTRY should be defined as __stdcall. </p>
+<p>it returns undef if the function is not found.</p>
+
+</div>
+<h2 id="GL_get_attribute_attr">GL_get_attribute(attr)</h2>
+<div id="GL_get_attribute_attr_CONTENT">
+<p>It returns  SDL/OpenGL attribute attr . This is useful after a call to SDL::set_video_mode to check whether your attributes have been set as you expected. 
+SDL::GL_get_attribute returns undef if the attribute is not found.</p>
+
+</div>
+<h2 id="GL_set_attribute_attr_value">GL_set_attribute(attr,value)</h2>
+<div id="GL_set_attribute_attr_value_CONTENT">
+<p>This function sets the given OpenGL attribute attr to value. The requested attributes will take effect after a call to SDL::set_video_mode.
+You should use SDL::GL_get_attribute to check the values after a SDL::set_video_mode call, since the values obtained can differ from the requested ones.
+See SDL_GLattr for the full list of available attributes. 
+SDL::GL_set_attribute returns 0 on succés or -1 on error.</p>
+<p>Note : The SDL_DOUBLEBUF flag is not required to enable double buffering when setting an OpenGL video mode. Double buffering is enabled or disabled using the SDL_GL_DOUBLEBUFFER attribute. </p>
+
+</div>
+<h2 id="GL_swap_buffers">GL_swap_buffers</h2>
+<div id="GL_swap_buffers_CONTENT">
+<p>Swap the OpenGL buffers, if double-buffering is supported.
+SDL::GL_swap_buffers doesn't returns any value.</p>
+
+</div>
+<h2 id="GL_attr_to_be_coded">GL_attr *** to be coded</h2>
+<div id="GL_attr_to_be_coded_CONTENT">
+
+
+
+
+
+</div>
+<h2 id="lock_YUV_overlay_overlay">lock_YUV_overlay(overlay)</h2>
+<div id="lock_YUV_overlay_overlay_CONTENT">
+<p>Much the same as <code>SDL::lock_surface</code>, SDL::lock_YUV_overlay locks the overlay for direct access to pixel data.
+It returns 0 on succés or -1 on error.</p>
+
+</div>
+<h2 id="unlock_YUV_overlay_overlay">unlock_YUV_overlay(overlay)</h2>
+<div id="unlock_YUV_overlay_overlay_CONTENT">
+<p>The opposite to <code>SDL::lock_YUV_overlay. Unlocks a previously locked overlay. An overlay must be unlocked before it can be displayed. 
+It returns 0 on succés or -1 on error.
+
+</code></p>
+
+</div>
+<h2 id="display_YUV_overlay_overlay_dstrect">display_YUV_overlay(overlay,dstrect)</h2>
+<div id="display_YUV_overlay_overlay_dstrect_">
+<p>Blit the overlay to the display surface specified when the overlay was created. The SDL::rect structure, dstrect, specifies a rectangle on the display where the overlay is drawn. The .x and .y fields of dstrect specify the upper left location in display coordinates. The overlay is scaled (independently in x and y dimensions) to the size specified by dstrect, and is optimized for 2x scaling</p>
+<p>It returns 0 on succés or -1 on error.</p>
+
+
+
+
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+
+</div>
+<h2 id="Category_Objects">Category Objects</h2>
+<div id="Category_Objects_CONTENT">
+<p><cite>SDL::Surface</cite>, <cite>SDL::Overlay</cite>, <cite>SDL::Color</cite>,
+<cite>SDL::Rect</cite>, <cite>SDL::Palette</cite>, <cite>SDL::PixelFormat</cite>, 
+<cite>SDL::VideoInfo</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL-VideoInfo.html-inc b/pages/SDL-VideoInfo.html-inc
new file mode 100644 (file)
index 0000000..cd88679
--- /dev/null
@@ -0,0 +1,166 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#METHODS">METHODS</a>
+<ul><li><a href="#hw_available">hw_available</a></li>
+<li><a href="#wm_available">wm_available</a></li>
+<li><a href="#blit_hw">blit_hw</a></li>
+<li><a href="#blit_hw_CC">blit_hw_CC</a></li>
+<li><a href="#blit_hw_A">blit_hw_A</a></li>
+<li><a href="#blit_sw">blit_sw</a></li>
+<li><a href="#blit_sw_CC">blit_sw_CC</a></li>
+<li><a href="#blit_sw_A">blit_sw_A     </a></li>
+<li><a href="#blit_fill">blit_fill</a></li>
+<li><a href="#video_mem">video_mem</a></li>
+<li><a href="#vfmt">vfmt</a></li>
+<li><a href="#current_w_current_h">current_w, current_h</a></li>
+</ul>
+</li>
+<li><a href="#SEE_ALSO">SEE ALSO</a>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL::VideoInfo - Video Target Information </p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  my $video_info = SDL::Video::get_video_info();
+
+</pre>
+<p>VideoInfo is only accessible <code>SDL::Video::get_video_info</code>. This module only provides getters to the struct <code>SDL_VideoInfo</code>.</p>
+
+
+
+
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>This object is a read-only structure and is returned by <code>SDL::Video::get_video_info</code>. It contains information on either the best available mode if called before <code>SDL::Video::set_video_mode</code> or the current video mode if called after <code>SDL::Video::set_video_mode</code>. </p>
+
+</div>
+<h1 id="METHODS">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT">
+
+
+
+
+
+</div>
+<h2 id="hw_available">hw_available</h2>
+<div id="hw_available_CONTENT">
+<pre>  $video_info-&gt;hw_available() # 1 if Hardware Accelerated Surfaces available   
+
+</pre>
+<p>Is it possible to create hardware surfaces ?</p>
+
+</div>
+<h2 id="wm_available">wm_available</h2>
+<div id="wm_available_CONTENT">
+<pre>  $video_info-&gt;wm_available() # 1 if Window Manager available  
+
+</pre>
+<p>Is there a window manager available ?</p>
+
+</div>
+<h2 id="blit_hw">blit_hw</h2>
+<div id="blit_hw_CONTENT">
+<pre>  $video_info-&gt;blit_hw() 
+
+</pre>
+<p>Are hardware to hardware blits accelerated ?</p>
+
+</div>
+<h2 id="blit_hw_CC">blit_hw_CC</h2>
+<div id="blit_hw_CC_CONTENT">
+<pre>  $video_info-&gt;blit_hw_CC()    
+
+</pre>
+<p>Are hardware to hardware colorkey blits accelerated ?</p>
+
+</div>
+<h2 id="blit_hw_A">blit_hw_A</h2>
+<div id="blit_hw_A_CONTENT">
+<pre>  $video_info-&gt;blit_hw_A()     
+
+</pre>
+<p>Are hardware to hardware alpha blits accelerated ?</p>
+
+</div>
+<h2 id="blit_sw">blit_sw</h2>
+<div id="blit_sw_CONTENT">
+<pre>  $video_info-&gt;blit_sw()
+
+</pre>
+<p>Are software to hardware blits accelerated ?</p>
+
+</div>
+<h2 id="blit_sw_CC">blit_sw_CC</h2>
+<div id="blit_sw_CC_CONTENT">
+<pre>  $video_info-&gt;blit_sw_CC()
+
+
+
+
+</pre>
+<p>Are software to hardware colorkey blits accelerated ?</p>
+
+</div>
+<h2 id="blit_sw_A">blit_sw_A   </h2>
+<div id="blit_sw_A_CONTENT">
+<pre>  $video_info-&gt;blit_sw_A()
+
+</pre>
+<p>Are software to hardware alpha blits accelerated ?</p>
+
+</div>
+<h2 id="blit_fill">blit_fill</h2>
+<div id="blit_fill_CONTENT">
+<pre>  $video_info-&gt;blit_fill()     
+
+</pre>
+<p>Are color fills accelerated ?</p>
+
+</div>
+<h2 id="video_mem">video_mem</h2>
+<div id="video_mem_CONTENT">
+<pre>  my $video_mem = $video_info-&gt;video_mem();
+
+</pre>
+<p>Total amount of video memory in Kilobytes, should be accessed only if hw_available == 1, otherwise it is equal to 0</p>
+
+</div>
+<h2 id="vfmt">vfmt</h2>
+<div id="vfmt_CONTENT">
+<pre>  my $vd_pixel_format = $video_info-&gt;vfmt();
+
+
+
+
+</pre>
+<p><code>SDL::PixelFormat</code> of the video device</p>
+
+</div>
+<h2 id="current_w_current_h">current_w, current_h</h2>
+<div id="current_w_current_h_CONTENT">
+<pre>  $video_info-&gt;current_w();
+       $video_info-&gt;current_h();    
+
+</pre>
+<p>Width and height of the current video mode, or of the desktop mode if <code>SDL_GetVideoInfo</code> was called before <code>SDL::Video::set_video_mode</code> (available since SDL 1.2.10)</p>
+
+</div>
+<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SEE_ALSO_CONTENT">
+<p><cite>SDL::Video</cite>, <cite>SDL::PixelFormat</cite></p>
+
+</div>
+</div>
\ No newline at end of file
diff --git a/pages/SDL.html-inc b/pages/SDL.html-inc
new file mode 100644 (file)
index 0000000..34e5c9f
--- /dev/null
@@ -0,0 +1,282 @@
+<div class="pod">
+<!-- INDEX START -->
+<h3 id="TOP">Index</h3>
+
+<ul><li><a href="#NAME">NAME</a></li>
+<li><a href="#SYNOPSIS">SYNOPSIS</a></li>
+<li><a href="#DESCRIPTION">DESCRIPTION</a></li>
+<li><a href="#The_SDL_Perl_2009_Development_Team">The SDL Perl 2009 Development Team</a>
+<ul><li><a href="#Documentation">Documentation</a></li>
+<li><a href="#Perl_Development">Perl Development</a></li>
+<li><a href="#Maintainance">Maintainance </a></li>
+</ul>
+</li>
+<li><a href="#MacOSX_Experimental_Usage">MacOSX Experimental Usage</a>
+<ul><li><a href="#Running_SDL_Perl_Scripts_in_MacOSX">Running SDL Perl Scripts in MacOSX</a></li>
+</ul>
+</li>
+<li><a href="#Functions_exported_by_SDL_pm">Functions exported by SDL.pm</a>
+<ul><li><a href="#init_flags">init(flags) </a></li>
+<li><a href="#init_subsystem_flags">init_subsystem(flags)</a></li>
+<li><a href="#quit_subsystem_flags">quit_subsystem(flags)</a></li>
+<li><a href="#quit">quit</a></li>
+<li><a href="#was_init_flags">was_init(flags)</a></li>
+<li><a href="#get_error">get_error()</a></li>
+<li><a href="#set_error_error_need_to_be_coded">set_error(error)  *need to be coded</a></li>
+<li><a href="#error_code_need_to_be_coded">error(code) * need to be coded</a></li>
+<li><a href="#clear_error_need_to_be_coded">clear_error() * need to be coded</a></li>
+<li><a href="#load_object">load_object()</a></li>
+<li><a href="#load_function">load_function()</a></li>
+<li><a href="#unload_object">unload_object()</a></li>
+<li><a href="#VERSION">VERSION()</a></li>
+<li><a href="#version">version()</a></li>
+<li><a href="#linked_version">linked_version</a></li>
+<li><a href="#get_error-2">get_error()</a></li>
+<li><a href="#delay_ms">delay(ms)</a>
+</li>
+</ul>
+</li>
+</ul><hr />
+<!-- INDEX END -->
+
+<h1 id="NAME">NAME</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="NAME_CONTENT">
+<p>SDL_perl - Simple DirectMedia Layer for Perl</p>
+
+</div>
+<h1 id="SYNOPSIS">SYNOPSIS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="SYNOPSIS_CONTENT">
+<pre>  use SDL;
+
+</pre>
+
+</div>
+<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="DESCRIPTION_CONTENT">
+<p>SDL_perl is a package of perl modules that provides both functional and object orient
+interfaces to the Simple DirectMedia Layer for Perl 5.  This package does take some
+liberties with the SDL API, and attempts to adhere to the spirit of both the SDL
+and Perl.  This document describes the low-level functional SDL_perl API.  For the
+object oriented programming interface please see the documentation provided on a
+per class basis.</p>
+
+</div>
+<h1 id="The_SDL_Perl_2009_Development_Team">The SDL Perl 2009 Development Team</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="The_SDL_Perl_2009_Development_Team_C">
+
+</div>
+<h2 id="Documentation">Documentation</h2>
+<div id="Documentation_CONTENT">
+<pre>  Nick: magnet
+
+</pre>
+
+</div>
+<h2 id="Perl_Development">Perl Development</h2>
+<div id="Perl_Development_CONTENT">
+<pre>  Nick: Garu
+       Name: Breno G. de Oliveira
+
+       Nick: Dngor
+       Name: Rocco Caputo
+
+       Nick: nferraz
+       Name: Nelson Ferraz
+
+       Nick: acme
+       Name: Leon Brocard
+
+       Nick: FROGGS
+       Name: Tobias Leich
+
+</pre>
+
+</div>
+<h2 id="Maintainance">Maintainance </h2>
+<div id="Maintainance_CONTENT">
+<pre>  Nick: kthakore
+       Name: Kartik Thakore
+
+</pre>
+
+</div>
+<h1 id="MacOSX_Experimental_Usage">MacOSX Experimental Usage</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="MacOSX_Experimental_Usage_CONTENT">
+<p>Please get libsdl packages from Fink</p>
+<pre>  perl Build.PL
+       perl Build test
+       perl Build bundle
+       perl Build install
+
+</pre>
+
+</div>
+<h2 id="Running_SDL_Perl_Scripts_in_MacOSX">Running SDL Perl Scripts in MacOSX</h2>
+<div id="Running_SDL_Perl_Scripts_in_MacOSX_C">
+<p>First set the PERL5LIB environment variable to the dependencies of your script</p>
+<pre>  %export PERL5LIB=$PERL5LIB:./lib
+
+</pre>
+<p>Use the SDLPerl executable made in the bundle and call your scripts</p>
+<pre>  %SDLPerl.app/Contents/MacOS/SDLPerl yourScript.pl
+
+</pre>
+
+</div>
+<h1 id="Functions_exported_by_SDL_pm">Functions exported by SDL.pm</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="Functions_exported_by_SDL_pm_CONTENT">
+
+</div>
+<h2 id="init_flags">init(flags) </h2>
+<div id="init_flags_CONTENT">
+<p>As with the C language API, SDL_perl initializes the SDL environment through
+the <code>SDL::init</code> subroutine.  This routine takes a mode flag constructed through
+the bitwise OR product of the following constants:</p>
+<dl>
+       <dt>*
+INIT_AUDIO</dt>
+       <dt>*
+INIT_VIDEO</dt>
+       <dt>*
+INIT_CDROM</dt>
+       <dt>*
+INIT_EVERYTHING</dt>
+       <dt>*
+INIT_NOPARACHUTE</dt>
+       <dt>*
+INIT_JOYSTICK</dt>
+       <dt>*
+INIT_TIMER</dt>
+</dl>
+<p><code>SDL::Init</code> returns 0 on success, or -1 on error.</p>
+
+</div>
+<h2 id="init_subsystem_flags">init_subsystem(flags)</h2>
+<div id="init_subsystem_flags_CONTENT">
+<p>After SDL has been initialized with SDL::init you may initialize uninitialized subsystems with SDL::init_subsystem.
+The flags parameter is the same as that used in SDL::init. </p>
+<p>SDL::init_subsystem returns 0 on success, or -1 on error.</p>
+
+</div>
+<h2 id="quit_subsystem_flags">quit_subsystem(flags)</h2>
+<div id="quit_subsystem_flags_CONTENT">
+<p>SDL::quit_subsystem allows you to shut down a subsystem that has been previously initialized by SDL::init or SDL::init_subsystem.
+The flags tells SDL::quit_subSystem which subsystems to shut down, it uses the same values that are passed to SDL::init. </p>
+<p>SDL::quit_subsystem doesn't returns any value.</p>
+
+</div>
+<h2 id="quit">quit</h2>
+<div id="quit_CONTENT">
+<p>Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources. This should always be called before you exit.</p>
+<p>SDL::quit doesn't returns any value.</p>
+
+</div>
+<h2 id="was_init_flags">was_init(flags)</h2>
+<div id="was_init_flags_CONTENT">
+<p>SDL::was_init allows you to see which SDL subsytems have been initialized.
+flags is a bitwise OR'd combination of the subsystems you wish to check (see SDL::init for a list of subsystem flags). 
+If 'flags' is 0 or SDL_INIT_EVERYTHING, it returns a mask of all initialized subsystems (this does not include SDL_INIT_EVENTTHREAD or SDL_INIT_NOPARACHUTE).</p>
+
+
+
+
+
+</div>
+<h2 id="get_error">get_error()</h2>
+<div id="get_error_CONTENT">
+<p>The last error message set by the SDL library can be retrieved using the subroutine
+<code>SDL::get_error</code>, which returns a scalar containing the text of the message if any.</p>
+
+</div>
+<h2 id="set_error_error_need_to_be_coded">set_error(error)  *need to be coded</h2>
+<div id="set_error_error_need_to_be_coded_CON">
+<p>SDL::get_error sets the SDL error to a printf style formatted string. 
+it doesn't returns any values.</p>
+
+</div>
+<h2 id="error_code_need_to_be_coded">error(code) * need to be coded</h2>
+<div id="error_code_need_to_be_coded_CONTENT">
+<p>Sets the SDL error message to one of several predefined strings specified by code. </p>
+<p>code can be :</p>
+<pre>          SDL_errorcode   The corresponding error string
+
+               SDL_ENOMEM      Out of memory
+               SDL_EFREAD      Error reading from datastream
+               SDL_EFWRITE     Error writing to datastream
+               SDL_EFSEEK      Error seeking in datastream
+               SDL_UNSUPPORTED Unknown SDL error
+               SDL_LASTERROR   Unknown SDL error
+               any other value Unknown SDL error
+
+
+
+
+               Note 1: SDL_LASTERROR marks the highest numbered predefined error.
+               Note 2: SDL also defines SDL_OutOfMemory() and SDL_Unsupported() for internal use
+               which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) respectively. 
+
+</pre>
+<p>SDL::Error doesn't returns any value.</p>
+
+
+
+
+
+</div>
+<h2 id="clear_error_need_to_be_coded">clear_error() * need to be coded</h2>
+<div id="clear_error_need_to_be_coded_CONTENT">
+<p>SDL::clear_error deletes all information about the last internal SDL error. Useful if the error has been handled by the program.
+it doesn't returns any value.</p>
+
+</div>
+<h2 id="load_object">load_object()</h2>
+<div id="load_object_CONTENT">
+<p>Need to be coded.</p>
+
+</div>
+<h2 id="load_function">load_function()</h2>
+<div id="load_function_CONTENT">
+<p>Need to be coded.</p>
+
+</div>
+<h2 id="unload_object">unload_object()</h2>
+<div id="unload_object_CONTENT">
+<p>Need to be coded.</p>
+
+</div>
+<h2 id="VERSION">VERSION()</h2>
+<div id="VERSION_CONTENT">
+<p>Need to be coded. </p>
+
+</div>
+<h2 id="version">version()</h2>
+<div id="version_CONTENT">
+<p>Need to be coded.</p>
+
+</div>
+<h2 id="linked_version">linked_version</h2>
+<div id="linked_version_CONTENT">
+<p>Need to be coded.</p>
+
+</div>
+<h2 id="get_error-2">get_error()</h2>
+<div id="get_error_CONTENT-2">
+<p>The last error message set by the SDL library can be retrieved using the subroutine
+<code>SDL::get_error</code>, which returns a scalar containing the text of the message if any.</p>
+
+</div>
+<h2 id="delay_ms">delay(ms)</h2>
+<div id="delay_ms_CONTENT">
+<p>This subroutine allows an application to delay further operations for atleast a
+number of milliseconds provided as the argument.  The actual delay may be longer
+than the specified depending on the underlying OS.</p>
+
+
+
+
+
+
+
+
+</div>
+</div>
\ No newline at end of file