38 #ifndef __TEXTCOMMON__
46 #ifndef __APPLEEVENTS__
50 #ifndef __COLLECTIONS__
79 #if PRAGMA_STRUCT_ALIGN
80 #pragma options align = mac68k
81 #elif PRAGMA_STRUCT_PACKPUSH
83 #elif PRAGMA_STRUCT_PACK
423 kMenuCalcItemMsg = 5,
433 #if CALL_NOT_IN_CARBON
451 kThemeSavvyMenuResponse = 0x7473
460 kMenuFindItemMsg = 10,
461 kMenuHiliteItemMsg = 11,
462 kMenuDrawItemsMsg = 12
470 kInsertHierarchicalMenu = -1,
478 kMenuStdMenuProc = 63,
479 kMenuStdMenuBarProc = 63
485 kMenuNoModifiers = 0,
486 kMenuShiftModifier = (1 << 0),
487 kMenuOptionModifier = (1 << 1),
488 kMenuControlModifier = (1 << 2),
489 kMenuNoCommandModifier = (1 << 3)
497 kMenuShrinkIconType = 2,
498 kMenuSmallIconType = 3,
499 kMenuColorIconType = 4,
500 kMenuIconSuiteType = 5,
501 kMenuIconRefType = 6,
502 kMenuCGImageRefType = 7,
503 kMenuSystemIconSelectorType =
506 kMenuIconResourceType =
514 kMenuNullGlyph = 0x00,
519 kMenuEnterGlyph = 0x04,
520 kMenuShiftGlyph = 0x05,
521 kMenuControlGlyph = 0x06,
522 kMenuOptionGlyph = 0x07,
523 kMenuSpaceGlyph = 0x09,
524 kMenuDeleteRightGlyph =
526 kMenuReturnGlyph = 0x0B,
527 kMenuReturnR2LGlyph = 0x0C,
528 kMenuNonmarkingReturnGlyph = 0x0D,
529 kMenuPencilGlyph = 0x0F,
530 kMenuDownwardArrowDashedGlyph = 0x10,
531 kMenuCommandGlyph = 0x11,
532 kMenuCheckmarkGlyph = 0x12,
533 kMenuDiamondGlyph = 0x13,
534 kMenuAppleLogoFilledGlyph = 0x14,
535 kMenuParagraphKoreanGlyph = 0x15,
536 kMenuDeleteLeftGlyph =
538 kMenuLeftArrowDashedGlyph = 0x18,
539 kMenuUpArrowDashedGlyph = 0x19,
540 kMenuRightArrowDashedGlyph = 0x1A,
541 kMenuEscapeGlyph = 0x1B,
542 kMenuClearGlyph = 0x1C,
543 kMenuLeftDoubleQuotesJapaneseGlyph =
545 kMenuRightDoubleQuotesJapaneseGlyph =
547 kMenuTrademarkJapaneseGlyph = 0x1F,
548 kMenuBlankGlyph = 0x61,
549 kMenuPageUpGlyph = 0x62,
550 kMenuCapsLockGlyph = 0x63,
551 kMenuLeftArrowGlyph = 0x64,
552 kMenuRightArrowGlyph = 0x65,
553 kMenuNorthwestArrowGlyph = 0x66,
554 kMenuHelpGlyph = 0x67,
555 kMenuUpArrowGlyph = 0x68,
556 kMenuSoutheastArrowGlyph = 0x69,
557 kMenuDownArrowGlyph = 0x6A,
558 kMenuPageDownGlyph = 0x6B,
559 kMenuAppleLogoOutlineGlyph = 0x6C,
560 kMenuContextualMenuGlyph = 0x6D,
561 kMenuPowerGlyph = 0x6E,
571 kMenuF10Glyph = 0x78,
572 kMenuF11Glyph = 0x79,
573 kMenuF12Glyph = 0x7A,
574 kMenuF13Glyph = 0x87,
575 kMenuF14Glyph = 0x88,
576 kMenuF15Glyph = 0x89,
577 kMenuControlISOGlyph = 0x8A
748 typedef SInt16 MenuID;
749 typedef UInt16 MenuItemIndex;
750 typedef UInt32 MenuCommand;
751 #if !OPAQUE_TOOLBOX_STRUCTS
770 typedef Handle MenuBarHandle;
796 struct MenuAccessKeyRec
800 unsigned char keys[1];
802 typedef struct MenuAccessKeyRec MenuAccessKeyRec;
803 typedef MenuAccessKeyRec *MenuAccessKeyPtr;
804 typedef MenuAccessKeyPtr *MenuAccessKeyHandle;
805 #if CALL_NOT_IN_CARBON
815 SetMenuItemHotKey(
MenuRef menu,
short itemID,
char hotKey,
long flags);
832 MenuItemIndex itemSelected;
833 MenuItemIndex itemUnderMouse;
835 SInt32 virtualMenuTop;
836 SInt32 virtualMenuBottom;
1071 kMenuItemDataSubmenuID = (1 << 12),
1072 kMenuItemDataSubmenuHandle = (1 << 13),
1073 kMenuItemDataFontID = (1 << 14),
1074 kMenuItemDataRefcon = (1 << 15),
1075 kMenuItemDataAttributes = (1 << 16),
1076 kMenuItemDataCFString = (1 << 17),
1106 kMenuItemDataAllDataVersionOne = 0x000FFFFF,
1107 kMenuItemDataAllDataVersionTwo =
1135 UInt32 cmdKeyModifiers;
1144 TextEncoding encoding;
1153 UInt16 cmdVirtualKey;
1157 typedef UInt32 MenuItemID;
1165 typedef CALLBACK_API(
void, MenuDefProcPtr)(
short message,
MenuRef theMenu,
1179 #if !OPAQUE_UPP_TYPES
1182 uppMenuDefProcInfo = 0x0000FF80
1189 (ProcPtr)(userRoutine), uppMenuDefProcInfo, GetCurrentArchitecture());
1192 #define NewMenuDefUPP(userRoutine) \
1193 (MenuDefUPP) NewRoutineDescriptor( \
1194 (ProcPtr)(userRoutine), uppMenuDefProcInfo, GetCurrentArchitecture())
1208 #if !OPAQUE_UPP_TYPES
1215 #define DisposeMenuDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1229 short *whichItem, MenuDefUPP userUPP);
1230 #if !OPAQUE_UPP_TYPES
1233 Point hitPt,
short *whichItem,
1236 CALL_FIVE_PARAMETER_UPP(userUPP, uppMenuDefProcInfo, message,
theMenu,
1237 menuRect, hitPt, whichItem);
1240 #define InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, \
1242 CALL_FIVE_PARAMETER_UPP((userUPP), uppMenuDefProcInfo, (message), (theMenu), \
1243 (menuRect), (hitPt), (whichItem))
1247 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1249 #define NewMenuDefProc(userRoutine) NewMenuDefUPP(userRoutine)
1250 #define CallMenuDefProc(userRoutine, message, theMenu, menuRect, hitPt, \
1252 InvokeMenuDefUPP(message, theMenu, menuRect, hitPt, whichItem, userRoutine)
1255 typedef CALLBACK_API(
long, MenuBarDefProcPtr)(
short selector,
short message,
1258 typedef CALLBACK_API(
void, MenuHookProcPtr)(void);
1263 #if CALL_NOT_IN_CARBON
1274 #if !OPAQUE_UPP_TYPES
1277 uppMenuBarDefProcInfo = 0x00003AB0
1283 (ProcPtr)(userRoutine), uppMenuBarDefProcInfo, GetCurrentArchitecture());
1286 #define NewMenuBarDefUPP(userRoutine) \
1287 (MenuBarDefUPP) NewRoutineDescriptor( \
1288 (ProcPtr)(userRoutine), uppMenuBarDefProcInfo, GetCurrentArchitecture())
1302 #if !OPAQUE_UPP_TYPES
1305 uppMenuHookProcInfo = 0x00000000
1311 (ProcPtr)(userRoutine), uppMenuHookProcInfo, GetCurrentArchitecture());
1314 #define NewMenuHookUPP(userRoutine) \
1315 (MenuHookUPP) NewRoutineDescriptor( \
1316 (ProcPtr)(userRoutine), uppMenuHookProcInfo, GetCurrentArchitecture())
1330 #if !OPAQUE_UPP_TYPES
1333 uppMBarHookProcInfo = 0x000000CF
1339 (ProcPtr)(userRoutine), uppMBarHookProcInfo, GetCurrentArchitecture());
1342 #define NewMBarHookUPP(userRoutine) \
1343 (MBarHookUPP) NewRoutineDescriptor( \
1344 (ProcPtr)(userRoutine), uppMBarHookProcInfo, GetCurrentArchitecture())
1358 #if !OPAQUE_UPP_TYPES
1365 #define DisposeMenuBarDefUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1379 #if !OPAQUE_UPP_TYPES
1386 #define DisposeMenuHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1400 #if !OPAQUE_UPP_TYPES
1407 #define DisposeMBarHookUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1421 long parameter2, MenuBarDefUPP userUPP);
1422 #if !OPAQUE_UPP_TYPES
1425 long parameter2, MenuBarDefUPP userUPP)
1427 return (
long)CALL_FOUR_PARAMETER_UPP(userUPP, uppMenuBarDefProcInfo, selector,
1428 message, parameter1, parameter2);
1431 #define InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, \
1433 (long)CALL_FOUR_PARAMETER_UPP((userUPP), uppMenuBarDefProcInfo, (selector), \
1434 (message), (parameter1), (parameter2))
1448 #if !OPAQUE_UPP_TYPES
1455 #define InvokeMenuHookUPP(userUPP) \
1456 CALL_ZERO_PARAMETER_UPP((userUPP), uppMenuHookProcInfo)
1470 #if !OPAQUE_UPP_TYPES && \
1471 (!TARGET_OS_MAC || !TARGET_CPU_68K || TARGET_RT_MAC_CFM)
1475 return (
short)CALL_ONE_PARAMETER_UPP(userUPP, uppMBarHookProcInfo, menuRect);
1478 #define InvokeMBarHookUPP(menuRect, userUPP) \
1479 (short)CALL_ONE_PARAMETER_UPP((userUPP), uppMBarHookProcInfo, (menuRect))
1485 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
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, \
1492 InvokeMenuBarDefUPP(selector, message, parameter1, parameter2, userRoutine)
1493 #define CallMenuHookProc(userRoutine) InvokeMenuHookUPP(userRoutine)
1494 #define CallMBarHookProc(userRoutine, menuRect) \
1495 InvokeMBarHookUPP(menuRect, userRoutine)
1503 typedef UInt32 MenuDefType;
1506 MenuDefType defType;
1517 #if CALL_NOT_IN_CARBON
1554 NewMenu(MenuID menuID, ConstStr255Param menuTitle);
1565 #define MacGetMenu GetMenu
1592 #if CALL_NOT_IN_CARBON
1632 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
1639 #define CountMenuItems(theMenu) (CountMItems(theMenu))
2128 CGContextRef inContext);
2169 int inVScroll, CGContextRef inContext);
2183 #define MacAppendMenu AppendMenu
2219 #define MacInsertMenuItem InsertMenuItem
2256 short scriptFilter);
2279 MenuItemIndex afterItem);
2312 ItemCount inNumItems,
MenuRef inDestMenu,
2313 MenuItemIndex inInsertAfter);
2343 ItemCount inNumItems);
2386 MenuCommand inCommandID,
2387 MenuItemIndex *outNewItem);
2428 MenuItemIndex inAfterItem,
2430 MenuCommand inCommandID);
2546 MenuItemIndex *outMenuItem);
2614 #define MacDrawMenuBar DrawMenuBar
2761 #define GetMenuRef GetMenuHandle
2771 #define MacInsertMenu InsertMenu
2785 #define MacDeleteMenu DeleteMenu
2801 #if CALL_NOT_IN_CARBON
2838 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
2842 #define SetMenuFlashCount(count) (SetMenuFlash(count))
2858 #if CALL_NOT_IN_CARBON
2961 #if CALL_NOT_IN_CARBON
2987 #define MacCheckMenuItem CheckMenuItem
2991 #if CALL_NOT_IN_CARBON && !TARGET_CPU_68K
2993 inline DEFINE_API(
void)
3000 #define CheckMenuItem(theMenu, item, checked) \
3001 (CheckItem(theMenu, item, checked))
3003 #define MacCheckMenuItem(theMenu, item, checked) \
3004 (CheckItem(theMenu, item, checked))
3125 * \copyright THINK Reference © 1991 - 1992 Symantec Corporation
3126 * \non_carbon_cfm in InterfaceLib 7.1 and
3128 * \carbon_lib in CarbonLib 1.0 and
3130 * \mac_os_x in version 10.0 and
3242 #if CALL_NOT_IN_CARBON
3383 Handle inIconHandle);
3395 Handle *outIconHandle);
3418 TextEncoding *outScriptID);
3487 #if CALL_NOT_IN_CARBON
3546 #define MacEnableMenuItem EnableMenuItem
3705 CFStringRef *outString);
3740 CFStringRef inString);
3848 Boolean inGetVirtualKey, UInt16 *outKey);
3892 Boolean inSetVirtualKey, UInt16 inKey);
3965 myMCE.mctRGB2.green = 0;
3966 myMCE.mctRGB2.blue = 0;
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
3974 * \carbon_lib in CarbonLib 1.0 and
3976 * \mac_os_x in version 10.0 and
3980 GetMCEntry(MenuID menuID,
short menuItem);
4004 kMenuPropertyPersistent =
4018 OSType propertyTag, UInt32 bufferSize, UInt32 *actualSize,
4019 void *propertyBuffer);
4031 OSType propertyCreator, OSType propertyTag,
4044 OSType propertyTag, UInt32 propertySize,
4045 const void *propertyData);
4057 OSType propertyTag);
4089 OSType propertyCreator, OSType propertyTag,
4090 UInt32 *attributes);
4125 OSType propertyCreator, OSType propertyTag,
4126 UInt32 attributesToSet,
4127 UInt32 attributesToClear);
4477 MenuItemIndex *outIndex);
4658 OSType inPropertyCreator, OSType inPropertyTag,
4659 ByteCount inBufferSize,
4660 ByteCount *outActualSize,
4661 void *inPropertyBuffer);
4698 OSType inPropertyCreator, OSType inPropertyTag,
4699 ByteCount *outSize);
4738 OSType inPropertyCreator, OSType inPropertyTag,
4739 ByteCount inPropertySize,
const void *inPropertyData);
4772 OSType inPropertyCreator, OSType inPropertyTag);
4958 kHierarchicalFontMenuOption = 0x00000001
4971 MenuID firstHierMenuID, OptionBits options,
4972 ItemCount *outHierMenuCount);
4995 FMFontFamily *outFontFamily,
4996 FMFontStyle *outStyle);
5006 gestaltContextualMenuAttr = FOUR_CHAR_CODE(
'cmnu'),
5007 gestaltContextualMenuUnusedBit = 0,
5008 gestaltContextualMenuTrapAvailable = 1
5014 kCMHelpItemNoHelp = 0,
5015 kCMHelpItemAppleGuide = 1,
5016 kCMHelpItemOtherHelp = 2
5022 kCMNothingSelected = 0,
5023 kCMMenuItemSelected = 1,
5024 kCMShowHelpSelected = 3
5071 ConstStr255Param inHelpItemString,
5072 const AEDesc *inSelection,
5073 UInt32 *outUserSelectionType, SInt16 *outMenuID,
5074 MenuItemIndex *outMenuItem);
5106 #define kContextualMenuTypeID \
5107 (CFUUIDGetConstantUUIDWithBytes(NULL, 0x2F, 0x65, 0x22, 0xE9, 0x3E, 0x66, \
5108 0x11, 0xD5, 0x80, 0xA7, 0x00, 0x30, 0x65, \
5114 #define kContextualMenuInterfaceID \
5115 (CFUUIDGetConstantUUIDWithBytes(NULL, 0x32, 0x99, 0x7B, 0x62, 0x3E, 0x66, \
5116 0x11, 0xD5, 0xBE, 0xAB, 0x00, 0x30, 0x65, \
5120 #define CM_IUNKNOWN_C_GUTS \
5122 SInt32 (*QueryInterface)(void *thisPointer, CFUUIDBytes iid, void **ppv); \
5123 UInt32 (*AddRef)(void *thisPointer); \
5124 UInt32 (*Release)(void *thisPointer)
5130 OSStatus (*ExamineContext)(
void *thisInstance,
const AEDesc *inContext,
5132 OSStatus (*HandleSelection)(
void *thisInstance,
AEDesc *inContext,
5133 SInt32 inCommandID);
5134 void (*PostMenuCleanup)(
void *thisInstance);
5156 SInt32 inCommandID);
5180 #if CALL_NOT_IN_CARBON
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)
5255 #define SetItem MacSetItem
5256 #define GetItem MacGetItem
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)
5274 #if ACCESSOR_CALLS_ARE_FUNCTIONS
5392 #if PRAGMA_STRUCT_ALIGN
5393 #pragma options align = reset
5394 #elif PRAGMA_STRUCT_PACKPUSH
5396 #elif PRAGMA_STRUCT_PACK
5400 #ifdef PRAGMA_IMPORT_OFF
5403 #pragma import reset
5412 #define insmenuitem(theMenu, itemString, afterItem) \
5413 insertmenuitem(theMenu, itemString, afterItem)
5417 #if ACCESSOR_CALLS_ARE_FUNCTIONS
5532 #if PRAGMA_STRUCT_ALIGN
5533 #pragma options align = reset
5534 #elif PRAGMA_STRUCT_PACKPUSH
5536 #elif PRAGMA_STRUCT_PACK
5540 #ifdef PRAGMA_IMPORT_OFF
5543 #pragma import reset
5552 #pragma import reset
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.
Basic Macintosh data types.
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
#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
MenuTrackingData trackingData
Definition: Menus.h:894
void * context
Definition: Menus.h:900
void * context
Definition: Menus.h:968
MenuItemIndex firstItem
Definition: Menus.h:950
MenuTrackingData * trackingData
Definition: Menus.h:962
MenuItemIndex lastItem
Definition: Menus.h:955
void * context
Definition: Menus.h:930
MenuTrackingData trackingData
Definition: Menus.h:923
MenuItemIndex newItem
Definition: Menus.h:864
void * context
Definition: Menus.h:870
MenuItemIndex previousItem
Definition: Menus.h:858
Definition: MacTypes.h:520
Definition: Processes.h:65
Definition: Quickdraw.h:1710
Definition: MacTypes.h:527
Definition: MacTypes.h:110