From: Kartik Thakore Date: Tue, 22 Sep 2009 15:24:33 +0000 (-0400) Subject: Updated SDL::App docs X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bf87e76a9fcb50d9b3ff352e675bd87edb97b236;p=sdlgit%2FSDL_perl.git Updated SDL::App docs --- diff --git a/Build.PL b/Build.PL index 0117822..f01da49 100644 --- a/Build.PL +++ b/Build.PL @@ -131,8 +131,11 @@ my $build = SDL::Build->new( { 'Test::Simple' => '0.47', 'Module::Build' => '0.22', - 'YAML' => '0.68', - 'Alien::SDL' => '0.05', + 'YAML' => '0.68' + }, + configure_requires => + { + 'Alien::SDL' => '0.07', 'ExtUtils::CBuilder' => '0.260301' }, build_recommends => diff --git a/lib/SDL/App.pm b/lib/SDL/App.pm index 0105eee..e5a6cdc 100644 --- a/lib/SDL/App.pm +++ b/lib/SDL/App.pm @@ -221,17 +221,35 @@ __END__; SDL::App - a SDL perl extension =head1 SYNOPSIS - - my $app = new SDL::App ( - -title => 'Application Title', - -width => 640, - -height => 480, - -depth => 32 ); + + use SDL; + use SDL::Event; + use SDL::App; + + my $app = new SDL::App ( + -title => 'Application Title', + -width => 640, + -height => 480, + -depth => 32 ); + +This is the manual way of doing things + + my $event = new SDL::Event; # create a new event + + $event->pump(); + $event->poll(); + + 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 . =head1 DESCRIPTION L controls the root window of the of your SDL based application. -It extends the L class, and provides an interface to the window +It extends the L class, and provides an interface to the window manager oriented functions. =head1 METHODS