UNIXworkcode

1 /******************************************************************************* 2 * * 3 * macro.h -- Nirvana Editor Macro Header File * 4 * * 5 * Copyright 2004 The NEdit Developers * 6 * * 7 * This is free software; you can redistribute it and/or modify it under the * 8 * terms of the GNU General Public License as published by the Free Software * 9 * Foundation; either version 2 of the License, or (at your option) any later * 10 * version. In addition, you may distribute versions of this program linked to * 11 * Motif or Open Motif. See README for details. * 12 * * 13 * This software is distributed in the hope that it will be useful, but WITHOUT * 14 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * 15 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * 16 * more details. * 17 * * 18 * You should have received a copy of the GNU General Public License along with * 19 * software; if not, write to the Free Software Foundation, Inc., 59 Temple * 20 * Place, Suite 330, Boston, MA 02111-1307 USA * 21 * * 22 * Nirvana Text Editor * 23 * July 31, 2001 * 24 * * 25 *******************************************************************************/ 26 27 #ifndef NEDIT_MACRO_H_INCLUDED 28 #define NEDIT_MACRO_H_INCLUDED 29 30 #include "nedit.h" 31 32 #include <X11/Intrinsic.h> 33 34 #define REPEAT_TO_END -1 35 #define REPEAT_IN_SEL -2 36 37 void RegisterMacroSubroutines(void); 38 void AddLastCommandActionHook(XtAppContext context); 39 void BeginLearn(WindowInfo *window); 40 void FinishLearn(void); 41 void CancelMacroOrLearn(WindowInfo *window); 42 void Replay(WindowInfo *window); 43 void SafeGC(void); 44 void DoMacro(WindowInfo *window, const char *macro, const char *errInName); 45 void ResumeMacroExecution(WindowInfo *window); 46 void AbortMacroCommand(WindowInfo *window); 47 int MacroWindowCloseActions(WindowInfo *window); 48 void RepeatDialog(WindowInfo *window); 49 void RepeatMacro(WindowInfo *window, const char *command, int how); 50 int ReadMacroFile(WindowInfo *window, const char *fileName, int warnNotExist); 51 int ReadMacroString(WindowInfo *window, char *string, const char *errIn); 52 int CheckMacroString(Widget dialogParent, char *string, const char *errIn, 53 char **errPos); 54 char *GetReplayMacro(void); 55 void ReadMacroInitFile(WindowInfo *window); 56 void ReturnShellCommandOutput(WindowInfo *window, const char *outText, int status); 57 58 #endif /* NEDIT_MACRO_H_INCLUDED */ 59