home *** CD-ROM | disk | FTP | other *** search
- /*______________________________________________________________________
-
- Menu Events
-
- Version 1.2
-
- an AWOL Software Production
- PO Box 24207
- 300 Eagleson Road
- Kanata, Ontario, Canada K2M 2C3
-
- Internet: ab026@freenet.carleton.ca
-
- Copyright © 1994 Ross Brown. All rights reserved.
- _____________________________________________________________________*/
-
-
- /*______________________________________________________________________
-
- 'Menu Events'.h - Menu Events Definitions.
-
- This file defines the Apple events which you can send to any
- high-level-event-aware process when Menu Events is installed.
-
- The Query Menu List event returns a list of menu info records,
- each with ID, title, enabled/disabled status, and menu
- definition procedure resource ID.
-
- The Query Menu event, given a menu ID, returns a list of menu
- item records, each with ID, title, enabled/disabled status,
- mark character, icon number, style, and Command-key character.
-
- The Select Menu Item event, given a menu ID and menu item ID,
- causes the target to act as if the given item had been selected
- by the user. You can optionally specify which modifier keys
- (Shift, Control, Option, Command) are pressed at the time of
- the simulated menu item selection.
-
- Use AppleScript's Script Editor or any Apple event tool to read
- the dictionary for this suite of events from the Menu Events
- Scripting Addition file. See the Menu Events Sample Script file
- for an example of Menu event scripting. There is also a full
- description of the Menu Events suite in the Menu Events Help file.
- _____________________________________________________________________*/
-
-
- #ifndef __MENU_EVENTS__
- #define __MENU_EVENTS__
-
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
-
-
- /* Signature of the Menu Events extension. */
-
- #define kMESignature 'Mænu'
-
-
- /* Gestalt selector and response bits for the Menu Events extension. */
-
- #define gestaltMenuEventsAttr kMESignature
-
- #define gestaltMEQueryEventSupport 0
- #define gestaltMESelectEventSupport 1
-
-
- /* Error codes returned by the Menu Events Apple event suite. */
-
- #define noSuchMenuErr ( -21000 ) /* no such menu in menu bar */
- #define noSuchMenuItemErr ( -21001 ) /* no such item in menu */
- #define menuItemDisabledErr ( -21002 ) /* item is disabled */
- #define menuEventPendingErr ( -21003 ) /* another menu event is pending */
- #define nonStandardMenuErr ( -21004 ) /* obsolete, kept for compatibility */
-
-
- /* Class, ID, and key definitions for the Menu Events Apple event suite. */
-
- #define kMEEventClass kMESignature
-
- #define kAEMEQueryMenuList 'qmn#'
- #define kAEMEQueryMenu 'qmn '
- #define kAEMESelectMenuItem 'semi'
-
- #define keyMenuID 'mnid'
- #define keyMenuTitle 'mnti'
- #define keyMenuEnabled 'mnen'
- #define keyMenuMDEFID 'mndf'
-
- #define keyMenuItemID 'miid'
- #define keyMenuItemText 'mite'
- #define keyMenuItemEnabled 'mien'
- #define keyMenuItemMark 'mima'
- #define keyMenuItemIcon 'miic'
- #define keyMenuItemStyle 'mist'
- #define keyMenuItemCmd 'micm'
-
- #define keyShiftKeyPressed 'shik'
- #define keyControlKeyPressed 'conk'
- #define keyOptionKeyPressed 'optk'
- #define keyCommandKeyPressed 'comk'
-
- #define keyMenuEventsTattoo kMESignature /* null; presence verifies handling of event */
-
-
- #endif __MENU_EVENTS__
-