public abstract class CanvasThreading extends CanvasKeysAndTouch implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static int |
app_state
The current and previous app statuses.
|
static int |
APPSTATEFLAG_LOADING
Indicates the application is in a status where loading is happening on a separate thread
|
static long |
last_fixed_update_time_ms |
static long |
last_variable_update_time_ms |
static java.lang.Thread |
main_thread |
static int |
MS_PER_UPDATE
Milli-seconds for each tick (rounded to the nearest, and based on PARAM_MD_BASE_FRAMERATE)
|
static int |
previous_app_state
The current and previous app statuses.
|
internal_key_mappings
CURRENT_SCREEN_HEIGHT, CURRENT_SCREEN_PPI, CURRENT_SCREEN_WIDTH, UPDATE_SCREEN_DIMENSIONS
Constructor and Description |
---|
CanvasThreading() |
Modifier and Type | Method and Description |
---|---|
void |
run()
The main run method that controls the frame-rate throttling and calls the update and synchronised render methods
|
abstract void |
runOnce() |
void |
startLoading()
Method that is called whenever the application enters a loading app_state
|
void |
startMainThread()
Starts a thread for the application to run in
|
void |
stopMainThread()
Stops any application thread that may be running
|
findKeyBitflag, initKeysAndTouch, keyAction, keyPressed, keyReleased, pointerAction, pointerPressed, pointerReleased
initInterrupts
updateScreenDimensions
paint, render, sizeChanged, syncPaint
flushGraphics, flushGraphics, getKeyStates
getGameAction, getHeight, getKeyCode, getKeyName, getWidth, hasPointerEvents, hasPointerMotionEvents, hasRepeatEvents, isDoubleBuffered, repaint, repaint, serviceRepaints, setFullScreenMode
public static final int APPSTATEFLAG_LOADING
public static final int MS_PER_UPDATE
public static int app_state
public static int previous_app_state
public static long last_fixed_update_time_ms
public static long last_variable_update_time_ms
public static java.lang.Thread main_thread
public void startLoading()
public abstract void runOnce()
public void startMainThread()
public void stopMainThread()
public void run()
run
in interface java.lang.Runnable