</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 => 'Application Title',
- -width => 640,
- -height => 480,
- -depth => 32 );
+<pre> use SDL;
+ use SDL::App;
+ use SDL::Event;
+ use SDL::Events;
+
+ my $app = SDL::App->new(
+ -title => 'Application Title',
+ -width => 640,
+ -height => 480,
+ -depth => 32
+ );
</pre>
<p>This is the manual way of doing things </p>
-<pre> my $event = new SDL::Event; # create a new event
+<pre> my $event = SDL::Event->new; # create a new event
- $event->pump();
- $event->poll();
+ SDL::Events::pump_events();
- while ($event->wait()) {
- my $type = $event->type(); # get event type
- print $type;
- exit if $type == SDL_QUIT;
- }
-An alternative to the manual Event processing is the L<SDL::App::loop> .
+ while ( SDL::Events::poll_event($event) ) {
+ my $type = $event->type(); # get event type
+ print $type;
+ exit if $type == SDL_QUIT;
+ }
</pre>
+<p>An alternative to the manual Event processing is the <a href="/SDL-App.html#loop">SDL::App::loop</a> .</p>
</div>
<h1 id="DESCRIPTION">DESCRIPTION</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="DESCRIPTION_CONTENT">
-<p><a href="SDL-App">SDL::App</a> controls the root window of the of your SDL based application.
-It extends the <a href="SDL-Surface">SDL::Surface</a> class, and provides an interface to the window
+<p><a href="SDL-App.html">SDL::App</a> controls the root window of the of your SDL based application.
+It extends the <a href="SDL-Surface.html">SDL::Surface</a> class, and provides an interface to the window
manager oriented functions.</p>
</div>
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 => "test.app",
- -width => 800,
- -height => 600,
- -depth => 32;
+<p>Example:</p>
+<pre> my $app = SDL::App->new(
+ -title => "test.app",
+ -width => 800,
+ -height => 600,
+ -depth => 32
+ );
- my %actions = (
- SDL_QUIT() => sub { exit(0); },
- SDL_KEYDOWN() => sub { print "Key Pressed" },
- );
+ my %actions = (
+ SDL_QUIT() => sub { exit(0); },
+ SDL_KEYDOWN() => sub { print "Key Pressed" },
+ );
- $app->loop(\%actions);
+ $app->loop( \%actions );
</pre>
</div>
<h1 id="SEE_ALSO">SEE ALSO</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="SEE_ALSO_CONTENT">
-<p><a href="http://search.cpan.org/perldoc?perl">perl</a> <a href="SDL-Surface">SDL::Surface</a> <a href="SDL-Event">SDL::Event</a> <a href="SDL-OpenGL">SDL::OpenGL</a></p>
+<p><a href="http://search.cpan.org/perldoc?perl">perl</a> <a href="SDL-Surface.html">SDL::Surface</a> <a href="SDL-Event.html">SDL::Event</a> <a href="SDL-OpenGL.html">SDL::OpenGL</a></p>
</div>
</div>
\ No newline at end of file