From 889ebf6ce937d70a2f153639dbaf73e90b64db1d Mon Sep 17 00:00:00 2001 From: ehouse Date: Fri, 2 Sep 2005 06:24:47 +0000 Subject: [PATCH] catch up with API changes --- linux/cursesdraw.c | 3 ++- linux/gtkdraw.c | 3 ++- linux/gtkmain.c | 11 ++++++++--- linux/linuxmain.c | 2 +- linux/linuxmain.h | 2 +- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/linux/cursesdraw.c b/linux/cursesdraw.c index 3276e0143..08813602c 100644 --- a/linux/cursesdraw.c +++ b/linux/cursesdraw.c @@ -57,7 +57,8 @@ curses_draw_destroyCtxt( DrawCtx* p_dctx ) } /* draw_setup */ 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; if ( hasfocus ) { diff --git a/linux/gtkdraw.c b/linux/gtkdraw.c index efc7ad06e..8d0e1f481 100644 --- a/linux/gtkdraw.c +++ b/linux/gtkdraw.c @@ -241,7 +241,8 @@ gtk_draw_destroyCtxt( DrawCtx* p_dctx ) 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; GtkDrawCtx* dctx = (GtkDrawCtx*)p_dctx; diff --git a/linux/gtkmain.c b/linux/gtkmain.c index a9ea3cfd6..c61bcc598 100644 --- a/linux/gtkmain.c +++ b/linux/gtkmain.c @@ -395,9 +395,12 @@ expose_event( GtkWidget* widget, widget->allocation.width, 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 ); /* gdk_draw_pixmap( widget->window, */ @@ -617,7 +620,9 @@ static void handle_resend( GtkWidget* widget, GtkAppGlobals* globals ) { CommsCtxt* comms = globals->cGlobals.game.comms; - comms_resendAll( comms ); + if ( comms != NULL ) { + comms_resendAll( comms ); + } } /* handle_resend */ #ifdef DEBUG diff --git a/linux/linuxmain.c b/linux/linuxmain.c index 59d25318e..b9cfeb3ba 100644 --- a/linux/linuxmain.c +++ b/linux/linuxmain.c @@ -225,7 +225,7 @@ usage( char* appName, char* msg ) } 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 ) { CommonGlobals* globals = (CommonGlobals*)closure; diff --git a/linux/linuxmain.h b/linux/linuxmain.h index 147bdeac8..200b6fc2e 100644 --- a/linux/linuxmain.h +++ b/linux/linuxmain.h @@ -37,7 +37,7 @@ typedef struct LinuxBMStruct { DictionaryCtxt* linux_dictionary_make( MPFORMAL char* dictFileName ); 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 ); int linux_init_socket( CommonGlobals* cGlobals ); int linux_receive( CommonGlobals* cGlobals, unsigned char* buf, int bufSize );