shellundo.h

Go to the documentation of this file.
00001 
00002 /*  $Id: shellundo.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /******************************************************************************
00005 
00006     UserLand Frontier(tm) -- High performance Web content management,
00007     object database, system-level and Internet scripting environment,
00008     including source code editing and debugging.
00009 
00010     Copyright (C) 1992-2004 UserLand Software, Inc.
00011 
00012     This program is free software; you can redistribute it and/or modify
00013     it under the terms of the GNU General Public License as published by
00014     the Free Software Foundation; either version 2 of the License, or
00015     (at your option) any later version.
00016 
00017     This program is distributed in the hope that it will be useful,
00018     but WITHOUT ANY WARRANTY; without even the implied warranty of
00019     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00020     GNU General Public License for more details.
00021 
00022     You should have received a copy of the GNU General Public License
00023     along with this program; if not, write to the Free Software
00024     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00025 
00026 ******************************************************************************/
00027 
00028 #define shellundoinclude /*so other includes can tell if we've been loaded*/
00029 
00030 
00031 
00032 
00033 typedef struct tystack {
00034 
00035     short topstack;
00036 
00037     short basesize;
00038 
00039     short elemsize;
00040     
00041     #if THINK_C
00042         
00043         byte stack [];
00044     
00045     #else
00046             
00047         byte stack [1];
00048     
00049     #endif  
00050     } tystack, *ptrstack, **hdlstack;
00051 
00052 
00053 typedef boolean (*undocallback) (Handle, boolean);
00054 
00055 
00056 typedef struct tyundorecord {
00057     
00058     undocallback undoroutine;
00059     
00060     Handle hundodata;
00061     
00062     boolean flactionstep; /*is this step an action record?*/
00063     } tyundorecord;
00064 
00065 
00066 typedef struct tyactionrecord {
00067     
00068     long ixaction;
00069     
00070     long globaldata;
00071     
00072     boolean flaction; /*always true for actionrecords*/
00073     } tyactionrecord;
00074 
00075 
00076 typedef struct tyundostack {
00077 
00078     short topundo;
00079     
00080     short basesize;
00081     
00082     short elemsize;
00083     
00084     /*
00085     union {
00086         tyundorecord undostep;
00087         
00088         tyactionrecord actionstep;
00089         } u;
00090     */
00091         
00092     short ixaction;
00093     
00094     long globaldata;
00095     
00096     #if THINK_C
00097         
00098         tyundorecord undostep [];
00099     
00100     #else
00101     
00102         tyundorecord undostep [1];
00103         
00104     #endif
00105     } tyundostack, *ptrundostack, **hdlundostack;
00106 
00107 
00108 /*function prototypes*/
00109 
00110 extern boolean pushundostep (undocallback, Handle);
00111 
00112 extern boolean pushundoaction (short);
00113 
00114 extern boolean popundoaction (void);
00115 
00116 extern boolean undolastaction (boolean);
00117 
00118 extern boolean redolastaction (boolean);
00119 
00120 extern boolean getundoaction (short *);
00121 
00122 extern boolean getredoaction (short *);
00123 
00124 extern void killundo (void);
00125 
00126 extern boolean newundostack (hdlundostack *);
00127 
00128 extern boolean disposeundostack (hdlundostack);
00129 
00130 extern void initundo (void);
00131 
00132 
00133 /*global variables*/
00134 
00135 extern hdlundostack shellundostack;
00136 
00137 extern hdlundostack shellredostack;
00138 
00139 

Generated on Wed May 31 18:20:01 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6