mirror of
https://github.com/jamessanford/kegs.git
synced 2025-02-08 03:30:41 +00:00
Add some helpful comments.
This commit is contained in:
parent
6b41dea925
commit
b3ba48b28e
@ -6,6 +6,7 @@ import android.view.KeyEvent;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
class KegsKeyboard {
|
||||
// These are ADB keycodes.
|
||||
public final static int KEY_ESCAPE = 0x35;
|
||||
public final static int KEY_RETURN = 0x24;
|
||||
public final static int KEY_BACKSPACE = 0x33; // 0x75 == delete
|
||||
|
@ -39,12 +39,14 @@ class KegsThread extends Thread {
|
||||
mUpdateScreen = update;
|
||||
}
|
||||
|
||||
// Called by native thread. Sometimes called by UI thread.
|
||||
protected void updateScreen() {
|
||||
if (mUpdateScreen != null) {
|
||||
mUpdateScreen.updateScreen();
|
||||
}
|
||||
}
|
||||
|
||||
// Called by native thread.
|
||||
private void checkForPause() {
|
||||
if (mPaused) {
|
||||
mPauseLock.lock();
|
||||
@ -53,6 +55,7 @@ class KegsThread extends Thread {
|
||||
}
|
||||
}
|
||||
|
||||
// Called by native thread.
|
||||
private String getConfigFile() {
|
||||
return mConfigFile;
|
||||
}
|
||||
|
@ -8,6 +8,8 @@ import android.view.MotionEvent;
|
||||
import android.view.ViewConfiguration;
|
||||
import java.util.concurrent.ConcurrentLinkedQueue;
|
||||
|
||||
// Translate onTouchEvent calls into mouse pointer movement.
|
||||
|
||||
class KegsTouch {
|
||||
private ConcurrentLinkedQueue mEventQueue;
|
||||
private int mButton1 = 0;
|
||||
|
@ -11,6 +11,8 @@ import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
import android.view.View;
|
||||
|
||||
// This is the old software renderer that uses BitmapThread.
|
||||
|
||||
class KegsView extends SurfaceView implements KegsThread.UpdateScreen, SurfaceHolder.Callback {
|
||||
// Reported area of this view, see updateScreenSize()
|
||||
private int mWidth = 0;
|
||||
|
@ -8,6 +8,8 @@ import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputConnection;
|
||||
import android.opengl.GLSurfaceView;
|
||||
|
||||
// All the interesting OpenGL stuff is in the KegsRenderer class.
|
||||
|
||||
class KegsViewGL extends GLSurfaceView implements KegsThread.UpdateScreen {
|
||||
// Reported area of this view, see updateScreenSize()
|
||||
private int mWidth = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user