2011-08-30 05:36:01 +02:00
|
|
|
/* -*-mode: C; fill-column: 78; c-basic-offset: 4; -*- */
|
2003-11-01 06:35:29 +01:00
|
|
|
/*
|
2010-04-08 06:14:34 +02:00
|
|
|
* Copyright 1997 - 2010 by Eric House (xwords@eehouse.org). All rights
|
|
|
|
* reserved.
|
2003-11-01 06:35:29 +01:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _UTIL_H_
|
|
|
|
#define _UTIL_H_
|
|
|
|
|
|
|
|
#include "comtypes.h"
|
|
|
|
|
|
|
|
#include "dawg.h"
|
|
|
|
#include "model.h"
|
|
|
|
#include "board.h"
|
|
|
|
#include "mempool.h"
|
|
|
|
#include "vtabmgr.h"
|
2005-03-09 16:14:10 +01:00
|
|
|
#include "comms.h"
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2005-09-03 08:56:33 +02:00
|
|
|
#include "xwrelay.h"
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
#define LETTER_NONE '\0'
|
|
|
|
|
|
|
|
typedef enum {
|
2007-11-19 00:43:27 +01:00
|
|
|
ERR_NONE, /* 0 is special case */
|
2003-11-01 06:35:29 +01:00
|
|
|
ERR_TILES_NOT_IN_LINE, /* scoring a move where tiles aren't in line */
|
|
|
|
ERR_NO_EMPTIES_IN_TURN,
|
|
|
|
ERR_TWO_TILES_FIRST_MOVE,
|
|
|
|
ERR_TILES_MUST_CONTACT,
|
|
|
|
/* ERR_NO_HINT_MID_TURN, */
|
|
|
|
ERR_TOO_FEW_TILES_LEFT_TO_TRADE,
|
|
|
|
ERR_NOT_YOUR_TURN,
|
|
|
|
ERR_NO_PEEK_ROBOT_TILES,
|
|
|
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
|
|
|
ERR_SERVER_DICT_WINS,
|
|
|
|
ERR_NO_PEEK_REMOTE_TILES,
|
2008-05-31 05:26:16 +02:00
|
|
|
ERR_REG_UNEXPECTED_USER, /* server asked to register too many remote
|
|
|
|
users */
|
2008-01-04 15:47:52 +01:00
|
|
|
ERR_REG_SERVER_SANS_REMOTE,
|
2008-01-07 02:11:29 +01:00
|
|
|
STR_NEED_BT_HOST_ADDR,
|
2003-11-01 06:35:29 +01:00
|
|
|
#endif
|
2011-03-07 15:28:43 +01:00
|
|
|
ERR_NO_EMPTY_TRADE,
|
2005-01-04 05:07:38 +01:00
|
|
|
/* ERR_CANT_ENGINE_MID_MOVE, */
|
2003-11-01 06:35:29 +01:00
|
|
|
/* ERR_NOT_YOUR_TURN_TO_TRADE, */
|
|
|
|
/* ERR_NOT_YOUR_TURN_TO_MOVE, */
|
2005-07-06 03:36:52 +02:00
|
|
|
ERR_CANT_UNDO_TILEASSIGN,
|
2008-07-24 14:37:05 +02:00
|
|
|
ERR_CANT_HINT_WHILE_DISABLED,
|
2005-07-06 03:36:52 +02:00
|
|
|
|
2005-09-03 08:56:33 +02:00
|
|
|
ERR_RELAY_BASE,
|
|
|
|
ERR_RELAY_END = ERR_RELAY_BASE + XWRELAY_ERROR_LASTERR
|
2003-11-01 06:35:29 +01:00
|
|
|
} UtilErrID;
|
|
|
|
|
|
|
|
typedef enum {
|
2008-05-31 05:26:16 +02:00
|
|
|
QUERY_COMMIT_TURN, /* 0 means cancel; 1 means commit */
|
2005-01-20 03:37:13 +01:00
|
|
|
QUERY_ROBOT_TRADE,
|
|
|
|
|
|
|
|
QUERY_LAST_COMMON
|
2003-11-01 06:35:29 +01:00
|
|
|
} UtilQueryID;
|
|
|
|
|
2004-05-14 10:57:38 +02:00
|
|
|
#define PICKER_PICKALL -1
|
|
|
|
#define PICKER_BACKUP -2
|
|
|
|
|
2003-11-16 18:11:33 +01:00
|
|
|
typedef struct PickInfo {
|
2009-04-07 06:23:56 +02:00
|
|
|
const XP_UCHAR** curTiles;
|
2003-11-30 19:54:08 +01:00
|
|
|
XP_U16 nCurTiles;
|
2004-11-02 07:27:47 +01:00
|
|
|
XP_U16 nTotal; /* count to fetch for turn, <= MAX_TRAY_TILES */
|
2003-11-16 18:11:33 +01:00
|
|
|
XP_U16 thisPick; /* <= nTotal */
|
|
|
|
} PickInfo;
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
typedef struct BadWordInfo {
|
|
|
|
XP_U16 nWords;
|
2012-09-06 16:49:05 +02:00
|
|
|
XP_UCHAR* dictName;
|
2010-02-24 05:34:22 +01:00
|
|
|
const XP_UCHAR* words[MAX_TRAY_TILES+1]; /* can form in both directions */
|
2003-11-01 06:35:29 +01:00
|
|
|
} BadWordInfo;
|
|
|
|
|
2008-04-12 17:36:31 +02:00
|
|
|
/* XWTimerProc returns true if redraw was necessitated by what the proc did */
|
|
|
|
typedef XP_Bool (*XWTimerProc)( void* closure, XWTimerReason why );
|
2005-06-23 06:16:53 +02:00
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
/* Platform-specific utility functions that need to be
|
|
|
|
*/
|
|
|
|
typedef struct UtilVtable {
|
|
|
|
|
|
|
|
VTableMgr* (*m_util_getVTManager)(XW_UtilCtxt* uc);
|
|
|
|
|
2005-01-04 05:07:38 +01:00
|
|
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
2003-11-01 06:35:29 +01:00
|
|
|
XWStreamCtxt* (*m_util_makeStreamFromAddr )(XW_UtilCtxt* uc,
|
2007-12-05 07:28:51 +01:00
|
|
|
XP_PlayerAddr channelNo );
|
2005-01-04 05:07:38 +01:00
|
|
|
#endif
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2011-11-17 04:01:11 +01:00
|
|
|
XWBonusType (*m_util_getSquareBonus)( XW_UtilCtxt* uc, XP_U16 boardSize,
|
2003-11-01 06:35:29 +01:00
|
|
|
XP_U16 col, XP_U16 row );
|
|
|
|
void (*m_util_userError)( XW_UtilCtxt* uc, UtilErrID id );
|
|
|
|
|
2004-02-17 05:00:12 +01:00
|
|
|
XP_Bool (*m_util_userQuery)( XW_UtilCtxt* uc, UtilQueryID id,
|
|
|
|
XWStreamCtxt* stream );
|
2011-10-20 03:34:26 +02:00
|
|
|
XP_Bool (*m_util_confirmTrade)( XW_UtilCtxt* uc, const XP_UCHAR** tiles,
|
|
|
|
XP_U16 nTiles );
|
2003-11-16 18:11:33 +01:00
|
|
|
/* return of < 0 means computer should pick */
|
2011-10-29 07:15:56 +02:00
|
|
|
XP_S16 (*m_util_userPickTileBlank)( XW_UtilCtxt* uc, XP_U16 playerNum,
|
|
|
|
const XP_UCHAR** tileFaces,
|
|
|
|
XP_U16 nTiles );
|
|
|
|
XP_S16 (*m_util_userPickTileTray)( XW_UtilCtxt* uc, const PickInfo* pi,
|
|
|
|
XP_U16 playerNum,
|
|
|
|
const XP_UCHAR** texts, XP_U16 nTiles );
|
2003-11-16 18:11:33 +01:00
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
XP_Bool (*m_util_askPassword)( XW_UtilCtxt* uc, const XP_UCHAR* name,
|
|
|
|
XP_UCHAR* buf, XP_U16* len );
|
|
|
|
|
|
|
|
void (*m_util_trayHiddenChange)(XW_UtilCtxt* uc,
|
2006-05-19 15:44:05 +02:00
|
|
|
XW_TrayVisState newState,
|
|
|
|
XP_U16 nVisibleRows );
|
2010-04-08 06:14:14 +02:00
|
|
|
void (*m_util_yOffsetChange)(XW_UtilCtxt* uc, XP_U16 maxOffset,
|
|
|
|
XP_U16 oldOffset, XP_U16 newOffset );
|
2008-02-27 06:43:27 +01:00
|
|
|
#ifdef XWFEATURE_TURNCHANGENOTIFY
|
2012-09-27 16:04:57 +02:00
|
|
|
void (*m_util_turnChanged)(XW_UtilCtxt* uc, XP_S16 newTurn);
|
2008-02-27 06:43:27 +01:00
|
|
|
#endif
|
2011-10-03 01:21:09 +02:00
|
|
|
void (*m_util_informMove)( XW_UtilCtxt* uc, XWStreamCtxt* expl,
|
2011-10-05 03:54:53 +02:00
|
|
|
XWStreamCtxt* words );
|
2012-05-14 16:01:02 +02:00
|
|
|
void (*m_util_informUndo)( XW_UtilCtxt* uc );
|
2012-10-24 16:17:21 +02:00
|
|
|
void (*m_util_informNetDict)( XW_UtilCtxt* uc, XP_LangCode lang,
|
|
|
|
const XP_UCHAR* oldName,
|
2012-09-04 06:33:46 +02:00
|
|
|
const XP_UCHAR* newName,
|
2012-09-09 05:23:48 +02:00
|
|
|
const XP_UCHAR* newSum,
|
2012-09-04 06:33:46 +02:00
|
|
|
XWPhoniesChoice phoniesAction );
|
|
|
|
|
2012-10-09 14:31:12 +02:00
|
|
|
void (*m_util_notifyGameOver)( XW_UtilCtxt* uc, XP_S16 quitter );
|
2012-10-06 03:51:32 +02:00
|
|
|
#ifdef XWFEATURE_HILITECELL
|
2003-11-01 06:35:29 +01:00
|
|
|
XP_Bool (*m_util_hiliteCell)( XW_UtilCtxt* uc, XP_U16 col, XP_U16 row );
|
2012-10-06 03:51:32 +02:00
|
|
|
#endif
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
XP_Bool (*m_util_engineProgressCallback)( XW_UtilCtxt* uc );
|
|
|
|
|
2005-06-23 06:16:53 +02:00
|
|
|
void (*m_util_setTimer)( XW_UtilCtxt* uc, XWTimerReason why, XP_U16 when,
|
2007-05-26 16:14:01 +02:00
|
|
|
XWTimerProc proc, void* closure );
|
2009-09-21 14:49:08 +02:00
|
|
|
void (*m_util_clearTimer)( XW_UtilCtxt* uc, XWTimerReason why );
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
void (*m_util_requestTime)( XW_UtilCtxt* uc );
|
|
|
|
|
2008-04-08 05:55:53 +02:00
|
|
|
XP_Bool (*m_util_altKeyDown)( XW_UtilCtxt* uc );
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
XP_U32 (*m_util_getCurSeconds)( XW_UtilCtxt* uc );
|
2012-10-30 15:01:47 +01:00
|
|
|
#ifdef XWFEATURE_DEVID
|
|
|
|
const XP_UCHAR* (*m_util_getDevID)( XW_UtilCtxt* uc, DevIDType* typ );
|
|
|
|
#endif
|
2003-11-01 06:35:29 +01:00
|
|
|
DictionaryCtxt* (*m_util_makeEmptyDict)( XW_UtilCtxt* uc );
|
|
|
|
|
2007-02-03 18:54:20 +01:00
|
|
|
const XP_UCHAR* (*m_util_getUserString)( XW_UtilCtxt* uc,
|
|
|
|
XP_U16 stringCode );
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
XP_Bool (*m_util_warnIllegalWord)( XW_UtilCtxt* uc, BadWordInfo* bwi,
|
|
|
|
XP_U16 turn, XP_Bool turnLost );
|
2008-10-24 10:56:20 +02:00
|
|
|
|
|
|
|
void (*m_util_remSelected)(XW_UtilCtxt* uc);
|
|
|
|
|
2011-08-30 05:36:01 +02:00
|
|
|
#ifndef XWFEATURE_MINIWIN
|
|
|
|
void (*m_util_bonusSquareHeld)( XW_UtilCtxt* uc, XWBonusType bonus );
|
2011-09-03 03:36:03 +02:00
|
|
|
void (*m_util_playerScoreHeld)( XW_UtilCtxt* uc, XP_U16 player );
|
2011-08-30 05:36:01 +02:00
|
|
|
#endif
|
2011-10-14 04:14:08 +02:00
|
|
|
#ifdef XWFEATURE_BOARDWORDS
|
|
|
|
void (*m_util_cellSquareHeld)( XW_UtilCtxt* uc, XWStreamCtxt* words );
|
|
|
|
#endif
|
2011-08-30 05:36:01 +02:00
|
|
|
|
2012-03-19 15:36:18 +01:00
|
|
|
#ifdef XWFEATURE_SMS
|
|
|
|
XP_Bool (*m_util_phoneNumbersSame)( XW_UtilCtxt* uc, const XP_UCHAR* p1,
|
|
|
|
const XP_UCHAR* p2 );
|
|
|
|
#endif
|
|
|
|
|
2009-01-04 00:54:25 +01:00
|
|
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
2012-02-09 14:19:03 +01:00
|
|
|
void (*m_util_informMissing)(XW_UtilCtxt* uc, XP_Bool isServer,
|
|
|
|
CommsConnType connType, XP_U16 nMissing );
|
2005-04-03 18:57:01 +02:00
|
|
|
void (*m_util_addrChange)( XW_UtilCtxt* uc, const CommsAddrRec* oldAddr,
|
2006-09-08 09:14:24 +02:00
|
|
|
const CommsAddrRec* newAddr );
|
2010-09-10 10:30:40 +02:00
|
|
|
void (*m_util_setIsServer)(XW_UtilCtxt* uc, XP_Bool isServer );
|
2003-11-01 06:35:29 +01:00
|
|
|
#endif
|
|
|
|
|
2004-06-25 08:39:24 +02:00
|
|
|
#ifdef XWFEATURE_SEARCHLIMIT
|
|
|
|
XP_Bool (*m_util_getTraySearchLimits)(XW_UtilCtxt* uc,
|
|
|
|
XP_U16* min, XP_U16* max );
|
|
|
|
#endif
|
|
|
|
|
2010-10-04 03:11:51 +02:00
|
|
|
#ifdef XWFEATURE_CHAT
|
|
|
|
void (*m_util_showChat)( XW_UtilCtxt* uc, const XP_UCHAR* const msg );
|
|
|
|
#endif
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
#ifdef SHOW_PROGRESS
|
2004-10-07 15:51:03 +02:00
|
|
|
void (*m_util_engineStarting)( XW_UtilCtxt* uc, XP_U16 nBlanks );
|
2003-11-01 06:35:29 +01:00
|
|
|
void (*m_util_engineStopping)( XW_UtilCtxt* uc );
|
|
|
|
#endif
|
2006-11-07 06:46:44 +01:00
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
} UtilVtable;
|
|
|
|
|
|
|
|
|
|
|
|
struct XW_UtilCtxt {
|
|
|
|
UtilVtable* vtable;
|
|
|
|
|
|
|
|
struct CurGameInfo* gameInfo;
|
|
|
|
|
|
|
|
void* closure;
|
|
|
|
MPSLOT
|
|
|
|
};
|
|
|
|
|
|
|
|
#define util_getVTManager(uc) \
|
|
|
|
(uc)->vtable->m_util_getVTManager((uc))
|
|
|
|
|
|
|
|
#define util_makeStreamFromAddr(uc,a) \
|
|
|
|
(uc)->vtable->m_util_makeStreamFromAddr((uc),(a))
|
|
|
|
|
2011-11-17 04:01:11 +01:00
|
|
|
#define util_getSquareBonus(uc,b,c,r) \
|
|
|
|
(uc)->vtable->m_util_getSquareBonus((uc),(b),(c),(r))
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
#define util_userError(uc,err) \
|
|
|
|
(uc)->vtable->m_util_userError((uc),(err))
|
|
|
|
|
|
|
|
#define util_userQuery(uc,qcode,str) \
|
|
|
|
(uc)->vtable->m_util_userQuery((uc),(qcode),(str))
|
|
|
|
|
2011-10-20 03:34:26 +02:00
|
|
|
#define util_confirmTrade( uc, tx, nt ) \
|
|
|
|
(uc)->vtable->m_util_confirmTrade((uc),(tx),(nt))
|
|
|
|
|
2011-10-29 07:15:56 +02:00
|
|
|
#define util_userPickTileBlank( uc, n, tx, nt ) \
|
|
|
|
(uc)->vtable->m_util_userPickTileBlank( (uc), (n), (tx), (nt) )
|
|
|
|
#define util_userPickTileTray( uc, w, n, tx, nt ) \
|
|
|
|
(uc)->vtable->m_util_userPickTileTray( (uc), (w), (n), (tx), (nt) )
|
2003-11-01 06:35:29 +01:00
|
|
|
#define util_askPassword( uc, n, b, lp ) \
|
|
|
|
(uc)->vtable->m_util_askPassword( (uc), (n), (b), (lp) )
|
|
|
|
|
2006-05-19 15:44:05 +02:00
|
|
|
#define util_trayHiddenChange( uc, b, n ) \
|
|
|
|
(uc)->vtable->m_util_trayHiddenChange((uc), (b), (n))
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2010-04-08 06:14:14 +02:00
|
|
|
#define util_yOffsetChange( uc, m, o, n ) \
|
|
|
|
(uc)->vtable->m_util_yOffsetChange((uc), (m), (o), (n) )
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2008-02-27 06:43:27 +01:00
|
|
|
#ifdef XWFEATURE_TURNCHANGENOTIFY
|
2012-09-27 16:04:57 +02:00
|
|
|
# define util_turnChanged( uc, t ) \
|
|
|
|
(uc)->vtable->m_util_turnChanged( (uc), (t) )
|
2008-02-27 06:43:27 +01:00
|
|
|
#else
|
2012-09-27 16:04:57 +02:00
|
|
|
# define util_turnChanged( uc, t )
|
2008-02-27 06:43:27 +01:00
|
|
|
#endif
|
2008-02-26 14:46:33 +01:00
|
|
|
|
2011-10-05 03:54:53 +02:00
|
|
|
#define util_informMove(uc,e,w) \
|
|
|
|
(uc)->vtable->m_util_informMove( (uc),(e),(w))
|
2012-05-14 16:01:02 +02:00
|
|
|
#define util_informUndo(uc) \
|
|
|
|
(uc)->vtable->m_util_informUndo( (uc))
|
2012-10-24 16:17:21 +02:00
|
|
|
#define util_informNetDict(uc, cd, on, nn, ns, pa ) \
|
|
|
|
(uc)->vtable->m_util_informNetDict( (uc), (cd), (on), (nn), (ns), \
|
|
|
|
(pa) )
|
2012-10-09 14:31:12 +02:00
|
|
|
#define util_notifyGameOver( uc, q ) \
|
|
|
|
(uc)->vtable->m_util_notifyGameOver((uc), (q))
|
2003-11-01 06:35:29 +01:00
|
|
|
|
2012-10-06 03:51:32 +02:00
|
|
|
#ifdef XWFEATURE_HILITECELL
|
|
|
|
# define util_hiliteCell( uc, c, r ) \
|
2003-11-01 06:35:29 +01:00
|
|
|
(uc)->vtable->m_util_hiliteCell((uc), (c), (r))
|
2012-10-06 03:51:32 +02:00
|
|
|
#endif
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
#define util_engineProgressCallback( uc ) \
|
|
|
|
(uc)->vtable->m_util_engineProgressCallback((uc))
|
|
|
|
|
2005-06-23 06:16:53 +02:00
|
|
|
#define util_setTimer( uc, why, when, proc, clos ) \
|
|
|
|
(uc)->vtable->m_util_setTimer((uc),(why),(when),(proc),(clos))
|
2009-09-21 14:49:08 +02:00
|
|
|
#define util_clearTimer( uc, why ) \
|
|
|
|
(uc)->vtable->m_util_clearTimer((uc),(why))
|
2003-11-01 06:35:29 +01:00
|
|
|
|
|
|
|
#define util_requestTime( uc ) \
|
|
|
|
(uc)->vtable->m_util_requestTime((uc))
|
|
|
|
|
2008-04-08 05:55:53 +02:00
|
|
|
#define util_altKeyDown( uc ) \
|
|
|
|
(uc)->vtable->m_util_altKeyDown((uc))
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
#define util_getCurSeconds(uc) \
|
|
|
|
(uc)->vtable->m_util_getCurSeconds((uc))
|
|
|
|
|
2012-10-30 15:01:47 +01:00
|
|
|
#ifdef XWFEATURE_DEVID
|
|
|
|
# define util_getDevID( uc, t ) \
|
|
|
|
(uc)->vtable->m_util_getDevID((uc),(t))
|
|
|
|
#endif
|
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
#define util_makeEmptyDict( uc ) \
|
|
|
|
(uc)->vtable->m_util_makeEmptyDict((uc))
|
|
|
|
|
|
|
|
#define util_getUserString( uc, c ) \
|
|
|
|
(uc)->vtable->m_util_getUserString((uc),(c))
|
|
|
|
|
|
|
|
#define util_warnIllegalWord( uc, w, p, b ) \
|
|
|
|
(uc)->vtable->m_util_warnIllegalWord((uc),(w),(p),(b))
|
|
|
|
|
2008-10-24 10:56:20 +02:00
|
|
|
#define util_remSelected( uc ) \
|
|
|
|
(uc)->vtable->m_util_remSelected((uc))
|
|
|
|
|
2011-08-30 05:36:01 +02:00
|
|
|
#ifndef XWFEATURE_MINIWIN
|
|
|
|
# define util_bonusSquareHeld( uc, b ) \
|
|
|
|
(uc)->vtable->m_util_bonusSquareHeld( (uc), (b) )
|
2011-09-03 03:36:03 +02:00
|
|
|
# define util_playerScoreHeld( uc, player ) \
|
|
|
|
(uc)->vtable->m_util_playerScoreHeld( (uc), (player) )
|
2011-08-30 05:36:01 +02:00
|
|
|
#endif
|
2011-10-14 04:14:08 +02:00
|
|
|
#ifdef XWFEATURE_BOARDWORDS
|
|
|
|
#define util_cellSquareHeld(uc, s) \
|
|
|
|
(uc)->vtable->m_util_cellSquareHeld( (uc), (s) )
|
|
|
|
#endif
|
2012-03-19 15:36:18 +01:00
|
|
|
#ifdef XWFEATURE_SMS
|
|
|
|
#define util_phoneNumbersSame(uc,p1,p2) \
|
|
|
|
(uc)->vtable->m_util_phoneNumbersSame( (uc), (p1), (p2) )
|
|
|
|
#endif
|
|
|
|
|
2009-01-04 00:54:25 +01:00
|
|
|
#ifndef XWFEATURE_STANDALONE_ONLY
|
2012-02-09 14:19:03 +01:00
|
|
|
# define util_informMissing( uc, is, ct, nm ) \
|
|
|
|
(uc)->vtable->m_util_informMissing((uc), (is), (ct), (nm) )
|
2009-01-04 00:54:25 +01:00
|
|
|
# define util_addrChange( uc, addro, addrn ) \
|
2006-09-08 09:14:24 +02:00
|
|
|
(uc)->vtable->m_util_addrChange((uc), (addro), (addrn))
|
2010-09-10 10:30:40 +02:00
|
|
|
# define util_setIsServer( uc, is ) \
|
|
|
|
(uc)->vtable->m_util_setIsServer((uc), (is))
|
2009-01-05 03:07:30 +01:00
|
|
|
# else
|
|
|
|
# define util_addrChange( uc, addro, addrn )
|
2003-11-01 06:35:29 +01:00
|
|
|
#endif
|
|
|
|
|
2004-06-25 08:39:24 +02:00
|
|
|
#ifdef XWFEATURE_SEARCHLIMIT
|
|
|
|
#define util_getTraySearchLimits(uc,min,max) \
|
|
|
|
(uc)->vtable->m_util_getTraySearchLimits((uc), (min), (max))
|
|
|
|
#endif
|
|
|
|
|
2010-10-04 03:11:51 +02:00
|
|
|
#ifdef XWFEATURE_CHAT
|
|
|
|
# define util_showChat( uc, m ) (uc)->vtable->m_util_showChat((uc),(m))
|
|
|
|
#endif
|
2004-06-25 08:39:24 +02:00
|
|
|
|
2003-11-01 06:35:29 +01:00
|
|
|
# ifdef SHOW_PROGRESS
|
2004-10-07 15:51:03 +02:00
|
|
|
# define util_engineStarting( uc, nb ) \
|
|
|
|
(uc)->vtable->m_util_engineStarting((uc),(nb))
|
2003-11-01 06:35:29 +01:00
|
|
|
# define util_engineStopping( uc ) \
|
|
|
|
(uc)->vtable->m_util_engineStopping((uc))
|
|
|
|
# else
|
2004-10-30 18:59:07 +02:00
|
|
|
# define util_engineStarting( uc, nb )
|
2003-11-01 06:35:29 +01:00
|
|
|
# define util_engineStopping( uc )
|
|
|
|
# endif
|
|
|
|
|
|
|
|
#endif
|