Updated docs
[sdlgit/SDL-Site.git] / pages / SDL.html-inc
index 73216f2..ee6419f 100644 (file)
@@ -8,21 +8,21 @@
 <li><a href="#DESCRIPTION">DESCRIPTION</a></li>
 <li><a href="#CONSTANTS">CONSTANTS</a></li>
 <li><a href="#METHODS">METHODS</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_real_error_values">set_error_real(error, @values)</a></li>
-<li><a href="#clear_error">clear_error()</a></li>
-<li><a href="#version">version()</a></li>
-<li><a href="#linked_version">linked_version()</a></li>
-<li><a href="#get_ticks">get_ticks()</a></li>
-<li><a href="#delay_ms">delay(ms)</a></li>
+<ul><li><a href="#init">init</a></li>
+<li><a href="#init_subsystem">init_subsystem</a></li>
+<li><a href="#quit_subsystem">quit_subsystem</a></li>
+<li><a href="#quit">quit</a></li>
+<li><a href="#was_init">was_init</a></li>
+<li><a href="#get_error">get_error</a></li>
+<li><a href="#set_error_real">set_error_real</a></li>
+<li><a href="#clear_error">clear_error</a></li>
+<li><a href="#version">version</a></li>
+<li><a href="#linked_version">linked_version</a></li>
+<li><a href="#get_ticks">get_ticks</a></li>
+<li><a href="#delay">delay</a></li>
 </ul>
 </li>
-<li><a href="#AUTHORS">AUTHORS</a>
+<li><a href="#AUTHOR">AUTHOR</a>
 </li>
 </ul><hr />
 <!-- INDEX END -->
@@ -79,44 +79,59 @@ For the object oriented programming interface please see the documentation provi
 <div id="METHODS_CONTENT">
 
 </div>
-<h2 id="init_flags">init(flags)</h2>
-<div id="init_flags_CONTENT">
+<h2 id="init">init</h2>
+<div id="init_CONTENT">
+<pre> SDL::init( $flags );
+
+</pre>
 <p>As with the C language API, SDL Perl initializes the SDL environment with the <code>SDL::init</code> subroutine.
 This routine takes a mode flag constructed through the bitwise OR product of the <code>SDL_INIT_*</code> constants.
-The <code>flags</code> tell <code>SDL::init</code> which subsystems to initialize.</p>
+The <code>$flags</code> tell <code>SDL::init</code> which subsystems to initialize.</p>
 <pre> SDL::init(SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
 
 </pre>
 <p><code>SDL::init</code> returns <code>0</code> on success, or <code>-1</code> on error.</p>
 
 </div>
-<h2 id="init_subsystem_flags">init_subsystem(flags)</h2>
-<div id="init_subsystem_flags_CONTENT">
-<p>After <code>SDL</code> has been initialized with <code>SDL::init</code> you may initialize any uninitialized subsystems with <code>SDL::init_subsystem</code>.
-The <code>flags</code> tell <code>SDL::init_subsystem</code> which subsystems to initialize, and are taken in the same way as <code>SDL::init</code>.</p>
+<h2 id="init_subsystem">init_subsystem</h2>
+<div id="init_subsystem_CONTENT">
+<pre> SDL::init_subsystem( $flags );
+
+</pre>
+<p>After SDL has been initialized with <code>SDL::init</code> you may initialize any uninitialized subsystems with <code>SDL::init_subsystem</code>.
+The <code>$flags</code> tell <code>SDL::init_subsystem</code> which subsystems to initialize, and are taken in the same way as <code>SDL::init</code>.</p>
 <p><code>SDL::init_subsystem</code> returns <code>0</code> on success, or <code>-1</code> on error.</p>
 
 </div>
-<h2 id="quit_subsystem_flags">quit_subsystem(flags)</h2>
-<div id="quit_subsystem_flags_CONTENT">
+<h2 id="quit_subsystem">quit_subsystem</h2>
+<div id="quit_subsystem_CONTENT">
+<pre> SDL::quit_subsystem( $flags );
+
+</pre>
 <p><code>SDL::quit_subsystem</code> allows you to shut down a subsystem that has been previously initialized by <code>SDL::init</code> or <code>SDL::init_subsystem</code>.
-The <code>flags</code> tell <code>SDL::quit_subsystem</code> which subsystems to shut down, and are taken in the same way as <code>SDL::init</code>.</p>
+The <code>$flags</code> tell <code>SDL::quit_subsystem</code> which subsystems to shut down, and are taken in the same way as <code>SDL::init</code>.</p>
 <p><code>SDL::quit_subsystem</code> doesn't return any values.</p>
 
 </div>
-<h2 id="quit">quit()</h2>
+<h2 id="quit">quit</h2>
 <div id="quit_CONTENT">
+<pre> SDL::quit;
+
+</pre>
 <p><code>SDL::quit</code> Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources.</p>
 <p><strong>Note:</strong> This will be called automatically when Perl exits. You don't need to call this, except if you want to initialize SDL again after this.</p>
 <p><code>SDL::quit</code> doesn't return any values.</p>
 
 </div>
-<h2 id="was_init_flags">was_init(flags)</h2>
-<div id="was_init_flags_CONTENT">
+<h2 id="was_init">was_init</h2>
+<div id="was_init_CONTENT">
+<pre> my $flags = SDL::was_init( $flags );
+
+</pre>
 <p><code>SDL::was_init</code> allows you to see which SDL subsytems have been initialized.
-The <code>flags</code> tell <code>SDL::was_init</code> which subsystems to check, and are taken in the same way as <code>SDL::init</code>.</p>
+The <code>$flags</code> tell <code>SDL::was_init</code> which subsystems to check, and are taken in the same way as <code>SDL::init</code>.</p>
 <p><code>SDL::was_init</code> returns a mask of the initialized subsystems it checks.
-If <code>flags</code> is <code>0</code> or <code>SDL_INIT_EVERYTHING</code>, a mask of all initialized subsystems will be returned (this does not include <code>SDL_INIT_EVENTTHREAD</code> or <code>SDL_INIT_NOPARACHUTE</code>).</p>
+If <code>$flags</code> is <code>0</code> or <code>SDL_INIT_EVERYTHING</code>, a mask of all initialized subsystems will be returned (this does not include <code>SDL_INIT_EVENTTHREAD</code> or <code>SDL_INIT_NOPARACHUTE</code>).</p>
 <pre> use SDL ':all';
 
  my $mask = SDL::was_init(SDL_INIT_AUDIO | SDL_INIT_JOYSTICK);
@@ -127,49 +142,67 @@ If <code>flags</code> is <code>0</code> or <code>SDL_INIT_EVERYTHING</code>, a m
 </pre>
 
 </div>
-<h2 id="get_error">get_error()</h2>
+<h2 id="get_error">get_error</h2>
 <div id="get_error_CONTENT">
+<pre> my $error = SDL::get_error;
+
+</pre>
 <p>Returns a scalar value containing the last error message set by the SDL library (if any).</p>
 
 </div>
-<h2 id="set_error_real_error_values">set_error_real(error, @values)</h2>
-<div id="set_error_real_error_values_CONTENT">
+<h2 id="set_error_real">set_error_real</h2>
+<div id="set_error_real_CONTENT">
+<pre> SDL::set_error_real( $printf_format, @values )
+
+</pre>
 <p><code>SDL::set_error_real</code> sets the SDL error to a <code>printf</code> style formatted string.</p>
 <p><code>SDL::set_error_real</code> doesn't return any values.</p>
 
 </div>
-<h2 id="clear_error">clear_error()</h2>
+<h2 id="clear_error">clear_error</h2>
 <div id="clear_error_CONTENT">
+<pre> SDL::clear_error;
+
+</pre>
 <p><code>SDL::clear_error</code> deletes all information about the last SDL error.
 This is useful if the error has been handled by the program.</p>
 <p><code>SDL::clear_error</code> doesn't return any values.</p>
 
 </div>
-<h2 id="version">version()</h2>
+<h2 id="version">version</h2>
 <div id="version_CONTENT">
+<pre> my $version = SDL::version;
+
+</pre>
 <p>Returns an <code>SDL::Version</code> object of the SDL library at compile-time.</p>
 <pre> use SDL;
  use SDL::Version;
 
- my $v = SDL::version();
+ my $v = SDL::version;
  printf(&quot;got version: %d.%d.%d\n&quot;, $v-&gt;major, $v-&gt;minor, $v-&gt;patch);
 
 </pre>
 
 </div>
-<h2 id="linked_version">linked_version()</h2>
+<h2 id="linked_version">linked_version</h2>
 <div id="linked_version_CONTENT">
 <p><code>SDL::linked_version</code> works in the same way as <code>SDL::version</code>, but returns an <code>SDL::Version</code> object of the SDL library at link-time.</p>
 
 </div>
-<h2 id="get_ticks">get_ticks()</h2>
+<h2 id="get_ticks">get_ticks</h2>
 <div id="get_ticks_CONTENT">
+<pre> my $ticks = SDL::get_ticks;
+
+</pre>
 <p>Returns the number of milliseconds since SDL library initialization.
 This value wraps around if the program runs for more than 49.7 days</p>
 
 </div>
-<h2 id="delay_ms">delay(ms)</h2>
-<div id="delay_ms_CONTENT">
+<h2 id="delay">delay</h2>
+<div id="delay_CONTENT">
+<pre> SDL::delay( $ms );
+
+</pre>
 <p><code>SDL::delay</code> waits the specified number of milliseconds before returning.
 The actual delay may be longer than specified depending on the underlying OS.</p>
 <p><code>SDL::delay</code> doesn't return anything.</p>
@@ -179,8 +212,8 @@ The actual delay may be longer than specified depending on the underlying OS.</p
 </pre>
 
 </div>
-<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
-<div id="AUTHORS_CONTENT">
+<h1 id="AUTHOR">AUTHOR</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="AUTHOR_CONTENT">
 <p>magnet, kthakore, Blaizer</p>
 
 </div>