catch up with API changes

This commit is contained in:
ehouse 2005-09-02 06:24:47 +00:00
parent bd121ed939
commit 889ebf6ce9
5 changed files with 14 additions and 7 deletions

View file

@ -57,7 +57,8 @@ curses_draw_destroyCtxt( DrawCtx* p_dctx )
} /* draw_setup */ } /* draw_setup */
static XP_Bool static XP_Bool
curses_draw_boardBegin( DrawCtx* p_dctx, XP_Rect* rect, XP_Bool hasfocus ) curses_draw_boardBegin( DrawCtx* p_dctx, DictionaryCtxt* dict, XP_Rect* rect,
XP_Bool hasfocus )
{ {
CursesDrawCtx* dctx = (CursesDrawCtx*)p_dctx; CursesDrawCtx* dctx = (CursesDrawCtx*)p_dctx;
if ( hasfocus ) { if ( hasfocus ) {

View file

@ -241,7 +241,8 @@ gtk_draw_destroyCtxt( DrawCtx* p_dctx )
static XP_Bool static XP_Bool
gtk_draw_boardBegin( DrawCtx* p_dctx, XP_Rect* rect, XP_Bool hasfocus ) gtk_draw_boardBegin( DrawCtx* p_dctx, DictionaryCtxt* dict,
XP_Rect* rect, XP_Bool hasfocus )
{ {
GdkRectangle gdkrect; GdkRectangle gdkrect;
GtkDrawCtx* dctx = (GtkDrawCtx*)p_dctx; GtkDrawCtx* dctx = (GtkDrawCtx*)p_dctx;

View file

@ -395,9 +395,12 @@ expose_event( GtkWidget* widget,
widget->allocation.width, widget->allocation.width,
widget->allocation.height+widget->allocation.y ); widget->allocation.height+widget->allocation.y );
*/ */
board_invalRect( globals->cGlobals.game.board, (XP_Rect*)&event->area ); /* I want to inval only the area that's exposed, but the rect is always
empty, even when clearly shouldn't be. Need to investigate. Until
fixed, use board_invalAll to ensure board is drawn.*/
/* board_invalRect( globals->cGlobals.game.board, (XP_Rect*)&event->area ); */
/* board_invalAll( globals->cGlobals.game.board ); */ board_invalAll( globals->cGlobals.game.board );
board_draw( globals->cGlobals.game.board ); board_draw( globals->cGlobals.game.board );
/* gdk_draw_pixmap( widget->window, */ /* gdk_draw_pixmap( widget->window, */
@ -617,7 +620,9 @@ static void
handle_resend( GtkWidget* widget, GtkAppGlobals* globals ) handle_resend( GtkWidget* widget, GtkAppGlobals* globals )
{ {
CommsCtxt* comms = globals->cGlobals.game.comms; CommsCtxt* comms = globals->cGlobals.game.comms;
comms_resendAll( comms ); if ( comms != NULL ) {
comms_resendAll( comms );
}
} /* handle_resend */ } /* handle_resend */
#ifdef DEBUG #ifdef DEBUG

View file

@ -225,7 +225,7 @@ usage( char* appName, char* msg )
} }
XP_S16 XP_S16
linux_tcp_send( XP_U8* buf, XP_U16 buflen, CommsAddrRec* addrRec, linux_tcp_send( XP_U8* buf, XP_U16 buflen, const CommsAddrRec* addrRec,
void* closure ) void* closure )
{ {
CommonGlobals* globals = (CommonGlobals*)closure; CommonGlobals* globals = (CommonGlobals*)closure;

View file

@ -37,7 +37,7 @@ typedef struct LinuxBMStruct {
DictionaryCtxt* linux_dictionary_make( MPFORMAL char* dictFileName ); DictionaryCtxt* linux_dictionary_make( MPFORMAL char* dictFileName );
int initListenerSocket( int port ); int initListenerSocket( int port );
XP_S16 linux_tcp_send( XP_U8* buf, XP_U16 buflen, CommsAddrRec* addrRec, XP_S16 linux_tcp_send( XP_U8* buf, XP_U16 buflen, const CommsAddrRec* addrRec,
void* closure ); void* closure );
int linux_init_socket( CommonGlobals* cGlobals ); int linux_init_socket( CommonGlobals* cGlobals );
int linux_receive( CommonGlobals* cGlobals, unsigned char* buf, int bufSize ); int linux_receive( CommonGlobals* cGlobals, unsigned char* buf, int bufSize );