appletprocess.c File Reference

#include <Aliases.h>
#include <GestaltEqu.h>
#include <Folders.h>
#include <iac.h>
#include "applet.h"
#include "appletprocess.h"
#include "appletsyserror.h"
#include "appletfolder.h"

Include dependency graph for appletprocess.c:

Go to the source code of this file.

Defines

#define kAEFinderEvents   'FNDR'
#define kAEFinderID   'MACS'
#define kAEShowClipboard   'shcl'
#define kAEPutAway   'sput'
#define keyAEFinderSelection   'fsel'
#define kAEDrag   'drag'
#define keyAEFinderMisc   'fmsc'
#define kAEEmptyTrash   'empt'
#define kAEOpenSelection   'sope'
#define kAEPrintSelection   'spri'

Typedefs

typedef AppParameters ** AppParametersHandle

Functions

boolean processloop (typrocessloopcallback callback, long refcon)
static boolean findrunningappvisit (typrocessinfo *visitinfo, long refcon)
boolean findrunningapp (OSType id, typrocessinfo *info)
boolean bringapptofront (OSType id)
static OSErr buildlaunchparamlist (FSSpec *fsdoc, AppParametersHandle *appparams)
boolean launchappwithdoc (FSSpec *fsapp, FSSpec *fsdoc, boolean flbringtofront)
static boolean pushaliaslist (FSSpec *fsdoc, OSType listkey, AppleEvent *event)
static boolean oldsendodoc (OSType appid, FSSpec *fsdoc)
boolean sendodoc (OSType appid, FSSpec *fsdoc)
static boolean xxxfinderevent (OSType idverb, FSSpec *fsdoc)
static boolean finderevent (OSType idverb, FSSpec *fsdoc)
boolean launchusingfinder (FSSpec *fs)
boolean revealinfinder (FSSpec *fs)
static boolean fileisrunningvisit (typrocessinfo *info, long refcon)
boolean fileisrunning (FSSpec *fs)
boolean equalprocesses (typrocessinfo *rec1, typrocessinfo *rec2)
boolean quitapplication (OSType idapp)
boolean launchdeskaccessoryfile (FSSpec *fs)
static boolean helpercallback (bigstring fname, tyfileinfo *info, long pxinfo)
boolean getcurrentappfilespec (ptrfilespec pfs)
boolean getcurrentappfolder (ptrfilespec pfs)
static boolean gethelperfolder (ptrfilespec pfshelperfolder, bigstring errormessage)
boolean launchHelperApp (OSType serverid, void *verrormessage)
static boolean launchFrontier (void)

Variables

struct {
   short   errornumber
   hdltreenode   htree
   hdlhashnode   hnode
   hdltreenode   hcode
   long   offset
   hdlheadrecord   hnode
   FSSpec *   fsfile
   FSSpec   fsalias
   boolean   fl
   boolean   launched
   OSType   apptype
   bigstring   errormessage
   short   fnum
   short   fsize
   short   fstyle
helperappinfo
static boolean apprunningflag


Define Documentation

#define kAEDrag   'drag'
 

Definition at line 41 of file appletprocess.c.

#define kAEEmptyTrash   'empt'
 

Definition at line 43 of file appletprocess.c.

#define kAEFinderEvents   'FNDR'
 

Definition at line 36 of file appletprocess.c.

#define kAEFinderID   'MACS'
 

Definition at line 37 of file appletprocess.c.

Referenced by finderevent().

#define kAEOpenSelection   'sope'
 

Definition at line 44 of file appletprocess.c.

#define kAEPrintSelection   'spri'
 

Definition at line 45 of file appletprocess.c.

#define kAEPutAway   'sput'
 

Definition at line 39 of file appletprocess.c.

#define kAEShowClipboard   'shcl'
 

Definition at line 38 of file appletprocess.c.

#define keyAEFinderMisc   'fmsc'
 

Definition at line 42 of file appletprocess.c.

#define keyAEFinderSelection   'fsel'
 

Definition at line 40 of file appletprocess.c.


Typedef Documentation

typedef AppParameters** AppParametersHandle
 

Definition at line 34 of file appletprocess.c.


Function Documentation

boolean bringapptofront OSType  id  ) 
 

Definition at line 137 of file appletprocess.c.

References findrunningapp(), and info.

Referenced by finderevent().

Here is the call graph for this function:

static OSErr buildlaunchparamlist FSSpec fsdoc,
AppParametersHandle appparams
[static]
 

Definition at line 152 of file appletprocess.c.

References tyAEDesc::dataHandle, tyAEDesc::descriptorType, kAEOpenDocuments, kCoreEventClass, keyDirectObject, nil, noErr, return(), testheapspace(), typeAlias, typeAppParameters, and typeNull.

Referenced by launchappwithdoc().

Here is the call graph for this function:

boolean equalprocesses typrocessinfo rec1,
typrocessinfo rec2
 

Definition at line 562 of file appletprocess.c.

boolean fileisrunning FSSpec fs  ) 
 

Definition at line 552 of file appletprocess.c.

References apprunningflag, fileisrunningvisit(), and processloop().

Here is the call graph for this function:

static boolean fileisrunningvisit typrocessinfo info,
long  refcon
[static]
 

Definition at line 537 of file appletprocess.c.

References apprunningflag, and equalfilespecs().

Referenced by fileisrunning().

Here is the call graph for this function:

static boolean finderevent OSType  idverb,
FSSpec fsdoc
[static]
 

Definition at line 375 of file appletprocess.c.

References appnewhandle(), bringapptofront(), FALSE, filler, GetHandleSize, HLock, kAEFinderEvents, kAEFinderID, tyEventRecord::message, message, tyEventRecord::modifiers, noErr, tyEventRecord::what, tyEventRecord::when, and tyEventRecord::where.

Referenced by launchusingfinder(), and revealinfinder().

Here is the call graph for this function:

boolean findrunningapp OSType  id,
typrocessinfo info
 

Definition at line 127 of file appletprocess.c.

References clearbytes(), findrunningappvisit(), info, longsizeof, and processloop().

Here is the call graph for this function:

static boolean findrunningappvisit typrocessinfo visitinfo,
long  refcon
[static]
 

Definition at line 112 of file appletprocess.c.

References longsizeof, and moveleft().

Referenced by findrunningapp().

Here is the call graph for this function:

boolean getcurrentappfilespec ptrfilespec  pfs  ) 
 

Definition at line 633 of file appletprocess.c.

References app, tyappletrecord::creator, findrunningapp(), and info.

Here is the call graph for this function:

boolean getcurrentappfolder ptrfilespec  pfs  ) 
 

Definition at line 656 of file appletprocess.c.

References filegetparentfolderspec(), and getcurrentappfilespec().

Here is the call graph for this function:

static boolean gethelperfolder ptrfilespec  pfshelperfolder,
bigstring  errormessage
[static]
 

Definition at line 665 of file appletprocess.c.

References copystring(), fileexists(), filegetsubitemspec(), getcurrentappfolder(), and setstringlength.

Referenced by launchHelperApp().

Here is the call graph for this function:

static boolean helpercallback bigstring  fname,
tyfileinfo info,
long  pxinfo
[static]
 

Definition at line 600 of file appletprocess.c.

References bigstring, copystring(), filemakespec(), helperappinfo, launchappwithdoc(), nil, and pushstring().

Referenced by launchHelperApp().

Here is the call graph for this function:

boolean launchappwithdoc FSSpec fsapp,
FSSpec fsdoc,
boolean  flbringtofront
 

Definition at line 203 of file appletprocess.c.

References buildlaunchparamlist(), clearbytes(), disposehandle(), EventAvail(), everyEvent, i, lockhandle(), longsizeof, nil, and noErr.

Referenced by assureappisrunning(), and helpercallback().

Here is the call graph for this function:

boolean launchdeskaccessoryfile FSSpec fs  ) 
 

Definition at line 590 of file appletprocess.c.

References nil, and syserror().

Here is the call graph for this function:

static boolean launchFrontier void   )  [static]
 

Definition at line 713 of file appletprocess.c.

References alertdialog(), bigstring, copystring(), errormessage, launchHelperApp(), and stringlength.

Here is the call graph for this function:

boolean launchHelperApp OSType  serverid,
void *  verrormessage
 

Definition at line 687 of file appletprocess.c.

References copystring(), errormessage, findrunningapp(), folderloop(), gethelperfolder(), helperappinfo, helpercallback(), info, and setstringlength.

Referenced by launchFrontier().

Here is the call graph for this function:

boolean launchusingfinder FSSpec fs  ) 
 

Definition at line 522 of file appletprocess.c.

References finderevent(), and kAEOpenSelection.

Referenced by mouseinline().

Here is the call graph for this function:

static boolean oldsendodoc OSType  appid,
FSSpec fsdoc
[static]
 

Definition at line 290 of file appletprocess.c.

References fl, IACnewverb(), IACsendverb(), kAEOpenDocuments, kCoreEventClass, keyDirectObject, and pushaliaslist().

Here is the call graph for this function:

boolean processloop typrocessloopcallback  callback,
long  refcon
 

Definition at line 59 of file appletprocess.c.

References clearbytes(), typrocessinfo::file, longsizeof, typrocessinfo::name, and noErr.

Referenced by fileisrunning(), and findrunningapp().

Here is the call graph for this function:

static boolean pushaliaslist FSSpec fsdoc,
OSType  listkey,
AppleEvent event
[static]
 

Definition at line 254 of file appletprocess.c.

References tyAEDesc::dataHandle, tyAEDesc::descriptorType, nil, noErr, and typeAlias.

Referenced by oldsendodoc(), sendodoc(), and xxxfinderevent().

boolean quitapplication OSType  idapp  ) 
 

Definition at line 572 of file appletprocess.c.

References fl, IACnewverb(), IACsendverb(), kAEQuitApplication, and kCoreEventClass.

Here is the call graph for this function:

boolean revealinfinder FSSpec fs  ) 
 

Definition at line 528 of file appletprocess.c.

References finderevent().

Here is the call graph for this function:

boolean sendodoc OSType  appid,
FSSpec fsdoc
 

Definition at line 313 of file appletprocess.c.

References findrunningapp(), fl, IACsendverb(), info, kAEOpenDocuments, kCoreEventClass, keyDirectObject, noErr, pushaliaslist(), sizeof(), and typeProcessSerialNumber.

Here is the call graph for this function:

static boolean xxxfinderevent OSType  idverb,
FSSpec fsdoc
[static]
 

Definition at line 348 of file appletprocess.c.

References fl, IACnewverb(), nil, noErr, and pushaliaslist().

Here is the call graph for this function:


Variable Documentation

boolean apprunningflag [static]
 

Definition at line 534 of file appletprocess.c.

Referenced by fileisrunning(), and fileisrunningvisit().

OSType apptype
 

Definition at line 52 of file appletprocess.c.

bigstring errormessage
 

Definition at line 54 of file appletprocess.c.

Referenced by frontDeleteCardTable(), frontEditTable(), frontGetTable(), frontSetRuntimeCard(), frontStartCard(), launchFrontier(), and launchHelperApp().

struct { ... } helperappinfo [static]
 

Referenced by helpercallback(), and launchHelperApp().

boolean launched
 

Definition at line 50 of file appletprocess.c.


Generated on Wed May 31 21:43:05 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6