Add some helpful comments.

This commit is contained in:
James Sanford 2012-10-25 18:38:13 -07:00
parent 6b41dea925
commit b3ba48b28e
5 changed files with 10 additions and 0 deletions

View File

@ -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

View File

@ -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;
}

View File

@ -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;

View File

@ -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;

View File

@ -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;