Mac OS 9
Menus.h
Go to the documentation of this file.
1 
19 #ifndef __MENUS__
20 #define __MENUS__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __EVENTS__
27 #include <Events.h>
28 #endif
29 
30 #ifndef __QUICKDRAW__
31 #include <Quickdraw.h>
32 #endif
33 
34 #ifndef __FONTS__
35 #include <Fonts.h>
36 #endif
37 
38 #ifndef __TEXTCOMMON__
39 #include <TextCommon.h>
40 #endif
41 
42 #ifndef __PROCESSES__
43 #include <Processes.h>
44 #endif
45 
46 #ifndef __APPLEEVENTS__
47 #include <AppleEvents.h>
48 #endif
49 
50 #ifndef __COLLECTIONS__
51 #include <Collections.h>
52 #endif
53 
54 #ifndef __MACERRORS__
55 #include <MacErrors.h>
56 #endif
57 
58 #ifndef __CFSTRING__
59 #include <CFString.h>
60 #endif
61 
62 #ifndef __CFUUID__
63 #include <CFUUID.h>
64 #endif
65 
66 #if PRAGMA_ONCE
67 #pragma once
68 #endif
69 
70 #ifdef __cplusplus
71 extern "C"
72 {
73 #endif
74 
75 #if PRAGMA_IMPORT
76 #pragma import on
77 #endif
78 
79 #if PRAGMA_STRUCT_ALIGN
80 #pragma options align = mac68k
81 #elif PRAGMA_STRUCT_PACKPUSH
82 #pragma pack(push, 2)
83 #elif PRAGMA_STRUCT_PACK
84 #pragma pack(2)
85 #endif
86 
90  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
91  /* © Menu Constants */
92  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
93  enum
94  {
95  noMark = 0 /* mark symbol for SetItemMark; other mark symbols are defined in
96  Fonts.h */
97  };
98 
417  enum
418  {
419  /* menu defProc messages */
420  kMenuDrawMsg = 0,
421  kMenuSizeMsg = 2,
422  kMenuPopUpMsg = 3,
423  kMenuCalcItemMsg = 5,
424  kMenuThemeSavvyMsg =
425  7, /* is your MDEF theme-savvy? If so, return kThemeSavvyMenuResponse in
426  the whichItem parameter*/
427  mDrawMsg = 0,
428  mSizeMsg = 2,
429  mPopUpMsg = 3, /* position the popup menu rect appropriately */
430  mCalcItemMsg = 5
431  };
432 
433 #if CALL_NOT_IN_CARBON
439  enum
440  {
441  mChooseMsg = 1,
442  mDrawItemMsg = 4,
443  kMenuChooseMsg = 1,
444  kMenuDrawItemMsg = 4
445  };
446 
447 #endif /* CALL_NOT_IN_CARBON */
448 
449  enum
450  {
451  kThemeSavvyMenuResponse = 0x7473 /* should be returned in *whichItem when
452  handling kMenuThemeSavvyMsg*/
453  };
454 
455  /* these MDEF messages are only supported in Carbon*/
456  enum
457  {
458  kMenuInitMsg = 8,
459  kMenuDisposeMsg = 9,
460  kMenuFindItemMsg = 10,
461  kMenuHiliteItemMsg = 11,
462  kMenuDrawItemsMsg = 12
463  };
464 
465  enum
466  {
467  textMenuProc = 0,
468  hMenuCmd = 27, /*itemCmd == 0x001B ==> hierarchical menu*/
469  hierMenu = -1, /*a hierarchical menu - for InsertMenu call*/
470  kInsertHierarchicalMenu = -1, /*a better name for hierMenu */
471  mctAllItems = -98, /*search for all Items for the given ID*/
472  mctLastIDIndic = -99 /*last color table entry has this in ID field*/
473  };
474 
475  /* Constants for use with MacOS 8.0 (Appearance 1.0) and later*/
476  enum
477  {
478  kMenuStdMenuProc = 63,
479  kMenuStdMenuBarProc = 63
480  };
481 
482  /* For use with Get/SetMenuItemModifiers*/
483  enum
484  {
485  kMenuNoModifiers = 0, /* Mask for no modifiers*/
486  kMenuShiftModifier = (1 << 0), /* Mask for shift key modifier*/
487  kMenuOptionModifier = (1 << 1), /* Mask for option key modifier*/
488  kMenuControlModifier = (1 << 2), /* Mask for control key modifier*/
489  kMenuNoCommandModifier = (1 << 3) /* Mask for no command key modifier*/
490  };
491 
492  /* For use with Get/SetMenuItemIconHandle*/
493  enum
494  {
495  kMenuNoIcon = 0, /* No icon*/
496  kMenuIconType = 1, /* Type for ICON*/
497  kMenuShrinkIconType = 2, /* Type for ICON plotted 16 x 16*/
498  kMenuSmallIconType = 3, /* Type for SICN*/
499  kMenuColorIconType = 4, /* Type for cicn*/
500  kMenuIconSuiteType = 5, /* Type for Icon Suite*/
501  kMenuIconRefType = 6, /* Type for Icon Ref*/
502  kMenuCGImageRefType = 7, /* Type for a CGImageRef (Mac OS X only)*/
503  kMenuSystemIconSelectorType =
504  8, /* Type for an IconRef registered with Icon Services under
505  kSystemIconsCreator (after Mac OS X 10.0.x only)*/
506  kMenuIconResourceType =
507  9 /* Type for a CFStringRef naming a resource in the main bundle of the
508  process (after Mac OS X 10.0.x only)*/
509  };
510 
511  /* For use with Get/SetMenuItemKeyGlyph*/
512  enum
513  {
514  kMenuNullGlyph = 0x00, /* Null (always glyph 1)*/
515  kMenuTabRightGlyph =
516  0x02, /* Tab to the right key (for left-to-right script systems)*/
517  kMenuTabLeftGlyph =
518  0x03, /* Tab to the left key (for right-to-left script systems)*/
519  kMenuEnterGlyph = 0x04, /* Enter key*/
520  kMenuShiftGlyph = 0x05, /* Shift key*/
521  kMenuControlGlyph = 0x06, /* Control key*/
522  kMenuOptionGlyph = 0x07, /* Option key*/
523  kMenuSpaceGlyph = 0x09, /* Space (always glyph 3) key*/
524  kMenuDeleteRightGlyph =
525  0x0A, /* Delete to the right key (for right-to-left script systems)*/
526  kMenuReturnGlyph = 0x0B, /* Return key (for left-to-right script systems)*/
527  kMenuReturnR2LGlyph = 0x0C, /* Return key (for right-to-left script systems)*/
528  kMenuNonmarkingReturnGlyph = 0x0D, /* Nonmarking return key*/
529  kMenuPencilGlyph = 0x0F, /* Pencil key*/
530  kMenuDownwardArrowDashedGlyph = 0x10, /* Downward dashed arrow key*/
531  kMenuCommandGlyph = 0x11, /* Command key*/
532  kMenuCheckmarkGlyph = 0x12, /* Checkmark key*/
533  kMenuDiamondGlyph = 0x13, /* Diamond key*/
534  kMenuAppleLogoFilledGlyph = 0x14, /* Apple logo key (filled)*/
535  kMenuParagraphKoreanGlyph = 0x15, /* Unassigned (paragraph in Korean)*/
536  kMenuDeleteLeftGlyph =
537  0x17, /* Delete to the left key (for left-to-right script systems)*/
538  kMenuLeftArrowDashedGlyph = 0x18, /* Leftward dashed arrow key*/
539  kMenuUpArrowDashedGlyph = 0x19, /* Upward dashed arrow key*/
540  kMenuRightArrowDashedGlyph = 0x1A, /* Rightward dashed arrow key*/
541  kMenuEscapeGlyph = 0x1B, /* Escape key*/
542  kMenuClearGlyph = 0x1C, /* Clear key*/
543  kMenuLeftDoubleQuotesJapaneseGlyph =
544  0x1D, /* Unassigned (left double quotes in Japanese)*/
545  kMenuRightDoubleQuotesJapaneseGlyph =
546  0x1E, /* Unassigned (right double quotes in Japanese)*/
547  kMenuTrademarkJapaneseGlyph = 0x1F, /* Unassigned (trademark in Japanese)*/
548  kMenuBlankGlyph = 0x61, /* Blank key*/
549  kMenuPageUpGlyph = 0x62, /* Page up key*/
550  kMenuCapsLockGlyph = 0x63, /* Caps lock key*/
551  kMenuLeftArrowGlyph = 0x64, /* Left arrow key*/
552  kMenuRightArrowGlyph = 0x65, /* Right arrow key*/
553  kMenuNorthwestArrowGlyph = 0x66, /* Northwest arrow key*/
554  kMenuHelpGlyph = 0x67, /* Help key*/
555  kMenuUpArrowGlyph = 0x68, /* Up arrow key*/
556  kMenuSoutheastArrowGlyph = 0x69, /* Southeast arrow key*/
557  kMenuDownArrowGlyph = 0x6A, /* Down arrow key*/
558  kMenuPageDownGlyph = 0x6B, /* Page down key*/
559  kMenuAppleLogoOutlineGlyph = 0x6C, /* Apple logo key (outline)*/
560  kMenuContextualMenuGlyph = 0x6D, /* Contextual menu key*/
561  kMenuPowerGlyph = 0x6E, /* Power key*/
562  kMenuF1Glyph = 0x6F, /* F1 key*/
563  kMenuF2Glyph = 0x70, /* F2 key*/
564  kMenuF3Glyph = 0x71, /* F3 key*/
565  kMenuF4Glyph = 0x72, /* F4 key*/
566  kMenuF5Glyph = 0x73, /* F5 key*/
567  kMenuF6Glyph = 0x74, /* F6 key*/
568  kMenuF7Glyph = 0x75, /* F7 key*/
569  kMenuF8Glyph = 0x76, /* F8 key*/
570  kMenuF9Glyph = 0x77, /* F9 key*/
571  kMenuF10Glyph = 0x78, /* F10 key*/
572  kMenuF11Glyph = 0x79, /* F11 key*/
573  kMenuF12Glyph = 0x7A, /* F12 key*/
574  kMenuF13Glyph = 0x87, /* F13 key*/
575  kMenuF14Glyph = 0x88, /* F14 key*/
576  kMenuF15Glyph = 0x89, /* F15 key*/
577  kMenuControlISOGlyph = 0x8A /* Control key (ISO standard)*/
578  };
579 
587  typedef UInt32 MenuAttributes;
588  enum
589  {
590 
596 
602 
609  kMenuAttrUsePencilGlyph = (1 << 3)
610  };
611 
619  typedef UInt32 MenuItemAttributes;
620  enum
621  {
622 
627 
632 
637 
642 
648 
653 
658 
664 
670 
676 
683 
690  kMenuItemAttrCustomDraw = (1 << 11)
691  };
692 
702  typedef UInt32 MenuTrackingMode;
703  enum
704  {
705 
710 
715  };
716 
725  typedef UInt32 MenuEventOptions;
726  enum
727  {
728 
733 
738 
743  };
744 
745  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
746  /* © Menu Types */
747  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
748  typedef SInt16 MenuID;
749  typedef UInt16 MenuItemIndex;
750  typedef UInt32 MenuCommand;
751 #if !OPAQUE_TOOLBOX_STRUCTS
752  struct MenuInfo
753  {
754  MenuID menuID; /* in Carbon use Get/SetMenuID*/
755  short menuWidth; /* in Carbon use Get/SetMenuWidth*/
756  short menuHeight; /* in Carbon use Get/SetMenuHeight*/
757  Handle menuProc; /* not supported in Carbon*/
758  long enableFlags; /* in Carbon use Enable/DisableMenuItem, IsMenuItemEnable*/
759  Str255 menuData; /* in Carbon use Get/SetMenuTitle*/
760  };
761  typedef struct MenuInfo MenuInfo;
762  typedef MenuInfo *MenuPtr;
763  typedef MenuPtr *MenuHandle;
764 #else
765 typedef struct OpaqueMenuHandle *MenuHandle;
766 #endif /* !OPAQUE_TOOLBOX_STRUCTS */
767 
768  /* MenuRef and MenuHandle are equivalent. Use either. We don't care.*/
769  typedef MenuHandle MenuRef;
770  typedef Handle MenuBarHandle;
771  struct MCEntry
772  {
773  MenuID mctID; /*menu ID. ID = 0 is the menu bar*/
774  short mctItem; /*menu Item. Item = 0 is a title*/
775  RGBColor mctRGB1; /*usage depends on ID and Item*/
776  RGBColor mctRGB2; /*usage depends on ID and Item*/
777  RGBColor mctRGB3; /*usage depends on ID and Item*/
778  RGBColor mctRGB4; /*usage depends on ID and Item*/
779  short mctReserved; /*reserved for internal use*/
780  };
781  typedef struct MCEntry MCEntry;
782  typedef MCEntry *MCEntryPtr;
783  typedef MCEntry MCTable[1];
784  typedef MCEntry *MCTablePtr;
785  typedef MCTablePtr *MCTableHandle;
786  struct MenuCRsrc
787  {
788  short numEntries; /*number of entries*/
789  MCTable mcEntryRecs; /*ARRAY [1..numEntries] of MCEntry*/
790  };
791  typedef struct MenuCRsrc MenuCRsrc;
792  typedef MenuCRsrc *MenuCRsrcPtr;
793  typedef MenuCRsrcPtr *MenuCRsrcHandle;
794 #if TARGET_OS_WIN32
795  // QuickTime 3.0
796  struct MenuAccessKeyRec
797  {
798  short count;
799  long flags;
800  unsigned char keys[1];
801  };
802  typedef struct MenuAccessKeyRec MenuAccessKeyRec;
803  typedef MenuAccessKeyRec *MenuAccessKeyPtr;
804  typedef MenuAccessKeyPtr *MenuAccessKeyHandle;
805 #if CALL_NOT_IN_CARBON
814  void
815  SetMenuItemHotKey(MenuRef menu, short itemID, char hotKey, long flags);
816 
817 #endif /* CALL_NOT_IN_CARBON */
818 
819 #endif /* TARGET_OS_WIN32 */
820 
830  {
831  MenuRef menu;
832  MenuItemIndex itemSelected;
833  MenuItemIndex itemUnderMouse;
834  Rect itemRect;
835  SInt32 virtualMenuTop;
836  SInt32 virtualMenuBottom;
837  };
838  typedef struct MenuTrackingData MenuTrackingData;
840 
852  {
853 
858  MenuItemIndex previousItem;
859 
864  MenuItemIndex newItem;
865 
870  void *context;
871  };
872  typedef struct MDEFHiliteItemData MDEFHiliteItemData;
876 
887  {
888 
895 
900  void *context;
901  };
902  typedef struct MDEFDrawData MDEFDrawData;
903  typedef MDEFDrawData *MDEFDrawDataPtr;
904 
916  {
917 
924 
930  void *context;
931  };
932  typedef struct MDEFFindItemData MDEFFindItemData;
934 
945  {
946 
950  MenuItemIndex firstItem;
951 
955  MenuItemIndex lastItem;
956 
963 
968  void *context;
969  };
970  typedef struct MDEFDrawItemsData MDEFDrawItemsData;
972 
982  enum
983  {
984 
996  kMenuItemDataText = (1 << 0),
997 
1002  kMenuItemDataMark = (1 << 1),
1003 
1009 
1015 
1021 
1027 
1034 
1040 
1046 
1059 
1065 
1071  kMenuItemDataSubmenuID = (1 << 12),
1072  kMenuItemDataSubmenuHandle = (1 << 13),
1073  kMenuItemDataFontID = (1 << 14),
1074  kMenuItemDataRefcon = (1 << 15),
1075  kMenuItemDataAttributes = (1 << 16),
1076  kMenuItemDataCFString = (1 << 17),
1077 
1092 
1097  kMenuItemDataIndent = (1 << 19),
1098 
1106  kMenuItemDataAllDataVersionOne = 0x000FFFFF,
1107  kMenuItemDataAllDataVersionTwo =
1108  kMenuItemDataAllDataVersionOne | kMenuItemDataCmdVirtualKey
1109  };
1110 
1111  typedef UInt64 MenuItemDataFlags;
1112 
1129  {
1130  MenuItemDataFlags whichData;
1131  StringPtr text;
1132  UniChar mark;
1133  UniChar cmdKey;
1134  UInt32 cmdKeyGlyph;
1135  UInt32 cmdKeyModifiers;
1136  Style style;
1137  Boolean enabled;
1138  Boolean iconEnabled;
1139  UInt8 filler1;
1140  SInt32 iconID;
1141  UInt32 iconType;
1142  Handle iconHandle;
1143  MenuCommand cmdID;
1144  TextEncoding encoding;
1145  MenuID submenuID;
1146  MenuRef submenuHandle;
1147  SInt32 fontID;
1148  UInt32 refcon;
1149  OptionBits attr;
1150  CFStringRef cfText;
1151  Collection properties;
1152  UInt32 indent;
1153  UInt16 cmdVirtualKey;
1154  };
1155  typedef struct MenuItemDataRec MenuItemDataRec;
1157  typedef UInt32 MenuItemID;
1158  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1159  /* © Menu ProcPtrs */
1160  /* */
1161  /* All of these procs are considered deprecated. Developers interested in
1162  * portability */
1163  /* to Carbon should avoid them entirely, if at all possible. */
1164  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1165  typedef CALLBACK_API(void, MenuDefProcPtr)(short message, MenuRef theMenu,
1166  Rect *menuRect, Point hitPt,
1167  short *whichItem);
1168  typedef STACK_UPP_TYPE(MenuDefProcPtr) MenuDefUPP;
1177  MenuDefUPP
1178  NewMenuDefUPP(MenuDefProcPtr userRoutine);
1179 #if !OPAQUE_UPP_TYPES
1180  enum
1181  {
1182  uppMenuDefProcInfo = 0x0000FF80
1183  }; /* pascal no_return_value Func(2_bytes, 4_bytes, 4_bytes, 4_bytes, 4_bytes)
1184  */
1185 #ifdef __cplusplus
1186  inline MenuDefUPP NewMenuDefUPP(MenuDefProcPtr userRoutine)
1187  {
1188  return (MenuDefUPP)NewRoutineDescriptor(
1189  (ProcPtr)(userRoutine), uppMenuDefProcInfo, GetCurrentArchitecture());
1190  }
1191 #else
1192 #define NewMenuDefUPP(userRoutine) \
1193  (MenuDefUPP) NewRoutineDescriptor( \
1194  (ProcPtr)(userRoutine), uppMenuDefProcInfo, GetCurrentArchitecture())
1195 #endif
1196 #endif
1197 
1206  void
1207  DisposeMenuDefUPP(MenuDefUPP userUPP);
1208 #if !OPAQUE_UPP_TYPES
1209 #ifdef __cplusplus
1210  inline void DisposeMenuDefUPP(MenuDefUPP userUPP)
1211  {
1212  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1213  }
1214 #else
1215 #define DisposeMenuDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1216 #endif
1217 #endif
1218 
1227  void
1228  InvokeMenuDefUPP(short message, MenuRef theMenu, Rect *menuRect, Point hitPt,
1229  short *whichItem, MenuDefUPP userUPP);
1230 #if !OPAQUE_UPP_TYPES
1231 #ifdef __cplusplus
1232  inline void InvokeMenuDefUPP(short message, MenuRef theMenu, Rect *menuRect,
1233  Point hitPt, short *whichItem,
1234  MenuDefUPP userUPP)
1235  {
1236  CALL_FIVE_PARAMETER_UPP(userUPP, uppMenuDefProcInfo, message, theMenu,
1237  menuRect, hitPt, whichItem);
1238  }
1239 #else
1240 #define InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, \
1241  userUPP) \
1242  CALL_FIVE_PARAMETER_UPP((userUPP), uppMenuDefProcInfo, (message), (theMenu), \
1243  (menuRect), (hitPt), (whichItem))
1244 #endif
1245 #endif
1246 
1247 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1248 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1249 #define NewMenuDefProc(userRoutine) NewMenuDefUPP(userRoutine)
1250 #define CallMenuDefProc(userRoutine, message, theMenu, menuRect, hitPt, \
1251  whichItem) \
1252  InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, userRoutine)
1253 #endif /* CALL_NOT_IN_CARBON */
1254 
1255  typedef CALLBACK_API(long, MenuBarDefProcPtr)(short selector, short message,
1256  short parameter1,
1257  long parameter2);
1258  typedef CALLBACK_API(void, MenuHookProcPtr)(void);
1259  typedef CALLBACK_API_REGISTER68K(short, MBarHookProcPtr, (Rect * menuRect));
1260  typedef STACK_UPP_TYPE(MenuBarDefProcPtr) MenuBarDefUPP;
1261  typedef STACK_UPP_TYPE(MenuHookProcPtr) MenuHookUPP;
1262  typedef REGISTER_UPP_TYPE(MBarHookProcPtr) MBarHookUPP;
1263 #if CALL_NOT_IN_CARBON
1272  MenuBarDefUPP
1273  NewMenuBarDefUPP(MenuBarDefProcPtr userRoutine);
1274 #if !OPAQUE_UPP_TYPES
1275  enum
1276  {
1277  uppMenuBarDefProcInfo = 0x00003AB0
1278  }; /* pascal 4_bytes Func(2_bytes, 2_bytes, 2_bytes, 4_bytes) */
1279 #ifdef __cplusplus
1280  inline MenuBarDefUPP NewMenuBarDefUPP(MenuBarDefProcPtr userRoutine)
1281  {
1282  return (MenuBarDefUPP)NewRoutineDescriptor(
1283  (ProcPtr)(userRoutine), uppMenuBarDefProcInfo, GetCurrentArchitecture());
1284  }
1285 #else
1286 #define NewMenuBarDefUPP(userRoutine) \
1287  (MenuBarDefUPP) NewRoutineDescriptor( \
1288  (ProcPtr)(userRoutine), uppMenuBarDefProcInfo, GetCurrentArchitecture())
1289 #endif
1290 #endif
1291 
1300  MenuHookUPP
1301  NewMenuHookUPP(MenuHookProcPtr userRoutine);
1302 #if !OPAQUE_UPP_TYPES
1303  enum
1304  {
1305  uppMenuHookProcInfo = 0x00000000
1306  }; /* pascal no_return_value Func() */
1307 #ifdef __cplusplus
1308  inline MenuHookUPP NewMenuHookUPP(MenuHookProcPtr userRoutine)
1309  {
1310  return (MenuHookUPP)NewRoutineDescriptor(
1311  (ProcPtr)(userRoutine), uppMenuHookProcInfo, GetCurrentArchitecture());
1312  }
1313 #else
1314 #define NewMenuHookUPP(userRoutine) \
1315  (MenuHookUPP) NewRoutineDescriptor( \
1316  (ProcPtr)(userRoutine), uppMenuHookProcInfo, GetCurrentArchitecture())
1317 #endif
1318 #endif
1319 
1328  MBarHookUPP
1329  NewMBarHookUPP(MBarHookProcPtr userRoutine);
1330 #if !OPAQUE_UPP_TYPES
1331  enum
1332  {
1333  uppMBarHookProcInfo = 0x000000CF
1334  }; /* SPECIAL_CASE_PROCINFO(12) */
1335 #ifdef __cplusplus
1336  inline MBarHookUPP NewMBarHookUPP(MBarHookProcPtr userRoutine)
1337  {
1338  return (MBarHookUPP)NewRoutineDescriptor(
1339  (ProcPtr)(userRoutine), uppMBarHookProcInfo, GetCurrentArchitecture());
1340  }
1341 #else
1342 #define NewMBarHookUPP(userRoutine) \
1343  (MBarHookUPP) NewRoutineDescriptor( \
1344  (ProcPtr)(userRoutine), uppMBarHookProcInfo, GetCurrentArchitecture())
1345 #endif
1346 #endif
1347 
1356  void
1357  DisposeMenuBarDefUPP(MenuBarDefUPP userUPP);
1358 #if !OPAQUE_UPP_TYPES
1359 #ifdef __cplusplus
1360  inline void DisposeMenuBarDefUPP(MenuBarDefUPP userUPP)
1361  {
1362  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1363  }
1364 #else
1365 #define DisposeMenuBarDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1366 #endif
1367 #endif
1368 
1377  void
1378  DisposeMenuHookUPP(MenuHookUPP userUPP);
1379 #if !OPAQUE_UPP_TYPES
1380 #ifdef __cplusplus
1381  inline void DisposeMenuHookUPP(MenuHookUPP userUPP)
1382  {
1383  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1384  }
1385 #else
1386 #define DisposeMenuHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1387 #endif
1388 #endif
1389 
1398  void
1399  DisposeMBarHookUPP(MBarHookUPP userUPP);
1400 #if !OPAQUE_UPP_TYPES
1401 #ifdef __cplusplus
1402  inline void DisposeMBarHookUPP(MBarHookUPP userUPP)
1403  {
1404  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1405  }
1406 #else
1407 #define DisposeMBarHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1408 #endif
1409 #endif
1410 
1419  long
1420  InvokeMenuBarDefUPP(short selector, short message, short parameter1,
1421  long parameter2, MenuBarDefUPP userUPP);
1422 #if !OPAQUE_UPP_TYPES
1423 #ifdef __cplusplus
1424  inline long InvokeMenuBarDefUPP(short selector, short message, short parameter1,
1425  long parameter2, MenuBarDefUPP userUPP)
1426  {
1427  return (long)CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuBarDefProcInfo, selector,
1428  message, parameter1, parameter2);
1429  }
1430 #else
1431 #define InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, \
1432  userUPP) \
1433  (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuBarDefProcInfo, (selector), \
1434  (message), (parameter1), (parameter2))
1435 #endif
1436 #endif
1437 
1446  void
1447  InvokeMenuHookUPP(MenuHookUPP userUPP);
1448 #if !OPAQUE_UPP_TYPES
1449 #ifdef __cplusplus
1450  inline void InvokeMenuHookUPP(MenuHookUPP userUPP)
1451  {
1452  CALL_ZERO_PARAMETER_UPP(userUPP, uppMenuHookProcInfo);
1453  }
1454 #else
1455 #define InvokeMenuHookUPP(userUPP) \
1456  CALL_ZERO_PARAMETER_UPP((userUPP), uppMenuHookProcInfo)
1457 #endif
1458 #endif
1459 
1468  short
1469  InvokeMBarHookUPP(Rect *menuRect, MBarHookUPP userUPP);
1470 #if !OPAQUE_UPP_TYPES && \
1471  (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
1472 #ifdef __cplusplus
1473  inline short InvokeMBarHookUPP(Rect *menuRect, MBarHookUPP userUPP)
1474  {
1475  return (short)CALL_ONE_PARAMETER_UPP(userUPP, uppMBarHookProcInfo, menuRect);
1476  }
1477 #else
1478 #define InvokeMBarHookUPP(menuRect, userUPP) \
1479  (short)CALL_ONE_PARAMETER_UPP((userUPP), uppMBarHookProcInfo, (menuRect))
1480 #endif
1481 #endif
1482 
1483 #endif /* CALL_NOT_IN_CARBON */
1484 
1485 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1486 /* support for pre-Carbon UPP routines: New...Proc and Call...Proc */
1487 #define NewMenuBarDefProc(userRoutine) NewMenuBarDefUPP(userRoutine)
1488 #define NewMenuHookProc(userRoutine) NewMenuHookUPP(userRoutine)
1489 #define NewMBarHookProc(userRoutine) NewMBarHookUPP(userRoutine)
1490 #define CallMenuBarDefProc(userRoutine, selector, message, parameter1, \
1491  parameter2) \
1492  InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, userRoutine)
1493 #define CallMenuHookProc(userRoutine) InvokeMenuHookUPP(userRoutine)
1494 #define CallMBarHookProc(userRoutine, menuRect) \
1495  InvokeMBarHookUPP(menuRect, userRoutine)
1496 #endif /* CALL_NOT_IN_CARBON */
1497 
1498  enum
1499  {
1500  kMenuDefProcPtr = 0 /* raw proc-ptr access based on old MDEF */
1501  };
1502 
1503  typedef UInt32 MenuDefType;
1505  {
1506  MenuDefType defType;
1507  union
1508  {
1509  MenuDefUPP defProc;
1510  } u;
1511  };
1512  typedef struct MenuDefSpec MenuDefSpec;
1513  typedef MenuDefSpec *MenuDefSpecPtr;
1514 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1515 /* © Menu Manager Initialization */
1516 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1517 #if CALL_NOT_IN_CARBON
1526  void
1527  InitProcMenu(short resID);
1528 
1537  void
1538  InitMenus(void);
1539 
1540 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1541 /* © Menu Manipulation */
1542 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
1543 #endif /* CALL_NOT_IN_CARBON */
1544 
1553  MenuRef
1554  NewMenu(MenuID menuID, ConstStr255Param menuTitle);
1555 
1564 #if TARGET_OS_MAC
1565 #define MacGetMenu GetMenu
1566 #endif
1567  MenuRef
1568  MacGetMenu(short resourceID);
1569 
1578  void
1580 
1589  void
1591 
1592 #if CALL_NOT_IN_CARBON
1593 
1617  UInt16
1619 
1620 #endif /* CALL_NOT_IN_CARBON */
1621 
1630  UInt16
1632 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
1633 #ifdef __cplusplus
1634  inline DEFINE_API(UInt16) CountMenuItems(MenuRef theMenu)
1635  {
1636  return CountMItems(theMenu);
1637  }
1638 #else
1639 #define CountMenuItems(theMenu) (CountMItems(theMenu))
1640 #endif
1641 #endif
1642 
1643  /* Routines available in Mac OS 8.5 and later, and on Mac OS 8.1 and later using
1644  * CarbonLib 1.1 and later*/
1645 
1654  OSStatus
1655  GetMenuFont(MenuRef menu, SInt16 *outFontID, UInt16 *outFontSize);
1656 
1665  OSStatus
1666  SetMenuFont(MenuRef menu, SInt16 inFontID, UInt16 inFontSize);
1667 
1676  Boolean
1678 
1687  OSStatus
1689 
1724  OSStatus
1725  RegisterMenuDefinition(SInt16 inResID, MenuDefSpecPtr inDefSpec);
1726 
1755  OSStatus
1756  CreateNewMenu(MenuID inMenuID, MenuAttributes inMenuAttributes,
1757  MenuRef *outMenuRef);
1758 
1790  OSStatus
1791  CreateCustomMenu(const MenuDefSpec *inDefSpec, MenuID inMenuID,
1792  MenuAttributes inMenuAttributes, MenuRef *outMenuRef);
1793 
1813  Boolean
1815 
1832  ItemCount
1834 
1856  OSStatus
1858 
1880  OSStatus
1882 
1908  OSStatus
1909  DuplicateMenu(MenuRef inSourceMenu, MenuRef *outMenu);
1910 
1931  OSStatus
1932  CopyMenuTitleAsCFString(MenuRef inMenu, CFStringRef *outString);
1933 
1962  OSStatus
1963  SetMenuTitleWithCFString(MenuRef inMenu, CFStringRef inString);
1964 
2001  OSStatus
2002  SetMenuTitleIcon(MenuRef inMenu, UInt32 inType, void *inIcon);
2003 
2034  OSStatus
2035  GetMenuTitleIcon(MenuRef inMenu, UInt32 *outType, /* can be NULL */
2036  void **outIcon); /* can be NULL */
2037 
2062  OSStatus
2064 
2088  Boolean
2090 
2091  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2092  /* ©©MDEF support */
2093  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2126  OSStatus
2127  EraseMenuBackground(MenuRef inMenu, const Rect *inEraseRect,
2128  CGContextRef inContext); /* can be NULL */
2129 
2167  OSStatus
2168  ScrollMenuImage(MenuRef inMenu, const Rect *inScrollRect, int inHScroll,
2169  int inVScroll, CGContextRef inContext); /* can be NULL */
2170 
2171 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2172 /* © Menu Item Insertion */
2173 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2182 #if TARGET_OS_MAC
2183 #define MacAppendMenu AppendMenu
2184 #endif
2185  void
2186  MacAppendMenu(MenuRef menu, ConstStr255Param data);
2187 
2196  void
2197  InsertResMenu(MenuRef theMenu, ResType theType, short afterItem);
2198 
2207  void
2208  AppendResMenu(MenuRef theMenu, ResType theType);
2209 
2218 #if TARGET_OS_MAC
2219 #define MacInsertMenuItem InsertMenuItem
2220 #endif
2221  void
2222  MacInsertMenuItem(MenuRef theMenu, ConstStr255Param itemString, short afterItem);
2223 
2232  void
2234 
2243  void
2244  InsertFontResMenu(MenuRef theMenu, short afterItem, short scriptFilter);
2245 
2254  void
2255  InsertIntlResMenu(MenuRef theMenu, ResType theType, short afterItem,
2256  short scriptFilter);
2257 
2266  OSStatus
2267  AppendMenuItemText(MenuRef menu, ConstStr255Param inString);
2268 
2277  OSStatus
2278  InsertMenuItemText(MenuRef menu, ConstStr255Param inString,
2279  MenuItemIndex afterItem);
2280 
2310  OSStatus
2311  CopyMenuItems(MenuRef inSourceMenu, MenuItemIndex inFirstItem,
2312  ItemCount inNumItems, MenuRef inDestMenu,
2313  MenuItemIndex inInsertAfter);
2314 
2341  OSStatus
2342  DeleteMenuItems(MenuRef inMenu, MenuItemIndex inFirstItem,
2343  ItemCount inNumItems);
2344 
2383  OSStatus
2384  AppendMenuItemTextWithCFString(MenuRef inMenu, CFStringRef inString,
2385  MenuItemAttributes inAttributes,
2386  MenuCommand inCommandID,
2387  MenuItemIndex *outNewItem); /* can be NULL */
2388 
2426  OSStatus
2427  InsertMenuItemTextWithCFString(MenuRef inMenu, CFStringRef inString,
2428  MenuItemIndex inAfterItem,
2429  MenuItemAttributes inAttributes,
2430  MenuCommand inCommandID);
2431 
2432  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2433  /* © Menu Events */
2434  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2443  long
2444  MenuKey(CharParameter ch);
2445 
2454  long
2456 
2465  long
2466  PopUpMenuSelect(MenuRef menu, short top, short left, short popUpItem);
2467 
2493  long
2494  MenuChoice(void);
2495 
2504  UInt32
2505  MenuEvent(const EventRecord *inEvent);
2506 
2543  Boolean
2544  IsMenuKeyEvent(MenuRef inStartMenu, EventRef inEvent,
2545  MenuEventOptions inOptions, MenuRef *outMenu, /* can be NULL */
2546  MenuItemIndex *outMenuItem); /* can be NULL */
2547 
2581  OSStatus
2583 
2584  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2585  /* © Menu Bar */
2586  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2587 
2602  short
2604 
2613 #if TARGET_OS_MAC
2614 #define MacDrawMenuBar DrawMenuBar
2615 #endif
2616  void
2618 
2627  void
2629 
2647  Boolean
2649 
2658  void
2659  HiliteMenu(MenuID menuID);
2660 
2669  MenuBarHandle
2670  GetNewMBar(short menuBarID);
2671 
2680  MenuBarHandle
2681  GetMenuBar(void);
2682 
2691  void
2692  SetMenuBar(MenuBarHandle mbar);
2693 
2721  OSStatus
2722  DuplicateMenuBar(MenuBarHandle inMbar, MenuBarHandle *outMbar);
2723 
2747  OSStatus
2748  DisposeMenuBar(MenuBarHandle inMbar);
2749 
2758  MenuRef
2759  GetMenuHandle(MenuID menuID);
2760 
2761 #define GetMenuRef GetMenuHandle
2770 #if TARGET_OS_MAC
2771 #define MacInsertMenu InsertMenu
2772 #endif
2773  void
2774  MacInsertMenu(MenuRef theMenu, MenuID beforeID);
2775 
2784 #if TARGET_OS_MAC
2785 #define MacDeleteMenu DeleteMenu
2786 #endif
2787  void
2788  MacDeleteMenu(MenuID menuID);
2789 
2798  void
2800 
2801 #if CALL_NOT_IN_CARBON
2802 
2823  void
2824  SetMenuFlash(short count);
2825 
2826 #endif /* CALL_NOT_IN_CARBON */
2827 
2836  void
2837  SetMenuFlashCount(short count);
2838 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
2839 #ifdef __cplusplus
2840  inline DEFINE_API(void) SetMenuFlashCount(short count) { SetMenuFlash(count); }
2841 #else
2842 #define SetMenuFlashCount(count) (SetMenuFlash(count))
2843 #endif
2844 #endif
2845 
2854  void
2855  FlashMenuBar(MenuID menuID);
2856 
2857 /* These are obsolete because Carbon does not support desk accessories.*/
2858 #if CALL_NOT_IN_CARBON
2867  Boolean
2868  SystemEdit(short editCmd);
2869 
2878  void
2879  SystemMenu(long menuResult);
2880 
2881 #endif /* CALL_NOT_IN_CARBON */
2882 
2891  Boolean
2893 
2902  void
2904 
2913  void
2915 
2932  MenuRef
2934 
2955  OSStatus
2957 
2958 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2959 /* © Menu Item Accessors */
2960 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
2961 #if CALL_NOT_IN_CARBON
2973  void
2974  CheckItem(MenuRef theMenu, short item, Boolean checked);
2975 
2976 #endif /* CALL_NOT_IN_CARBON */
2977 
2986 #if TARGET_OS_MAC
2987 #define MacCheckMenuItem CheckMenuItem
2988 #endif
2989  void
2990  MacCheckMenuItem(MenuRef theMenu, short item, Boolean checked);
2991 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
2992 #ifdef __cplusplus
2993  inline DEFINE_API(void)
2994  MacCheckMenuItem(MenuRef theMenu, short item, Boolean checked)
2995  {
2996  CheckItem(theMenu, item, checked);
2997  }
2998 #else
2999 #if TARGET_OS_MAC
3000 #define CheckMenuItem(theMenu, item, checked) \
3001  (CheckItem(theMenu, item, checked))
3002 #else
3003 #define MacCheckMenuItem(theMenu, item, checked) \
3004  (CheckItem(theMenu, item, checked))
3005 #endif
3006 #endif
3007 #endif
3008 
3017  void
3018  SetMenuItemText(MenuRef theMenu, short item, ConstStr255Param itemString);
3019 
3028  void
3029  GetMenuItemText(MenuRef theMenu, short item, Str255 itemString);
3030 
3039  void
3040  SetItemMark(MenuRef theMenu, short item, CharParameter markChar);
3041 
3084  void
3085  GetItemMark(MenuRef theMenu, short item, CharParameter *markChar);
3086 
3121  // create submenu with two entries ...
3122  windowsSubMenu = NewMenu(SMID_CLWIND, "\pClose Window");
3123  AppendMenu(windowsSubMenu, "\pMyFile");
3124  </ pre>
3125  * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
3126  * \non_carbon_cfm in InterfaceLib 7.1 and
3127  later
3128  * \carbon_lib in CarbonLib 1.0 and
3129  later
3130  * \mac_os_x in version 10.0 and
3131  later
3132  * /
3133  void
3134  SetItemCmd(MenuRef theMenu, short item, CharParameter cmdChar);
3135 
3173  void
3174  GetItemCmd(MenuRef theMenu, short item, CharParameter *cmdChar);
3175 
3184  void
3185  SetItemIcon(MenuRef theMenu, short item, short iconIndex);
3186 
3187  /* icon is returned in high byte of 16-bit iconIndex */
3188 
3215  void
3216  GetItemIcon(MenuRef theMenu, short item, short *iconIndex);
3217 
3226  void
3227  SetItemStyle(MenuRef theMenu, short item, StyleParameter chStyle);
3228 
3237  void
3238  GetItemStyle(MenuRef theMenu, short item, Style *chStyle);
3239 
3240 /* These APIs are not supported in Carbon. Please use EnableMenuItem and */
3241 /* DisableMenuItem (available back through Mac OS 8.5) instead. */
3242 #if CALL_NOT_IN_CARBON
3243 
3337  OSErr
3338  SetMenuItemCommandID(MenuRef inMenu, SInt16 inItem, MenuCommand inCommandID);
3339 
3348  OSErr
3349  GetMenuItemCommandID(MenuRef inMenu, SInt16 inItem, MenuCommand *outCommandID);
3350 
3359  OSErr
3360  SetMenuItemModifiers(MenuRef inMenu, SInt16 inItem, UInt8 inModifiers);
3361 
3370  OSErr
3371  GetMenuItemModifiers(MenuRef inMenu, SInt16 inItem, UInt8 *outModifiers);
3372 
3381  OSErr
3382  SetMenuItemIconHandle(MenuRef inMenu, SInt16 inItem, UInt8 inIconType,
3383  Handle inIconHandle);
3384 
3393  OSErr
3394  GetMenuItemIconHandle(MenuRef inMenu, SInt16 inItem, UInt8 *outIconType,
3395  Handle *outIconHandle);
3396 
3405  OSErr
3406  SetMenuItemTextEncoding(MenuRef inMenu, SInt16 inItem, TextEncoding inScriptID);
3407 
3416  OSErr
3417  GetMenuItemTextEncoding(MenuRef inMenu, SInt16 inItem,
3418  TextEncoding *outScriptID);
3419 
3428  OSErr
3429  SetMenuItemHierarchicalID(MenuRef inMenu, SInt16 inItem, MenuID inHierID);
3430 
3439  OSErr
3440  GetMenuItemHierarchicalID(MenuRef inMenu, SInt16 inItem, MenuID *outHierID);
3441 
3450  OSErr
3451  SetMenuItemFontID(MenuRef inMenu, SInt16 inItem, SInt16 inFontID);
3452 
3461  OSErr
3462  GetMenuItemFontID(MenuRef inMenu, SInt16 inItem, SInt16 *outFontID);
3463 
3472  OSErr
3473  SetMenuItemRefCon(MenuRef inMenu, SInt16 inItem, UInt32 inRefCon);
3474 
3483  OSErr
3484  GetMenuItemRefCon(MenuRef inMenu, SInt16 inItem, UInt32 *outRefCon);
3485 
3486 /* Please use the menu item property APIs in Carbon.*/
3487 #if CALL_NOT_IN_CARBON
3496  OSErr
3497  SetMenuItemRefCon2(MenuRef inMenu, SInt16 inItem, UInt32 inRefCon2);
3498 
3507  OSErr
3508  GetMenuItemRefCon2(MenuRef inMenu, SInt16 inItem, UInt32 *outRefCon2);
3509 
3510 #endif /* CALL_NOT_IN_CARBON */
3511 
3520  OSErr
3521  SetMenuItemKeyGlyph(MenuRef inMenu, SInt16 inItem, SInt16 inGlyph);
3522 
3531  OSErr
3532  GetMenuItemKeyGlyph(MenuRef inMenu, SInt16 inItem, SInt16 *outGlyph);
3533 
3534 /* Routines available in Mac OS 8.5 and later (supporting enabling/disabling of
3535  * > 31 items)*/
3536 
3545 #if TARGET_OS_MAC
3546 #define MacEnableMenuItem EnableMenuItem
3547 #endif
3548  void
3549  MacEnableMenuItem(MenuRef theMenu, MenuItemIndex item);
3550 
3559  void
3560  DisableMenuItem(MenuRef theMenu, MenuItemIndex item);
3561 
3570  Boolean
3571  IsMenuItemEnabled(MenuRef menu, MenuItemIndex item);
3572 
3581  void
3582  EnableMenuItemIcon(MenuRef theMenu, MenuItemIndex item);
3583 
3592  void
3593  DisableMenuItemIcon(MenuRef theMenu, MenuItemIndex item);
3594 
3603  Boolean
3604  IsMenuItemIconEnabled(MenuRef menu, MenuItemIndex item);
3605 
3640  OSStatus
3641  SetMenuItemHierarchicalMenu(MenuRef inMenu, MenuItemIndex inItem,
3642  MenuRef inHierMenu); /* can be NULL */
3643 
3676  OSStatus
3677  GetMenuItemHierarchicalMenu(MenuRef inMenu, MenuItemIndex inItem,
3678  MenuRef *outHierMenu);
3679 
3703  OSStatus
3704  CopyMenuItemTextAsCFString(MenuRef inMenu, MenuItemIndex inItem,
3705  CFStringRef *outString);
3706 
3738  OSStatus
3739  SetMenuItemTextWithCFString(MenuRef inMenu, MenuItemIndex inItem,
3740  CFStringRef inString);
3741 
3771  OSStatus
3772  GetMenuItemIndent(MenuRef inMenu, MenuItemIndex inItem, UInt32 *outIndent);
3773 
3803  OSStatus
3804  SetMenuItemIndent(MenuRef inMenu, MenuItemIndex inItem, UInt32 inIndent);
3805 
3846  OSStatus
3847  GetMenuItemCommandKey(MenuRef inMenu, MenuItemIndex inItem,
3848  Boolean inGetVirtualKey, UInt16 *outKey);
3849 
3890  OSStatus
3891  SetMenuItemCommandKey(MenuRef inMenu, MenuItemIndex inItem,
3892  Boolean inSetVirtualKey, UInt16 inKey);
3893 
3894  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
3895  /* © Menu Item Color Tables */
3896  /* */
3897  /* Menu color manipulation is considered deprecated with the advent of the
3898  * Appearance */
3899  /* Manager. Avoid using these routines if possible */
3900  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
3909  void
3910  DeleteMCEntries(MenuID menuID, short menuItem);
3911 
3921  GetMCInfo(void);
3922 
3931  void
3933 
3942  void
3944 
3965  myMCE.mctRGB2.green = 0;
3966  myMCE.mctRGB2.blue = 0;
3967  MyHeapScramble(); // do something to move memory
3968  SetMCEntries(1, &myMCE); // NOT ptrMCE; may have moved
3969  Use GetMCInfo to get a copy of the entire menu color table.</ pre>
3970  * \copyright THINK Reference © 1991 -
3971  1992 Symantec Corporation
3972  * \non_carbon_cfm in InterfaceLib 7.1 and
3973  later
3974  * \carbon_lib in CarbonLib 1.0 and
3975  later
3976  * \mac_os_x in version 10.0 and
3977  later
3978  * /
3979  MCEntryPtr
3980  GetMCEntry(MenuID menuID, short menuItem);
3981 
3990  void
3991  SetMCEntries(short numEntries, MCTablePtr menuCEntries);
3992 
3993  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
3994  /* © Properties (Mac OS 8.5 and later) */
3995  /* */
3996  /* With the following property APIs, you can attach any piece of data you'd like
3997  * to a */
3998  /* menu or menu item. Passing zero for the item number parameter indicates you'd
3999  * like */
4000  /* to attach the data to the menu itself, and not to any specific menu item. */
4001  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4002  enum
4003  {
4004  kMenuPropertyPersistent =
4005  0x00000001 /* whether this property gets saved when flattening the menu*/
4006  };
4007 
4016  OSStatus
4017  GetMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator,
4018  OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize,
4019  void *propertyBuffer);
4020 
4029  OSStatus
4030  GetMenuItemPropertySize(MenuRef menu, MenuItemIndex item,
4031  OSType propertyCreator, OSType propertyTag,
4032  UInt32 *size);
4033 
4042  OSStatus
4043  SetMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator,
4044  OSType propertyTag, UInt32 propertySize,
4045  const void *propertyData);
4046 
4055  OSStatus
4056  RemoveMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator,
4057  OSType propertyTag);
4058 
4087  OSStatus
4089  OSType propertyCreator, OSType propertyTag,
4090  UInt32 *attributes);
4091 
4123  OSStatus
4125  OSType propertyCreator, OSType propertyTag,
4126  UInt32 attributesToSet,
4127  UInt32 attributesToClear);
4128 
4129  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4130  /* © Attributes (Carbon and later) */
4131  /* */
4132  /* Each menu and menu item has attribute flags. */
4133  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4153  OSStatus
4155 
4178  OSStatus
4180  MenuAttributes clearTheseAttributes);
4181 
4204  OSStatus
4205  GetMenuItemAttributes(MenuRef menu, MenuItemIndex item,
4206  MenuItemAttributes *outAttributes);
4207 
4233  OSStatus
4235  MenuItemAttributes setTheseAttributes,
4236  MenuItemAttributes clearTheseAttributes);
4237 
4238  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4239  /* © Mass menu item enabling and disabling (Carbon and later) */
4240  /* */
4241  /* Useful when rewriting code that modifies the enableFlags field directly. */
4242  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4265  void
4267 
4290  void
4292 
4316  Boolean
4318 
4319  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4320  /* © Menu tracking status (Carbon and later) */
4321  /* */
4322  /* Get info about the selected menu item during menu tracking. Replaces direct
4323  * access */
4324  /* to low-mem globals that previously held this info. */
4325  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4356  OSStatus
4358 
4389  OSStatus
4390  GetMenuType(MenuRef theMenu, UInt16 *outType);
4391 
4392  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4393  /* ©©Universal command ID access (Carbon and later) */
4394  /* */
4395  /* These APIs allow you to operate on menu items strictly by command ID, with
4396  * no */
4397  /* knowledge of a menu item's index. */
4398  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4427  ItemCount
4428  CountMenuItemsWithCommandID(MenuRef inMenu, MenuCommand inCommandID);
4429 
4473  OSStatus
4474  GetIndMenuItemWithCommandID(MenuRef inMenu, MenuCommand inCommandID,
4475  UInt32 inItemIndex,
4476  MenuRef *outMenu, /* can be NULL */
4477  MenuItemIndex *outIndex); /* can be NULL */
4478 
4501  void
4502  EnableMenuCommand(MenuRef inMenu, MenuCommand inCommandID);
4503 
4526  void
4527  DisableMenuCommand(MenuRef inMenu, MenuCommand inCommandID);
4528 
4552  Boolean
4553  IsMenuCommandEnabled(MenuRef inMenu, MenuCommand inCommandID);
4554 
4584  OSStatus
4585  SetMenuCommandMark(MenuRef inMenu, MenuCommand inCommandID, UniChar inMark);
4586 
4613  OSStatus
4614  GetMenuCommandMark(MenuRef inMenu, MenuCommand inCommandID, UniChar *outMark);
4615 
4656  OSStatus
4657  GetMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID,
4658  OSType inPropertyCreator, OSType inPropertyTag,
4659  ByteCount inBufferSize,
4660  ByteCount *outActualSize, /* can be NULL */
4661  void *inPropertyBuffer);
4662 
4696  OSStatus
4697  GetMenuCommandPropertySize(MenuRef inMenu, MenuCommand inCommandID,
4698  OSType inPropertyCreator, OSType inPropertyTag,
4699  ByteCount *outSize);
4700 
4736  OSStatus
4737  SetMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID,
4738  OSType inPropertyCreator, OSType inPropertyTag,
4739  ByteCount inPropertySize, const void *inPropertyData);
4740 
4770  OSStatus
4771  RemoveMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID,
4772  OSType inPropertyCreator, OSType inPropertyTag);
4773 
4782  OSStatus
4783  CopyMenuItemData(MenuRef menu, MenuItemID item, Boolean isCommandID,
4784  MenuItemDataPtr outData);
4785 
4794  OSStatus
4795  SetMenuItemData(MenuRef menu, MenuItemID item, Boolean isCommandID,
4796  const MenuItemDataRec *data);
4797 
4798  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4799  /* © Dynamic menu item support (CarbonLib 1.1 and Carbon for Mac OS X, and
4800  * later) */
4801  /* */
4802  /* Dynamic menu item support allows a menu item to be redrawn while the menu is
4803  * open */
4804  /* and visible to the user. Carbon contains automatic support for dynamic items
4805  * based */
4806  /* on keyboard modifier state. If you need to implement your own variable item
4807  * state */
4808  /* based on other system state, you can use these APIs to implement it. */
4809  /* */
4810  /* To use the built-in support for dynamic items, you should create a menu
4811  * containing */
4812  /* several contiguous items with the same command key but different text and
4813  * modifier */
4814  /* keys. For example, you might have: */
4815  /* */
4816  /* Close cmd-W */
4817  /* Close All cmd-option-W */
4818  /* */
4819  /* In your MENU resource, you would create the Close and Close All items and
4820  * give */
4821  /* them each the letter 'W' as the command key; using an associated xmnu
4822  * resource, */
4823  /* you would specify kMenuOptionModifier as the modifier for the Close All
4824  * item. */
4825  /* */
4826  /* After loading your menu from the resource, you must set the
4827  * kMenuItemAttrDynamic */
4828  /* flag for each dynamic item. In this example, you would use: */
4829  /* */
4830  /* ChangeMenuItemAttributes( menu, kCloseItem, kMenuItemAttrDynamic, 0 );
4831  */
4832  /* ChangeMenuItemAttributes( menu, kCloseAllItem, kMenuItemAttrDynamic, 0
4833  * ); */
4834  /* */
4835  /* The Menu Manager will now automatically display the correct item depending
4836  * on */
4837  /* whether the Option key is pressed. The result from MenuSelect will be the
4838  * item */
4839  /* number of the item that was visible when the menu closed. */
4840  /* */
4841  /* If the Menu Manager's built-in support is not sufficient, you can also
4842  * change the */
4843  /* attributes of an item yourself and use the UpdateInvalidMenuItems API to
4844  * cause */
4845  /* the menu to redraw. Changes to a menu item (changing text, command key,
4846  * style, */
4847  /* etc.) that occur while the menu is open will cause the menu item to be
4848  * invalidated, */
4849  /* but not redrawn. If you need to invalidate the item explicitly yourself,
4850  * perhaps */
4851  /* because you have a custom MDEF that depends on state not accessed using Menu
4852  */
4853  /* Manager APIs, you can use the InvalidateMenuItems API.
4854  * UpdateInvalidMenuItems will */
4855  /* scan the menu for invalid items and redraw each, clearing its invalid flag
4856  */
4857  /* afterwards. */
4858  /* */
4859  /* If you need to change menu contents based on modifier key state without
4860  * using the */
4861  /* built-in support in the Menu Manager, we recommend that you install a Carbon
4862  * event */
4863  /* handler on your menu for the [kEventClassKeyboard,
4864  * kEventRawKeyModifiersChanged] */
4865  /* event. Modifier key events are passed to the currently open menu before
4866  * being sent */
4867  /* to the user focus target. */
4868  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4888  Boolean
4889  IsMenuItemInvalid(MenuRef menu, MenuItemIndex item);
4890 
4920  OSStatus
4921  InvalidateMenuItems(MenuRef menu, MenuItemIndex firstItem, ItemCount numItems);
4922 
4948  OSStatus
4950 
4951  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4952  /* ©©Standard font menu (Carbon and later) */
4953  /* */
4954  /* These APIs allow you to create and use the standard font menu. */
4955  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4956  enum
4957  {
4958  kHierarchicalFontMenuOption = 0x00000001
4959  };
4960 
4969  OSStatus
4970  CreateStandardFontMenu(MenuRef menu, MenuItemIndex afterItem,
4971  MenuID firstHierMenuID, OptionBits options,
4972  ItemCount *outHierMenuCount);
4973 
4982  OSStatus
4983  UpdateStandardFontMenu(MenuRef menu, ItemCount *outHierMenuCount);
4984 
4993  OSStatus
4995  FMFontFamily *outFontFamily,
4996  FMFontStyle *outStyle);
4997 
4998  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
4999  /* © Contextual Menu routines and constants */
5000  /* available with Conxtextual Menu extension 1.0 and later */
5001  /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
5002  /* Gestalt Selector for classic 68K apps only. */
5003  /* CFM apps should weak link and check the symbols. */
5004  enum
5005  {
5006  gestaltContextualMenuAttr = FOUR_CHAR_CODE('cmnu'),
5007  gestaltContextualMenuUnusedBit = 0,
5008  gestaltContextualMenuTrapAvailable = 1
5009  };
5010 
5011  /* Values indicating what kind of help the application supports */
5012  enum
5013  {
5014  kCMHelpItemNoHelp = 0,
5015  kCMHelpItemAppleGuide = 1,
5016  kCMHelpItemOtherHelp = 2
5017  };
5018 
5019  /* Values indicating what was chosen from the menu */
5020  enum
5021  {
5022  kCMNothingSelected = 0,
5023  kCMMenuItemSelected = 1,
5024  kCMShowHelpSelected = 3
5025  };
5026 
5035  OSStatus
5037 
5046  Boolean
5048 
5057  Boolean
5059 
5068  OSStatus
5069  ContextualMenuSelect(MenuRef inMenu, Point inGlobalLocation, Boolean inReserved,
5070  UInt32 inHelpType,
5071  ConstStr255Param inHelpItemString, /* can be NULL */
5072  const AEDesc *inSelection, /* can be NULL */
5073  UInt32 *outUserSelectionType, SInt16 *outMenuID,
5074  MenuItemIndex *outMenuItem);
5075 
5084  Boolean
5086 
5087 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
5088 /* Contextual Menu Plugin Interface */
5089 /* */
5090 /* For Mac OS X, we will support a new type of Contextual Menu Plugin: the
5091  * CFPlugIn */
5092 /* based plugin. Each plugin must be in a CFPlugIn in the Contextual Menu
5093  * Items */
5094 /* folder in one of these paths: */
5095 /* /System/Library/Contextual Menu Items/ */
5096 /* /Library/Contextual Menu Items/ */
5097 /* ~/Library/Contextual Menu Items/ */
5098 /* */
5099 /* It must export the following functions using the following interface or a
5100  * C++ */
5101 /* interface inheriting from IUnknown and including similar functions. */
5102 /*©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©©*/
5103 
5104 /* The Contextual Menu Manager will only load CFPlugIns of type
5105  * kContextualMenuTypeID */
5106 #define kContextualMenuTypeID \
5107  (CFUUIDGetConstantUUIDWithBytes(NULL, 0x2F, 0x65, 0x22, 0xE9, 0x3E, 0x66, \
5108  0x11, 0xD5, 0x80, 0xA7, 0x00, 0x30, 0x65, \
5109  0xB3, 0x00, 0xBC))
5110 /* 2F6522E9-3E66-11D5-80A7-003065B300BC */
5111 
5112 /* Contextual Menu Plugins must implement this Contexual Menu Plugin Interface
5113  */
5114 #define kContextualMenuInterfaceID \
5115  (CFUUIDGetConstantUUIDWithBytes(NULL, 0x32, 0x99, 0x7B, 0x62, 0x3E, 0x66, \
5116  0x11, 0xD5, 0xBE, 0xAB, 0x00, 0x30, 0x65, \
5117  0xB3, 0x00, 0xBC))
5118  /* 32997B62-3E66-11D5-BEAB-003065B300BC */
5119 
5120 #define CM_IUNKNOWN_C_GUTS \
5121  void *_reserved; \
5122  SInt32 (*QueryInterface)(void *thisPointer, CFUUIDBytes iid, void **ppv); \
5123  UInt32 (*AddRef)(void *thisPointer); \
5124  UInt32 (*Release)(void *thisPointer)
5125 
5126  // The function table for the interface
5128  {
5129  CM_IUNKNOWN_C_GUTS;
5130  OSStatus (*ExamineContext)(void *thisInstance, const AEDesc *inContext,
5131  AEDescList *outCommandPairs);
5132  OSStatus (*HandleSelection)(void *thisInstance, AEDesc *inContext,
5133  SInt32 inCommandID);
5134  void (*PostMenuCleanup)(void *thisInstance);
5135  };
5137 
5144  OSStatus
5145  CMPluginExamineContext(void *thisInstance, const AEDesc *inContext,
5146  AEDescList *outCommandPairs);
5147 
5154  OSStatus
5155  CMPluginHandleSelection(void *thisInstance, AEDesc *inContext,
5156  SInt32 inCommandID);
5157 
5164  void
5165  CMPluginPostMenuCleanup(void *thisInstance);
5166 
5167  /* previously in LowMem.h. This functions return the menu ID of the hilited
5168  * menu */
5177  SInt16
5179 
5180 #if CALL_NOT_IN_CARBON
5189  MenuRef
5190  newmenu(MenuID menuID, const char *menuTitle);
5191 
5200  void
5201  appendmenu(MenuRef menu, const char *data);
5202 
5211  void
5212  insertmenuitem(MenuRef theMenu, const char *itemString, short afterItem);
5213 
5222  long
5224 
5233  void
5234  setmenuitemtext(MenuRef menu, short item, const char *itemString);
5235 
5244  void
5245  getmenuitemtext(MenuRef menu, short item, char *itemString);
5246 
5247 #endif /* CALL_NOT_IN_CARBON */
5248 
5249 #if OLDROUTINENAMES
5250 #define AddResMenu(theMenu, theType) AppendResMenu(theMenu, theType)
5251 #define InsMenuItem(theMenu, itemString, afterItem) \
5252  InsertMenuItem(theMenu, itemString, afterItem)
5253 #define DelMenuItem(theMenu, item) DeleteMenuItem(theMenu, item)
5254 #if TARGET_OS_MAC
5255 #define SetItem MacSetItem
5256 #define GetItem MacGetItem
5257 #endif
5258 #define MacSetItem(theMenu, item, itemString) \
5259  SetMenuItemText(theMenu, item, itemString)
5260 #define MacGetItem(theMenu, item, itemString) \
5261  GetMenuItemText(theMenu, item, itemString)
5262 #define GetMHandle(menuID) GetMenuHandle(menuID)
5263 #define DelMCEntries(menuID, menuItem) DeleteMCEntries(menuID, menuItem)
5264 #define DispMCInfo(menuCTbl) DisposeMCInfo(menuCTbl)
5265 #if CALL_NOT_IN_CARBON
5266 #define addresmenu(menu, data) appendresmenu(menu, data)
5267 #define getitem(menu, item, itemString) getmenuitemtext(menu, item, itemString)
5268 #define setitem(menu, item, itemString) setmenuitemtext(menu, item, itemString)
5269 #define insmenuitem(theMenu, itemString, afterItem) \
5270  insertmenuitem(theMenu, itemString, afterItem)
5271 #endif
5272 #endif /* OLDROUTINENAMES */
5273 
5274 #if ACCESSOR_CALLS_ARE_FUNCTIONS
5275  /* Getters */
5284  MenuID
5286 
5295  SInt16
5297 
5306  SInt16
5308 
5317  StringPtr
5318  GetMenuTitle(MenuRef menu, Str255 title);
5319 
5328  OSStatus
5330 
5331  /* Setters */
5340  void
5341  SetMenuID(MenuRef menu, MenuID menuID);
5342 
5351  void
5352  SetMenuWidth(MenuRef menu, SInt16 width);
5353 
5362  void
5363  SetMenuHeight(MenuRef menu, SInt16 height);
5364 
5373  OSStatus
5374  SetMenuTitle(MenuRef menu, ConstStr255Param title);
5375 
5384  OSStatus
5386 
5387 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
5388 
5389 #if TARGET_OS_WIN32
5390 #endif /* TARGET_OS_WIN32 */
5391 
5392 #if PRAGMA_STRUCT_ALIGN
5393 #pragma options align = reset
5394 #elif PRAGMA_STRUCT_PACKPUSH
5395 #pragma pack(pop)
5396 #elif PRAGMA_STRUCT_PACK
5397 #pragma pack()
5398 #endif
5399 
5400 #ifdef PRAGMA_IMPORT_OFF
5401 #pragma import off
5402 #elif PRAGMA_IMPORT
5403 #pragma import reset
5404 #endif
5405 
5406 #ifdef __cplusplus
5407 }
5408 #endif
5409 
5410 #endif /* __MENUS__ */
5411 * / setmenuitemtext(menu, item, itemString)
5412 #define insmenuitem(theMenu, itemString, afterItem) \
5413  insertmenuitem(theMenu, itemString, afterItem)
5414 #endif
5415 #endif /* OLDROUTINENAMES */
5416 
5417 #if ACCESSOR_CALLS_ARE_FUNCTIONS
5418  /* Getters */
5427  MenuID
5429 
5438 SInt16
5440 
5449 SInt16
5451 
5460 StringPtr
5461 GetMenuTitle(MenuRef menu, Str255 title);
5462 
5471 OSStatus
5473 
5474 /* Setters */
5483 void SetMenuID(MenuRef menu, MenuID menuID);
5484 
5493 void SetMenuWidth(MenuRef menu, SInt16 width);
5494 
5503 void SetMenuHeight(MenuRef menu, SInt16 height);
5504 
5513 OSStatus
5514 SetMenuTitle(MenuRef menu, ConstStr255Param title);
5515 
5524 OSStatus
5525 SetMenuDefinition(MenuRef menu, const MenuDefSpec *defSpec);
5526 
5527 #endif /* ACCESSOR_CALLS_ARE_FUNCTIONS */
5528 
5529 #if TARGET_OS_WIN32
5530 #endif /* TARGET_OS_WIN32 */
5531 
5532 #if PRAGMA_STRUCT_ALIGN
5533 #pragma options align = reset
5534 #elif PRAGMA_STRUCT_PACKPUSH
5535 #pragma pack(pop)
5536 #elif PRAGMA_STRUCT_PACK
5537 #pragma pack()
5538 #endif
5539 
5540 #ifdef PRAGMA_IMPORT_OFF
5541 #pragma import off
5542 #elif PRAGMA_IMPORT
5543 #pragma import reset
5544 #endif
5545 
5546 #ifdef __cplusplus
5547 }
5548 #endif
5549 
5550 #endif /* __MENUS__ */
5551 * / RAGMA_IMPORT
5552 #pragma import reset
5553 #endif
5554 
5555 #ifdef __cplusplus
5556 }
5557 #endif
5558 
5559 #endif /* __MENUS__ */
5560 * /*/*/ * /*/*/ * /*/*/ * /*/*/
AppleEvent Package Interfaces.
Collection Manager Interfaces.
struct OpaqueCollection * Collection
Definition: Collections.h:158
Event Manager Interfaces.
struct OpaqueEventRef * EventRef
Definition: Events.h:1081
Public interface to the Font Manager.
OSErr codes.
Basic Macintosh data types.
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
void InsertIntlResMenu(MenuRef theMenu, ResType theType, short afterItem, short scriptFilter)
OSStatus SetMenuTitle(MenuRef menu, ConstStr255Param title)
OSStatus GetMenuItemIndent(MenuRef inMenu, MenuItemIndex inItem, UInt32 *outIndent)
Boolean IsMenuItemEnabled(MenuRef menu, MenuItemIndex item)
OSStatus AppendMenuItemTextWithCFString(MenuRef inMenu, CFStringRef inString, MenuItemAttributes inAttributes, MenuCommand inCommandID, MenuItemIndex *outNewItem)
void EnableAllMenuItems(MenuRef theMenu)
OSErr GetMenuItemRefCon(MenuRef inMenu, SInt16 inItem, UInt32 *outRefCon)
OSStatus RemoveMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag)
void DisableMenuItemIcon(MenuRef theMenu, MenuItemIndex item)
Boolean IsMenuBarInvalid(MenuRef rootMenu)
void MacCheckMenuItem(MenuRef theMenu, short item, Boolean checked)
OSStatus SetMenuCommandMark(MenuRef inMenu, MenuCommand inCommandID, UniChar inMark)
OSStatus AppendMenuItemText(MenuRef menu, ConstStr255Param inString)
void SetItemMark(MenuRef theMenu, short item, CharParameter markChar)
void ShowMenuBar(void)
OSStatus GetIndMenuItemWithCommandID(MenuRef inMenu, MenuCommand inCommandID, UInt32 inItemIndex, MenuRef *outMenu, MenuItemIndex *outIndex)
OSStatus GetMenuCommandMark(MenuRef inMenu, MenuCommand inCommandID, UniChar *outMark)
void SetItemIcon(MenuRef theMenu, short item, short iconIndex)
void DeleteMCEntries(MenuID menuID, short menuItem)
OSStatus UpdateStandardFontMenu(MenuRef menu, ItemCount *outHierMenuCount)
Boolean IsMenuCommandEnabled(MenuRef inMenu, MenuCommand inCommandID)
void InitMenus(void)
MenuID GetMenuID(MenuRef menu)
OSStatus CopyMenuItemData(MenuRef menu, MenuItemID item, Boolean isCommandID, MenuItemDataPtr outData)
MenuHookUPP NewMenuHookUPP(MenuHookProcPtr userRoutine)
void MacDrawMenuBar(void)
OSStatus SetMenuItemCommandKey(MenuRef inMenu, MenuItemIndex inItem, Boolean inSetVirtualKey, UInt16 inKey)
void DisposeMCInfo(MCTableHandle menuCTbl)
UInt32 MenuAttributes
Definition: Menus.h:587
MenuRef AcquireRootMenu(void)
void SetMenuFlashCount(short count)
Boolean IsShowContextualMenuEvent(EventRef inEvent)
Boolean SystemEdit(short editCmd)
OSErr SetMenuItemIconHandle(MenuRef inMenu, SInt16 inItem, UInt8 inIconType, Handle inIconHandle)
void MacDeleteMenu(MenuID menuID)
UInt32 MenuEvent(const EventRecord *inEvent)
void CMPluginPostMenuCleanup(void *thisInstance)
SInt16 GetMenuWidth(MenuRef menu)
void SystemMenu(long menuResult)
OSErr GetMenuItemHierarchicalID(MenuRef inMenu, SInt16 inItem, MenuID *outHierID)
OSStatus CMPluginExamineContext(void *thisInstance, const AEDesc *inContext, AEDescList *outCommandPairs)
OSErr GetMenuItemRefCon2(MenuRef inMenu, SInt16 inItem, UInt32 *outRefCon2)
OSStatus GetMenuDefinition(MenuRef menu, MenuDefSpecPtr outDefSpec)
OSErr SetMenuItemTextEncoding(MenuRef inMenu, SInt16 inItem, TextEncoding inScriptID)
MenuRef NewMenu(MenuID menuID, ConstStr255Param menuTitle)
void DisposeMenuDefUPP(MenuDefUPP userUPP)
Boolean IsValidMenu(MenuRef inMenu)
@ kMenuAttrExcludesMarkColumn
Definition: Menus.h:595
@ kMenuAttrAutoDisable
Definition: Menus.h:601
@ kMenuAttrUsePencilGlyph
Definition: Menus.h:609
void SetMenuItemText(MenuRef theMenu, short item, ConstStr255Param itemString)
Boolean IsMenuItemInvalid(MenuRef menu, MenuItemIndex item)
void GetMenuItemText(MenuRef theMenu, short item, Str255 itemString)
OSStatus GetMenuItemAttributes(MenuRef menu, MenuItemIndex item, MenuItemAttributes *outAttributes)
void getmenuitemtext(MenuRef menu, short item, char *itemString)
OSStatus ChangeMenuItemPropertyAttributes(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 attributesToSet, UInt32 attributesToClear)
Boolean GetMenuExcludesMarkColumn(MenuRef menu)
OSErr GetMenuItemFontID(MenuRef inMenu, SInt16 inItem, SInt16 *outFontID)
OSStatus SetMenuTitleWithCFString(MenuRef inMenu, CFStringRef inString)
MenuRef GetMenuHandle(MenuID menuID)
void ClearMenuBar(void)
Redraw the menu bar with no menus.
OSErr SetMenuItemFontID(MenuRef inMenu, SInt16 inItem, SInt16 inFontID)
#define CountMenuItems(theMenu)
Definition: Menus.h:1639
OSStatus EraseMenuBackground(MenuRef inMenu, const Rect *inEraseRect, CGContextRef inContext)
OSStatus GetMenuType(MenuRef theMenu, UInt16 *outType)
long MenuChoice(void)
See if user attempted to select a disabled item.
UInt16 CountMItems(MenuRef theMenu)
Find how many items are in a menu.
MBarHookUPP NewMBarHookUPP(MBarHookProcPtr userRoutine)
SInt16 LMGetTheMenu(void)
void GetItemCmd(MenuRef theMenu, short item, CharParameter *cmdChar)
Query current command character of a menu item.
Boolean ProcessIsContextualMenuClient(ProcessSerialNumber *inPSN)
OSStatus SetMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag, ByteCount inPropertySize, const void *inPropertyData)
void InitProcMenu(short resID)
OSErr SetMenuItemRefCon2(MenuRef inMenu, SInt16 inItem, UInt32 inRefCon2)
void HideMenuBar(void)
OSStatus SetMenuFont(MenuRef menu, SInt16 inFontID, UInt16 inFontSize)
void GetItemIcon(MenuRef theMenu, short item, short *iconIndex)
See which icon, if any, is attached to a menu item.
OSErr SetMenuItemKeyGlyph(MenuRef inMenu, SInt16 inItem, SInt16 inGlyph)
ItemCount CountMenuItemsWithCommandID(MenuRef inMenu, MenuCommand inCommandID)
OSStatus DeleteMenuItems(MenuRef inMenu, MenuItemIndex inFirstItem, ItemCount inNumItems)
OSStatus InvalidateMenuItems(MenuRef menu, MenuItemIndex firstItem, ItemCount numItems)
UInt32 MenuEventOptions
Definition: Menus.h:725
OSStatus RemoveMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag)
long menuselect(const Point *startPt)
MenuDefUPP NewMenuDefUPP(MenuDefProcPtr userRoutine)
void SetItemStyle(MenuRef theMenu, short item, StyleParameter chStyle)
void MacInsertMenu(MenuRef theMenu, MenuID beforeID)
void setmenuitemtext(MenuRef menu, short item, const char *itemString)
OSStatus GetMenuItemHierarchicalMenu(MenuRef inMenu, MenuItemIndex inItem, MenuRef *outHierMenu)
OSStatus InvalidateMenuEnabling(MenuRef inMenu)
OSErr GetMenuItemTextEncoding(MenuRef inMenu, SInt16 inItem, TextEncoding *outScriptID)
void DisposeMenu(MenuRef theMenu)
long MenuSelect(Point startPt)
OSStatus UpdateInvalidMenuItems(MenuRef menu)
void FlashMenuBar(MenuID menuID)
long PopUpMenuSelect(MenuRef menu, short top, short left, short popUpItem)
MenuBarHandle GetNewMBar(short menuBarID)
OSStatus CreateCustomMenu(const MenuDefSpec *inDefSpec, MenuID inMenuID, MenuAttributes inMenuAttributes, MenuRef *outMenuRef)
void insertmenuitem(MenuRef theMenu, const char *itemString, short afterItem)
SInt16 GetMenuHeight(MenuRef menu)
void DeleteMenuItem(MenuRef theMenu, short item)
short InvokeMBarHookUPP(Rect *menuRect, MBarHookUPP userUPP)
void MacAppendMenu(MenuRef menu, ConstStr255Param data)
OSErr SetMenuItemRefCon(MenuRef inMenu, SInt16 inItem, UInt32 inRefCon)
@ kMenuTrackingModeMouse
Definition: Menus.h:709
@ kMenuTrackingModeKeyboard
Definition: Menus.h:714
OSStatus SetRootMenu(MenuRef inMenu)
OSStatus SetMenuItemTextWithCFString(MenuRef inMenu, MenuItemIndex inItem, CFStringRef inString)
OSStatus CopyMenuTitleAsCFString(MenuRef inMenu, CFStringRef *outString)
OSStatus CopyMenuItems(MenuRef inSourceMenu, MenuItemIndex inFirstItem, ItemCount inNumItems, MenuRef inDestMenu, MenuItemIndex inInsertAfter)
Boolean IsShowContextualMenuClick(const EventRecord *inEvent)
long InvokeMenuBarDefUPP(short selector, short message, short parameter1, long parameter2, MenuBarDefUPP userUPP)
OSErr SetMenuItemModifiers(MenuRef inMenu, SInt16 inItem, UInt8 inModifiers)
void InsertFontResMenu(MenuRef theMenu, short afterItem, short scriptFilter)
Boolean MenuHasEnabledItems(MenuRef theMenu)
OSStatus SetMenuItemIndent(MenuRef inMenu, MenuItemIndex inItem, UInt32 inIndent)
void HiliteMenu(MenuID menuID)
void SetMenuHeight(MenuRef menu, SInt16 height)
void InsertResMenu(MenuRef theMenu, ResType theType, short afterItem)
OSErr GetMenuItemCommandID(MenuRef inMenu, SInt16 inItem, MenuCommand *outCommandID)
OSStatus GetMenuTrackingData(MenuRef theMenu, MenuTrackingData *outData)
OSStatus CreateNewMenu(MenuID inMenuID, MenuAttributes inMenuAttributes, MenuRef *outMenuRef)
OSStatus ChangeMenuItemAttributes(MenuRef menu, MenuItemIndex item, MenuItemAttributes setTheseAttributes, MenuItemAttributes clearTheseAttributes)
windowsSubMenu
Assign a command-key to a menu item; make submenu.
Definition: Menus.h:3122
OSStatus ScrollMenuImage(MenuRef inMenu, const Rect *inScrollRect, int inHScroll, int inVScroll, CGContextRef inContext)
@ kMenuItemDataCmdKeyGlyph
Definition: Menus.h:1014
@ kMenuItemDataIndent
Definition: Menus.h:1097
@ kMenuItemDataCmdKeyModifiers
Definition: Menus.h:1020
@ kMenuItemDataTextEncoding
Definition: Menus.h:1070
@ kMenuItemDataProperties
Definition: Menus.h:1091
@ kMenuItemDataMark
Definition: Menus.h:1002
@ kMenuItemDataIconID
Definition: Menus.h:1045
@ kMenuItemDataEnabled
Definition: Menus.h:1033
@ kMenuItemDataText
Definition: Menus.h:996
@ kMenuItemDataCommandID
Definition: Menus.h:1064
@ kMenuItemDataIconHandle
Definition: Menus.h:1058
@ kMenuItemDataCmdVirtualKey
Definition: Menus.h:1105
@ kMenuItemDataIconEnabled
Definition: Menus.h:1039
@ kMenuItemDataCmdKey
Definition: Menus.h:1008
@ kMenuItemDataStyle
Definition: Menus.h:1026
void DisableMenuItem(MenuRef theMenu, MenuItemIndex item)
void InvokeMenuHookUPP(MenuHookUPP userUPP)
OSStatus GetMenuItemPropertyAttributes(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 *attributes)
@ kMenuItemAttrHidden
Definition: Menus.h:652
@ kMenuItemAttrSectionHeader
Definition: Menus.h:663
@ kMenuItemAttrAutoRepeat
Definition: Menus.h:675
@ kMenuItemAttrIconDisabled
Definition: Menus.h:631
@ kMenuItemAttrIgnoreMeta
Definition: Menus.h:669
@ kMenuItemAttrDynamic
Definition: Menus.h:641
@ kMenuItemAttrSeparator
Definition: Menus.h:657
@ kMenuItemAttrCustomDraw
Definition: Menus.h:690
@ kMenuItemAttrNotPreviousAlternate
Definition: Menus.h:647
@ kMenuItemAttrSubmenuParentChoosable
Definition: Menus.h:636
@ kMenuItemAttrDisabled
Definition: Menus.h:626
@ kMenuItemAttrUseVirtualKey
Definition: Menus.h:682
OSStatus SetMenuDefinition(MenuRef menu, const MenuDefSpec *defSpec)
OSStatus GetMenuCommandProperty(MenuRef inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag, ByteCount inBufferSize, ByteCount *outActualSize, void *inPropertyBuffer)
void InvokeMenuDefUPP(short message, MenuRef theMenu, Rect *menuRect, Point hitPt, short *whichItem, MenuDefUPP userUPP)
@ kMenuEventDontCheckSubmenus
Definition: Menus.h:742
@ kMenuEventIncludeDisabledItems
Definition: Menus.h:732
@ kMenuEventQueryOnly
Definition: Menus.h:737
OSStatus InsertMenuItemText(MenuRef menu, ConstStr255Param inString, MenuItemIndex afterItem)
OSStatus InsertMenuItemTextWithCFString(MenuRef inMenu, CFStringRef inString, MenuItemIndex inAfterItem, MenuItemAttributes inAttributes, MenuCommand inCommandID)
UInt32 MenuItemAttributes
Definition: Menus.h:619
MenuRef MacGetMenu(short resourceID)
Boolean IsMenuItemIconEnabled(MenuRef menu, MenuItemIndex item)
OSStatus InitContextualMenus(void)
OSStatus RetainMenu(MenuRef inMenu)
void appendmenu(MenuRef menu, const char *data)
Boolean IsMenuSizeInvalid(MenuRef inMenu)
void EnableMenuItemIcon(MenuRef theMenu, MenuItemIndex item)
void DisposeMenuHookUPP(MenuHookUPP userUPP)
MenuBarDefUPP NewMenuBarDefUPP(MenuBarDefProcPtr userRoutine)
ItemCount GetMenuRetainCount(MenuRef inMenu)
UInt32 MenuTrackingMode
Definition: Menus.h:702
OSErr GetMenuItemKeyGlyph(MenuRef inMenu, SInt16 inItem, SInt16 *outGlyph)
OSErr GetMenuItemModifiers(MenuRef inMenu, SInt16 inItem, UInt8 *outModifiers)
OSErr GetMenuItemIconHandle(MenuRef inMenu, SInt16 inItem, UInt8 *outIconType, Handle *outIconHandle)
OSStatus GetMenuTitleIcon(MenuRef inMenu, UInt32 *outType, void **outIcon)
MenuRef newmenu(MenuID menuID, const char *menuTitle)
OSStatus GetMenuCommandPropertySize(MenuRef inMenu, MenuCommand inCommandID, OSType inPropertyCreator, OSType inPropertyTag, ByteCount *outSize)
OSStatus SetMenuExcludesMarkColumn(MenuRef menu, Boolean excludesMark)
OSStatus GetMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize, void *propertyBuffer)
void DisposeMBarHookUPP(MBarHookUPP userUPP)
OSStatus SetMenuItemData(MenuRef menu, MenuItemID item, Boolean isCommandID, const MenuItemDataRec *data)
OSStatus InvalidateMenuSize(MenuRef inMenu)
void SetMCEntries(short numEntries, MCTablePtr menuCEntries)
OSStatus GetMenuItemPropertySize(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 *size)
OSStatus CreateStandardFontMenu(MenuRef menu, MenuItemIndex afterItem, MenuID firstHierMenuID, OptionBits options, ItemCount *outHierMenuCount)
void DisposeMenuBarDefUPP(MenuBarDefUPP userUPP)
OSStatus CMPluginHandleSelection(void *thisInstance, AEDesc *inContext, SInt32 inCommandID)
void DisableAllMenuItems(MenuRef theMenu)
void SetMenuWidth(MenuRef menu, SInt16 width)
OSStatus SetMenuItemProperty(MenuRef menu, MenuItemIndex item, OSType propertyCreator, OSType propertyTag, UInt32 propertySize, const void *propertyData)
OSStatus ChangeMenuAttributes(MenuRef menu, MenuAttributes setTheseAttributes, MenuAttributes clearTheseAttributes)
void CalcMenuSize(MenuRef theMenu)
Boolean IsMenuBarVisible(void)
void GetItemStyle(MenuRef theMenu, short item, Style *chStyle)
Obtain the current character formatting of a menu item.
OSStatus SetMenuTitleIcon(MenuRef inMenu, UInt32 inType, void *inIcon)
OSStatus RegisterMenuDefinition(SInt16 inResID, MenuDefSpecPtr inDefSpec)
StringPtr GetMenuTitle(MenuRef menu, Str255 title)
void SetMenuBar(MenuBarHandle mbar)
Install an entire menu list.
Boolean IsMenuKeyEvent(MenuRef inStartMenu, EventRef inEvent, MenuEventOptions inOptions, MenuRef *outMenu, MenuItemIndex *outMenuItem)
OSStatus SetMenuItemHierarchicalMenu(MenuRef inMenu, MenuItemIndex inItem, MenuRef inHierMenu)
OSStatus ContextualMenuSelect(MenuRef inMenu, Point inGlobalLocation, Boolean inReserved, UInt32 inHelpType, ConstStr255Param inHelpItemString, const AEDesc *inSelection, UInt32 *outUserSelectionType, SInt16 *outMenuID, MenuItemIndex *outMenuItem)
void EnableMenuCommand(MenuRef inMenu, MenuCommand inCommandID)
OSStatus GetMenuFont(MenuRef menu, SInt16 *outFontID, UInt16 *outFontSize)
void CheckItem(MenuRef theMenu, short item, Boolean checked)
void DisableMenuCommand(MenuRef inMenu, MenuCommand inCommandID)
OSStatus ReleaseMenu(MenuRef inMenu)
void MacInsertMenuItem(MenuRef theMenu, ConstStr255Param itemString, short afterItem)
void GetItemMark(MenuRef theMenu, short item, CharParameter *markChar)
Query the current mark character of a menu item.
OSErr SetMenuItemHierarchicalID(MenuRef inMenu, SInt16 inItem, MenuID inHierID)
OSStatus DisposeMenuBar(MenuBarHandle inMbar)
void SetMenuFlash(short count)
Set the number of times a menu item blinks upon selection.
OSStatus GetMenuItemCommandKey(MenuRef inMenu, MenuItemIndex inItem, Boolean inGetVirtualKey, UInt16 *outKey)
OSStatus DuplicateMenuBar(MenuBarHandle inMbar, MenuBarHandle *outMbar)
OSStatus CopyMenuItemTextAsCFString(MenuRef inMenu, MenuItemIndex inItem, CFStringRef *outString)
OSStatus GetFontFamilyFromMenuSelection(MenuRef menu, MenuItemIndex item, FMFontFamily *outFontFamily, FMFontStyle *outStyle)
OSStatus DuplicateMenu(MenuRef inSourceMenu, MenuRef *outMenu)
void AppendResMenu(MenuRef theMenu, ResType theType)
void SetMCInfo(MCTableHandle menuCTbl)
void InvalMenuBar(void)
long MenuKey(CharParameter ch)
void SetMenuID(MenuRef menu, MenuID menuID)
OSStatus GetMenuAttributes(MenuRef menu, MenuAttributes *outAttributes)
MenuBarHandle GetMenuBar(void)
MCTableHandle GetMCInfo(void)
short GetMBarHeight(void)
Fetch the height of the menu bar.
OSErr SetMenuItemCommandID(MenuRef inMenu, SInt16 inItem, MenuCommand inCommandID)
Dim a menu or a menu item; make non-selectable.
#define CALL_ZERO_PARAMETER_UPP(upp, procInfo)
Definition: MixedMode.h:790
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Process Manager Interfaces.
Interface to Quickdraw Graphics.
typedef CALLBACK_API_REGISTER68K(void, SIInterruptProcPtr,(SPBPtr inParamPtr, Ptr dataBuffer, short peakAmplitude, long sampleSize))
TextEncoding-related types and constants, and prototypes for related functions.
typedef REGISTER_UPP_TYPE(HighHookProcPtr) HighHookUPP
Definition: AEDataModel.h:175
Definition: Menus.h:5128
Definition: Events.h:224
Definition: Menus.h:772
Definition: Menus.h:887
MenuTrackingData trackingData
Definition: Menus.h:894
void * context
Definition: Menus.h:900
Definition: Menus.h:945
void * context
Definition: Menus.h:968
MenuItemIndex firstItem
Definition: Menus.h:950
MenuTrackingData * trackingData
Definition: Menus.h:962
MenuItemIndex lastItem
Definition: Menus.h:955
Definition: Menus.h:916
void * context
Definition: Menus.h:930
MenuTrackingData trackingData
Definition: Menus.h:923
Definition: Menus.h:852
MenuItemIndex newItem
Definition: Menus.h:864
void * context
Definition: Menus.h:870
MenuItemIndex previousItem
Definition: Menus.h:858
Definition: Menus.h:787
Definition: Menus.h:1505
Definition: Menus.h:753
Definition: Menus.h:1129
Definition: Menus.h:830
Definition: MacTypes.h:520
Definition: Processes.h:65
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527
Definition: MacTypes.h:110