|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object sdljava.SDLMain
public class SDLMain
Wrapping of the SDL_main functions.
Field Summary | |
---|---|
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 |
private static long |
start_time
Time in milliseconds of the SDL library initialization |
Constructor Summary | |
---|---|
SDLMain()
|
Method Summary | |
---|---|
static java.lang.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 |
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 |
static long |
wasInit(long flags)
Checks which subsystems are initialized |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SDL_INIT_TIMER
public static final int SDL_INIT_AUDIO
public static final int SDL_INIT_VIDEO
public static final int SDL_INIT_CDROM
public static final int SDL_INIT_JOYSTICK
public static final int SDL_INIT_NOPARACHUTE
public static final int SDL_INIT_EVENTTHREAD
public static final int SDL_INIT_EVERYTHING
private static long start_time
Constructor Detail |
---|
public SDLMain()
Method Detail |
---|
public static void init(long flags) throws SDLException
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
flags
- an int
value
SDLException
- if an error occurspublic static void initSubSystem(int flags) throws SDLException
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.
flags
- an int
value
SDLException
- if an error occurspublic static void quitSubSystem(int flags)
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.
flags
- an int
valuepublic static void quit()
public static long wasInit(long flags) throws SDLException
flags
- bitwise OR'd combination of the subsystems you wish to check
SDLException
- if an error occurspublic static java.lang.String getError()
public static long getStartedTime()
public static SDLVersion getSDLVersion()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |