sdljava
public class SDLMain extends Object
Version: $Id: SDLMain.java,v 1.8 2005/02/19 02:26:01 ivan_ganza Exp $
Field Summary | |
---|---|
static long | start_time
Time in milliseconds of the SDL library initialization |
static int | SDL_INIT_AUDIO
Initializes the audio subsystem
|
static int | SDL_INIT_CDROM
Initializes the cdrom subsystem
|
static int | SDL_INIT_EVENTTHREAD |
static int | SDL_INIT_EVERYTHING
Initialize all
|
static int | SDL_INIT_JOYSTICK
Initializes the joystick subsystem
|
static int | SDL_INIT_NOPARACHUTE
Prevents SDL from catching fatal signals
|
static int | SDL_INIT_TIMER
Initializes the timer subsystem
|
static int | SDL_INIT_VIDEO
Initializes the video subsystem
|
Method Summary | |
---|---|
static String | getError()
Gets SDL error string about the last internal SDL error
|
static SDLVersion | getSDLVersion()
get a version structure with the compile-time version of the SDL library.
|
static long | getStartedTime()
Get time of the SDL library initialization.
|
static void | init(long flags)
Initializes SDL. |
static void | initSubSystem(int flags)
Initialize subsystems
After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem. |
static void | quit()
SDL_Quit shuts down all SDL subsystems and frees the resources allocated to them.
|
static void | quitSubSystem(int flags)
Shut down a subsystem
SDL_QuitSubSystem allows you to shut down a subsystem that has been previously initialized by SDL_Init or SDL_InitSubSystem. |
static long | wasInit(long flags)
Checks which subsystems are initialized
|
Returns: returns string containing information about the last internal SDL error.
Returns: the compile-time version of the SDL library.
Returns: returns long represent time of the SDL library initialization.
SDL_INIT_TIMER Initializes the timer subsystem.
SDL_INIT_AUDIO Initializes the audio subsystem.
SDL_INIT_VIDEO Initializes the video subsystem.
SDL_INIT_CDROM Initializes the cdrom subsystem.
SDL_INIT_JOYSTICK Initializes the joystick subsystem.
SDL_INIT_EVERYTHING Initialize all of the above.
SDL_INIT_NOPARACHUTE Prevents SDL from catching fatal signals.
SDL_INIT_EVENTTHREAD
Parameters: flags an int
value
Throws: SDLException if an error occurs
After SDL has been initialized with SDL_Init you may initialize uninitialized subsystems with SDL_InitSubSystem. The flags parameter is the same as that used in SDL_Init.
Parameters: flags an int
value
Throws: SDLException if an error occurs
SDL_QuitSubSystem allows you to shut down a subsystem that has been previously initialized by SDL_Init or SDL_InitSubSystem. The flags tells SDL_QuitSubSystem which subsystems to shut down, it uses the same values that are passed to SDL_Init.
Parameters: flags an int
value
Parameters: flags bitwise OR'd combination of the subsystems you wish to check
Returns: Returns a bitwised OR'd combination of the initialized subsystems.
Throws: SDLException if an error occurs