X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL.html-inc;h=bb561e5541c6b0089f0f548a1d38c66963dd7522;hb=3065276381925b3e87e7851f9a52df76064b9916;hp=530e24cffcd4fb0e04ac8c48774f7c4751c001be;hpb=449a007bd9879e7a37f21137c044f2af6f99f87c;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL.html-inc b/pages/SDL.html-inc index 530e24c..bb561e5 100644 --- a/pages/SDL.html-inc +++ b/pages/SDL.html-inc @@ -2,7 +2,10 @@
SDL_perl - Simple DirectMedia Layer for Perl
+SDL - Simple DirectMedia Layer for Perl
+ +Core
As with the C language API, SDL_perl initializes the SDL environment through
-the SDL::init
subroutine. This routine takes a mode flag constructed through
-the bitwise OR product of the following constants:
SDL::init
subroutine. This routine takes a mode flag constructed through
+the bitwise OR product of the SDL_INIT_* constants.
+The constants are not exported by default. You can export them into your namespace by doing:
+use SDL ':all'; + ++
or access them directly:
+SDL::SDL_INIT_AUDIO; + +
SDL::Init
returns 0 on success, or -1 on error.
Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources. This should always be called before you exit.
+Shuts down all SDL subsystems, unloads the dynamically linked library and frees the allocated resources.
+Note: This will be called automatically when perl exits. You don't need to call this, except you want to initialize SDL after this again.
SDL::quit doesn't returns any value.
SDL::get_error
, which returns a scalar containing the text of the message if any.
-SDL::get_error sets the SDL error to a printf style formatted string. it doesn't returns any values.
@@ -232,10 +250,6 @@ it doesn't returns any values.Unknown SDL error
- - - -Note 1: SDL_LASTERROR marks the highest numbered predefined error. Note 2: SDL also defines SDL_OutOfMemory() and SDL_Unsupported() for internal use which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) respectively.
@@ -246,8 +260,8 @@ which are equivalent to SDL_Error(SDL_ENOMEM) and SDL_Error(SDL_UNSUPPORTED) resSDL::clear_error deletes all information about the last internal SDL error. Useful if the error has been handled by the program. it doesn't returns any value.
@@ -298,6 +312,12 @@ than the specified depending on the underlying OS. +magnet, kthakore
+ +