1 /* 2 * menus.h -- platform-indendent menu handling code for XBoard 3 * 4 * Copyright 1991 by Digital Equipment Corporation, Maynard, 5 * Massachusetts. 6 * 7 * Enhancements Copyright 1992-2001, 2002, 2003, 2004, 2005, 2006, 8 * 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2016 Free 9 * Software Foundation, Inc. 10 * 11 * The following terms apply to Digital Equipment Corporation's copyright 12 * interest in XBoard: 13 * ------------------------------------------------------------------------ 14 * All Rights Reserved 15 * 16 * Permission to use, copy, modify, and distribute this software and its 17 * documentation for any purpose and without fee is hereby granted, 18 * provided that the above copyright notice appear in all copies and that 19 * both that copyright notice and this permission notice appear in 20 * supporting documentation, and that the name of Digital not be 21 * used in advertising or publicity pertaining to distribution of the 22 * software without specific, written prior permission. 23 * 24 * DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING 25 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL 26 * DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR 27 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, 28 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, 29 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS 30 * SOFTWARE. 31 * ------------------------------------------------------------------------ 32 * 33 * The following terms apply to the enhanced version of XBoard 34 * distributed by the Free Software Foundation: 35 * ------------------------------------------------------------------------ 36 * 37 * GNU XBoard is free software: you can redistribute it and/or modify 38 * it under the terms of the GNU General Public License as published by 39 * the Free Software Foundation, either version 3 of the License, or (at 40 * your option) any later version. 41 * 42 * GNU XBoard is distributed in the hope that it will be useful, but 43 * WITHOUT ANY WARRANTY; without even the implied warranty of 44 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 45 * General Public License for more details. 46 * 47 * You should have received a copy of the GNU General Public License 48 * along with this program. If not, see http://www.gnu.org/licenses/. * 49 * 50 *------------------------------------------------------------------------ 51 ** See the file ChangeLog for a revision history. */ 52 53 54 55 typedef void MenuProc P((void)); 56 57 typedef struct { 58 char *string; 59 char *accel; 60 char *ref; 61 MenuProc *proc; 62 void *handle; 63 } MenuItem; 64 65 typedef struct { 66 char *name; 67 char *ref; 68 MenuItem *mi; 69 } Menu; 70 71 typedef struct { 72 char *name; 73 Boolean value; 74 } Enables; 75 76 extern Menu menuBar[]; 77 78 void ErrorPopUp P((char *title, char *text, int modal)); 79 void AppendEnginesToMenu P((char *list)); 80 void LoadGameProc P((void)); 81 void LoadNextGameProc P((void)); 82 void LoadPrevGameProc P((void)); 83 void ReloadGameProc P((void)); 84 void LoadPositionProc P((void)); 85 void LoadNextPositionProc P((void)); 86 void LoadPrevPositionProc P((void)); 87 void ReloadPositionProc P((void)); 88 void CopyPositionProc P((void)); 89 void PastePositionProc P((void)); 90 void CopyGameProc P((void)); 91 void CopyGameListProc P((void)); 92 void PasteGameProc P((void)); 93 void SaveGameProc P((void)); 94 void SavePositionProc P((void)); 95 void ReloadCmailMsgProc P((void)); 96 void QuitProc P((void)); 97 void AnalyzeModeProc P((void)); 98 void AnalyzeFileProc P((void)); 99 void MatchProc P((void)); 100 void MatchOptionsProc P((void)); 101 void EditTagsProc P((void)); 102 void EditCommentProc P((void)); 103 void IcsInputBoxProc P((void)); 104 void ChatProc P((void)); 105 void AdjuWhiteProc P((void)); 106 void AdjuBlackProc P((void)); 107 void AdjuDrawProc P((void)); 108 void RevertProc P((void)); 109 void AnnotateProc P((void)); 110 void AlwaysQueenProc P((void)); 111 void AnimateDraggingProc P((void)); 112 void AnimateMovingProc P((void)); 113 void AutoflagProc P((void)); 114 void AutoflipProc P((void)); 115 void BlindfoldProc P((void)); 116 void FlashMovesProc P((void)); 117 void FlipViewProc P((void)); 118 void HighlightDraggingProc P((void)); 119 void HighlightLastMoveProc P((void)); 120 void HighlightArrowProc P((void)); 121 void MoveSoundProc P((void)); 122 //void IcsAlarmProc P((void)); 123 void OneClickProc P((void)); 124 void PeriodicUpdatesProc P((void)); 125 void PonderNextMoveProc P((void)); 126 void PopupMoveErrorsProc P((void)); 127 void PopupExitMessageProc P((void)); 128 //void PremoveProc P((void)); 129 void ShowCoordsProc P((void)); 130 void ShowThinkingProc P((void)); 131 void HideThinkingProc P((void)); 132 void TestLegalityProc P((void)); 133 void SaveSettingsProc P((void)); 134 void SaveOnExitProc P((void)); 135 void InfoProc P((void)); 136 void ManProc P((void)); 137 void GuideProc P((void)); 138 void HomePageProc P((void)); 139 void NewsPageProc P((void)); 140 void BugReportProc P((void)); 141 void AboutGameProc P((void)); 142 void AboutProc P((void)); 143 void DebugProc P((void)); 144 void NothingProc P((void)); 145 void ShuffleMenuProc P((void)); 146 void EngineMenuProc P((void)); 147 void UciMenuProc P((void)); 148 void TimeControlProc P((void)); 149 void OptionsProc P((void)); 150 void NewVariantProc P((void)); 151 void IcsTextProc P((void)); 152 void LoadEngine1Proc P((void)); 153 void LoadEngine2Proc P((void)); 154 void FirstSettingsProc P((void)); 155 void SecondSettingsProc P((void)); 156 void GameListOptionsProc P((void)); 157 void IcsOptionsProc P((void)); 158 void SoundOptionsProc P((void)); 159 void BoardOptionsProc P((void)); 160 void LoadOptionsProc P((void)); 161 void SaveOptionsProc P((void)); 162 void SaveSettings P((char *)); 163 void EditBookProc P((void)); 164 void InitMenuMarkers P((void)); 165 void FontsProc P((void)); 166 void ShowGameListProc P((void)); // in ngamelist.c 167 void HistoryShowProc P((void)); // in nhistory.c 168 169 // only here because it is the only header shared by xoptions.c and usystem.c 170 void SetTextColor P((char **cnames, int fg, int bg, int attr)); 171 void ConsoleWrite P((char *message, int count)); 172 173 // must be moved to xengineoutput.h 174 175 void EngineOutputProc P((void)); 176 void EvalGraphProc P((void)); 177 178 int SaveGameListAsText P((FILE *f)); 179 void FileNamePopUp P((char *label, char *def, char *filter, 180 FileProc proc, char *openMode)); 181 182 void AppendMenuItem P((char *text, int n)); 183 MenuItem *MenuNameToItem P((char *menuName)); 184 void SetMenuEnables P((Enables *enab)); 185 void EnableButtonBar P((int state)); 186 char *ModeToWidgetName P((GameMode mode)); 187 void CreateAnimVars P((void)); 188 void CopySomething P((char *s)); 189 void EditAnyPopUp P((char *tags, char **dest, char *title)); 190 191 192 193 extern char *gameCopyFilename, *gamePasteFilename; 194 extern Boolean saveSettingsOnExit; 195 extern char *settingsFileName; 196 extern int firstEngineItem; 197 198 199 200 #define CHECK (void *) 1 201 #define RADIO (void *) 2 202 203 #define OPTIONSDIALOG 204 #define INFOFILE "xboard.info" 205