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