remove unused DrawFocusState params from jni interface

This commit is contained in:
Andy2 2011-10-04 19:03:27 -07:00
parent dc20b04a4c
commit c5c0fbccae
3 changed files with 22 additions and 28 deletions

View file

@ -107,12 +107,11 @@ makeDSI( AndDraw* draw, int indx, const DrawScoreInfo* dsi )
static XP_Bool static XP_Bool
and_draw_scoreBegin( DrawCtx* dctx, const XP_Rect* rect, and_draw_scoreBegin( DrawCtx* dctx, const XP_Rect* rect,
XP_U16 numPlayers, XP_U16 numPlayers, const XP_S16* const scores,
const XP_S16* const scores, XP_S16 remCount, DrawFocusState XP_UNUSED(dfs) )
XP_S16 remCount, DrawFocusState dfs )
{ {
jboolean result; jboolean result;
DRAW_CBK_HEADER("scoreBegin", "(Landroid/graphics/Rect;I[III)Z" ); DRAW_CBK_HEADER("scoreBegin", "(Landroid/graphics/Rect;I[II)Z" );
jint jarr[numPlayers]; jint jarr[numPlayers];
int ii; int ii;
@ -123,8 +122,7 @@ and_draw_scoreBegin( DrawCtx* dctx, const XP_Rect* rect,
jobject jrect = makeJRect( draw, JCACHE_RECT0, rect ); jobject jrect = makeJRect( draw, JCACHE_RECT0, rect );
result = (*env)->CallBooleanMethod( env, draw->jdraw, mid, result = (*env)->CallBooleanMethod( env, draw->jdraw, mid,
jrect, numPlayers, jscores, remCount, jrect, numPlayers, jscores, remCount );
dfs );
(*env)->DeleteLocalRef( env, jscores ); (*env)->DeleteLocalRef( env, jscores );
return result; return result;
@ -220,15 +218,15 @@ and_draw_drawTimer( DrawCtx* dctx, const XP_Rect* rect, XP_U16 player,
static XP_Bool static XP_Bool
and_draw_boardBegin( DrawCtx* dctx, const XP_Rect* rect, and_draw_boardBegin( DrawCtx* dctx, const XP_Rect* rect,
XP_U16 cellWidth, XP_U16 cellHeight, DrawFocusState dfs ) XP_U16 cellWidth, XP_U16 cellHeight,
DrawFocusState XP_UNUSED(dfs) )
{ {
DRAW_CBK_HEADER( "boardBegin", "(Landroid/graphics/Rect;III)Z" ); DRAW_CBK_HEADER( "boardBegin", "(Landroid/graphics/Rect;II)Z" );
jobject jrect = makeJRect( draw, JCACHE_RECT0, rect ); jobject jrect = makeJRect( draw, JCACHE_RECT0, rect );
jboolean result = (*env)->CallBooleanMethod( env, draw->jdraw, mid, jboolean result = (*env)->CallBooleanMethod( env, draw->jdraw, mid,
jrect, cellWidth, cellHeight, jrect, cellWidth, cellHeight );
(jint)dfs );
return result; return result;
} }
@ -281,15 +279,14 @@ and_draw_vertScrollBoard( DrawCtx* XP_UNUSED(dctx), XP_Rect* XP_UNUSED(rect),
static XP_Bool static XP_Bool
and_draw_trayBegin( DrawCtx* dctx, const XP_Rect* rect, XP_U16 owner, and_draw_trayBegin( DrawCtx* dctx, const XP_Rect* rect, XP_U16 owner,
XP_S16 score, DrawFocusState dfs ) XP_S16 score, DrawFocusState XP_UNUSED(dfs) )
{ {
DRAW_CBK_HEADER( "trayBegin", "(Landroid/graphics/Rect;III)Z" ); DRAW_CBK_HEADER( "trayBegin", "(Landroid/graphics/Rect;II)Z" );
jobject jrect = makeJRect( draw, JCACHE_RECT0, rect ); jobject jrect = makeJRect( draw, JCACHE_RECT0, rect );
jboolean result = (*env)->CallBooleanMethod( env, draw->jdraw, mid, jboolean result = (*env)->CallBooleanMethod( env, draw->jdraw, mid,
jrect, owner, score, jrect, owner, score );
(jint)dfs );
return result; return result;
} }
@ -373,13 +370,13 @@ and_draw_score_pendingScore( DrawCtx* dctx, const XP_Rect* rect,
static void static void
and_draw_objFinished( DrawCtx* dctx, BoardObjectType typ, and_draw_objFinished( DrawCtx* dctx, BoardObjectType typ,
const XP_Rect* rect, const XP_Rect* rect,
DrawFocusState dfs ) DrawFocusState XP_UNUSED(dfs) )
{ {
DRAW_CBK_HEADER( "objFinished", "(ILandroid/graphics/Rect;I)V" ); DRAW_CBK_HEADER( "objFinished", "(ILandroid/graphics/Rect;)V" );
jobject jrect = makeJRect( draw, JCACHE_RECT0, rect ); jobject jrect = makeJRect( draw, JCACHE_RECT0, rect );
(*env)->CallVoidMethod( env, draw->jdraw, mid, (*env)->CallVoidMethod( env, draw->jdraw, mid,
(jint)typ, jrect, (jint)dfs ); (jint)typ, jrect );
} }
static void static void

View file

@ -345,7 +345,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
// DrawCtxt interface implementation // DrawCtxt interface implementation
public boolean scoreBegin( Rect rect, int numPlayers, int[] scores, public boolean scoreBegin( Rect rect, int numPlayers, int[] scores,
int remCount, int dfs ) int remCount )
{ {
fillRectOther( rect, CommonPrefs.COLOR_BACKGRND ); fillRectOther( rect, CommonPrefs.COLOR_BACKGRND );
m_canvas.save( Canvas.CLIP_SAVE_FLAG ); m_canvas.save( Canvas.CLIP_SAVE_FLAG );
@ -472,8 +472,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
} }
} }
public boolean boardBegin( Rect rect, int cellWidth, int cellHeight, public boolean boardBegin( Rect rect, int cellWidth, int cellHeight )
int dfs )
{ {
return true; return true;
} }
@ -589,7 +588,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
} }
} }
public boolean trayBegin ( Rect rect, int owner, int score, int dfs ) public boolean trayBegin ( Rect rect, int owner, int score )
{ {
m_trayOwner = owner; m_trayOwner = owner;
m_pendingScore = score; m_pendingScore = score;
@ -646,7 +645,7 @@ public class BoardView extends View implements DrawCtx, BoardHandler,
drawCentered( getResources().getString( R.string.pts ), rect, null ); drawCentered( getResources().getString( R.string.pts ), rect, null );
} }
public void objFinished( /*BoardObjectType*/int typ, Rect rect, int dfs ) public void objFinished( /*BoardObjectType*/int typ, Rect rect )
{ {
if ( DrawCtx.OBJ_SCORE == typ ) { if ( DrawCtx.OBJ_SCORE == typ ) {
m_canvas.restoreToCount(1); // in case new canvas... m_canvas.restoreToCount(1); // in case new canvas...

View file

@ -43,21 +43,19 @@ public interface DrawCtx {
static final int OBJ_TRAY = 3; static final int OBJ_TRAY = 3;
boolean scoreBegin( Rect rect, int numPlayers, int[] scores, int remCount, boolean scoreBegin( Rect rect, int numPlayers, int[] scores, int remCount );
int dfs );
void measureRemText( Rect r, int nTilesLeft, int[] width, int[] height ); void measureRemText( Rect r, int nTilesLeft, int[] width, int[] height );
void measureScoreText( Rect r, DrawScoreInfo dsi, int[] width, int[] height ); void measureScoreText( Rect r, DrawScoreInfo dsi, int[] width, int[] height );
void drawRemText( Rect rInner, Rect rOuter, int nTilesLeft, boolean focussed ); void drawRemText( Rect rInner, Rect rOuter, int nTilesLeft, boolean focussed );
void score_drawPlayer( Rect rInner, Rect rOuter, DrawScoreInfo dsi ); void score_drawPlayer( Rect rInner, Rect rOuter, DrawScoreInfo dsi );
void drawTimer( Rect rect, int player, int secondsLeft ); void drawTimer( Rect rect, int player, int secondsLeft );
boolean boardBegin( Rect rect, int cellWidth, int cellHeight, boolean boardBegin( Rect rect, int cellWidth, int cellHeight );
int dfs );
boolean drawCell( Rect rect, String text, int tile, boolean drawCell( Rect rect, String text, int tile,
int owner, int bonus, int hintAtts, int flags ); int owner, int bonus, int hintAtts, int flags );
void drawBoardArrow ( Rect rect, int bonus, boolean vert, int hintAtts, void drawBoardArrow ( Rect rect, int bonus, boolean vert, int hintAtts,
int flags ); int flags );
boolean trayBegin ( Rect rect, int owner, int score, int dfs ); boolean trayBegin ( Rect rect, int owner, int score );
void drawTile( Rect rect, String text, int val, int flags ); void drawTile( Rect rect, String text, int val, int flags );
void drawTileMidDrag ( Rect rect, String text, int val, int owner, void drawTileMidDrag ( Rect rect, String text, int val, int owner,
int flags ); int flags );
@ -72,7 +70,7 @@ public interface DrawCtx {
public static final int BONUS_TRIPLE_WORD = 4; public static final int BONUS_TRIPLE_WORD = 4;
public static final int INTRADE_MW_TEXT = 5; public static final int INTRADE_MW_TEXT = 5;
void objFinished( /*BoardObjectType*/int typ, Rect rect, int dfs ); void objFinished( /*BoardObjectType*/int typ, Rect rect );
void dictChanged( int dictPtr ); void dictChanged( int dictPtr );