osacomponent.c File Reference

#include "frontier.h"
#include "standard.h"
#include <land.h>
#include <UserTalk.h>
#include "dialogs.h"
#include "error.h"
#include "file.h"
#include "font.h"
#include "kb.h"
#include "launch.h"
#include "memory.h"
#include "ops.h"
#include "resources.h"
#include "strings.h"
#include "timedate.h"
#include "lang.h"
#include "langexternal.h"
#include "langinternal.h"
#include "langipc.h"
#include "langsystem7.h"
#include "shellhooks.h"
#include "scripts.h"
#include "process.h"
#include "processinternal.h"
#include "tablestructure.h"
#include "osacomponent.h"
#include "osadroplet.h"
#include "osainternal.h"
#include "osamenus.h"
#include "osaparseaete.h"
#include "osawindows.h"
#include <SetUpA5.h>
#include "byteorder.h"

Include dependency graph for osacomponent.c:

Go to the source code of this file.

Data Structures

struct  tyservercomponent
struct  tyclientlist
struct  tystylerecord

Defines

#define cmpcloseUPP   ((ComponentFunctionUPP) cmpclose)
#define cmpcandoUPP   ((ComponentFunctionUPP) cmpcando)
#define cmpversionUPP   ((ComponentFunctionUPP) cmpversion)
#define osaLoadUPP   ((ComponentFunctionUPP) osaLoad)
#define osaStoreUPP   ((ComponentFunctionUPP) osaStore)
#define osaExecuteUPP   ((ComponentFunctionUPP) osaExecute)
#define osaDisplayUPP   ((ComponentFunctionUPP) osaDisplay)
#define osaScriptErrorUPP   ((ComponentFunctionUPP) osaScriptError)
#define osaDisposeUPP   ((ComponentFunctionUPP) osaDispose)
#define osaSetScriptInfoUPP   ((ComponentFunctionUPP) osaSetScriptInfo)
#define osaGetScriptInfoUPP   ((ComponentFunctionUPP) osaGetScriptInfo)
#define osaCompileUPP   ((ComponentFunctionUPP) osaCompile)
#define osaGetSourceUPP   ((ComponentFunctionUPP) osaGetSource)
#define osaCoerceFromDescUPP   ((ComponentFunctionUPP) osaCoerceFromDesc)
#define osaCoerceToDescUPP   ((ComponentFunctionUPP) osaCoerceToDesc)
#define osaStartRecordingUPP   ((ComponentFunctionUPP) osaStartRecording)
#define osaStopRecordingUPP   ((ComponentFunctionUPP) osaStopRecording)
#define osaScriptingComponentNameUPP   ((ComponentFunctionUPP) osaScriptingComponentName)
#define osaLoadExecuteUPP   ((ComponentFunctionUPP) osaLoadExecute)
#define osaCompileExecuteUPP   ((ComponentFunctionUPP) osaCompileExecute)
#define osaDoScriptUPP   ((ComponentFunctionUPP) osaDoScript)
#define osaMakeContextUPP   ((ComponentFunctionUPP) osaMakeContext)
#define osaSetResumeDispatchProcUPP   ((ComponentFunctionUPP) osaSetResumeDispatchProc)
#define osaGetResumeDispatchProcUPP   ((ComponentFunctionUPP) osaGetResumeDispatchProc)
#define osaExecuteEventUPP   ((ComponentFunctionUPP) osaExecuteEvent)
#define osaDoEventUPP   ((ComponentFunctionUPP) osaDoEvent)
#define osaSetActiveProcUPP   ((ComponentFunctionUPP) osaSetActiveProc)
#define osaSetDebugProcUPP   ((ComponentFunctionUPP) osaSetDebugProc)
#define osaDebugUPP   ((ComponentFunctionUPP) osaDebug)
#define osaSetSendProcUPP   ((ComponentFunctionUPP) osaSetSendProc)
#define osaGetSendProcUPP   ((ComponentFunctionUPP) osaGetSendProc)
#define osaSetCreateProcUPP   ((ComponentFunctionUPP) osaSetCreateProc)
#define osaGetCreateProcUPP   ((ComponentFunctionUPP) osaGetCreateProc)
#define osaSetDefaultTargetUPP   ((ComponentFunctionUPP) osaSetDefaultTarget)
#define osaclientactiveUPP   (&osaclientactive)
#define osaclientidleUPP   (&osaclientidleproc)
#define osaclientsendUPP   (&osaclientsend)
#define kOSAScriptIsBeingEdited   'edit'
#define kOSAScriptIsBeingRecorded   'recd'
#define osadefaultactiveUPP   ((OSAActiveProcPtr) &osadefaultactiveproc)
#define osadefaultcreateUPP   ((OSACreateAppleEventProcPtr) &osadefaultcreate)
#define osadefaultsendUPP   ((OSASendProcPtr) &osadefaultsend)
#define coerceTEXTtoSTXTUPP   ((AECoercionHandlerUPP) &coerceTEXTtoSTXT)
#define coerceTypetoObjUPP   ((AECoercionHandlerUPP) &coerceTypetoObj)
#define coerceInsltoTEXTUPP   ((AECoercionHandlerUPP) &coerceInsltoTEXT)
#define handlerecordableeventUPP   handlerecordableevent
#define shutdowntimeout   10

Typedefs

typedef tyservercomponentptrservercomponent
typedef tyservercomponent ** hdlservercomponent
typedef tyclientlist ** hdlclientlist

Enumerations

enum  {
  nullstring = 1, afterstring, beforestring, beginningofstring,
  endofstring, replacingstring, insertionlocstring, withobjectmodelstring,
  bringtofrontstring, sysbringapptofrontstring, idstring, appleeventstring,
  noverbtablestring, multipleclientsstring, specificclientstring
}

Functions

static boolean osabackgroundtask (boolean)
static boolean osadebugger (hdltreenode)
static boolean osapartialeventloop (short)
static pascal OSErr osaclientactive (long refcon)
static pascal OSErr osaclientsend (const AppleEvent *, AppleEvent *, AESendMode, AESendPriority, long, AEIdleUPP, AEFilterUPP, long)
static pascal Boolean osaclientidleproc (EventRecord *ev, long *sleep, RgnHandle *mousergn)
static pascal ComponentResult cmpclose (Handle storage, ComponentInstance self)
static pascal OSAError osaLoad (hdlcomponentglobals hglobals, const AEDesc *scriptData, long modeFlags, OSAID *resultingCompiledScriptID)
static pascal ComponentResult cmpcando (short selector)
static pascal ComponentResult cmpversion (void)
static pascal OSAError osaStore (hdlcomponentglobals hglobals, OSAID compiledScriptID, DescType desiredType, long modeFlags, AEDesc *resultingScriptData)
static pascal OSAError osaExecute (hdlcomponentglobals hglobals, OSAID compiledScriptID, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
static pascal OSAError osaSetScriptInfo (hdlcomponentglobals hglobals, OSAID scriptID, OSType selector, long value)
static pascal OSAError osaGetScriptInfo (hdlcomponentglobals hglobals, OSAID scriptID, OSType selector, long *result)
static pascal OSAError osaCompile (hdlcomponentglobals hglobals, const AEDesc *sourceData, long modeFlags, OSAID *scriptID)
static pascal OSAError osaGetSource (hdlcomponentglobals hglobals, OSAID scriptID, DescType desiredType, AEDesc *resultingSourceData)
static pascal OSAError osaCoerceFromDesc (hdlcomponentglobals hglobals, const AEDesc *scriptData, long modeFlags, OSAID *resultingScriptID)
static pascal OSAError osaCoerceToDesc (hdlcomponentglobals hglobals, OSAID scriptID, DescType desiredType, long modeFlags, AEDesc *result)
static pascal OSAError osaStartRecording (hdlcomponentglobals hglobals, OSAID *compiledScriptToModifyID)
static pascal OSAError osaStopRecording (hdlcomponentglobals hglobals, OSAID compiledScriptID)
static pascal OSAError osaScriptingComponentName (hdlcomponentglobals hglobals, AEDesc *resultingScriptingComponentName)
static pascal OSAError osaLoadExecute (hdlcomponentglobals hglobals, const AEDesc *scriptData, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
static pascal OSAError osaMakeContext (hdlcomponentglobals hglobals, const AEDesc *contextName, OSAID parentContext, OSAID *resultingContextID)
static pascal OSAError osaDisplay (hdlcomponentglobals hglobals, OSAID scriptValueID, DescType desiredType, long modeFlags, AEDesc *resultingText)
static pascal OSAError osaSetResumeDispatchProc (hdlcomponentglobals hglobals, AEEventHandlerUPP resumeDispatchProc, long refCon)
static pascal OSAError osaGetResumeDispatchProc (hdlcomponentglobals hglobals, AEEventHandlerUPP *resumeDispatchProc, long *refCon)
static pascal OSAError osaExecuteEvent (hdlcomponentglobals hglobals, AppleEvent *event, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
static pascal OSAError osaDoEvent (hdlcomponentglobals hglobals, AppleEvent *event, OSAID contextID, long modeFlags, AppleEvent *reply)
static pascal OSAError osaSetDebugProc (hdlcomponentglobals hglobals, OSADebugUPP debugProc, long refCon)
static pascal OSAError osaDebug (hdlcomponentglobals hglobals, OSType selector, const AEDesc *selectorData, DescType desiredType, AEDesc *resultingDebugInfoOrDataToSet)
static pascal OSAError osaGetSendProc (hdlcomponentglobals hglobals, OSASendUPP *sendProc, long *refCon)
static pascal OSAError osaSetCreateProc (hdlcomponentglobals hglobals, OSACreateAppleEventUPP createProc, long refCon)
static pascal OSAError osaGetCreateProc (hdlcomponentglobals hglobals, OSACreateAppleEventUPP *createProc, long *refCon)
void disposecomponentglobals (hdlcomponentglobals hglobals)
pascal OSErr osadefaultactiveproc (long refcon)
static pascal OSErr osadefaultcreate (AEEventClass class, AEEventID id, const AEAddressDesc *target, short returnID, long transactionID, AppleEvent *result, long refcon)
static pascal OSErr osadefaultsend (const AppleEvent *event, AppleEvent *reply, AESendMode sendmode, AESendPriority priority, long timeout, AEIdleUPP idleproc, AEFilterUPP filterproc, long refcon)
boolean newcomponentglobals (Component self, long clienta5, hdlcomponentglobals *hglobals)
OSAError osageterror (void)
static boolean inosasource (void)
static boolean osaerrormessage (bigstring bs, ptrvoid refcon)
static pascal OSErr coerceTEXTtoSTXT (DescType fromtype, Ptr pdata, long size, DescType totype, long refcon, AEDesc *result)
static pascal OSErr coerceTypetoObj (AEDesc *desc, DescType totype, long refcon, AEDesc *result)
static void osapushfastcontext (hdlcomponentglobals hglobals)
static void osapopfastcontext (hdlcomponentglobals hglobals)
long osapreclientcallback (hdlcomponentglobals hglobals)
void osapostclientcallback (hdlcomponentglobals hglobals)
GNEUPP osainstallpatch (hdlcomponentglobals hglobals)
void osaremovepatch (hdlcomponentglobals hglobals, GNEUPP origproc)
THz osasethomezone (hdlcomponentglobals hglobals)
THz osasetclientzone (hdlcomponentglobals hglobals)
static pascal OSErr osacreateevent (AEEventClass class, AEEventID id, const AEAddressDesc *target, short returnID, long transactionID, AppleEvent *result)
static pascal OSErr osasendevent (const AppleEvent *event, AppleEvent *reply, AESendMode mode, AESendPriority priority, long timeout, AEIdleUPP idleproc, AEFilterUPP filterproc)
static boolean osaprocessstarted (void)
static boolean osahandlerunscript (hdlcomponentglobals hglobals, hdltreenode hcode, hdlhashtable hcontext, long modeflags, tyvaluerecord *resultval)
static pascal boolean osacreatemodulecontext (hdltreenode htree, hdlhashtable *hcontext)
static boolean lookupeventname (hdlcomponentglobals hglobals, AEEventClass class, AEEventID id, bigstring bsname)
static boolean osahandletrapverb (hdlcomponentglobals hglobals, hdlverbrecord hverb, hdltreenode hmodule, long modeflags, tyvaluerecord *vreturned)
static boolean osabuildsubroutineevent (bigstring bsname, hdltreenode hparam1, AppleEvent *event)
static boolean setstorageval (hdlcomponentglobals hglobals, tyvaluerecord *val, OSAID id)
static boolean addstorageval (hdlcomponentglobals hglobals, tyvaluerecord *val, OSAID *id)
static boolean getstorageval (hdlcomponentglobals hglobals, OSAID id, tyvaluerecord *val, hdlhashnode *hnode)
static boolean deletestorageval (hdlcomponentglobals hglobals, OSAID id)
static boolean storagevaltodesc (tyvaluerecord *val, OSType desctype, AEDesc *result)
static boolean osagetcontext (hdlcomponentglobals hglobals, OSAID id, hdlhashtable *hcontext)
static boolean osanewvalue (tyexternalid id, Handle hdata, tyvaluerecord *val)
pascal OSAError osaDispose (hdlcomponentglobals hglobals, OSAID scriptID)
pascal OSAError osaSetActiveProc (hdlcomponentglobals hglobals, OSAActiveUPP activeProc, long refCon)
pascal OSAError osaSetSendProc (hdlcomponentglobals hglobals, OSASendUPP sendProc, long refCon)
static pascal OSAError osacompiledesc (const AEDesc *sourceData, tyvaluerecord *vcode)
static Handle getcomponentstringhandle (short id)
static boolean getrecordingstring (short id, bigstring bs)
static pascal OSErr coerceInsltoTEXT (const AEDesc *desc, DescType totype, long refcon, AEDesc *result)
static pascal OSErr sendrecordingevent (hdlcomponentglobals hglobals, AEEventID id)
static pascal OSErr sendrecordedtextevent (hdlcomponentglobals hcg, bigstring bs)
static pascal OSErr pusheventparameter (const AppleEvent *event, AEKeyword key, boolean flpushkey, bigstring bsparam, bigstring bsevent)
static pascal OSErr handlerecordableevent (const AppleEvent *event, AppleEvent *reply, SInt32 refcon)
pascal OSAError osaScriptError (hdlcomponentglobals hglobals, OSType selector, DescType desiredType, AEDesc *resultingErrorDescription)
pascal OSAError osaCompileExecute (hdlcomponentglobals hglobals, const AEDesc *sourceData, OSAID contextID, long modeFlags, OSAID *resultingScriptValueID)
pascal OSAError osaDoScript (hdlcomponentglobals hglobals, const AEDesc *sourceData, OSAID contextID, DescType desiredType, long modeFlags, AEDesc *resultingText)
static boolean getverbresult (hdlverbrecord hv, tyvaluerecord *vresult)
static pascal Boolean osahandleevent (hdlcomponentglobals hglobals, hdlverbrecord hverb, OSAID contextID, long modeFlags, tyvaluerecord *vresult)
pascal ComponentResult callosafunction (Handle storage, register ComponentParameters *params, ComponentFunctionUPP func)
static pascal ComponentResult osaDispatch (ComponentParameters *params, Handle storage)
static boolean osacomponenterror (ComponentInstance comp, OSAID idscript, OSAError err)
static boolean addosaserver (ComponentInstance instance, OSType type)
ComponentInstance getosaserver (OSType type)
static boolean initosaservers (void)
void closeosaservers (void)
static boolean openscriptcomponent (const tyvaluerecord *osaval, AEDesc *scriptdata, OSType *subtype, ComponentInstance *comp)
boolean osagetcode (Handle htext, OSType idserver, boolean fljustexecutable, tyvaluerecord *vcode)
boolean osagetsource (const tyvaluerecord *osaval, OSType *idserver, tyvaluerecord *vsource)
boolean isosascriptnode (hdltreenode htree, tyvaluerecord *osaval)
boolean evaluateosascript (const tyvaluerecord *osaval, hdltreenode hparam1, bigstring bsname, tyvaluerecord *vreturned)
boolean evaluateosascriptevent (const tyvaluerecord *osaval, const AppleEvent *event, AppleEvent *reply)
boolean osafindclienteventfilter (long clienta5, long *eventfilter)
static boolean osagethomeresfile (void)
Component osaregistercomponent (OSType type, long flags, ComponentRoutine dispatch, short idname, short iddescription)
static boolean initosacomponent (void)
boolean havecomponentmanager (void)
boolean getprocessname (ProcessSerialNumber psn, bigstring bsname, boolean *flbackgroundonly)
boolean osacomponentverifyshutdown (void)
static boolean servingsharedmenus (hdlcomponentglobals *hclient)
static pascal OSErr sendmenusharingshutdownevent (hdlcomponentglobals hcg)
void osacomponentshutdown (void)
boolean osacomponentstart (void)

Variables

Component osacomponent = nil
boolean flosashutdown = false
static hdlservercomponent hserverlist = nil
static hdlclientlist hclientlist = nil
static byte bssource [] = "\p_source"
static byte bscode [] = "\p_code"
static THz homezone
static Handle homeresmap
static short homeresfile
static ProcessSerialNumber homepsn
hdlcomponentglobals osaglobals = nil
static long osacoercionhandlerinstalled = 0
static long osabackgroundtime = 0


Define Documentation

#define cmpcandoUPP   ((ComponentFunctionUPP) cmpcando)
 

Definition at line 674 of file osacomponent.c.

Referenced by osaDispatch().

#define cmpcloseUPP   ((ComponentFunctionUPP) cmpclose)
 

Definition at line 673 of file osacomponent.c.

Referenced by osaDispatch().

#define cmpversionUPP   ((ComponentFunctionUPP) cmpversion)
 

Definition at line 675 of file osacomponent.c.

Referenced by osaDispatch().

#define coerceInsltoTEXTUPP   ((AECoercionHandlerUPP) &coerceInsltoTEXT)
 

Definition at line 3417 of file osacomponent.c.

Referenced by handlerecordableevent().

#define coerceTEXTtoSTXTUPP   ((AECoercionHandlerUPP) &coerceTEXTtoSTXT)
 

Definition at line 1400 of file osacomponent.c.

Referenced by osapopfastcontext(), and osapushfastcontext().

#define coerceTypetoObjUPP   ((AECoercionHandlerUPP) &coerceTypetoObj)
 

Definition at line 1402 of file osacomponent.c.

Referenced by osacomponentshutdown(), and osacomponentstart().

#define handlerecordableeventUPP   handlerecordableevent
 

Definition at line 4002 of file osacomponent.c.

Referenced by osaStartRecording().

#define kOSAScriptIsBeingEdited   'edit'
 

Definition at line 715 of file osacomponent.c.

Referenced by osaGetScriptInfo().

#define kOSAScriptIsBeingRecorded   'recd'
 

Definition at line 718 of file osacomponent.c.

Referenced by osaGetScriptInfo().

#define osaclientactiveUPP   (&osaclientactive)
 

Definition at line 708 of file osacomponent.c.

Referenced by evaluateosascript().

#define osaclientidleUPP   (&osaclientidleproc)
 

Definition at line 709 of file osacomponent.c.

Referenced by osaclientsend().

#define osaclientsendUPP   (&osaclientsend)
 

Definition at line 710 of file osacomponent.c.

Referenced by evaluateosascript().

#define osaCoerceFromDescUPP   ((ComponentFunctionUPP) osaCoerceFromDesc)
 

Definition at line 686 of file osacomponent.c.

Referenced by osaDispatch().

#define osaCoerceToDescUPP   ((ComponentFunctionUPP) osaCoerceToDesc)
 

Definition at line 687 of file osacomponent.c.

Referenced by osaDispatch().

#define osaCompileExecuteUPP   ((ComponentFunctionUPP) osaCompileExecute)
 

Definition at line 692 of file osacomponent.c.

Referenced by osaDispatch().

#define osaCompileUPP   ((ComponentFunctionUPP) osaCompile)
 

Definition at line 684 of file osacomponent.c.

Referenced by osaDispatch().

#define osaDebugUPP   ((ComponentFunctionUPP) osaDebug)
 

Definition at line 701 of file osacomponent.c.

Referenced by osaDispatch().

#define osadefaultactiveUPP   ((OSAActiveProcPtr) &osadefaultactiveproc)
 

Definition at line 1000 of file osacomponent.c.

Referenced by newcomponentglobals().

#define osadefaultcreateUPP   ((OSACreateAppleEventProcPtr) &osadefaultcreate)
 

Definition at line 1001 of file osacomponent.c.

Referenced by newcomponentglobals(), and osaSetCreateProc().

#define osadefaultsendUPP   ((OSASendProcPtr) &osadefaultsend)
 

Definition at line 1002 of file osacomponent.c.

Referenced by newcomponentglobals(), and osaSetSendProc().

#define osaDisplayUPP   ((ComponentFunctionUPP) osaDisplay)
 

Definition at line 679 of file osacomponent.c.

Referenced by osaDispatch().

#define osaDisposeUPP   ((ComponentFunctionUPP) osaDispose)
 

Definition at line 681 of file osacomponent.c.

Referenced by osaDispatch().

#define osaDoEventUPP   ((ComponentFunctionUPP) osaDoEvent)
 

Definition at line 698 of file osacomponent.c.

Referenced by osaDispatch().

#define osaDoScriptUPP   ((ComponentFunctionUPP) osaDoScript)
 

Definition at line 693 of file osacomponent.c.

Referenced by osaDispatch().

#define osaExecuteEventUPP   ((ComponentFunctionUPP) osaExecuteEvent)
 

Definition at line 697 of file osacomponent.c.

Referenced by osaDispatch().

#define osaExecuteUPP   ((ComponentFunctionUPP) osaExecute)
 

Definition at line 678 of file osacomponent.c.

Referenced by osaDispatch().

#define osaGetCreateProcUPP   ((ComponentFunctionUPP) osaGetCreateProc)
 

Definition at line 705 of file osacomponent.c.

Referenced by osaDispatch().

#define osaGetResumeDispatchProcUPP   ((ComponentFunctionUPP) osaGetResumeDispatchProc)
 

Definition at line 696 of file osacomponent.c.

Referenced by osaDispatch().

#define osaGetScriptInfoUPP   ((ComponentFunctionUPP) osaGetScriptInfo)
 

Definition at line 683 of file osacomponent.c.

Referenced by osaDispatch().

#define osaGetSendProcUPP   ((ComponentFunctionUPP) osaGetSendProc)
 

Definition at line 703 of file osacomponent.c.

Referenced by osaDispatch().

#define osaGetSourceUPP   ((ComponentFunctionUPP) osaGetSource)
 

Definition at line 685 of file osacomponent.c.

Referenced by osaDispatch().

#define osaLoadExecuteUPP   ((ComponentFunctionUPP) osaLoadExecute)
 

Definition at line 691 of file osacomponent.c.

Referenced by osaDispatch().

#define osaLoadUPP   ((ComponentFunctionUPP) osaLoad)
 

Definition at line 676 of file osacomponent.c.

Referenced by osaDispatch().

#define osaMakeContextUPP   ((ComponentFunctionUPP) osaMakeContext)
 

Definition at line 694 of file osacomponent.c.

Referenced by osaDispatch().

#define osaScriptErrorUPP   ((ComponentFunctionUPP) osaScriptError)
 

Definition at line 680 of file osacomponent.c.

Referenced by osaDispatch().

#define osaScriptingComponentNameUPP   ((ComponentFunctionUPP) osaScriptingComponentName)
 

Definition at line 690 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetActiveProcUPP   ((ComponentFunctionUPP) osaSetActiveProc)
 

Definition at line 699 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetCreateProcUPP   ((ComponentFunctionUPP) osaSetCreateProc)
 

Definition at line 704 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetDebugProcUPP   ((ComponentFunctionUPP) osaSetDebugProc)
 

Definition at line 700 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetDefaultTargetUPP   ((ComponentFunctionUPP) osaSetDefaultTarget)
 

Definition at line 706 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetResumeDispatchProcUPP   ((ComponentFunctionUPP) osaSetResumeDispatchProc)
 

Definition at line 695 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetScriptInfoUPP   ((ComponentFunctionUPP) osaSetScriptInfo)
 

Definition at line 682 of file osacomponent.c.

Referenced by osaDispatch().

#define osaSetSendProcUPP   ((ComponentFunctionUPP) osaSetSendProc)
 

Definition at line 702 of file osacomponent.c.

Referenced by osaDispatch().

#define osaStartRecordingUPP   ((ComponentFunctionUPP) osaStartRecording)
 

Definition at line 688 of file osacomponent.c.

Referenced by osaDispatch().

#define osaStopRecordingUPP   ((ComponentFunctionUPP) osaStopRecording)
 

Definition at line 689 of file osacomponent.c.

Referenced by osaDispatch().

#define osaStoreUPP   ((ComponentFunctionUPP) osaStore)
 

Definition at line 677 of file osacomponent.c.

Referenced by osaDispatch().

#define shutdowntimeout   10
 

Definition at line 6215 of file osacomponent.c.

Referenced by osacomponentshutdown().


Typedef Documentation

typedef struct tyclientlist ** hdlclientlist
 

typedef struct tyservercomponent ** hdlservercomponent
 

typedef struct tyservercomponent * ptrservercomponent
 


Enumeration Type Documentation

anonymous enum
 

Enumerator:
nullstring 
afterstring 
beforestring 
beginningofstring 
endofstring 
replacingstring 
insertionlocstring 
withobjectmodelstring 
bringtofrontstring 
sysbringapptofrontstring 
idstring 
appleeventstring 
noverbtablestring 
multipleclientsstring 
specificclientstring 

Definition at line 741 of file osacomponent.c.


Function Documentation

static boolean addosaserver ComponentInstance  instance,
OSType  type
[static]
 

Definition at line 5286 of file osacomponent.c.

References tyservercomponent::clientpsn, hserverlist, tyservercomponent::instance, listlink(), newfilledhandle(), and tyservercomponent::type.

Referenced by initosacomponent().

Here is the call graph for this function:

static boolean addstorageval hdlcomponentglobals  hglobals,
tyvaluerecord val,
OSAID *  id
[static]
 

Definition at line 2363 of file osacomponent.c.

References return(), and setstorageval().

Referenced by osaCoerceFromDesc(), osaCompile(), osaExecute(), osaExecuteEvent(), osaLoad(), osaMakeContext(), and osaStartRecording().

Here is the call graph for this function:

pascal ComponentResult callosafunction Handle  storage,
register ComponentParameters *  params,
ComponentFunctionUPP  func
 

Definition at line 4760 of file osacomponent.c.

References currenthashtable, tylangcallbacks::errormessagecallback, fllangerror, flthreadkilled, landgetglobals(), langcallbacks, nil, noErr, osacreateevent(), osaerrormessage(), osapopfastcontext(), osapushfastcontext(), osasendevent(), oserror(), pophashtable(), pushhashtable(), quickdrawglobal, shellpoperrorhook(), and shellpusherrorhook().

Here is the call graph for this function:

void closeosaservers void   ) 
 

Definition at line 5370 of file osacomponent.c.

References disposehandle(), tyservercomponent::hnext, hserverlist, iscurrentapplication(), listunlink(), and nil.

Referenced by closesharedmenus(), osacomponentshutdown(), osacomponentverifyshutdown(), and osaDirtySharedMenus().

Here is the call graph for this function:

static pascal ComponentResult cmpcando short  selector  )  [static]
 

Definition at line 4705 of file osacomponent.c.

References kOSASelectDebug, and kOSASelectSetDebugProc.

Referenced by newcomponentglobals().

static pascal ComponentResult cmpclose Handle  storage,
ComponentInstance  self
[static]
 

Definition at line 4689 of file osacomponent.c.

References disposecomponentglobals(), nil, noErr, and osaStopRecording().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal ComponentResult cmpversion void   )  [static]
 

Definition at line 4754 of file osacomponent.c.

Referenced by newcomponentglobals().

static pascal OSErr coerceInsltoTEXT const AEDesc desc,
DescType  totype,
long  refcon,
AEDesc result
[static]
 

Definition at line 3285 of file osacomponent.c.

References afterstring, beforestring, beginningofstring, bigstring, copystring(), DebugStr(), disposevaluerecord(), endofstring, getobjectmodeldisplaystring(), getrecordingstring(), insertionlocstring, isemptystring, kAEAfter, kAEBefore, kAEBeginning, kAEEnd, kAEReplace, keyAEObject, keyAEPosition, nil, noErr, parsedialogstring(), pushstring(), replacingstring, RestoreA5, setdescriptorvalue(), setemptystring, setostypevalue(), SetUpAppA5, stringlength, typeAERecord, typeChar, typeEnumeration, typeInsertionLoc, and typeWildCard.

Referenced by handlerecordableevent().

Here is the call graph for this function:

static pascal OSErr coerceTEXTtoSTXT DescType  fromtype,
Ptr  pdata,
long  size,
DescType  totype,
long  refcon,
AEDesc result
[static]
 

Definition at line 1269 of file osacomponent.c.

References tystylerecord::ctstyles, DebugStr(), geneva, nil, noErr, tystylerecord::styles, typeChar, and typeStyledText.

Referenced by osapushfastcontext().

Here is the call graph for this function:

static pascal OSErr coerceTypetoObj AEDesc desc,
DescType  totype,
long  refcon,
AEDesc result
[static]
 

Definition at line 1335 of file osacomponent.c.

References cProperty, tyAEDesc::dataHandle, DebugStr(), tyAEDesc::descriptorType, newdescnull(), nil, RestoreA5, SetUpAppA5, typeNull, and typeType.

Referenced by osacomponentstart().

Here is the call graph for this function:

static boolean deletestorageval hdlcomponentglobals  hglobals,
OSAID  id
[static]
 

Definition at line 2389 of file osacomponent.c.

References bigstring, hashdelete(), and numbertostring().

Referenced by osaDispose().

Here is the call graph for this function:

void disposecomponentglobals hdlcomponentglobals  hglobals  ) 
 

Definition at line 835 of file osacomponent.c.

References disposehandle(), disposehashtable(), disposethreadglobals(), hashflushcache(), hashtablestack, hclientlist, listunlink(), longinfinity, and nil.

Referenced by closesharedmenus(), cmpclose(), newcomponentglobals(), and windowsharingdispatch().

Here is the call graph for this function:

boolean evaluateosascript const tyvaluerecord osaval,
hdltreenode  hparam1,
bigstring  bsname,
tyvaluerecord vreturned
 

Definition at line 5713 of file osacomponent.c.

References alllower(), langparamerror(), nil, notfunctionerror, openscriptcomponent(), osabuildsubroutineevent(), osaclientactiveUPP, osaclientsendUPP, osacomponenterror(), osaval, oserror(), setbooleanvalue(), setdescriptorvalue(), and typeWildCard.

Here is the call graph for this function:

boolean evaluateosascriptevent const tyvaluerecord osaval,
const AppleEvent event,
AppleEvent reply
 

Definition at line 5812 of file osacomponent.c.

References openscriptcomponent(), osacomponenterror(), and osaval.

Referenced by langipchandletrapverb().

Here is the call graph for this function:

static Handle getcomponentstringhandle short  id  )  [static]
 

Definition at line 3262 of file osacomponent.c.

References bigstring, componentlistnumber, getstringlist(), and nil.

Referenced by osaregistercomponent().

Here is the call graph for this function:

ComponentInstance getosaserver OSType  type  ) 
 

Definition at line 5311 of file osacomponent.c.

References disposehandle(), tyservercomponent::hnext, hserverlist, tyservercomponent::instance, iscurrentapplication(), listunlink(), and nil.

Referenced by openscriptcomponent(), osagetcode(), and osaRunSharedMenuItem().

Here is the call graph for this function:

boolean getprocessname ProcessSerialNumber  psn,
bigstring  bsname,
boolean flbackgroundonly
 

Definition at line 6021 of file osacomponent.c.

References long, nil, and noErr.

Referenced by handlerecordableevent(), osacomponentverifyshutdown(), and servingsharedmenus().

static boolean getrecordingstring short  id,
bigstring  bs
[static]
 

Definition at line 3278 of file osacomponent.c.

References getstringlist(), and recordinglistnumber.

Referenced by coerceInsltoTEXT(), handlerecordableevent(), and osacomponentverifyshutdown().

Here is the call graph for this function:

static boolean getstorageval hdlcomponentglobals  hglobals,
OSAID  id,
tyvaluerecord val,
hdlhashnode hnode
[static]
 

Definition at line 2371 of file osacomponent.c.

References bigstring, hashlookup(), hnode, numbertostring(), and oserror().

Referenced by osaCoerceToDesc(), osaCompile(), osaDisplay(), osagetcontext(), osaGetScriptInfo(), osaSetScriptInfo(), and osaStore().

Here is the call graph for this function:

static boolean getverbresult hdlverbrecord  hv,
tyvaluerecord vresult
[static]
 

Definition at line 4359 of file osacomponent.c.

References typaramrecord::desc, initvalue(), landsystem7geteventrecords(), landsystem7getparam(), notype, novaluetype, returnedvaluekey, and setdescriptorvalue().

Referenced by osahandleevent().

Here is the call graph for this function:

static pascal OSErr handlerecordableevent const AppleEvent event,
AppleEvent reply,
SInt32  refcon
[static]
 

Definition at line 3659 of file osacomponent.c.

References aete, appleeventstring, bigstring, bringtofrontstring, coerceInsltoTEXT(), coerceInsltoTEXTUPP, datahandletostring(), getprocessname(), getrecordingstring(), hashsymbolexists(), hashtablesymbolexists(), hkeywordtable, homezone, idstring, insertchar(), insertstring(), isfrontapplication(), keyDirectObject, keyEventClassAttr, keyEventIDAttr, keyMissedKeywordAttr, landsystem7getsenderinfo(), langipcfindapptable(), nil, noErr, noverbtablestring, osaparseaete(), osaparseaeteparamlist(), osapopfastcontext(), osapushfastcontext(), osasetclientzone(), ostypetostring(), parsedialogstring(), pophashtable(), pushchar(), pusheventparameter(), pushhashtable(), pushstring(), RestoreA5, sendrecordedtextevent(), setemptystring, SetUpAppA5, sysbringapptofrontstring, texthandletostring(), typeChar, typeInsertionLoc, typeKeyword, typeType, and withobjectmodelstring.

Referenced by osaStartRecording().

Here is the call graph for this function:

boolean havecomponentmanager void   ) 
 

Definition at line 6009 of file osacomponent.c.

References gestalt().

Here is the call graph for this function:

static boolean initosacomponent void   )  [static]
 

Definition at line 5942 of file osacomponent.c.

References addosaserver(), homezone, nil, osaclientactive(), osaclientidleproc(), osaclientsend(), osadefaultactiveproc(), osadefaultcreate(), osadefaultsend(), osaDispatch(), osagethomeresfile(), osaregistercomponent(), RememberA5, scriptingcomponentstring, shellpushfilehook(), and usertalkstring.

Referenced by osacomponentstart().

Here is the call graph for this function:

static boolean initosaservers void   )  [static]
 

Definition at line 5358 of file osacomponent.c.

References hserverlist, longsizeof, and newclearhandle().

Referenced by osacomponentstart().

Here is the call graph for this function:

static boolean inosasource void   )  [static]
 

Definition at line 1178 of file osacomponent.c.

References langcallbacks, nil, and tylangcallbacks::scripterrorstack.

Referenced by osadebugger(), and osaerrormessage().

boolean isosascriptnode hdltreenode  htree,
tyvaluerecord osaval
 

Definition at line 5571 of file osacomponent.c.

References h, htree, moduleop, osascriptop, and osaval.

static boolean lookupeventname hdlcomponentglobals  hglobals,
AEEventClass  class,
AEEventID  id,
bigstring  bsname
[static]
 

Definition at line 2184 of file osacomponent.c.

References aete, osaparseaete(), osapopfastcontext(), and osapushfastcontext().

Referenced by osahandletrapverb().

Here is the call graph for this function:

boolean newcomponentglobals Component  self,
long  clienta5,
hdlcomponentglobals hglobals
 

Definition at line 1007 of file osacomponent.c.

References cmpcando(), cmpclose(), cmpversion(), disposecomponentglobals(), disposehandle(), fl, hclientlist, homezone, tythreadglobals::htable, hthreadglobals, listlink(), newclearhandle(), newhashtable(), newthreadglobals(), noErr, osabackgroundtask(), osaCoerceFromDesc(), osaCoerceToDesc(), osaCompile(), osaCompileExecute(), osaDebug(), osadebugger(), osadefaultactiveproc(), osadefaultactiveUPP, osadefaultcreate(), osadefaultcreateUPP, osadefaultsend(), osadefaultsendUPP, osaDisplay(), osaDispose(), osaDoEvent(), osaDoScript(), osaExecute(), osaExecuteEvent(), osaGetCreateProc(), osaGetResumeDispatchProc(), osaGetScriptInfo(), osaGetSendProc(), osaGetSource(), osaLoad(), osaLoadExecute(), osaMakeContext(), osapartialeventloop(), osaScriptError(), osaScriptingComponentName(), osaSetActiveProc(), osaSetCreateProc(), osaSetDebugProc(), osaSetResumeDispatchProc(), osaSetScriptInfo(), osaSetSendProc(), osaStartRecording(), osaStopRecording(), osaStore(), scriptpopsourcecode(), and scriptpushsourcecode().

Referenced by menusharingdispatch(), osaDispatch(), and windowsharingdispatch().

Here is the call graph for this function:

static boolean openscriptcomponent const tyvaluerecord osaval,
AEDesc scriptdata,
OSType subtype,
ComponentInstance *  comp
[static]
 

Definition at line 5400 of file osacomponent.c.

References assert, binarytodesc(), binaryvaluetype, cantopencomponenterror, copydatahandle(), copyhandle(), disposehandle(), getosaserver(), h, langostypeparamerror(), nil, and noErr.

Referenced by evaluateosascript(), evaluateosascriptevent(), and osagetsource().

Here is the call graph for this function:

static boolean osabackgroundtask boolean   )  [static]
 

Definition at line 1902 of file osacomponent.c.

References flscriptresting, langdialogrunning(), langerrorenabled(), nil, osaglobals, osainstallpatch(), osapopfastcontext(), osapushfastcontext(), osaremovepatch(), osasetclientzone(), oserror(), RestoreA5, and SetUpThisA5.

Referenced by newcomponentglobals(), and osahandlerunscript().

Here is the call graph for this function:

static boolean osabuildsubroutineevent bigstring  bsname,
hdltreenode  hparam1,
AppleEvent event
[static]
 

Definition at line 2319 of file osacomponent.c.

References langipcbuildsubroutineevent(), nil, oserror(), and typeNull.

Referenced by evaluateosascript().

Here is the call graph for this function:

static pascal OSErr osaclientactive long  refcon  )  [static]
 

Definition at line 5616 of file osacomponent.c.

References langbackgroundtask(), languserescaped(), noErr, RestoreA5, and SetUpAppA5.

Referenced by initosacomponent().

Here is the call graph for this function:

static pascal Boolean osaclientidleproc EventRecord ev,
long sleep,
RgnHandle mousergn
[static]
 

Definition at line 5641 of file osacomponent.c.

References shellprocessevent().

Referenced by initosacomponent().

Here is the call graph for this function:

static pascal OSErr osaclientsend const AppleEvent ,
AppleEvent ,
AESendMode  ,
AESendPriority  ,
long  ,
AEIdleUPP  ,
AEFilterUPP  ,
long 
[static]
 

Definition at line 5661 of file osacomponent.c.

References landgetglobals(), langbackgroundtask(), languserescaped(), noErr, osaclientidleUPP, RestoreA5, and SetUpAppA5.

Referenced by initosacomponent().

Here is the call graph for this function:

static pascal OSAError osaCoerceFromDesc hdlcomponentglobals  hglobals,
const AEDesc scriptData,
long  modeFlags,
OSAID *  resultingScriptID
[static]
 

Definition at line 3174 of file osacomponent.c.

References addstorageval(), copydatahandle(), tyvaluerecord::data, tyAEDesc::dataHandle, tyAEDesc::descriptorType, disposehandle(), error, tyvaluedata::externalvalue, externalvaluetype, h, langexternalmemoryunpack(), langgetvaluetype(), noErr, osageterror(), oserror(), outlinevaluetype, setdescriptorvalue(), and tyvaluerecord::valuetype.

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaCoerceToDesc hdlcomponentglobals  hglobals,
OSAID  scriptID,
DescType  desiredType,
long  modeFlags,
AEDesc result
[static]
 

Definition at line 3233 of file osacomponent.c.

References error, getstorageval(), hnode, noErr, osageterror(), and storagevaltodesc().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaCompile hdlcomponentglobals  hglobals,
const AEDesc sourceData,
long  modeFlags,
OSAID *  scriptID
[static]
 

Definition at line 3059 of file osacomponent.c.

References addstorageval(), copydatahandle(), copyhandle(), exemptfromtmpstack(), getstorageval(), hashassign(), hnode, HNoNode, idtableprocessor, langexternalvaltotable(), nil, noErr, osacompiledesc(), osageterror(), osanewvalue(), pophashtable(), pushhashtable(), setheapvalue(), and stringvaluetype.

Referenced by newcomponentglobals(), osaCompileExecute(), and osaStopRecording().

Here is the call graph for this function:

static pascal OSAError osacompiledesc const AEDesc sourceData,
tyvaluerecord vcode
[static]
 

Definition at line 3026 of file osacomponent.c.

References codevaluetype, copydatahandle(), copyhandle(), hcode, initvalue(), langbuildtree(), noErr, osageterror(), and typeChar.

Referenced by osaCompile(), and osaDoScript().

Here is the call graph for this function:

pascal OSAError osaCompileExecute hdlcomponentglobals  hglobals,
const AEDesc sourceData,
OSAID  contextID,
long  modeFlags,
OSAID *  resultingScriptValueID
 

Definition at line 4258 of file osacomponent.c.

References noErr, osaCompile(), osaDispose(), and osaExecute().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static boolean osacomponenterror ComponentInstance  comp,
OSAID  idscript,
OSAError  err
[static]
 

Definition at line 5204 of file osacomponent.c.

References bigstring, bserror, copydatahandle(), tyAEDesc::dataHandle, datahandletostring(), disposehandle(), h, langerrormessage(), langsetsourceoffset(), noErr, numberfromhandle(), offset, oserror(), texthandletostring(), typeAERecord, typeChar, typeLongInteger, and typeWildCard.

Referenced by evaluateosascript(), evaluateosascriptevent(), osagetcode(), and osagetsource().

Here is the call graph for this function:

void osacomponentshutdown void   ) 
 

Definition at line 6218 of file osacomponent.c.

References closeosaservers(), coerceTypetoObjUPP, hclientlist, nil, osMask, sendmenusharingshutdownevent(), servingsharedmenus(), shellpartialeventloop(), shutdowntimeout, timenow(), and typeType.

Here is the call graph for this function:

boolean osacomponentstart void   ) 
 

Definition at line 6274 of file osacomponent.c.

References coerceTypetoObj(), coerceTypetoObjUPP, filegetapplicationrnum(), havecomponentmanager, hclientlist, initmenusharingcomponent(), initosacomponent(), initosaservers(), initwindowsharingcomponent(), longsizeof, newclearhandle(), and typeType.

Referenced by frontierstart(), and main().

Here is the call graph for this function:

boolean osacomponentverifyshutdown void   ) 
 

Definition at line 6040 of file osacomponent.c.

References bigstring, closeosaservers(), getprocessname(), getrecordingstring(), hclientlist, tycomponentglobals::hnext, iscurrentapplication(), msgdialog(), multipleclientsstring, nil, noErr, numbertostring(), and parsedialogstring().

Referenced by shellquit().

Here is the call graph for this function:

static pascal OSErr osacreateevent AEEventClass  class,
AEEventID  id,
const AEAddressDesc target,
short  returnID,
long  transactionID,
AppleEvent result
[static]
 

Definition at line 1794 of file osacomponent.c.

References osaglobals, osapopfastcontext(), osapushfastcontext(), osasetclientzone(), RestoreA5, SetUpCurA5, and target.

Referenced by callosafunction().

Here is the call graph for this function:

static pascal boolean osacreatemodulecontext hdltreenode  htree,
hdlhashtable hcontext
[static]
 

Definition at line 2158 of file osacomponent.c.

References evaluatetree(), h, moduleop, newhashtable(), nil, pophashtable(), and pushhashtable().

Referenced by osaGetScriptInfo(), and osahandletrapverb().

Here is the call graph for this function:

static pascal OSAError osaDebug hdlcomponentglobals  hglobals,
OSType  selector,
const AEDesc selectorData,
DescType  desiredType,
AEDesc resultingDebugInfoOrDataToSet
[static]
 

Definition at line 4594 of file osacomponent.c.

References bigstring, copyvaluerecord(), ctscanchars, ctscanlines, datahandletostring(), hnode, keyOSADebugRangeEnd, keyOSADebugRangeStart, kOSADebugRange, kOSADebugSetData, langgetsourceoffset(), langgetsymbolval(), nil, noErr, texthandletostring(), typeChar, typeLongInteger, typeOSADebugRange, and valuetodescriptor().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static boolean osadebugger hdltreenode   )  [static]
 

Definition at line 1963 of file osacomponent.c.

References bundleop, CallOSADebugProc, debuggingcurrentprocess(), hnode, inosasource(), languserescaped(), localop, moduleop, nil, noop, osaglobals, osainstallpatch(), osapopfastcontext(), osapushfastcontext(), osaremovepatch(), osasetclientzone(), oserror(), RestoreA5, and SetUpCurA5.

Referenced by newcomponentglobals(), and osahandlerunscript().

Here is the call graph for this function:

pascal OSErr osadefaultactiveproc long  refcon  ) 
 

Definition at line 913 of file osacomponent.c.

References EventAvail(), iscmdperiodevent(), keyDownMask, tyEventRecord::message, tyEventRecord::modifiers, noErr, and tyEventRecord::what.

Referenced by initosacomponent(), newcomponentglobals(), sharedmenuactiveproc(), and sharedmenusendproc().

Here is the call graph for this function:

static pascal OSErr osadefaultcreate AEEventClass  class,
AEEventID  id,
const AEAddressDesc target,
short  returnID,
long  transactionID,
AppleEvent result,
long  refcon
[static]
 

Definition at line 939 of file osacomponent.c.

References target.

Referenced by initosacomponent(), and newcomponentglobals().

static pascal OSErr osadefaultsend const AppleEvent event,
AppleEvent reply,
AESendMode  sendmode,
AESendPriority  priority,
long  timeout,
AEIdleUPP  idleproc,
AEFilterUPP  filterproc,
long  refcon
[static]
 

Definition at line 955 of file osacomponent.c.

Referenced by initosacomponent(), and newcomponentglobals().

static pascal ComponentResult osaDispatch ComponentParameters *  params,
Handle  storage
[static]
 

Definition at line 4845 of file osacomponent.c.

References callosafunction(), cmpcandoUPP, cmpcloseUPP, cmpversionUPP, kOSASelectDebug, kOSASelectSetDebugProc, newcomponentglobals(), nil, noErr, osaCoerceFromDescUPP, osaCoerceToDescUPP, osaCompileExecuteUPP, osaCompileUPP, osaDebugUPP, osaDisplayUPP, osaDisposeUPP, osaDoEventUPP, osaDoScriptUPP, osaExecuteEventUPP, osaExecuteUPP, osaGetCreateProcUPP, osaGetResumeDispatchProcUPP, osaGetScriptInfoUPP, osaGetSendProcUPP, osaGetSourceUPP, osaLoadExecuteUPP, osaLoadUPP, osaMakeContextUPP, osaScriptErrorUPP, osaScriptingComponentNameUPP, osaSetActiveProcUPP, osaSetCreateProcUPP, osaSetDebugProcUPP, osaSetDefaultTargetUPP, osaSetResumeDispatchProcUPP, osaSetScriptInfoUPP, osaSetSendProcUPP, osaStartRecordingUPP, osaStopRecordingUPP, osaStoreUPP, RestoreA5, and SetUpAppA5.

Referenced by initosacomponent().

Here is the call graph for this function:

static pascal OSAError osaDisplay hdlcomponentglobals  hglobals,
OSAID  scriptValueID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingText
[static]
 

Definition at line 4173 of file osacomponent.c.

References bigstring, error, getstorageval(), hashgetvaluestring(), hnode, osageterror(), stringlength, and typeChar.

Referenced by newcomponentglobals().

Here is the call graph for this function:

pascal OSAError osaDispose hdlcomponentglobals  hglobals,
OSAID  scriptID
 

Definition at line 2744 of file osacomponent.c.

References deletestorageval(), noErr, and osageterror().

Referenced by newcomponentglobals(), osaCompileExecute(), and osaLoadExecute().

Here is the call graph for this function:

static pascal OSAError osaDoEvent hdlcomponentglobals  hglobals,
AppleEvent event,
OSAID  contextID,
long  modeFlags,
AppleEvent reply
[static]
 

Definition at line 4488 of file osacomponent.c.

References copydatahandle(), tyAEDesc::dataHandle, disposehandle(), h, keyErrorNumber, keyErrorString, landdisposeverb(), landstartreturn(), landsystem7unpackverb(), langipcpushparam(), nil, noErr, numberfromhandle(), osageterror(), osahandleevent(), osaScriptError(), oserror(), returnedvaluekey, typeChar, typeNull, and typeShortInteger.

Referenced by newcomponentglobals().

Here is the call graph for this function:

pascal OSAError osaDoScript hdlcomponentglobals  hglobals,
const AEDesc sourceData,
OSAID  contextID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingText
 

Definition at line 4283 of file osacomponent.c.

References tyvaluedata::codevalue, tyvaluerecord::data, disposetmpvalue(), langdisposetree(), long, noErr, osacompiledesc(), osagetcontext(), osageterror(), osahandlerunscript(), osaScriptError(), and storagevaltodesc().

Referenced by newcomponentglobals(), and osaRunSharedMenuItem().

Here is the call graph for this function:

static boolean osaerrormessage bigstring  bs,
ptrvoid  refcon
[static]
 

Definition at line 1194 of file osacomponent.c.

References ctscanchars, ctscanlines, inosasource(), langgetsourceoffset(), newdescnull(), nil, noErr, osageterror(), stringlength, typeChar, typeLongInteger, and typeNull.

Referenced by callosafunction(), and osahandlerunscript().

Here is the call graph for this function:

static pascal OSAError osaExecute hdlcomponentglobals  hglobals,
OSAID  compiledScriptID,
OSAID  contextID,
long  modeFlags,
OSAID *  resultingScriptValueID
[static]
 

Definition at line 4133 of file osacomponent.c.

References addstorageval(), tyvaluedata::codevalue, tyvaluerecord::data, error, hashtablelookup(), hnode, nil, noErr, osagetcontext(), osageterror(), and osahandlerunscript().

Referenced by newcomponentglobals(), osaCompileExecute(), and osaLoadExecute().

Here is the call graph for this function:

static pascal OSAError osaExecuteEvent hdlcomponentglobals  hglobals,
AppleEvent event,
OSAID  contextID,
long  modeFlags,
OSAID *  resultingScriptValueID
[static]
 

Definition at line 4451 of file osacomponent.c.

References addstorageval(), landdisposeverb(), landsystem7unpackverb(), nil, noErr, osageterror(), and osahandleevent().

Referenced by newcomponentglobals().

Here is the call graph for this function:

boolean osafindclienteventfilter long  clienta5,
long eventfilter
 

Definition at line 5846 of file osacomponent.c.

References tycomponentglobals::hnext, long, and nil.

Referenced by sharedmenuidleproc().

boolean osagetcode Handle  htext,
OSType  idserver,
boolean  fljustexecutable,
tyvaluerecord vcode
 

Definition at line 5456 of file osacomponent.c.

References cantopencomponenterror, copydatahandle(), tyAEDesc::dataHandle, tyAEDesc::descriptorType, getosaserver(), h, langostypeparamerror(), newdescwithhandle(), nil, osacomponenterror(), oserror(), setbinaryvalue(), and typeChar.

Referenced by opgetcodeverb(), and scriptbuildtree().

Here is the call graph for this function:

static boolean osagetcontext hdlcomponentglobals  hglobals,
OSAID  id,
hdlhashtable hcontext
[static]
 

Definition at line 2451 of file osacomponent.c.

References getstorageval(), hnode, langexternalvaltotable(), nil, and oserror().

Referenced by osaDoScript(), osaExecute(), osaGetSource(), and osahandleevent().

Here is the call graph for this function:

static pascal OSAError osaGetCreateProc hdlcomponentglobals  hglobals,
OSACreateAppleEventUPP *  createProc,
long refCon
[static]
 

Definition at line 2999 of file osacomponent.c.

References tycomponentglobals::createproc, and noErr.

Referenced by newcomponentglobals().

OSAError osageterror void   ) 
 

Definition at line 1165 of file osacomponent.c.

References getoserror(), and noErr.

Referenced by osaCoerceFromDesc(), osaCoerceToDesc(), osaCompile(), osacompiledesc(), osaDisplay(), osaDispose(), osaDoEvent(), osaDoScript(), osaerrormessage(), osaExecute(), osaExecuteEvent(), osaGetSource(), osahandleevent(), osaLoad(), osaRunSharedMenuItem(), and osaStartRecording().

Here is the call graph for this function:

static boolean osagethomeresfile void   )  [static]
 

Definition at line 5874 of file osacomponent.c.

Referenced by initosacomponent().

static pascal OSAError osaGetResumeDispatchProc hdlcomponentglobals  hglobals,
AEEventHandlerUPP *  resumeDispatchProc,
long refCon
[static]
 

Definition at line 2914 of file osacomponent.c.

References noErr.

Referenced by newcomponentglobals().

static pascal OSAError osaGetScriptInfo hdlcomponentglobals  hglobals,
OSAID  scriptID,
OSType  selector,
long result
[static]
 

Definition at line 2793 of file osacomponent.c.

References tyvaluedata::codevalue, tyvaluerecord::data, disposehashtable(), getstorageval(), hashtablelookup(), hashtablesymbolexists(), hnode, kOSAScriptIsBeingEdited, kOSAScriptIsBeingRecorded, langexternalvaltotable(), nil, noErr, osacreatemodulecontext(), and typeChar.

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaGetSendProc hdlcomponentglobals  hglobals,
OSASendUPP *  sendProc,
long refCon
[static]
 

Definition at line 2966 of file osacomponent.c.

References noErr, and tycomponentglobals::sendproc.

Referenced by newcomponentglobals().

boolean osagetsource const tyvaluerecord osaval,
OSType idserver,
tyvaluerecord vsource
 

Definition at line 5531 of file osacomponent.c.

References copydatahandle(), tyAEDesc::dataHandle, h, noErr, openscriptcomponent(), osacomponenterror(), osaval, setheapvalue(), stringvaluetype, and typeChar.

Referenced by opgetsourceverb().

Here is the call graph for this function:

static pascal OSAError osaGetSource hdlcomponentglobals  hglobals,
OSAID  scriptID,
DescType  desiredType,
AEDesc resultingSourceData
[static]
 

Definition at line 3140 of file osacomponent.c.

References error, hashtablelookup(), hnode, noErr, novaluetype, osagetcontext(), osageterror(), storagevaltodesc(), and tyvaluerecord::valuetype.

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal Boolean osahandleevent hdlcomponentglobals  hglobals,
hdlverbrecord  hverb,
OSAID  contextID,
long  modeFlags,
tyvaluerecord vresult
[static]
 

Definition at line 4375 of file osacomponent.c.

References tyvaluedata::codevalue, tyvaluerecord::data, error, getverbresult(), hashtablelookup(), hnode, homezone, landgetglobals(), osagetcontext(), osageterror(), osaglobals, osahandletrapverb(), osainstallpatch(), osaremovepatch(), osasetclientzone(), and oserror().

Referenced by osaDoEvent(), and osaExecuteEvent().

Here is the call graph for this function:

static boolean osahandlerunscript hdlcomponentglobals  hglobals,
hdltreenode  hcode,
hdlhashtable  hcontext,
long  modeflags,
tyvaluerecord resultval
[static]
 

Definition at line 2039 of file osacomponent.c.

References tylangcallbacks::backgroundtaskcallback, bitboolean, tylangcallbacks::debuggercallback, disposeprocess(), falsenoop(), fldisableyield, hcode, homezone, kOSAModeDebug, kOSAModeTransparentScope, langcallbacks, langerror(), long, newprocess(), nil, nofileopenerror, osabackgroundtask(), osadebugger(), osaerrormessage(), osainstallpatch(), osapartialeventloop(), osaprocessstarted(), osaremovepatch(), osasetclientzone(), tylangcallbacks::partialeventloopcallback, tylangcallbacks::popsourcecodecallback, typrocessrecord::processrefcon, processruncode(), tylangcallbacks::pushsourcecodecallback, roottable, scriptpopsourcecode(), scriptpushsourcecode(), testheapspace(), and truenoop().

Referenced by osaDoScript(), osaExecute(), and osahandletrapverb().

Here is the call graph for this function:

static boolean osahandletrapverb hdlcomponentglobals  hglobals,
hdlverbrecord  hverb,
hdltreenode  hmodule,
long  modeflags,
tyvaluerecord vreturned
[static]
 

Definition at line 2229 of file osacomponent.c.

References bigstring, tyvaluerecord::data, disposehashtable(), functionop, hashtablesymbolexists(), hcode, initvalue(), landgetstringparam(), langdisposetree(), langipcbuildparamlist(), lookupeventname(), moduleop, newidnode(), newtexthandle(), nil, osacreatemodulecontext(), osahandlerunscript(), oserror(), ostypetostring(), poptrailingwhitespace(), pushbinaryoperation(), tyvaluedata::stringvalue, and stringvaluetype.

Referenced by osahandleevent().

Here is the call graph for this function:

GNEUPP osainstallpatch hdlcomponentglobals  hglobals  ) 
 

Definition at line 1645 of file osacomponent.c.

References nil.

Referenced by osabackgroundtask(), osadebugger(), osahandleevent(), osahandlerunscript(), osaRunSharedMenuItem(), and osasendevent().

static pascal OSAError osaLoad hdlcomponentglobals  hglobals,
const AEDesc scriptData,
long  modeFlags,
OSAID *  resultingCompiledScriptID
[static]
 

Definition at line 2507 of file osacomponent.c.

References addstorageval(), codevaluetype, copydatahandle(), copyhandle(), tyvaluerecord::data, disposehandle(), gethandlesize(), hashinsert(), hashlookup(), hcode, HNoNode, initvalue(), langbuildtree(), langexternalvaltotable(), langunpackvalue(), nil, noErr, osageterror(), pophashtable(), pushhashtable(), sethandlesize(), tyvaluedata::stringvalue, and typeLAND.

Referenced by newcomponentglobals(), and osaLoadExecute().

Here is the call graph for this function:

static pascal OSAError osaLoadExecute hdlcomponentglobals  hglobals,
const AEDesc scriptData,
OSAID  contextID,
long  modeFlags,
OSAID *  resultingScriptValueID
[static]
 

Definition at line 4235 of file osacomponent.c.

References noErr, osaDispose(), osaExecute(), and osaLoad().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaMakeContext hdlcomponentglobals  hglobals,
const AEDesc contextName,
OSAID  parentContext,
OSAID *  resultingContextID
[static]
 

Definition at line 4338 of file osacomponent.c.

References addstorageval(), idtableprocessor, nil, noErr, and osanewvalue().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static boolean osanewvalue tyexternalid  id,
Handle  hdata,
tyvaluerecord val
[static]
 

Definition at line 2476 of file osacomponent.c.

References homezone, and langexternalnewvalue().

Referenced by osaCompile(), osaMakeContext(), and osaStartRecording().

Here is the call graph for this function:

static boolean osapartialeventloop short   )  [static]
 

Definition at line 1660 of file osacomponent.c.

References iscurrentapplication(), langipcnoop(), and shellpartialeventloop().

Referenced by newcomponentglobals(), and osahandlerunscript().

Here is the call graph for this function:

static void osapopfastcontext hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 1487 of file osacomponent.c.

References coerceTEXTtoSTXTUPP, copythreadglobals(), tycomponentglobals::hserverosaglobals, nil, osaglobals, swapinthreadglobals(), typeChar, and typeStyledText.

Referenced by callosafunction(), handlerecordableevent(), lookupeventname(), osabackgroundtask(), osacreateevent(), osadebugger(), osapreclientcallback(), and osasendevent().

Here is the call graph for this function:

void osapostclientcallback hdlcomponentglobals  hglobals  ) 
 

Definition at line 1555 of file osacomponent.c.

References osapushfastcontext().

Referenced by osaRunSharedMenuItem(), sendrecordedtextevent(), and sharedmenuprocessevent().

Here is the call graph for this function:

long osapreclientcallback hdlcomponentglobals  hglobals  ) 
 

Definition at line 1532 of file osacomponent.c.

References osapopfastcontext().

Referenced by osaRunSharedMenuItem(), sendrecordedtextevent(), and sharedmenuprocessevent().

Here is the call graph for this function:

static boolean osaprocessstarted void   )  [static]
 

Definition at line 2025 of file osacomponent.c.

References processnotbusy().

Referenced by osahandlerunscript().

Here is the call graph for this function:

static void osapushfastcontext hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 1407 of file osacomponent.c.

References assert, coerceTEXTtoSTXT(), coerceTEXTtoSTXTUPP, copythreadglobals(), getcurrentthreadglobals(), tythreadglobals::hccglobals, nil, osaglobals, swapinthreadglobals(), typeChar, and typeStyledText.

Referenced by callosafunction(), handlerecordableevent(), lookupeventname(), osabackgroundtask(), osacreateevent(), osadebugger(), osapostclientcallback(), and osasendevent().

Here is the call graph for this function:

Component osaregistercomponent OSType  type,
long  flags,
ComponentRoutine  dispatch,
short  idname,
short  iddescription
 

Definition at line 5886 of file osacomponent.c.

References disposehandle(), getcomponentstringhandle(), and nil.

Referenced by initmenusharingcomponent(), initosacomponent(), and initwindowsharingcomponent().

Here is the call graph for this function:

void osaremovepatch hdlcomponentglobals  hglobals,
GNEUPP  origproc
 

Definition at line 1652 of file osacomponent.c.

Referenced by osabackgroundtask(), osadebugger(), osahandleevent(), osahandlerunscript(), osaRunSharedMenuItem(), and osasendevent().

pascal OSAError osaScriptError hdlcomponentglobals  hglobals,
OSType  selector,
DescType  desiredType,
AEDesc resultingErrorDescription
 

Definition at line 4221 of file osacomponent.c.

Referenced by newcomponentglobals(), osaDoEvent(), osaDoScript(), and osaRunSharedMenuItem().

static pascal OSAError osaScriptingComponentName hdlcomponentglobals  hglobals,
AEDesc resultingScriptingComponentName
[static]
 

Definition at line 4119 of file osacomponent.c.

References bigstring, componentlistnumber, getstringlist(), stringlength, typeChar, and usertalkstring.

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSErr osasendevent const AppleEvent event,
AppleEvent reply,
AESendMode  mode,
AESendPriority  priority,
long  timeout,
AEIdleUPP  idleproc,
AEFilterUPP  filterproc
[static]
 

Definition at line 1839 of file osacomponent.c.

References nil, osaglobals, osainstallpatch(), osapopfastcontext(), osapushfastcontext(), osaremovepatch(), osasetclientzone(), RestoreA5, and SetUpCurA5.

Referenced by callosafunction().

Here is the call graph for this function:

pascal OSAError osaSetActiveProc hdlcomponentglobals  hglobals,
OSAActiveUPP  activeProc,
long  refCon
 

Definition at line 2933 of file osacomponent.c.

References tycomponentglobals::activeproc, and noErr.

Referenced by newcomponentglobals(), and osaRunSharedMenuItem().

THz osasetclientzone hdlcomponentglobals  hglobals  ) 
 

Definition at line 1720 of file osacomponent.c.

Referenced by CheckFormulas(), GetSharedMenus(), handlerecordableevent(), osabackgroundtask(), osacreateevent(), osadebugger(), osahandleevent(), osahandlerunscript(), osaRunSharedMenuItem(), osasendevent(), and sendrecordedtextevent().

static pascal OSAError osaSetCreateProc hdlcomponentglobals  hglobals,
OSACreateAppleEventUPP  createProc,
long  refCon
[static]
 

Definition at line 2981 of file osacomponent.c.

References nil, noErr, and osadefaultcreateUPP.

Referenced by newcomponentglobals().

static pascal OSAError osaSetDebugProc hdlcomponentglobals  hglobals,
OSADebugUPP  debugProc,
long  refCon
[static]
 

Definition at line 4579 of file osacomponent.c.

References tycomponentglobals::debugproc, and noErr.

Referenced by newcomponentglobals().

THz osasethomezone hdlcomponentglobals  hglobals  ) 
 

Definition at line 1695 of file osacomponent.c.

References homezone.

Referenced by CheckFormulas(), GetSharedMenus(), and osaRunSharedMenuItem().

static pascal OSAError osaSetResumeDispatchProc hdlcomponentglobals  hglobals,
AEEventHandlerUPP  resumeDispatchProc,
long  refCon
[static]
 

Definition at line 2888 of file osacomponent.c.

References noErr, and tycomponentglobals::resumedispatchproc.

Referenced by newcomponentglobals().

static pascal OSAError osaSetScriptInfo hdlcomponentglobals  hglobals,
OSAID  scriptID,
OSType  selector,
long  value
[static]
 

Definition at line 2759 of file osacomponent.c.

References getstorageval(), hnode, langexternalvaltotable(), and noErr.

Referenced by newcomponentglobals().

Here is the call graph for this function:

pascal OSAError osaSetSendProc hdlcomponentglobals  hglobals,
OSASendUPP  sendProc,
long  refCon
 

Definition at line 2948 of file osacomponent.c.

References nil, noErr, and osadefaultsendUPP.

Referenced by newcomponentglobals(), and osaRunSharedMenuItem().

static pascal OSAError osaStartRecording hdlcomponentglobals  hglobals,
OSAID *  compiledScriptToModifyID
[static]
 

Definition at line 4007 of file osacomponent.c.

References addstorageval(), gestalt(), handlerecordableevent(), handlerecordableeventUPP, HNoNode, idtableprocessor, kCoreEventClass, langexternalvaltotable(), newemptyhandle(), nil, noErr, osageterror(), osanewvalue(), and sendrecordingevent().

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaStopRecording hdlcomponentglobals  hglobals,
OSAID  compiledScriptID
[static]
 

Definition at line 4067 of file osacomponent.c.

References disposehandle(), newdescwithhandle(), nil, noErr, osaCompile(), sendrecordedtextevent(), sendrecordingevent(), and typeChar.

Referenced by cmpclose(), and newcomponentglobals().

Here is the call graph for this function:

static pascal OSAError osaStore hdlcomponentglobals  hglobals,
OSAID  compiledScriptID,
DescType  desiredType,
long  modeFlags,
AEDesc resultingScriptData
[static]
 

Definition at line 2665 of file osacomponent.c.

References tyAEDesc::dataHandle, tyAEDesc::descriptorType, disposehandle(), getstorageval(), hashinsertnode(), hashunlink(), hnode, HNoNode, langexternalvaltotable(), langpackvalue(), newdescwithhandle(), nil, noErr, pophashtable(), pushhashtable(), and typeLAND.

Referenced by newcomponentglobals().

Here is the call graph for this function:

static pascal OSErr pusheventparameter const AppleEvent event,
AEKeyword  key,
boolean  flpushkey,
bigstring  bsparam,
bigstring  bsevent
[static]
 

Definition at line 3592 of file osacomponent.c.

References aliasvaluetype, bigstring, disposevaluerecord(), filespecvaluetype, getobjectmodeldisplaystring(), getoserror(), insertstring(), isemptystring, langgettypestring(), noErr, ostypetostring(), pushchar(), pushstring(), setdescriptorvalue(), stringlength, typeWildCard, and tyvaluerecord::valuetype.

Referenced by handlerecordableevent().

Here is the call graph for this function:

static pascal OSErr sendmenusharingshutdownevent hdlcomponentglobals  hcg  )  [static]
 

Definition at line 6170 of file osacomponent.c.

References idupdatemenus, nil, noErr, and typeProcessSerialNumber.

Referenced by osacomponentshutdown().

static pascal OSErr sendrecordedtextevent hdlcomponentglobals  hcg,
bigstring  bs
[static]
 

Definition at line 3467 of file osacomponent.c.

References bigstring, chreturn, copystring(), keyDirectObject, nil, noErr, osapostclientcallback(), osapreclientcallback(), osasetclientzone(), pushchar(), pushtexthandle(), RestoreA5, SetUpCurA5, stringlength, typeChar, and typeProcessSerialNumber.

Referenced by handlerecordableevent(), and osaStopRecording().

Here is the call graph for this function:

static pascal OSErr sendrecordingevent hdlcomponentglobals  hglobals,
AEEventID  id
[static]
 

Definition at line 3423 of file osacomponent.c.

References kCoreEventClass, nil, noErr, and typeProcessSerialNumber.

Referenced by osaStartRecording(), and osaStopRecording().

static boolean servingsharedmenus hdlcomponentglobals hclient  )  [static]
 

Definition at line 6119 of file osacomponent.c.

References bigstring, getprocessname(), tycomponentglobals::hnext, iscurrentapplication(), and nil.

Referenced by osacomponentshutdown().

Here is the call graph for this function:

static boolean setstorageval hdlcomponentglobals  hglobals,
tyvaluerecord val,
OSAID  id
[static]
 

Definition at line 2339 of file osacomponent.c.

References bigstring, disposevaluerecord(), exemptfromtmpstack(), hashassign(), and numbertostring().

Referenced by addstorageval().

Here is the call graph for this function:

static boolean storagevaltodesc tyvaluerecord val,
OSType  desctype,
AEDesc result
[static]
 

Definition at line 2400 of file osacomponent.c.

References coercevalue(), copyvaluerecord(), tyAEDesc::descriptorType, disposevaluerecord(), langgetvaluetype(), langgoodbinarytype(), oserror(), stringvaluetype, typeStyledText, typeWildCard, v, and valuetodescriptor().

Referenced by osaCoerceToDesc(), osaDoScript(), and osaGetSource().

Here is the call graph for this function:


Variable Documentation

byte bscode[] = "\p_code" [static]
 

Definition at line 787 of file osacomponent.c.

Referenced by htmlfunctionvalue(), webservercallresponder(), webservermethodnotallowed(), and webserverserver().

byte bssource[] = "\p_source" [static]
 

Definition at line 785 of file osacomponent.c.

Referenced by firstword(), lastword(), and midstring().

boolean flosashutdown = false
 

Definition at line 777 of file osacomponent.c.

Referenced by handlewindoweventcommand(), and osaDirtySharedMenus().

hdlclientlist hclientlist = nil [static]
 

Definition at line 782 of file osacomponent.c.

Referenced by disposecomponentglobals(), newcomponentglobals(), osacomponentshutdown(), osacomponentstart(), and osacomponentverifyshutdown().

ProcessSerialNumber homepsn [static]
 

Definition at line 824 of file osacomponent.c.

short homeresfile [static]
 

Definition at line 822 of file osacomponent.c.

Handle homeresmap [static]
 

Definition at line 819 of file osacomponent.c.

THz homezone [static]
 

Definition at line 816 of file osacomponent.c.

Referenced by handlerecordableevent(), initosacomponent(), newcomponentglobals(), osahandleevent(), osahandlerunscript(), osanewvalue(), and osasethomezone().

hdlservercomponent hserverlist = nil [static]
 

Definition at line 780 of file osacomponent.c.

Referenced by addosaserver(), closeosaservers(), getosaserver(), and initosaservers().

long osabackgroundtime = 0 [static]
 

Definition at line 831 of file osacomponent.c.

long osacoercionhandlerinstalled = 0 [static]
 

Definition at line 829 of file osacomponent.c.

Component osacomponent = nil
 

Definition at line 775 of file osacomponent.c.

Referenced by langipchandlefastscript().

hdlcomponentglobals osaglobals = nil
 

Definition at line 827 of file osacomponent.c.

Referenced by osabackgroundtask(), osacreateevent(), osadebugger(), osahandleevent(), osapopfastcontext(), osapushfastcontext(), osasendevent(), and sharedmenuprocessevent().


Generated on Fri Jun 9 18:37:55 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6