|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.backends.lwjgl.LwjglApplication
public class LwjglApplication
An OpenGL surface fullscreen or in a lightweight window.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.badlogic.gdx.Application |
---|
Application.ApplicationType |
Field Summary | |
---|---|
protected OpenALAudio |
audio
|
protected Array<java.lang.Runnable> |
executedRunnables
|
protected LwjglFiles |
files
|
protected LwjglGraphics |
graphics
|
protected LwjglInput |
input
|
protected Array<LifecycleListener> |
lifecycleListeners
|
protected ApplicationListener |
listener
|
protected int |
logLevel
|
protected java.lang.Thread |
mainLoopThread
|
protected LwjglNet |
net
|
protected Array<java.lang.Runnable> |
runnables
|
protected boolean |
running
|
Fields inherited from interface com.badlogic.gdx.Application |
---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_NONE |
Constructor Summary | |
---|---|
LwjglApplication(ApplicationListener listener)
|
|
LwjglApplication(ApplicationListener listener,
boolean useGL2,
java.awt.Canvas canvas)
|
|
LwjglApplication(ApplicationListener listener,
LwjglApplicationConfiguration config)
|
|
LwjglApplication(ApplicationListener listener,
LwjglApplicationConfiguration config,
java.awt.Canvas canvas)
|
|
LwjglApplication(ApplicationListener listener,
LwjglApplicationConfiguration config,
LwjglGraphics graphics)
|
|
LwjglApplication(ApplicationListener listener,
java.lang.String title,
int width,
int height,
boolean useGL2)
|
Method Summary | |
---|---|
void |
addLifecycleListener(LifecycleListener listener)
Adds a new LifecycleListener to the application. |
void |
debug(java.lang.String tag,
java.lang.String message)
Logs a debug message to the console or logcat |
void |
debug(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
Logs a debug message to the console or logcat |
void |
error(java.lang.String tag,
java.lang.String message)
Logs an error message to the console or logcat |
void |
error(java.lang.String tag,
java.lang.String message,
java.lang.Throwable exception)
Logs an error message to the console or logcat |
void |
exit()
Exits the application. |
Audio |
getAudio()
|
Clipboard |
getClipboard()
|
Files |
getFiles()
|
LwjglGraphics |
getGraphics()
|
Input |
getInput()
|
long |
getJavaHeap()
|
long |
getNativeHeap()
|
Net |
getNet()
|
Preferences |
getPreferences(java.lang.String name)
Returns the Preferences instance of this Application. |
Application.ApplicationType |
getType()
|
int |
getVersion()
|
void |
log(java.lang.String tag,
java.lang.String message)
Logs a message to the console or logcat |
void |
log(java.lang.String tag,
java.lang.String message,
java.lang.Exception exception)
Logs a message to the console or logcat |
void |
postRunnable(java.lang.Runnable runnable)
Posts a Runnable on the main loop thread. |
void |
removeLifecycleListener(LifecycleListener listener)
Removes the LifecycleListener . |
void |
setLogLevel(int logLevel)
Sets the log level. |
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final LwjglGraphics graphics
protected OpenALAudio audio
protected final LwjglFiles files
protected final LwjglInput input
protected final LwjglNet net
protected final ApplicationListener listener
protected java.lang.Thread mainLoopThread
protected boolean running
protected final Array<java.lang.Runnable> runnables
protected final Array<java.lang.Runnable> executedRunnables
protected final Array<LifecycleListener> lifecycleListeners
protected int logLevel
Constructor Detail |
---|
public LwjglApplication(ApplicationListener listener, java.lang.String title, int width, int height, boolean useGL2)
public LwjglApplication(ApplicationListener listener)
public LwjglApplication(ApplicationListener listener, LwjglApplicationConfiguration config)
public LwjglApplication(ApplicationListener listener, boolean useGL2, java.awt.Canvas canvas)
public LwjglApplication(ApplicationListener listener, LwjglApplicationConfiguration config, java.awt.Canvas canvas)
public LwjglApplication(ApplicationListener listener, LwjglApplicationConfiguration config, LwjglGraphics graphics)
Method Detail |
---|
public Audio getAudio()
getAudio
in interface Application
Audio
instancepublic Files getFiles()
getFiles
in interface Application
Files
instancepublic LwjglGraphics getGraphics()
getGraphics
in interface Application
Graphics
instancepublic Input getInput()
getInput
in interface Application
Input
instancepublic Net getNet()
getNet
in interface Application
Net
instancepublic Application.ApplicationType getType()
getType
in interface Application
Application.ApplicationType
this application has, e.g. Android or Desktoppublic int getVersion()
getVersion
in interface Application
public void stop()
public long getJavaHeap()
getJavaHeap
in interface Application
public long getNativeHeap()
getNativeHeap
in interface Application
public Preferences getPreferences(java.lang.String name)
Application
Preferences
instance of this Application. It can be used to store application settings across runs.
getPreferences
in interface Application
name
- the name of the preferences, must be useable as a file name.
public Clipboard getClipboard()
getClipboard
in interface Application
public void postRunnable(java.lang.Runnable runnable)
Application
Runnable
on the main loop thread.
postRunnable
in interface Application
runnable
- the runnable.public void debug(java.lang.String tag, java.lang.String message)
Application
debug
in interface Application
public void debug(java.lang.String tag, java.lang.String message, java.lang.Throwable exception)
Application
debug
in interface Application
public void log(java.lang.String tag, java.lang.String message)
Application
log
in interface Application
public void log(java.lang.String tag, java.lang.String message, java.lang.Exception exception)
Application
log
in interface Application
public void error(java.lang.String tag, java.lang.String message)
Application
error
in interface Application
public void error(java.lang.String tag, java.lang.String message, java.lang.Throwable exception)
Application
error
in interface Application
public void setLogLevel(int logLevel)
Application
Application.LOG_NONE
will mute all log output. Application.LOG_ERROR
will only let error messages through.
Application.LOG_INFO
will let all non-debug messages through, and Application.LOG_DEBUG
will let all messages through.
setLogLevel
in interface Application
logLevel
- Application.LOG_NONE
, Application.LOG_ERROR
, Application.LOG_INFO
, Application.LOG_DEBUG
.public void exit()
Application
exit
in interface Application
public void addLifecycleListener(LifecycleListener listener)
Application
LifecycleListener
to the application. This can be
used by extensions to hook into the lifecycle more easily. The
ApplicationListener
methods are sufficient for application
level development.
addLifecycleListener
in interface Application
public void removeLifecycleListener(LifecycleListener listener)
Application
LifecycleListener
.
removeLifecycleListener
in interface Application
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |