remove focus-related code and declarations

This commit is contained in:
Andy2 2010-07-09 18:52:14 -07:00
parent 8172e38cef
commit d1c7d4097c
2 changed files with 0 additions and 51 deletions

View file

@ -91,7 +91,6 @@ public class JNIThread extends Thread {
private Handler m_handler;
private SyncedDraw m_drawer;
private static final int kMinDivWidth = 10;
private boolean m_keyDown = false;
private Rect m_connsIconRect;
private int m_connsIconID = 0;
private boolean m_inBack = false;
@ -199,54 +198,6 @@ public class JNIThread extends Thread {
boolean[] barr )
{
boolean draw = false;
boolean handled = false;
boolean goingUp = JNICmd.CMD_KEYUP == cmd;
if ( m_keyDown && !goingUp ) {
// ignore duplicate downs for now
} else {
// sometimes ups come without prior downs. Fake a down in
// that case.
if ( goingUp && !m_keyDown ) {
draw = XwJNI.board_handleKey( m_jniGamePtr, xpKey, false, barr );
handled = barr[0];
}
if ( XwJNI.board_handleKey( m_jniGamePtr, xpKey, goingUp, barr ) ) {
handled = barr[0] || handled;
draw = true;
}
m_keyDown = !goingUp;
if ( goingUp && !handled ) {
int[] order = { DrawCtx.OBJ_SCORE,
DrawCtx.OBJ_BOARD,
DrawCtx.OBJ_TRAY };
int curType = XwJNI.board_getFocusOwner( m_jniGamePtr );
int cur = 0;
if ( DrawCtx.OBJ_NONE != curType ) {
for ( cur = 0; cur < order.length; ++cur ) {
if ( order[cur] == curType ) {
break;
}
}
}
cur += order.length;
switch( xpKey ) {
case XP_CURSOR_KEY_DOWN:
case XP_CURSOR_KEY_RIGHT:
++cur;
break;
case XP_CURSOR_KEY_UP:
case XP_CURSOR_KEY_LEFT:
--cur;
break;
}
cur %= order.length;
draw = XwJNI.board_focusChanged( m_jniGamePtr, order[cur] )
|| draw;
}
}
return draw;
} // processKeyEvent

View file

@ -146,8 +146,6 @@ public class XwJNI {
public static native boolean board_beginTrade( int gamePtr );
public static native String board_formatRemainingTiles( int gamePtr );
public static native int board_getFocusOwner( int gamePtr );
public static native boolean board_focusChanged( int gamePtr, int typ );
public static native int board_visTileCount( int gamePtr );
public static native boolean board_canHint( int gamePtr );
public static native boolean board_canShuffle( int gamePtr );