NAME
SDL::App - a SDL perl extension
SYNOPSIS
$app = new SDL::App ( -title => 'FunkMeister 2000',
-icon_title => 'FM2000',
-icon => 'funkmeister.png',
-width => 400,
-height => 400 );
DESCRIPTION
This Object is a composite made up of a few surfaces, and strings. This object does the setup for the SDL library, and greates the base application window.
The options that the constructor takes are:
-title => the title bar of the window -icon_title => the title bar of the icon -icon => the icon image file -flags => the SDL_* surface flags for the default window -width => of the app window -height => of the app window -depth => the bit depth of the window
Additional Methods
In addition to initilizing the SDL library, the app class
provides access to a couple miscellaneous functions that all programs
may need:
$app->delay(milliseconds);
Delay will cause a delay of roughly the specified milliseconds. Since this only runs in multi-tasking environments, the exact number is not assured.
$app->ticks();
Ticks returns the number of clock ticks since the program was started.
$app->error();
Error returns any pending SDL related error messages. It returns an empty string if no errors are pending, making it print friendly.
$app->warp(x,y);
Will move the cursor to the location x,y.
AUTHOR
David J. Goehrig
SEE ALSO
perl(1) SDL::Surface(3) SDL::Mixer(3) SDL::Event(3) SDL::Cdrom(3).