X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDLx-App.html-inc;h=ca61336f28932d06fbbaa4afc879c4de4dbd07d3;hb=d5943b684b1240307fbf0a103abbf18dd93998f4;hp=23e5cd32140330615901b5dbcf7b274b07b98aef;hpb=ca0a3441dd72000cbbbb4be484b18d0d305fdb29;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDLx-App.html-inc b/pages/SDLx-App.html-inc index 23e5cd3..ca61336 100644 --- a/pages/SDLx-App.html-inc +++ b/pages/SDLx-App.html-inc @@ -8,20 +8,23 @@
This is the manual way of doing things
+This is the manual way of doing things
my $event = SDL::Event->new; # create a new event SDL::Events::pump_events(); @@ -64,7 +67,7 @@ }-
An alternative to the manual Event processing is the SDLx::App::loop .
+An alternative to the manual Event processing is the SDLx::App::loop.
SDLx::App::new
initializes the SDL, creates a new screen,
and initializes some of the window manager properties.
SDLx::App::new
takes a series of named parameters:
SDLx::App::title
takes 0, 1, or 2 arguments. It returns the current
-application window title. If one parameter is passed, both the window
-title and icon title will be set to its value. If two parameters are
-passed the window title will be set to the first, and the icon title
-to the second.
SDLx::App::title
takes 0, 1, or 2 arguments. If no parameter is given,
+it returns the current application window title. If one parameter is
+passed, both the window title and icon title will be set to its value.
+If two parameters are passed the window title will be set to the first,
+and the icon title to the second.
SDLx::App::delay
takes 1 argument, and will sleep the application for
that many ms.
SDLx::App::error
returns the last error message set by the SDL.
SDLx::App::resize
takes a new height and width of the application
-if the application was originally created with the -resizable option.
SDLx::App::resize
takes a new width and height of the application. Only
+works if the application was originally created with the resizable option.
SDLx::App::iconify
iconifies the applicaiton window.
SDLx::App::iconify
iconifies the application window.
SDLx::App::grab_input
can be used to change the input focus behavior of
-the application. It takes one argument, which should be one of the following:
SDLx::App::loop
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. The event method recieves as its parameter
-the event object used in the loop.
Example:
my $app = SDLx::App->new( - -title => "test.app", - -width => 800, - -height => 600, - -depth => 32 + title => "test.app", + width => 800, + height => 600, + depth => 32 ); my %actions = ( @@ -178,21 +197,24 @@ the event object used in the loop.sync
++current video buffer.
SDLx::App::sync
encapsulates the various methods of syncronizing the screen with the -current video buffer.SDLx::App::sync
will do a fullscreen update, using the double buffer -or OpenGL buffer if applicable. This is prefered to calling flip on the application window.SDLx::App::sync
will do a fullscreen update, using the double buffer +or OpenGL buffer if applicable. This is prefered to calling flip on the application window. + +attribute( $attr )
+-attribute ( attr, [value] )
+attribute( $attr, $value )
--
SDLx::App::attribute
allows one to set and get GL attributes. By passing a value -in addition to the attribute selector, the value will be set.SDL:::App::attribute
+
SDLx::App::attribute
allows one to get and set GL attributes. By passing a value +in addition to the attribute selector, the value will be set.SDL:::App::attribute
always returns the current value of the given attribute, or croaks on failure.AUTHOR
-