nmStr
#include
typedef struct NMRec { Size Offset Description QElemPtr qLink; 4 0 Address of next element in the queue (0=last)
short qType; 2 4 Type of data: 8=nmType
short nmFlags; 2 6 ( reserved)
long nmPrivate; 4 8 ( reserved)
short nmReserved; 2 12 ( reserved)
short nmMark; 2 14 DA or Application to identify with ยท symbol
Handle nmIcon; 4 16 Handle to Small Icon; rotate with [Missing image]n menu bar
Handle nmSound; 4 20 Handle to sound record StringPtr nmStr; 4 24 Pointer to string you want to appear in the alert
NMProcPtr nmResp; 4 28 Pointer to response routine long nmRefCon; 4 32 Available for your application's use
typedef NMRec *NMRecPtr;
Notes: To set up a notification request, you need to fill in the fields qType,
nmMark, nmIcon, nmSound, nmStr, nmResp, and nmRefCon. The remaining fields of this record are used internally by the
Note: In system software version 6.0, the field nmIcon is named
nmSIcon and should contain a handle to a small icon (a 16-by-16
bitmap, often stored as an 'SICN' resource).
Field descriptions
qLink Points to the next element in the queue. This field is
qType Indicates the type of operating-system queue. You
should set this field to the value ORD(nmType), which
is 8.
nmFlags Reserved for use by Apple.
nmPrivate Reserved for use by Apple.
nmReserved Reserved for use by Apple.
nmMark Indicates whether to place a diamond-shaped mark
next to the name of the application in the Application
menu. If nmMark is 0, no such mark appears. If
nmMark is 1, the mark appears next to the name of the
calling application. If nmMark is neither 0 nor 1, it is
interpreted as the reference number of a desk
accessory. An application should pass 1, a desk
accessory should pass its own reference number, and a
driver or a detached background task (such as a VBL
nmIcon Contains a handle to a small icon or to an icon family
containing a small color icon that is to alternate
periodically in the menu bar. If nmIcon is NIL, no icon
appears in the menu bar. If nmIcon is not NIL, then the
handle to a small icon or to an icon family containing a
small color icon. This handle must be valid at the time
that the notification occurs; it does not need to be
locked, but must be non purgeable. See
Drawing Icons with System 7 for more on
icon families.
nmSound Contains a handle to a sound resource to be played with
SndPlay. If nmSound is NIL, no sound is produced. If nmSound is -1, then the system alert sound plays. This
handle does not need to be locked, but it must be
non purgeable.
nmStr Points to a string that appears in the alert box. If
nmStr is NULL, no alert box appears. Note that the
string, so your application should not dispose of this
storage until it removes the notification request.
nmResp Points to a response procedure. If nmResp is NIL, no
response procedure executes when the notification is
posted. If nmResp is -1, then a pre defined procedure
removes the notification request immediately after it
has completed. See Defining a Response
Procedure under
information on writing response procedures.
nmRefCon A long integer available for your application's own
use.