mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-17 18:12:01 +01:00
move vtmgr into ulinuxutl so linux variants don't all have to implement it
This commit is contained in:
parent
92b255c35d
commit
7ef555033f
4 changed files with 13 additions and 19 deletions
|
@ -1208,13 +1208,6 @@ initClientSocket( CursesAppGlobals* globals, char* serverName )
|
||||||
} /* initClientSocket */
|
} /* initClientSocket */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static VTableMgr*
|
|
||||||
curses_util_getVTManager(XW_UtilCtxt* uc)
|
|
||||||
{
|
|
||||||
CursesAppGlobals* globals = (CursesAppGlobals*)uc->closure;
|
|
||||||
return globals->cGlobals.params->vtMgr;
|
|
||||||
} /* linux_util_getVTManager */
|
|
||||||
|
|
||||||
static XP_Bool
|
static XP_Bool
|
||||||
curses_util_askPassword( XW_UtilCtxt* XP_UNUSED(uc),
|
curses_util_askPassword( XW_UtilCtxt* XP_UNUSED(uc),
|
||||||
const XP_UCHAR* XP_UNUSED(name),
|
const XP_UCHAR* XP_UNUSED(name),
|
||||||
|
@ -1294,7 +1287,6 @@ setupCursesUtilCallbacks( CursesAppGlobals* globals, XW_UtilCtxt* util )
|
||||||
{
|
{
|
||||||
util->vtable->m_util_userError = curses_util_userError;
|
util->vtable->m_util_userError = curses_util_userError;
|
||||||
|
|
||||||
util->vtable->m_util_getVTManager = curses_util_getVTManager;
|
|
||||||
util->vtable->m_util_askPassword = curses_util_askPassword;
|
util->vtable->m_util_askPassword = curses_util_askPassword;
|
||||||
util->vtable->m_util_yOffsetChange = curses_util_yOffsetChange;
|
util->vtable->m_util_yOffsetChange = curses_util_yOffsetChange;
|
||||||
util->vtable->m_util_warnIllegalWord = curses_util_warnIllegalWord;
|
util->vtable->m_util_warnIllegalWord = curses_util_warnIllegalWord;
|
||||||
|
@ -1439,7 +1431,7 @@ relay_error_curses( void* XP_UNUSED(closure), XWREASON XP_UNUSED_DBG(relayErr) )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
int
|
||||||
cursesmain( XP_Bool isServer, LaunchParams* params )
|
cursesmain( XP_Bool isServer, LaunchParams* params )
|
||||||
{
|
{
|
||||||
int piperesult;
|
int piperesult;
|
||||||
|
@ -1647,5 +1639,6 @@ cursesmain( XP_Bool isServer, LaunchParams* params )
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
endwin();
|
endwin();
|
||||||
|
return 0;
|
||||||
} /* cursesmain */
|
} /* cursesmain */
|
||||||
#endif /* PLATFORM_NCURSES */
|
#endif /* PLATFORM_NCURSES */
|
||||||
|
|
|
@ -106,6 +106,6 @@ DrawCtx* cursesDrawCtxtMake( WINDOW* boardWin );
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
void cursesmain( XP_Bool isServer, LaunchParams* params );
|
int cursesmain( XP_Bool isServer, LaunchParams* params );
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1052,9 +1052,11 @@ disenable_buttons( GtkAppGlobals* globals )
|
||||||
gtk_widget_set_sensitive( globals->prevhint_button, canHing );
|
gtk_widget_set_sensitive( globals->prevhint_button, canHing );
|
||||||
gtk_widget_set_sensitive( globals->nexthint_button, canHing );
|
gtk_widget_set_sensitive( globals->nexthint_button, canHing );
|
||||||
|
|
||||||
|
#ifdef XWFEATURE_CHAT
|
||||||
XP_Bool canChat = !!globals->cGlobals.game.comms
|
XP_Bool canChat = !!globals->cGlobals.game.comms
|
||||||
&& comms_canChat( globals->cGlobals.game.comms );
|
&& comms_canChat( globals->cGlobals.game.comms );
|
||||||
gtk_widget_set_sensitive( globals->chat_button, canChat );
|
gtk_widget_set_sensitive( globals->chat_button, canChat );
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1289,13 +1291,6 @@ gtkUserError( GtkAppGlobals* XP_UNUSED(globals), const char* format, ... )
|
||||||
va_end(ap);
|
va_end(ap);
|
||||||
} /* gtkUserError */
|
} /* gtkUserError */
|
||||||
|
|
||||||
static VTableMgr*
|
|
||||||
gtk_util_getVTManager(XW_UtilCtxt* uc)
|
|
||||||
{
|
|
||||||
GtkAppGlobals* globals = (GtkAppGlobals*)uc->closure;
|
|
||||||
return globals->cGlobals.params->vtMgr;
|
|
||||||
} /* linux_util_getVTManager */
|
|
||||||
|
|
||||||
static XP_S16
|
static XP_S16
|
||||||
gtk_util_userPickTile( XW_UtilCtxt* uc, const PickInfo* pi,
|
gtk_util_userPickTile( XW_UtilCtxt* uc, const PickInfo* pi,
|
||||||
XP_U16 playerNum, const XP_UCHAR** texts,
|
XP_U16 playerNum, const XP_UCHAR** texts,
|
||||||
|
@ -1884,7 +1879,6 @@ setupGtkUtilCallbacks( GtkAppGlobals* globals, XW_UtilCtxt* util )
|
||||||
{
|
{
|
||||||
util->vtable->m_util_userError = gtk_util_userError;
|
util->vtable->m_util_userError = gtk_util_userError;
|
||||||
util->vtable->m_util_userQuery = gtk_util_userQuery;
|
util->vtable->m_util_userQuery = gtk_util_userQuery;
|
||||||
util->vtable->m_util_getVTManager = gtk_util_getVTManager;
|
|
||||||
util->vtable->m_util_userPickTile = gtk_util_userPickTile;
|
util->vtable->m_util_userPickTile = gtk_util_userPickTile;
|
||||||
util->vtable->m_util_askPassword = gtk_util_askPassword;
|
util->vtable->m_util_askPassword = gtk_util_askPassword;
|
||||||
util->vtable->m_util_trayHiddenChange = gtk_util_trayHiddenChange;
|
util->vtable->m_util_trayHiddenChange = gtk_util_trayHiddenChange;
|
||||||
|
|
|
@ -265,6 +265,13 @@ linux_util_getUserString( XW_UtilCtxt* XP_UNUSED(uc), XP_U16 code )
|
||||||
}
|
}
|
||||||
} /* linux_util_getUserString */
|
} /* linux_util_getUserString */
|
||||||
|
|
||||||
|
static VTableMgr*
|
||||||
|
linux_util_getVTManager( XW_UtilCtxt* uc )
|
||||||
|
{
|
||||||
|
CommonGlobals* cGlobals = (CommonGlobals*)uc->closure;
|
||||||
|
return cGlobals->params->vtMgr;
|
||||||
|
} /* linux_util_getVTManager */
|
||||||
|
|
||||||
void
|
void
|
||||||
linux_util_vt_init( MPFORMAL XW_UtilCtxt* util )
|
linux_util_vt_init( MPFORMAL XW_UtilCtxt* util )
|
||||||
{
|
{
|
||||||
|
@ -274,7 +281,7 @@ linux_util_vt_init( MPFORMAL XW_UtilCtxt* util )
|
||||||
util->vtable->m_util_getSquareBonus = linux_util_getSquareBonus;
|
util->vtable->m_util_getSquareBonus = linux_util_getSquareBonus;
|
||||||
util->vtable->m_util_getCurSeconds = linux_util_getCurSeconds;
|
util->vtable->m_util_getCurSeconds = linux_util_getCurSeconds;
|
||||||
util->vtable->m_util_getUserString = linux_util_getUserString;
|
util->vtable->m_util_getUserString = linux_util_getUserString;
|
||||||
|
util->vtable->m_util_getVTManager = linux_util_getVTManager;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in a new issue