osamenus.c File Reference

#include "frontier.h"
#include "standard.h"
#include <land.h>
#include "dialogs.h"
#include "ops.h"
#include "kb.h"
#include "memory.h"
#include "langinternal.h"
#include "langipc.h"
#include "osacomponent.h"
#include "osainternal.h"
#include "osamenus.h"
#include "resources.h"
#include <SetUpA5.h>

Include dependency graph for osamenus.c:

Go to the source code of this file.

Defines

#define MSglobals   ((**hcg).menusharingglobals)
#define tickstoignorerequests   15
#define tickstocheckformulas   15
#define MenuList   (*(Handle *)0xA1C)
#define sharedmenuactiveprocUPP   sharedmenuactiveproc
#define sharedmenuidleprocUPP   sharedmenuidleproc
#define sharedmenusendprocUPP   sharedmenusendproc
#define HandleMenuDirtyUPP   HandleMenuDirty
#define menucandofunctionUPP   ((ComponentFunctionUPP) menucandofunction)
#define osaInitSharedMenusUPP   ((ComponentFunctionUPP) osaInitSharedMenus)
#define osaSharedMenuHitUPP   ((ComponentFunctionUPP) osaSharedMenuHit)
#define osaSharedScriptRunningUPP   ((ComponentFunctionUPP) osaSharedScriptRunning)
#define osaCancelSharedScriptUPP   ((ComponentFunctionUPP) osaCancelSharedScript)
#define osaCheckSharedMenusUPP   ((ComponentFunctionUPP) osaCheckSharedMenus)
#define osaDisposeSharedMenusUPP   ((ComponentFunctionUPP) osaDisposeSharedMenus)
#define osaIsSharedMenuUPP   ((ComponentFunctionUPP) osaIsSharedMenu)
#define osaEnableSharedMenusUPP   ((ComponentFunctionUPP) osaEnableSharedMenus)
#define osaRunSharedMenuItemUPP   ((ComponentFunctionUPP) osaRunSharedMenuItem)
#define osaSetScriptErrorCallbackUPP   ((ComponentFunctionUPP) osaSetScriptErrorCallback)
#define osaSetEventFilterCallbackUPP   ((ComponentFunctionUPP) osaSetEventFilterCallback)
#define osaSetMenusInserterCallbackUPP   ((ComponentFunctionUPP) osaSetMenusInserterCallback)
#define osaSetMenusRemoverCallbackUPP   ((ComponentFunctionUPP) osaSetMenusRemoverCallback)
#define osaDirtySharedMenusUPP   ((ComponentFunctionUPP) osaDirtySharedMenus)

Functions

static pascal Boolean ProcessInForeground ()
static pascal short CountMenuArray (hdlcomponentglobals hcg)
static pascal Boolean InstallSharedMenus (hdlcomponentglobals hcg, short idmenuafter)
static pascal Boolean GetSharedMenus (hdlcomponentglobals hglobals, short firstresource)
static pascal Boolean CheckFormulas (hdlcomponentglobals hglobals)
static pascal ComponentResult osaSharedScriptRunning (hdlcomponentglobals hcg, Boolean *flrunning)
static pascal ComponentResult osaCancelSharedScript (hdlcomponentglobals hcg)
static pascal ComponentResult osaDisposeSharedMenus (hdlcomponentglobals hglobals)
static pascal ComponentResult osaCheckSharedMenus (hdlcomponentglobals hglobals, short idinsertafter)
static pascal ComponentResult osaIsSharedMenu (hdlcomponentglobals hcg, short idmenu, Boolean *flshared)
static pascal ComponentResult osaEnableSharedMenus (hdlcomponentglobals hcg, Boolean flenable)
static pascal OSErr sharedmenueventfilter (EventRecord *event, long callback)
static pascal OSErr sharedmenuactiveproc (long refcon)
static pascal Boolean sharedmenuidleproc (EventRecord *ev, long *sleep, RgnHandle *mousergn)
static pascal OSErr sharedmenusendproc (const AppleEvent *, AppleEvent *, AESendMode, AESendPriority, long, AEIdleUPP, AEFilterUPP, long)
static boolean sharedmenuprocessevent (EventRecord *ev)
static pascal ComponentResult osaRunSharedMenuItem (hdlcomponentglobals hglobals, short idmenu, short iditem)
static pascal ComponentResult osaSetScriptErrorCallback (hdlcomponentglobals hglobals, MSstringcallbackUPP errorcallback)
static pascal ComponentResult osaSetEventFilterCallback (hdlcomponentglobals hglobals, MSeventcallbackUPP eventcallback)
static pascal ComponentResult osaSetMenusInserterCallback (hdlcomponentglobals hglobals, MSmenuscallbackUPP callback)
static pascal ComponentResult osaSetMenusRemoverCallback (hdlcomponentglobals hglobals, MSmenuscallbackUPP callback)
static pascal ComponentResult osaSharedMenuHit (hdlcomponentglobals hglobals, short idmenu, short iditem, Boolean *flhit)
static boolean removemenusharinghandlers (hdlcomponentglobals)
static pascal ComponentResult osaDirtySharedMenus (hdlcomponentglobals hglobals)
static pascal OSErr HandleMenuDirty (const AppleEvent *event, AppleEvent *reply, UInt32 refcon)
static boolean installmenusharinghandlers (hdlcomponentglobals hglobals)
static pascal ComponentResult closesharedmenus (hdlcomponentglobals hglobals)
static pascal ComponentResult osaInitSharedMenus (hdlcomponentglobals hglobals)
static pascal ComponentResult menucandofunction (short selector)
static pascal ComponentResult menusharingdispatch (register ComponentParameters *params, Handle storage)
boolean initmenusharingcomponent (void)


Define Documentation

#define HandleMenuDirtyUPP   HandleMenuDirty
 

Definition at line 2650 of file osamenus.c.

Referenced by installmenusharinghandlers(), and removemenusharinghandlers().

#define menucandofunctionUPP   ((ComponentFunctionUPP) menucandofunction)
 

Definition at line 2781 of file osamenus.c.

Referenced by menusharingdispatch().

#define MenuList   (*(Handle *)0xA1C)
 

Referenced by meallocmenuid().

#define MSglobals   ((**hcg).menusharingglobals)
 

Definition at line 1664 of file osamenus.c.

Referenced by CheckFormulas(), CountMenuArray(), GetSharedMenus(), installmenusharinghandlers(), InstallSharedMenus(), osaCancelSharedScript(), osaCheckSharedMenus(), osaDirtySharedMenus(), osaDisposeSharedMenus(), osaEnableSharedMenus(), osaInitSharedMenus(), osaIsSharedMenu(), osaRunSharedMenuItem(), osaSetEventFilterCallback(), osaSetMenusInserterCallback(), osaSetMenusRemoverCallback(), osaSetScriptErrorCallback(), removemenusharinghandlers(), and sharedmenuprocessevent().

#define osaCancelSharedScriptUPP   ((ComponentFunctionUPP) osaCancelSharedScript)
 

Definition at line 2785 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaCheckSharedMenusUPP   ((ComponentFunctionUPP) osaCheckSharedMenus)
 

Definition at line 2786 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaDirtySharedMenusUPP   ((ComponentFunctionUPP) osaDirtySharedMenus)
 

Definition at line 2795 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaDisposeSharedMenusUPP   ((ComponentFunctionUPP) osaDisposeSharedMenus)
 

Definition at line 2787 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaEnableSharedMenusUPP   ((ComponentFunctionUPP) osaEnableSharedMenus)
 

Definition at line 2789 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaInitSharedMenusUPP   ((ComponentFunctionUPP) osaInitSharedMenus)
 

Definition at line 2782 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaIsSharedMenuUPP   ((ComponentFunctionUPP) osaIsSharedMenu)
 

Definition at line 2788 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaRunSharedMenuItemUPP   ((ComponentFunctionUPP) osaRunSharedMenuItem)
 

Definition at line 2790 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSetEventFilterCallbackUPP   ((ComponentFunctionUPP) osaSetEventFilterCallback)
 

Definition at line 2792 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSetMenusInserterCallbackUPP   ((ComponentFunctionUPP) osaSetMenusInserterCallback)
 

Definition at line 2793 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSetMenusRemoverCallbackUPP   ((ComponentFunctionUPP) osaSetMenusRemoverCallback)
 

Definition at line 2794 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSetScriptErrorCallbackUPP   ((ComponentFunctionUPP) osaSetScriptErrorCallback)
 

Definition at line 2791 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSharedMenuHitUPP   ((ComponentFunctionUPP) osaSharedMenuHit)
 

Definition at line 2783 of file osamenus.c.

Referenced by menusharingdispatch().

#define osaSharedScriptRunningUPP   ((ComponentFunctionUPP) osaSharedScriptRunning)
 

Definition at line 2784 of file osamenus.c.

Referenced by menusharingdispatch().

#define sharedmenuactiveprocUPP   sharedmenuactiveproc
 

Definition at line 2169 of file osamenus.c.

Referenced by osaRunSharedMenuItem().

#define sharedmenuidleprocUPP   sharedmenuidleproc
 

Definition at line 2171 of file osamenus.c.

Referenced by sharedmenusendproc().

#define sharedmenusendprocUPP   sharedmenusendproc
 

Definition at line 2173 of file osamenus.c.

Referenced by osaRunSharedMenuItem().

#define tickstocheckformulas   15
 

Definition at line 1670 of file osamenus.c.

Referenced by osaCheckSharedMenus().

#define tickstoignorerequests   15
 

Definition at line 1668 of file osamenus.c.

Referenced by osaCheckSharedMenus().


Function Documentation

static pascal Boolean CheckFormulas hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 1780 of file osamenus.c.

References fldisableyield, langipccheckformulas(), MSglobals, osasetclientzone(), osasethomezone(), pophashtable(), and pushhashtable().

Referenced by osaCheckSharedMenus().

Here is the call graph for this function:

static pascal ComponentResult closesharedmenus hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 2691 of file osamenus.c.

References closeosaservers(), disposecomponentglobals(), osaDisposeSharedMenus(), and removemenusharinghandlers().

Referenced by menusharingdispatch().

Here is the call graph for this function:

static pascal short CountMenuArray hdlcomponentglobals  hcg  )  [static]
 

Definition at line 1694 of file osamenus.c.

References GetHandleSize, and MSglobals.

Referenced by InstallSharedMenus(), osaDisposeSharedMenus(), osaEnableSharedMenus(), and osaIsSharedMenu().

static pascal Boolean GetSharedMenus hdlcomponentglobals  hglobals,
short  firstresource
[static]
 

Definition at line 1750 of file osamenus.c.

References langipcgetmenuarray(), MSglobals, NewHandle, osasetclientzone(), and osasethomezone().

Referenced by osaCheckSharedMenus().

Here is the call graph for this function:

static pascal OSErr HandleMenuDirty const AppleEvent event,
AppleEvent reply,
UInt32  refcon
[static]
 

Definition at line 2631 of file osamenus.c.

References osaDirtySharedMenus().

Here is the call graph for this function:

boolean initmenusharingcomponent void   ) 
 

Definition at line 3101 of file osamenus.c.

References frontierstring, menusharingcomponentstring, menusharingdispatch(), msComponentType, osaregistercomponent(), and RememberA5.

Referenced by osacomponentstart().

Here is the call graph for this function:

static boolean installmenusharinghandlers hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 2661 of file osamenus.c.

References HandleMenuDirtyUPP, and MSglobals.

Referenced by osaInitSharedMenus().

static pascal Boolean InstallSharedMenus hdlcomponentglobals  hcg,
short  idmenuafter
[static]
 

Definition at line 1709 of file osamenus.c.

References CallMSmenuscallbackProc, CountMenuArray(), tyruntimemenurecord::flhierarchic, tyruntimemenurecord::flinserted, tyruntimemenurecord::hmenu, MSglobals, RestoreA5, and SetUpCurA5.

Referenced by osaCheckSharedMenus().

Here is the call graph for this function:

static pascal ComponentResult menucandofunction short  selector  )  [static]
 

Definition at line 2749 of file osamenus.c.

References msCancelSharedScriptCommand, msCheckSharedMenusCommand, msDirtySharedMenusCommand, msDisposeSharedMenusCommand, msEnableSharedMenusCommand, msInitSharedMenusCommand, msIsSharedMenuCommand, msRunSharedMenuItemCommand, msSetEventFilterCallbackCommand, msSetMenusInserterCallbackCommand, msSetMenusRemoverCallbackCommand, msSetScriptErrorCallbackCommand, msSharedMenuHitCommand, and msSharedScriptRunningCommand.

static pascal ComponentResult menusharingdispatch register ComponentParameters *  params,
Handle  storage
[static]
 

Definition at line 2939 of file osamenus.c.

References assert, callosafunction(), closesharedmenus(), menucandofunctionUPP, msCancelSharedScriptCommand, msCheckSharedMenusCommand, msDirtySharedMenusCommand, msDisposeSharedMenusCommand, msEnableSharedMenusCommand, msInitSharedMenusCommand, msIsSharedMenuCommand, msRunSharedMenuItemCommand, msSetEventFilterCallbackCommand, msSetMenusInserterCallbackCommand, msSetMenusRemoverCallbackCommand, msSetScriptErrorCallbackCommand, msSharedMenuHitCommand, msSharedScriptRunningCommand, newcomponentglobals(), osaCancelSharedScriptUPP, osaCheckSharedMenusUPP, osaDirtySharedMenusUPP, osaDisposeSharedMenusUPP, osaEnableSharedMenusUPP, osaInitSharedMenusUPP, osaIsSharedMenuUPP, osaRunSharedMenuItemUPP, osaSetEventFilterCallbackUPP, osaSetMenusInserterCallbackUPP, osaSetMenusRemoverCallbackUPP, osaSetScriptErrorCallbackUPP, osaSharedMenuHitUPP, osaSharedScriptRunningUPP, RestoreA5, and SetUpAppA5.

Referenced by initmenusharingcomponent().

Here is the call graph for this function:

static pascal ComponentResult osaCancelSharedScript hdlcomponentglobals  hcg  )  [static]
 

Definition at line 1825 of file osamenus.c.

References MSglobals, and processdisposecode().

Here is the call graph for this function:

static pascal ComponentResult osaCheckSharedMenus hdlcomponentglobals  hglobals,
short  idinsertafter
[static]
 

Definition at line 1911 of file osamenus.c.

References CheckFormulas(), flscriptrunning, GetSharedMenus(), InstallSharedMenus(), MSglobals, osaDisposeSharedMenus(), ProcessInForeground(), tickstocheckformulas, and tickstoignorerequests.

Here is the call graph for this function:

static pascal ComponentResult osaDirtySharedMenus hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 2588 of file osamenus.c.

References closeosaservers(), flosashutdown, MSglobals, osaDisposeSharedMenus(), removemenusharinghandlers(), RestoreA5, and SetUpAppA5.

Referenced by HandleMenuDirty().

Here is the call graph for this function:

static pascal ComponentResult osaDisposeSharedMenus hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 1843 of file osamenus.c.

References CallMSmenuscallbackProc, CountMenuArray(), tyruntimemenurecord::flinserted, tyruntimemenurecord::hmenu, tyruntimemenurecord::idmenu, MSglobals, RestoreA5, and SetUpCurA5.

Referenced by closesharedmenus(), osaCheckSharedMenus(), and osaDirtySharedMenus().

Here is the call graph for this function:

static pascal ComponentResult osaEnableSharedMenus hdlcomponentglobals  hcg,
Boolean  flenable
[static]
 

Definition at line 2010 of file osamenus.c.

References ACCESSOR_CALLS_ARE_FUNCTIONS, CountMenuArray(), and MSglobals.

Here is the call graph for this function:

static pascal ComponentResult osaInitSharedMenus hdlcomponentglobals  hglobals  )  [static]
 

Definition at line 2721 of file osamenus.c.

References tycomponentglobals::clientid, installmenusharinghandlers(), MSglobals, and typeLAND.

Here is the call graph for this function:

static pascal ComponentResult osaIsSharedMenu hdlcomponentglobals  hcg,
short  idmenu,
Boolean flshared
[static]
 

Definition at line 1980 of file osamenus.c.

References CountMenuArray(), tyruntimemenurecord::idmenu, and MSglobals.

Referenced by osaSharedMenuHit().

Here is the call graph for this function:

static pascal ComponentResult osaRunSharedMenuItem hdlcomponentglobals  hglobals,
short  idmenu,
short  iditem
[static]
 

Definition at line 2261 of file osamenus.c.

References alertdialog(), bigstring, CallMSstringcallbackProc, cantopencomponenterror, copydatahandle(), tyAEDesc::dataHandle, datahandletostring(), tyAEDesc::descriptorType, disposehandle(), fldisableyield, flscriptrunning, getosaserver(), langcallbacks, langipcgetitemlangtext(), langostypeparamerror(), MSglobals, newdescwithhandle(), osaDoScript(), osageterror(), osainstallpatch(), osapostclientcallback(), osapreclientcallback(), osaremovepatch(), osaScriptError(), osaSetActiveProc(), osasetclientzone(), osasethomezone(), osaSetSendProc(), tylangcallbacks::processeventcallback, RestoreA5, SetUpCurA5, sharedmenuactiveprocUPP, sharedmenuprocessevent(), sharedmenusendprocUPP, texthandletostring(), typeChar, typeLAND, typeLongInteger, and typeNull.

Referenced by osaSharedMenuHit().

Here is the call graph for this function:

static pascal ComponentResult osaSetEventFilterCallback hdlcomponentglobals  hglobals,
MSeventcallbackUPP  eventcallback
[static]
 

Definition at line 2523 of file osamenus.c.

References MSglobals.

static pascal ComponentResult osaSetMenusInserterCallback hdlcomponentglobals  hglobals,
MSmenuscallbackUPP  callback
[static]
 

Definition at line 2538 of file osamenus.c.

References MSglobals.

static pascal ComponentResult osaSetMenusRemoverCallback hdlcomponentglobals  hglobals,
MSmenuscallbackUPP  callback
[static]
 

Definition at line 2553 of file osamenus.c.

References MSglobals.

static pascal ComponentResult osaSetScriptErrorCallback hdlcomponentglobals  hglobals,
MSstringcallbackUPP  errorcallback
[static]
 

Definition at line 2513 of file osamenus.c.

References MSglobals.

static pascal ComponentResult osaSharedMenuHit hdlcomponentglobals  hglobals,
short  idmenu,
short  iditem,
Boolean flhit
[static]
 

Definition at line 2568 of file osamenus.c.

References osaIsSharedMenu(), and osaRunSharedMenuItem().

Here is the call graph for this function:

static pascal ComponentResult osaSharedScriptRunning hdlcomponentglobals  hcg,
Boolean flrunning
[static]
 

Definition at line 1810 of file osamenus.c.

References flscriptrunning.

static pascal Boolean ProcessInForeground  )  [static]
 

Definition at line 1674 of file osamenus.c.

Referenced by osaCheckSharedMenus().

static boolean removemenusharinghandlers hdlcomponentglobals   )  [static]
 

Definition at line 2676 of file osamenus.c.

References HandleMenuDirtyUPP, and MSglobals.

Referenced by closesharedmenus(), and osaDirtySharedMenus().

static pascal OSErr sharedmenuactiveproc long  refcon  )  [static]
 

Definition at line 2097 of file osamenus.c.

References activMask, keyDownMask, mDownMask, osadefaultactiveproc(), osMask, RestoreA5, SetUpAppA5, sharedmenueventfilter(), and updateMask.

Here is the call graph for this function:

static pascal OSErr sharedmenueventfilter EventRecord event,
long  callback
[static]
 

Definition at line 2051 of file osamenus.c.

References CallMSeventcallbackProc, iscmdperiodevent(), keyDown, mouseDown, RestoreA5, and SetUpCurA5.

Referenced by sharedmenuactiveproc(), and sharedmenuidleproc().

Here is the call graph for this function:

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

Definition at line 2133 of file osamenus.c.

References osafindclienteventfilter(), RestoreA5, SetUpAppA5, and sharedmenueventfilter().

Here is the call graph for this function:

static boolean sharedmenuprocessevent EventRecord ev  )  [static]
 

Definition at line 2235 of file osamenus.c.

References CallMSeventcallbackProc, MSglobals, osaglobals, osapostclientcallback(), osapreclientcallback(), RestoreA5, and SetUpCurA5.

Referenced by osaRunSharedMenuItem().

Here is the call graph for this function:

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

Definition at line 2192 of file osamenus.c.

References osadefaultactiveproc(), RestoreA5, SetUpAppA5, and sharedmenuidleprocUPP.

Here is the call graph for this function:


Generated on Fri Jun 9 20:40:57 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6