Test (int n)
{
GenericReadout(soundOptions, 2);
- if(soundFiles[values[3]]) PlaySound(soundFiles[values[3]]);
+ if(soundFiles[values[3]]) PlaySoundFile(soundFiles[values[3]]);
}
void
void ResizeWindowControls( int mode );
int EngineOutputDialogExists();
void SetEngineOutputTitle( char *title );
-void InitializeEngineOutput P((Option *opt, Option *memo2));
-void DrawIcon P((Option *opt, int nIcon));
-
-// front-end shared with xboard.c
-void SelectPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
-void StopPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
+void InitEngineOutput P((Option *opt, Option *memo2)); // XB only
+void DrawWidgetIcon P((Option *opt, int nIcon)); // XB only
void PlayIcsUnfinishedSound P((void));
void PlayAlarmSound P((void));
void PlayTellSound P((void));
-void PlaySound P((char *name));
+void PlaySoundFile P((char *name));
void PlaySoundByColor P((void));
void EchoOn P((void));
void EchoOff P((void));
void GreyRevert P((Boolean grey));
void MarkMenuItem P((char *menuRef, int state));
-void EnableMenuItem P((char *menuRef, int state));
+void EnableNamedMenuItem P((char *menuRef, int state));
typedef struct FrontEndProgramStats_TAG {
int which;
#if ZIPPY
if (appData.zippyPlay && !appData.noChessProgram) { /* [DM] icsEngineAnalyze */
- EnableMenuItem("Analysis Mode", True);
- EnableMenuItem("Engine #1 Settings", True);
+ EnableNamedMenuItem("Mode.AnalysisMode", True);
+ EnableNamedMenuItem("Engine.Engine#1Settings", True);
}
#endif
}
case MachinePlaysBlack:
case MachinePlaysWhite:
case TwoMachinesPlay:
- EnableMenuItem(ModeToWidgetName(gameMode), True);
+ EnableNamedMenuItem(ModeToWidgetName(gameMode), True);
break;
default:
break;
void
SetIcon (int which, int field, int nIcon)
{ // first call into xengineoutput.c to pick up icon pixmap
- if( nIcon ) DrawIcon(&engoutOptions[STRIDE*which + field - 1], nIcon);
+ if( nIcon ) DrawWidgetIcon(&engoutOptions[STRIDE*which + field - 1], nIcon);
}
void
AddHandler(&engoutOptions[MEMO], 6);
AddHandler(&engoutOptions[MEMO+STRIDE], 6);
if( needInit ) {
- InitializeEngineOutput(&engoutOptions[0], &engoutOptions[MEMO]); // make icon bitmaps
+ InitEngineOutput(&engoutOptions[0], &engoutOptions[MEMO]); // make icon bitmaps
needInit = FALSE;
}
SetEngineColorIcon( 0 );
void
-PlaySound (char *name)
+PlaySoundFile (char *name)
{
if (*name == NULLCHAR) {
return;
void
RingBell ()
{
- PlaySound(appData.soundMove);
+ PlaySoundFile(appData.soundMove);
}
void
PlayIcsWinSound ()
{
- PlaySound(appData.soundIcsWin);
+ PlaySoundFile(appData.soundIcsWin);
}
void
PlayIcsLossSound ()
{
- PlaySound(appData.soundIcsLoss);
+ PlaySoundFile(appData.soundIcsLoss);
}
void
PlayIcsDrawSound ()
{
- PlaySound(appData.soundIcsDraw);
+ PlaySoundFile(appData.soundIcsDraw);
}
void
PlayIcsUnfinishedSound ()
{
- PlaySound(appData.soundIcsUnfinished);
+ PlaySoundFile(appData.soundIcsUnfinished);
}
void
PlayAlarmSound ()
{
- PlaySound(appData.soundIcsAlarm);
+ PlaySoundFile(appData.soundIcsAlarm);
}
void
PlayTellSound ()
{
- PlaySound(appData.soundTell);
+ PlaySoundFile(appData.soundTell);
}
void
{
switch (cc) {
case ColorShout:
- PlaySound(appData.soundShout);
+ PlaySoundFile(appData.soundShout);
break;
case ColorSShout:
- PlaySound(appData.soundSShout);
+ PlaySoundFile(appData.soundSShout);
break;
case ColorChannel1:
- PlaySound(appData.soundChannel1);
+ PlaySoundFile(appData.soundChannel1);
break;
case ColorChannel:
- PlaySound(appData.soundChannel);
+ PlaySoundFile(appData.soundChannel);
break;
case ColorKibitz:
- PlaySound(appData.soundKibitz);
+ PlaySoundFile(appData.soundKibitz);
break;
case ColorTell:
- PlaySound(appData.soundTell);
+ PlaySoundFile(appData.soundTell);
break;
case ColorChallenge:
- PlaySound(appData.soundChallenge);
+ PlaySoundFile(appData.soundChallenge);
break;
case ColorRequest:
- PlaySound(appData.soundRequest);
+ PlaySoundFile(appData.soundRequest);
break;
case ColorSeek:
- PlaySound(appData.soundSeek);
+ PlaySoundFile(appData.soundSeek);
break;
case ColorNormal:
case ColorNone:
extern HANDLE chatHandle[];\r
extern int ics_type;\r
\r
+int MySearchPath P((char *installDir, char *name, char *fullname));\r
+int MyGetFullPathName P((char *name, char *fullname));\r
void DisplayHoldingsCount(HDC hdc, int x, int y, int align, int copyNumber);\r
VOID NewVariantPopup(HWND hwnd);\r
int FinishMove P((ChessMove moveType, int fromX, int fromY, int toX, int toY,\r
}
void
-EnableMenuItem (char *menuRef, int state)
+EnableNamedMenuItem (char *menuRef, int state)
{
MenuItem *item = MenuNameToItem(menuRef);
SetMenuEnables (Enables *enab)
{
while (enab->name != NULL) {
- EnableMenuItem(enab->name, enab->value);
+ EnableNamedMenuItem(enab->name, enab->value);
enab++;
}
}
MarkMenuItem("Mode.MachineMatch", matchMode && matchGame < appData.matchGames);
/* Maybe all the enables should be handled here, not just this one */
- EnableMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);
+ EnableNamedMenuItem("Mode.Training", gameMode == Training || gameMode == PlayFromGameFile);
}
void GenericMenu P((Widget w, XEvent *event, String *prms, Cardinal *nprms));
// from xengineoutput.c
+void SelectPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
+void StopPV P((Widget w, XEvent * event, String * params, Cardinal * nParams));
+
extern char memoTranslations[];
}
void
-InitializeEngineOutput (Option *opt, Option *memo2)
+InitEngineOutput (Option *opt, Option *memo2)
{ // front-end, because it must have access to the pixmaps
Widget w = opt->handle;
memoWidget = memo2->handle;
}
void
-DrawIcon (Option *opt, int nIcon)
+DrawWidgetIcon (Option *opt, int nIcon)
{ // as we are already in X front-end, so do X-stuff here
Arg arg;
XtSetArg(arg, XtNleftBitmap, (XtArgVal) icons[nIcon]);