<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>
+</ul>
+</li>
+<li><a href="#METHODS-2">METHODS</a>
+<ul><li><a href="#title">title()</a></li>
<li><a href="#title_new_title">title( $new_title )</a></li>
<li><a href="#title_window_title_icon_title">title( $window_title, $icon_title )</a></li>
<li><a href="#delay_ms">delay( $ms )</a></li>
<li><a href="#fullscreen">fullscreen</a></li>
<li><a href="#iconify">iconify</a></li>
<li><a href="#grab_input_CONSTANT">grab_input( $CONSTANT )</a></li>
-<li><a href="#loop_actions">loop( \%actions )</a></li>
<li><a href="#sync">sync</a></li>
<li><a href="#attribute_attr">attribute( $attr )</a></li>
<li><a href="#attribute_attr_value">attribute( $attr, $value )</a></li>
</ul>
</li>
+<li><a href="#CALLBACKS">CALLBACKS</a></li>
<li><a href="#AUTHORS">AUTHORS</a></li>
<li><a href="#SEE_ALSO">SEE ALSO</a>
</li>
Set this to a true value to make the window resizeable by the user. Default is off.</dt>
</dl>
-
-
-
+</div>
+<h1 id="METHODS-2">METHODS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="METHODS_CONTENT-2">
</div>
<h2 id="title">title()</h2>
</dl>
</div>
-<h2 id="loop_actions">loop( \%actions )</h2>
-<div id="loop_actions_CONTENT">
-<p><code>SDLx::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. When called, the event method recieves
-as its parameter the event object used in the loop.</p>
-<p>Example:</p>
-<pre> my $app = SDLx::App->new(
- title => "test.app",
- width => 800,
- height => 600,
- depth => 32
- );
-
- my %actions = (
- SDL_QUIT() => sub { exit(0); },
- SDL_KEYDOWN() => sub { print "Key Pressed" },
- );
-
- $app->loop( \%actions );
-
-</pre>
-
-</div>
<h2 id="sync">sync</h2>
<div id="sync_CONTENT">
<p><code>SDLx::App::sync</code> encapsulates the various methods of syncronizing the screen with the
always returns the current value of the given attribute, or croaks on failure.</p>
</div>
+<h1 id="CALLBACKS">CALLBACKS</h1><p><a href="#TOP" class="toplink">Top</a></p>
+<div id="CALLBACKS_CONTENT">
+<p><code>SDLx::App</code> is a <code>SDLx::Controller</code>. Use the event, show and handlers to run the app.</p>
+<pre> use SDL;
+ use SDLx::App;
+
+ use SDL::Event; #Where ever the event call back is processed
+
+ my $app = SDLx::App->new( width => 200, height => 200);
+
+ $app->add_event_handler( sub{ return 0 if $_[0]->type == SDL_QUIT; return 1});
+
+ $app->add_show_handler( sub{ $app->update() } );
+
+ $app->add_move_handler(
+ sub{
+ #calc your physics here
+ } );
+
+ $app->run();
+
+</pre>
+<p>see <a href="http://search.cpan.org/perldoc?SDLx::Controller">SDLx::Controller</a> for more details.</p>
+
+</div>
<h1 id="AUTHORS">AUTHORS</h1><p><a href="#TOP" class="toplink">Top</a></p>
<div id="AUTHORS_CONTENT">
<p>See <b>AUTHORS</b> in <cite>SDL</cite>.</p>