home *** CD-ROM | disk | FTP | other *** search
/ Apple Developer Connection 1998 Fall: Game Toolkit / Disc.iso / SDKs / QuickTime Mac / AIncludes / Menus.a < prev    next >
Encoding:
Text File  |  1998-04-09  |  26.9 KB  |  972 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Menus.a
  3. ;
  4. ;    Contains:    Menu Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8.1
  7. ;                Release:    QuickTime 3.0
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved.
  10. ;
  11. ;    Bugs?:        Please include the the file and version information (from above) with
  12. ;                the problem description.  Developers belonging to one of the Apple
  13. ;                developer programs can submit bug reports to:
  14. ;
  15. ;                    devsupport@apple.com
  16. ;
  17. ;
  18.     IF &TYPE('__MENUS__') = 'UNDEFINED' THEN
  19. __MENUS__ SET 1
  20.  
  21.     IF &TYPE('__APPLEEVENTS__') = 'UNDEFINED' THEN
  22.     include 'AppleEvents.a'
  23.     ENDIF
  24.     IF &TYPE('__CONDITIONALMACROS__') = 'UNDEFINED' THEN
  25.     include 'ConditionalMacros.a'
  26.     ENDIF
  27.     IF &TYPE('__EVENTS__') = 'UNDEFINED' THEN
  28.     include 'Events.a'
  29.     ENDIF
  30.     IF &TYPE('__PROCESSES__') = 'UNDEFINED' THEN
  31.     include 'Processes.a'
  32.     ENDIF
  33.     IF &TYPE('__TEXTCOMMON__') = 'UNDEFINED' THEN
  34.     include 'TextCommon.a'
  35.     ENDIF
  36.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  37.     include 'MacTypes.a'
  38.     ENDIF
  39.     IF &TYPE('__QUICKDRAW__') = 'UNDEFINED' THEN
  40.     include 'Quickdraw.a'
  41.     ENDIF
  42.  
  43. ; ——————————————————————————————————————————————————————————————————————————————————————
  44. ;     • Menu Types (for Appearance 1.0 and later)                                            
  45. ; ——————————————————————————————————————————————————————————————————————————————————————
  46.  
  47. kMenuStdMenuProc                EQU        63
  48. kMenuStdMenuBarProc                EQU        63
  49.  
  50. kMenuNoModifiers                EQU        0                    ; Mask for no modifiers
  51. kMenuShiftModifier                EQU        $01                    ; Mask for shift key modifier
  52. kMenuOptionModifier                EQU        $02                    ; Mask for option key modifier
  53. kMenuControlModifier            EQU        $04                    ; Mask for control key modifier
  54. kMenuNoCommandModifier            EQU        $08                    ; Mask for no command key modifier
  55.  
  56. kMenuNoIcon                        EQU        0                    ; No icon
  57. kMenuIconType                    EQU        1                    ; Type for ICON
  58. kMenuShrinkIconType                EQU        2                    ; Type for ICON plotted 16 x 16
  59. kMenuSmallIconType                EQU        3                    ; Type for SICN
  60. kMenuColorIconType                EQU        4                    ; Type for cicn
  61. kMenuIconSuiteType                EQU        5                    ; Type for Icon Suite
  62. kMenuIconRefType                EQU        6                    ; Type for Icon Ref
  63. ;  —— end of Appearance 1.0 types
  64.  
  65.  
  66. noMark                            EQU        0                    ;mark symbol for MarkItem
  67.  
  68.                                                             ; menu defProc messages 
  69. kMenuDrawMsg                    EQU        0
  70. kMenuChooseMsg                    EQU        1
  71. kMenuSizeMsg                    EQU        2
  72. kMenuDrawItemMsg                EQU        4
  73. kMenuCalcItemMsg                EQU        5
  74. kMenuThemeSavvyMsg                EQU        7                    ; is your MDEF theme-savvy?  If so, return hex 7473 in the whichItem parameter
  75. mDrawMsg                        EQU        0
  76. mChooseMsg                        EQU        1
  77. mSizeMsg                        EQU        2
  78. mDrawItemMsg                    EQU        4
  79. mCalcItemMsg                    EQU        5
  80.  
  81. kThemeSavvyMenuResponse            EQU        $7473
  82.  
  83. textMenuProc                    EQU        0
  84. hMenuCmd                        EQU        27                    ;itemCmd == 0x001B ==> hierarchical menu
  85. hierMenu                        EQU        -1                    ;a hierarchical menu - for InsertMenu call
  86. mPopUpMsg                        EQU        3                    ;menu defProc messages - place yourself
  87. mctAllItems                        EQU        -98                    ;search for all Items for the given ID
  88. mctLastIDIndic                    EQU        -99                    ;last color table entry has this in ID field
  89.  
  90. MenuInfo                RECORD 0
  91. menuID                     ds.w    1                ; offset: $0 (0)
  92. menuWidth                 ds.w    1                ; offset: $2 (2)
  93. menuHeight                 ds.w    1                ; offset: $4 (4)
  94. menuProc                 ds.l    1                ; offset: $6 (6)
  95. enableFlags                 ds.l    1                ; offset: $A (10)
  96. menuData                 ds        Str255            ; offset: $E (14)
  97. sizeof                     EQU *                    ; size:   $10E (270)
  98.                         ENDR
  99. ; typedef struct MenuInfo *                MenuPtr
  100.  
  101. ; typedef MenuPtr *                        MenuHandle
  102.  
  103. ;  MenuRef is obsolete.  Use MenuHandle. 
  104. ; typedef MenuHandle                     MenuRef
  105.  
  106. MCEntry                    RECORD 0
  107. mctID                     ds.w    1                ; offset: $0 (0)        ; menu ID.  ID = 0 is the menu bar
  108. mctItem                     ds.w    1                ; offset: $2 (2)        ; menu Item. Item = 0 is a title
  109. mctRGB1                     ds        RGBColor        ; offset: $4 (4)        ; usage depends on ID and Item
  110. mctRGB2                     ds        RGBColor        ; offset: $A (10)        ; usage depends on ID and Item
  111. mctRGB3                     ds        RGBColor        ; offset: $10 (16)        ; usage depends on ID and Item
  112. mctRGB4                     ds        RGBColor        ; offset: $16 (22)        ; usage depends on ID and Item
  113. mctReserved                 ds.w    1                ; offset: $1C (28)        ; reserved for internal use
  114. sizeof                     EQU *                    ; size:   $1E (30)
  115.                         ENDR
  116. ; typedef struct MCEntry *                MCEntryPtr
  117.  
  118. MCTable                    RECORD 0
  119. elements                 ds.b    1 * MCEntry.sizeof
  120. sizeof                     EQU *                    ; size:   $1E (30)
  121.                         ENDR
  122.  
  123.  
  124. ; typedef struct MCEntry *                MCTablePtr
  125.  
  126. ; typedef MCTablePtr *                    MCTableHandle
  127.  
  128. MenuCRsrc                RECORD 0
  129. numEntries                 ds.w    1                ; offset: $0 (0)        ; number of entries
  130. mcEntryRecs                 ds        MCTable            ; offset: $2 (2)        ; ARRAY [1..numEntries] of MCEntry
  131. sizeof                     EQU *                    ; size:   $20 (32)
  132.                         ENDR
  133. ; typedef struct MenuCRsrc *            MenuCRsrcPtr
  134.  
  135. ; typedef MenuCRsrcPtr *                MenuCRsrcHandle
  136.  
  137.     IF TARGET_OS_WIN32 THEN
  138. ;  QuickTime 3.0 
  139. MenuAccessKeyRec        RECORD 0
  140. count                     ds.w    1                ; offset: $0 (0)
  141. flags                     ds.l    1                ; offset: $2 (2)
  142. keys                     ds.b    1                ; offset: $6 (6) <-- really an array of length one
  143.                          ORG 8
  144. sizeof                     EQU *                    ; size:   $8 (8)
  145.                         ENDR
  146. ; typedef struct MenuAccessKeyRec *        MenuAccessKeyPtr
  147.  
  148. ; typedef MenuAccessKeyPtr *            MenuAccessKeyHandle
  149.  
  150. ;
  151. ; pascal void SetMenuItemHotKey(MenuRef menuRef, short itemID, char hotKey, long flags)
  152. ;
  153.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  154.         IMPORT_CFM_FUNCTION SetMenuItemHotKey
  155.     ENDIF
  156.  
  157.     ENDIF    ; TARGET_OS_WIN32
  158.  
  159. ;
  160. ; pascal short GetMBarHeight(void)
  161. ;
  162.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  163.         Macro
  164.         _GetMBarHeight        &dest=(sp)
  165.             move.w            $0BAA,&dest
  166.         EndM
  167.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  168.         IMPORT_CFM_FUNCTION GetMBarHeight
  169.     ENDIF
  170.  
  171. ;
  172. ; pascal void InitMenus(void )
  173. ;
  174.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  175.         _InitMenus:    OPWORD    $A930
  176.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  177.         IMPORT_CFM_FUNCTION InitMenus
  178.     ENDIF
  179.  
  180. ;
  181. ; pascal MenuHandle NewMenu(short menuID, ConstStr255Param menuTitle)
  182. ;
  183.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  184.         _NewMenu:    OPWORD    $A931
  185.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  186.         IMPORT_CFM_FUNCTION NewMenu
  187.     ENDIF
  188.  
  189. ;
  190. ; pascal MenuHandle GetMenu(short resourceID)
  191. ;
  192.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  193.         _GetMenu:    OPWORD    $A9BF
  194.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  195.         IMPORT_CFM_FUNCTION GetMenu
  196.     ENDIF
  197.  
  198. ;
  199. ; pascal void DisposeMenu(MenuHandle theMenu)
  200. ;
  201.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  202.         _DisposeMenu:    OPWORD    $A932
  203.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  204.         IMPORT_CFM_FUNCTION DisposeMenu
  205.     ENDIF
  206.  
  207. ;
  208. ; pascal void AppendMenu(MenuHandle menu, ConstStr255Param data)
  209. ;
  210.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  211.         _AppendMenu:    OPWORD    $A933
  212.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  213.         IMPORT_CFM_FUNCTION AppendMenu
  214.     ENDIF
  215.  
  216. ;
  217. ; pascal void InsertResMenu(MenuHandle theMenu, ResType theType, short afterItem)
  218. ;
  219.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  220.         _InsertResMenu:    OPWORD    $A951
  221.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  222.         IMPORT_CFM_FUNCTION InsertResMenu
  223.     ENDIF
  224.  
  225. ;
  226. ; pascal void InsertMenu(MenuHandle theMenu, short beforeID)
  227. ;
  228.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  229.         _InsertMenu:    OPWORD    $A935
  230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION InsertMenu
  232.     ENDIF
  233.  
  234. ;
  235. ; pascal void DeleteMenu(short menuID)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  238.         _DeleteMenu:    OPWORD    $A936
  239.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  240.         IMPORT_CFM_FUNCTION DeleteMenu
  241.     ENDIF
  242.  
  243. ;
  244. ; pascal void AppendResMenu(MenuHandle theMenu, ResType theType)
  245. ;
  246.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  247.         _AppendResMenu:    OPWORD    $A94D
  248.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  249.         IMPORT_CFM_FUNCTION AppendResMenu
  250.     ENDIF
  251.  
  252. ;
  253. ; pascal void InsertMenuItem(MenuHandle theMenu, ConstStr255Param itemString, short afterItem)
  254. ;
  255.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  256.         _InsertMenuItem:    OPWORD    $A826
  257.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  258.         IMPORT_CFM_FUNCTION InsertMenuItem
  259.     ENDIF
  260.  
  261. ;
  262. ; pascal void DeleteMenuItem(MenuHandle theMenu, short item)
  263. ;
  264.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  265.         _DeleteMenuItem:    OPWORD    $A952
  266.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  267.         IMPORT_CFM_FUNCTION DeleteMenuItem
  268.     ENDIF
  269.  
  270. ;
  271. ; pascal long MenuKey(CharParameter ch)
  272. ;
  273.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  274.         _MenuKey:    OPWORD    $A93E
  275.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  276.         IMPORT_CFM_FUNCTION MenuKey
  277.     ENDIF
  278.  
  279. ;
  280. ; pascal void HiliteMenu(short menuID)
  281. ;
  282.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  283.         _HiliteMenu:    OPWORD    $A938
  284.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  285.         IMPORT_CFM_FUNCTION HiliteMenu
  286.     ENDIF
  287.  
  288. ;
  289. ; pascal void SetMenuItemText(MenuHandle theMenu, short item, ConstStr255Param itemString)
  290. ;
  291.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  292.         _SetMenuItemText:    OPWORD    $A947
  293.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  294.         IMPORT_CFM_FUNCTION SetMenuItemText
  295.     ENDIF
  296.  
  297. ;
  298. ; pascal void GetMenuItemText(MenuHandle theMenu, short item, Str255 itemString)
  299. ;
  300.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  301.         _GetMenuItemText:    OPWORD    $A946
  302.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  303.         IMPORT_CFM_FUNCTION GetMenuItemText
  304.     ENDIF
  305.  
  306. ;
  307. ; pascal void SetItemMark(MenuHandle theMenu, short item, CharParameter markChar)
  308. ;
  309.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  310.         _SetItemMark:    OPWORD    $A944
  311.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  312.         IMPORT_CFM_FUNCTION SetItemMark
  313.     ENDIF
  314.  
  315. ;
  316. ; pascal void GetItemMark(MenuHandle theMenu, short item, CharParameter *markChar)
  317. ;
  318.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  319.         _GetItemMark:    OPWORD    $A943
  320.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  321.         IMPORT_CFM_FUNCTION GetItemMark
  322.     ENDIF
  323.  
  324. ;
  325. ; pascal void SetItemCmd(MenuHandle theMenu, short item, CharParameter cmdChar)
  326. ;
  327.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  328.         _SetItemCmd:    OPWORD    $A84F
  329.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  330.         IMPORT_CFM_FUNCTION SetItemCmd
  331.     ENDIF
  332.  
  333. ;
  334. ; pascal void GetItemCmd(MenuHandle theMenu, short item, CharParameter *cmdChar)
  335. ;
  336.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  337.         _GetItemCmd:    OPWORD    $A84E
  338.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  339.         IMPORT_CFM_FUNCTION GetItemCmd
  340.     ENDIF
  341.  
  342. ;
  343. ; pascal void SetItemIcon(MenuHandle theMenu, short item, short iconIndex)
  344. ;
  345.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  346.         _SetItemIcon:    OPWORD    $A940
  347.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  348.         IMPORT_CFM_FUNCTION SetItemIcon
  349.     ENDIF
  350.  
  351. ;
  352. ; pascal void GetItemIcon(MenuHandle theMenu, short item, short *iconIndex)
  353. ;
  354.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  355.         _GetItemIcon:    OPWORD    $A93F
  356.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  357.         IMPORT_CFM_FUNCTION GetItemIcon
  358.     ENDIF
  359.  
  360. ;
  361. ; pascal void SetItemStyle(MenuHandle theMenu, short item, StyleParameter chStyle)
  362. ;
  363.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  364.         _SetItemStyle:    OPWORD    $A942
  365.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  366.         IMPORT_CFM_FUNCTION SetItemStyle
  367.     ENDIF
  368.  
  369. ;
  370. ; pascal void GetItemStyle(MenuHandle theMenu, short item, Style *chStyle)
  371. ;
  372.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  373.         _GetItemStyle:    OPWORD    $A941
  374.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  375.         IMPORT_CFM_FUNCTION GetItemStyle
  376.     ENDIF
  377.  
  378. ;
  379. ; pascal MenuHandle GetMenuHandle(short menuID)
  380. ;
  381.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  382.         _GetMenuHandle:    OPWORD    $A949
  383.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  384.         IMPORT_CFM_FUNCTION GetMenuHandle
  385.     ENDIF
  386.  
  387. ;
  388. ; pascal void CalcMenuSize(MenuHandle theMenu)
  389. ;
  390.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  391.         _CalcMenuSize:    OPWORD    $A948
  392.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  393.         IMPORT_CFM_FUNCTION CalcMenuSize
  394.     ENDIF
  395.  
  396. ;
  397. ; pascal void DisableItem(MenuHandle theMenu, short item)
  398. ;
  399.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  400.         _DisableItem:    OPWORD    $A93A
  401.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  402.         IMPORT_CFM_FUNCTION DisableItem
  403.     ENDIF
  404.  
  405. ;
  406. ; pascal void EnableItem(MenuHandle theMenu, short item)
  407. ;
  408.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  409.         _EnableItem:    OPWORD    $A939
  410.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  411.         IMPORT_CFM_FUNCTION EnableItem
  412.     ENDIF
  413.  
  414. ;
  415. ; pascal void FlashMenuBar(short menuID)
  416. ;
  417.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  418.         _FlashMenuBar:    OPWORD    $A94C
  419.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  420.         IMPORT_CFM_FUNCTION FlashMenuBar
  421.     ENDIF
  422.  
  423. ;
  424. ; pascal long PopUpMenuSelect(MenuHandle menu, short top, short left, short popUpItem)
  425. ;
  426.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  427.         _PopUpMenuSelect:    OPWORD    $A80B
  428.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  429.         IMPORT_CFM_FUNCTION PopUpMenuSelect
  430.     ENDIF
  431.  
  432. ;
  433. ; pascal long MenuChoice(void )
  434. ;
  435.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  436.         _MenuChoice:    OPWORD    $AA66
  437.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  438.         IMPORT_CFM_FUNCTION MenuChoice
  439.     ENDIF
  440.  
  441. ;
  442. ; pascal void DeleteMCEntries(short menuID, short menuItem)
  443. ;
  444.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  445.         _DeleteMCEntries:    OPWORD    $AA60
  446.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  447.         IMPORT_CFM_FUNCTION DeleteMCEntries
  448.     ENDIF
  449.  
  450. ;
  451. ; pascal MCTableHandle GetMCInfo(void )
  452. ;
  453.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  454.         _GetMCInfo:    OPWORD    $AA61
  455.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  456.         IMPORT_CFM_FUNCTION GetMCInfo
  457.     ENDIF
  458.  
  459. ;
  460. ; pascal void SetMCInfo(MCTableHandle menuCTbl)
  461. ;
  462.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  463.         _SetMCInfo:    OPWORD    $AA62
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION SetMCInfo
  466.     ENDIF
  467.  
  468. ;
  469. ; pascal void DisposeMCInfo(MCTableHandle menuCTbl)
  470. ;
  471.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  472.         _DisposeMCInfo:    OPWORD    $AA63
  473.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  474.         IMPORT_CFM_FUNCTION DisposeMCInfo
  475.     ENDIF
  476.  
  477. ;
  478. ; pascal MCEntryPtr GetMCEntry(short menuID, short menuItem)
  479. ;
  480.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  481.         _GetMCEntry:    OPWORD    $AA64
  482.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  483.         IMPORT_CFM_FUNCTION GetMCEntry
  484.     ENDIF
  485.  
  486. ;
  487. ; pascal void SetMCEntries(short numEntries, MCTablePtr menuCEntries)
  488. ;
  489.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  490.         _SetMCEntries:    OPWORD    $AA65
  491.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  492.         IMPORT_CFM_FUNCTION SetMCEntries
  493.     ENDIF
  494.  
  495. ;
  496. ; pascal void DrawMenuBar(void )
  497. ;
  498.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  499.         _DrawMenuBar:    OPWORD    $A937
  500.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  501.         IMPORT_CFM_FUNCTION DrawMenuBar
  502.     ENDIF
  503.  
  504. ;
  505. ; pascal void InvalMenuBar(void )
  506. ;
  507.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  508.         _InvalMenuBar:    OPWORD    $A81D
  509.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  510.         IMPORT_CFM_FUNCTION InvalMenuBar
  511.     ENDIF
  512.  
  513. ;
  514. ; pascal void InitProcMenu(short resID)
  515. ;
  516.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  517.         _InitProcMenu:    OPWORD    $A808
  518.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  519.         IMPORT_CFM_FUNCTION InitProcMenu
  520.     ENDIF
  521.  
  522. ;
  523. ; pascal Handle GetMenuBar(void )
  524. ;
  525.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  526.         _GetMenuBar:    OPWORD    $A93B
  527.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  528.         IMPORT_CFM_FUNCTION GetMenuBar
  529.     ENDIF
  530.  
  531. ;
  532. ; pascal void SetMenuBar(Handle menuList)
  533. ;
  534.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  535.         _SetMenuBar:    OPWORD    $A93C
  536.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  537.         IMPORT_CFM_FUNCTION SetMenuBar
  538.     ENDIF
  539.  
  540. ;
  541. ; pascal Boolean SystemEdit(short editCmd)
  542. ;
  543.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  544.         _SystemEdit:    OPWORD    $A9C2
  545.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  546.         IMPORT_CFM_FUNCTION SystemEdit
  547.     ENDIF
  548.  
  549. ;
  550. ; pascal void SystemMenu(long menuResult)
  551. ;
  552.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  553.         _SystemMenu:    OPWORD    $A9B5
  554.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  555.         IMPORT_CFM_FUNCTION SystemMenu
  556.     ENDIF
  557.  
  558. ;
  559. ; pascal Handle GetNewMBar(short menuBarID)
  560. ;
  561.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  562.         _GetNewMBar:    OPWORD    $A9C0
  563.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  564.         IMPORT_CFM_FUNCTION GetNewMBar
  565.     ENDIF
  566.  
  567. ;
  568. ; pascal void ClearMenuBar(void )
  569. ;
  570.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  571.         _ClearMenuBar:    OPWORD    $A934
  572.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  573.         IMPORT_CFM_FUNCTION ClearMenuBar
  574.     ENDIF
  575.  
  576. ;
  577. ; pascal void CheckItem(MenuHandle theMenu, short item, Boolean checked)
  578. ;
  579.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  580.         _CheckItem:    OPWORD    $A945
  581.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  582.         IMPORT_CFM_FUNCTION CheckItem
  583.     ENDIF
  584.  
  585. ;
  586. ; pascal short CountMItems(MenuHandle theMenu)
  587. ;
  588.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  589.         _CountMItems:    OPWORD    $A950
  590.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  591.         IMPORT_CFM_FUNCTION CountMItems
  592.     ENDIF
  593.  
  594. ;
  595. ; pascal void SetMenuFlash(short count)
  596. ;
  597.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  598.         _SetMenuFlash:    OPWORD    $A94A
  599.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  600.         IMPORT_CFM_FUNCTION SetMenuFlash
  601.     ENDIF
  602.  
  603. ;
  604. ; pascal long MenuSelect(Point startPt)
  605. ;
  606.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  607.         _MenuSelect:    OPWORD    $A93D
  608.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  609.         IMPORT_CFM_FUNCTION MenuSelect
  610.     ENDIF
  611.  
  612. ;
  613. ; pascal void InsertFontResMenu(MenuHandle theMenu, short afterItem, short scriptFilter)
  614. ;
  615.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  616.         Macro
  617.         _InsertFontResMenu
  618.             move.w              #$0400,D0
  619.             dc.w                $A825
  620.         EndM
  621.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  622.         IMPORT_CFM_FUNCTION InsertFontResMenu
  623.     ENDIF
  624.  
  625. ;
  626. ; pascal void InsertIntlResMenu(MenuHandle theMenu, ResType theType, short afterItem, short scriptFilter)
  627. ;
  628.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  629.         Macro
  630.         _InsertIntlResMenu
  631.             move.w              #$0601,D0
  632.             dc.w                $A825
  633.         EndM
  634.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  635.         IMPORT_CFM_FUNCTION InsertIntlResMenu
  636.     ENDIF
  637.  
  638.  
  639. ; ——————————————————————————————————————————————————————————————————————————————————————
  640. ;     • Appearance 1.0 and later Menu Manager routines                                    
  641. ; ——————————————————————————————————————————————————————————————————————————————————————
  642. ;
  643. ; pascal UInt32 MenuEvent(const EventRecord *inEvent)
  644. ;
  645.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  646.         Macro
  647.         _MenuEvent
  648.             move.w              #$020C,D0
  649.             dc.w                $A825
  650.         EndM
  651.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  652.         IMPORT_CFM_FUNCTION MenuEvent
  653.     ENDIF
  654.  
  655. ;
  656. ; pascal OSErr SetMenuItemCommandID(MenuHandle inMenu, SInt16 inItem, UInt32 inCommandID)
  657. ;
  658.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  659.         Macro
  660.         _SetMenuItemCommandID
  661.             move.w              #$0502,D0
  662.             dc.w                $A825
  663.         EndM
  664.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  665.         IMPORT_CFM_FUNCTION SetMenuItemCommandID
  666.     ENDIF
  667.  
  668. ;
  669. ; pascal OSErr GetMenuItemCommandID(MenuHandle inMenu, SInt16 inItem, UInt32 *outCommandID)
  670. ;
  671.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  672.         Macro
  673.         _GetMenuItemCommandID
  674.             move.w              #$0503,D0
  675.             dc.w                $A825
  676.         EndM
  677.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  678.         IMPORT_CFM_FUNCTION GetMenuItemCommandID
  679.     ENDIF
  680.  
  681. ;
  682. ; pascal OSErr SetMenuItemModifiers(MenuHandle inMenu, SInt16 inItem, UInt8 inModifiers)
  683. ;
  684.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  685.         Macro
  686.         _SetMenuItemModifiers
  687.             move.w              #$0404,D0
  688.             dc.w                $A825
  689.         EndM
  690.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  691.         IMPORT_CFM_FUNCTION SetMenuItemModifiers
  692.     ENDIF
  693.  
  694. ;
  695. ; pascal OSErr GetMenuItemModifiers(MenuHandle inMenu, SInt16 inItem, UInt8 *outModifiers)
  696. ;
  697.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  698.         Macro
  699.         _GetMenuItemModifiers
  700.             move.w              #$0505,D0
  701.             dc.w                $A825
  702.         EndM
  703.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  704.         IMPORT_CFM_FUNCTION GetMenuItemModifiers
  705.     ENDIF
  706.  
  707. ;
  708. ; pascal OSErr SetMenuItemIconHandle(MenuHandle inMenu, SInt16 inItem, UInt8 inIconType, Handle inIconHandle)
  709. ;
  710.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  711.         Macro
  712.         _SetMenuItemIconHandle
  713.             move.w              #$0606,D0
  714.             dc.w                $A825
  715.         EndM
  716.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  717.         IMPORT_CFM_FUNCTION SetMenuItemIconHandle
  718.     ENDIF
  719.  
  720. ;
  721. ; pascal OSErr GetMenuItemIconHandle(MenuHandle inMenu, SInt16 inItem, UInt8 *outIconType, Handle *outIconHandle)
  722. ;
  723.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  724.         Macro
  725.         _GetMenuItemIconHandle
  726.             move.w              #$0707,D0
  727.             dc.w                $A825
  728.         EndM
  729.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  730.         IMPORT_CFM_FUNCTION GetMenuItemIconHandle
  731.     ENDIF
  732.  
  733. ;
  734. ; pascal OSErr SetMenuItemTextEncoding(MenuHandle inMenu, SInt16 inItem, TextEncoding inScriptID)
  735. ;
  736.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  737.         Macro
  738.         _SetMenuItemTextEncoding
  739.             move.w              #$0408,D0
  740.             dc.w                $A825
  741.         EndM
  742.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  743.         IMPORT_CFM_FUNCTION SetMenuItemTextEncoding
  744.     ENDIF
  745.  
  746. ;
  747. ; pascal OSErr GetMenuItemTextEncoding(MenuHandle inMenu, SInt16 inItem, TextEncoding *outScriptID)
  748. ;
  749.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  750.         Macro
  751.         _GetMenuItemTextEncoding
  752.             move.w              #$0509,D0
  753.             dc.w                $A825
  754.         EndM
  755.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  756.         IMPORT_CFM_FUNCTION GetMenuItemTextEncoding
  757.     ENDIF
  758.  
  759. ;
  760. ; pascal OSErr SetMenuItemHierarchicalID(MenuHandle inMenu, SInt16 inItem, SInt16 inHierID)
  761. ;
  762.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  763.         Macro
  764.         _SetMenuItemHierarchicalID
  765.             move.w              #$040D,D0
  766.             dc.w                $A825
  767.         EndM
  768.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  769.         IMPORT_CFM_FUNCTION SetMenuItemHierarchicalID
  770.     ENDIF
  771.  
  772. ;
  773. ; pascal OSErr GetMenuItemHierarchicalID(MenuHandle inMenu, SInt16 inItem, SInt16 *outHierID)
  774. ;
  775.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  776.         Macro
  777.         _GetMenuItemHierarchicalID
  778.             move.w              #$050E,D0
  779.             dc.w                $A825
  780.         EndM
  781.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  782.         IMPORT_CFM_FUNCTION GetMenuItemHierarchicalID
  783.     ENDIF
  784.  
  785. ;
  786. ; pascal OSErr SetMenuItemFontID(MenuHandle inMenu, SInt16 inItem, SInt16 inFontID)
  787. ;
  788.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  789.         Macro
  790.         _SetMenuItemFontID
  791.             move.w              #$040F,D0
  792.             dc.w                $A825
  793.         EndM
  794.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  795.         IMPORT_CFM_FUNCTION SetMenuItemFontID
  796.     ENDIF
  797.  
  798. ;
  799. ; pascal OSErr GetMenuItemFontID(MenuHandle inMenu, SInt16 inItem, SInt16 *outFontID)
  800. ;
  801.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  802.         Macro
  803.         _GetMenuItemFontID
  804.             move.w              #$0510,D0
  805.             dc.w                $A825
  806.         EndM
  807.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  808.         IMPORT_CFM_FUNCTION GetMenuItemFontID
  809.     ENDIF
  810.  
  811. ;
  812. ; pascal OSErr SetMenuItemRefCon(MenuHandle inMenu, SInt16 inItem, UInt32 inRefCon)
  813. ;
  814.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  815.         Macro
  816.         _SetMenuItemRefCon
  817.             move.w              #$050A,D0
  818.             dc.w                $A825
  819.         EndM
  820.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  821.         IMPORT_CFM_FUNCTION SetMenuItemRefCon
  822.     ENDIF
  823.  
  824. ;
  825. ; pascal OSErr GetMenuItemRefCon(MenuHandle inMenu, SInt16 inItem, UInt32 *outRefCon)
  826. ;
  827.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  828.         Macro
  829.         _GetMenuItemRefCon
  830.             move.w              #$050B,D0
  831.             dc.w                $A825
  832.         EndM
  833.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  834.         IMPORT_CFM_FUNCTION GetMenuItemRefCon
  835.     ENDIF
  836.  
  837. ;
  838. ; pascal OSErr SetMenuItemRefCon2(MenuHandle inMenu, SInt16 inItem, UInt32 inRefCon2)
  839. ;
  840.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  841.         Macro
  842.         _SetMenuItemRefCon2
  843.             move.w              #$0511,D0
  844.             dc.w                $A825
  845.         EndM
  846.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  847.         IMPORT_CFM_FUNCTION SetMenuItemRefCon2
  848.     ENDIF
  849.  
  850. ;
  851. ; pascal OSErr GetMenuItemRefCon2(MenuHandle inMenu, SInt16 inItem, UInt32 *outRefCon2)
  852. ;
  853.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  854.         Macro
  855.         _GetMenuItemRefCon2
  856.             move.w              #$0512,D0
  857.             dc.w                $A825
  858.         EndM
  859.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  860.         IMPORT_CFM_FUNCTION GetMenuItemRefCon2
  861.     ENDIF
  862.  
  863. ;
  864. ; pascal OSErr SetMenuItemKeyGlyph(MenuHandle inMenu, SInt16 inItem, SInt16 inGlyph)
  865. ;
  866.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  867.         Macro
  868.         _SetMenuItemKeyGlyph
  869.             move.w              #$0513,D0
  870.             dc.w                $A825
  871.         EndM
  872.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  873.         IMPORT_CFM_FUNCTION SetMenuItemKeyGlyph
  874.     ENDIF
  875.  
  876. ;
  877. ; pascal OSErr GetMenuItemKeyGlyph(MenuHandle inMenu, SInt16 inItem, SInt16 *outGlyph)
  878. ;
  879.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  880.         Macro
  881.         _GetMenuItemKeyGlyph
  882.             move.w              #$0514,D0
  883.             dc.w                $A825
  884.         EndM
  885.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  886.         IMPORT_CFM_FUNCTION GetMenuItemKeyGlyph
  887.     ENDIF
  888.  
  889. ; ——————————————————————————————————————————————————————————————————————————————————————
  890. ;     • Contextual Menu routines and constants                                            
  891. ;     available with Conxtextual Menu extension 1.0 and later                                
  892. ; ——————————————————————————————————————————————————————————————————————————————————————
  893. ;  Gestalt Selector for classic 68K apps only. 
  894. ;  CFM apps should weak link and check the symbols. 
  895.  
  896. gestaltContextualMenuAttr        EQU        'cmnu'
  897. gestaltContextualMenuUnusedBit    EQU        0
  898. gestaltContextualMenuTrapAvailable EQU    1
  899. ;  Values indicating what kind of help the application supports 
  900.  
  901. kCMHelpItemNoHelp                EQU        0
  902. kCMHelpItemAppleGuide            EQU        1
  903. kCMHelpItemOtherHelp            EQU        2
  904. ;  Values indicating what was chosen from the menu 
  905.  
  906. kCMNothingSelected                EQU        0
  907. kCMMenuItemSelected                EQU        1
  908. kCMShowHelpSelected                EQU        3
  909. ;
  910. ; pascal OSStatus InitContextualMenus(void )
  911. ;
  912.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  913.         Macro
  914.         _InitContextualMenus
  915.             moveq               #1,D0
  916.             dc.w                $AA72
  917.         EndM
  918.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  919.         IMPORT_CFM_FUNCTION InitContextualMenus
  920.     ENDIF
  921.  
  922. ;
  923. ; pascal Boolean IsShowContextualMenuClick(const EventRecord *inEvent)
  924. ;
  925.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  926.         Macro
  927.         _IsShowContextualMenuClick
  928.             moveq               #2,D0
  929.             dc.w                $AA72
  930.         EndM
  931.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  932.         IMPORT_CFM_FUNCTION IsShowContextualMenuClick
  933.     ENDIF
  934.  
  935. ;
  936. ; pascal OSStatus ContextualMenuSelect(MenuHandle inMenu, Point inGlobalLocation, Boolean inReserved, UInt32 inHelpType, ConstStr255Param inHelpItemString, const AEDesc *inSelection, UInt32 *outUserSelectionType, SInt16 *outMenuID, UInt16 *outMenuItem)
  937. ;
  938.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  939.         Macro
  940.         _ContextualMenuSelect
  941.             moveq               #3,D0
  942.             dc.w                $AA72
  943.         EndM
  944.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  945.         IMPORT_CFM_FUNCTION ContextualMenuSelect
  946.     ENDIF
  947.  
  948. ;
  949. ; pascal Boolean ProcessIsContextualMenuClient(ProcessSerialNumber *inPSN)
  950. ;
  951.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  952.         Macro
  953.         _ProcessIsContextualMenuClient
  954.             moveq               #4,D0
  955.             dc.w                $AA72
  956.         EndM
  957.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  958.         IMPORT_CFM_FUNCTION ProcessIsContextualMenuClient
  959.     ENDIF
  960.  
  961.  
  962.  
  963.  
  964.     IF OLDROUTINENAMES THEN
  965.     ENDIF    ; OLDROUTINENAMES
  966.  
  967.  
  968.     IF TARGET_OS_WIN32 THEN
  969.     ENDIF    ; TARGET_OS_WIN32
  970.     ENDIF ; __MENUS__ 
  971.  
  972.