processinternal.h

Go to the documentation of this file.
00001 
00002 /*  $Id: processinternal.h 1328 2006-04-24 20:02:59Z sethdill $    */
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 processinternalinclude
00029 
00030 #ifdef MACVERSION
00031     #ifndef __THREADS__
00032         //#include <Threads.h>
00033     #endif
00034 
00035     #ifndef landinclude
00036         #include <land.h>
00037     #endif
00038 #endif
00039 
00040 #ifndef threadsinclude
00041     #include "threads.h"
00042 #endif
00043 
00044 #ifndef cancooninclude
00045     #include "cancoon.h"
00046 #endif
00047 
00048 #ifndef opinternalinclude
00049     #include "opinternal.h"
00050 #endif
00051 
00052 #if !flruntime
00053     #ifndef shellprivateinclude
00054         #include "shellprivate.h"
00055     #endif
00056     
00057     #ifndef shellhooksinclude
00058         #include "shellhooks.h"
00059     #endif
00060 #endif
00061 
00062 
00063 #define ctprocesses 5 /*we can remember nested processes up to 5 levels deep*/
00064 
00065 typedef struct typrocessstackrecord {
00066     
00067     hdlprocessrecord hprocess;
00068     
00069     langerrormessagecallback errormessagecallback;
00070     
00071     langerrormessagecallback debugerrormessagecallback;
00072     
00073     langvoidcallback clearerrorcallback;
00074     
00075     hdlerrorstack herrorstack;
00076     
00077     hdltablestack htablestack;
00078     } typrocessstackrecord;
00079 
00080 
00081 typedef struct typrocessstack {
00082     
00083     short top;
00084     
00085     typrocessstackrecord stack [ctprocesses];
00086     } typrocessstack;
00087 
00088 
00089 typedef struct tythreadglobals {
00090     
00091     struct tythreadglobals **hnextglobals;
00092     
00093     hdlthread idthread;
00094     
00095     #if !flruntime
00096     
00097     hdlcancoonrecord hccglobals;
00098     
00099     #endif
00100     
00101     typrocessstack processstack;
00102     
00103     hdlprocessrecord hprocess;
00104     
00105     hdlhashtable htable;
00106     
00107     hdltablestack htablestack;
00108     
00109     tylangcallbacks langcallbacks;
00110     
00111     #if !flruntime
00112     
00113     short cterrorhooks;
00114     
00115     callback errorhooks [maxerrorhooks];
00116     
00117     tyglobalsstack globalsstack;
00118     
00119     short topoutlinestack;
00120     
00121     hdloutlinerecord outlinestack [ctoutlinestack];
00122     
00123     hdloutlinerecord outlinedata;
00124 
00125     WindowPtr shellwindow;
00126     
00127     DialogPtr pmodaldialog;
00128     
00129     #endif
00130     
00131     unsigned short ctscanlines;
00132     
00133     unsigned short ctscanchars;
00134     
00135     hdltreenode herrornode;
00136     
00137     unsigned long timestarted;
00138 
00139     unsigned long sleepticks;
00140 
00141     unsigned long timebeginsleep;
00142     
00143     unsigned long timetowake;
00144     
00145     unsigned long timeswappedin;
00146 
00147     unsigned long timesliceticks;
00148 
00149     #ifdef flcomponent
00150     
00151     pascal OSErr (*eventcreatecallback) (AEEventClass, AEEventID, const AEAddressDesc *, short, long, AppleEvent *);
00152     
00153     pascal OSErr (*eventsendcallback) (const AppleEvent *, AppleEvent *, AESendMode, AESendPriority, long, AEIdleUPP, AEFilterUPP);
00154     
00155     OSType applicationid;
00156     
00157     tymaceventsettings eventsettings; /*not just for OSA; new features*/
00158     
00159     #endif
00160     
00161     boolean flreturn;
00162     
00163     boolean flbreak;
00164     
00165     boolean flcontinue;
00166     
00167     boolean flscriptresting;
00168     
00169     boolean flretryagent;
00170     
00171     boolean flthreadkilled;
00172     
00173     boolean fllangerror;
00174     
00175     boolean flscriptrunning;
00176     
00177     unsigned short langerrordisable; /*6.1.1b2 AR*/
00178     
00179     Handle tryerror;
00180 
00181     Handle tryerrorstack;
00182     
00183     unsigned short fldisableyield;
00184     
00185     long debugthreadingcookie; /*6.2b11 AR: for debugging hung threads*/
00186     
00187     #if TARGET_API_MAC_CARBON == 1
00188     
00189     ThreadSwitchUPP threadInCallbackUPP;
00190     
00191     ThreadSwitchUPP threadOutCallbackUPP;
00192     
00193     ThreadTerminationUPP threadTerminateUPP;
00194     
00195     ThreadEntryUPP threadEntryCallbackUPP;
00196     
00197     #endif
00198 
00199     boolean flcominitialized;
00200 
00201     } tythreadglobals, *ptrthreadglobals, **hdlthreadglobals;
00202 
00203 
00204 /*globals*/
00205 
00206 extern boolean flthreadkilled;
00207 
00208 
00209 /*prototypes*/
00210 
00211 extern void disposethreadglobals (hdlthreadglobals);
00212 
00213 extern boolean newthreadglobals (hdlthreadglobals *);
00214 
00215 extern hdlthreadglobals getcurrentthreadglobals (void);
00216 
00217 extern void copythreadglobals (hdlthreadglobals);
00218 
00219 extern void swapinthreadglobals (hdlthreadglobals);
00220 

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