Legacy Documentclose button

Important: The information in this document is obsolete and should not be used for new development.

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Environment and Utilities /
Chapter 3 - Errors, Warnings, and Notices / Errors, Warnings, and Notices Reference
Functions / Notice Posting and Handling


GXSetUserGraphicsNotice

You can use the GXSetUserGraphicsNotice function to install a notice handler.

void GXSetUserGraphicsNotice(gxUserNoticeFunction userFunction, 
                           long reference);
userFunction
The application function that is to be passed the notice result code.
reference
A long value that is called each time a notice occurs. This value can be used by the application for any purpose.
DESCRIPTION
The GXSetUserGraphicsNotice function installs an application-defined notice- handling function. This function installs a function pointer that is called whenever a notice is posted. Setting the userFunction parameter to nil removes the notice function.

The userFunction parameter points to an application-defined notice handler defined by the following type:

typedef void (*gxUserNoticeProcPtr)(gxGraphicsNotice status, 
               long reference)
typedef gxUserNoticeProcPtr gxUserNoticeFunction;
The second parameter is the long reference. Whenever a notice is posted by the application, the installed notice handler is called with the notice number. The reference number is passed to the GXSetUserGraphicsNotice function.

You can install a notice handler before calling the GXEnterGraphics function, but you should call the GXNewGraphicsClient function first. If you don't, it will be called for you.

The GXSetUserGraphicsNotice function has no effect in the non-debugging version.

SEE ALSO
The use of this function is described in the section "Installing an Error, Warning, or Notice Handler" beginning on page 3-38.

The GXGetUserGraphicsNotice function used to return a pointer to the application-defined notice handler is described in the next section.

The application-defined notice handler is described on page 3-72.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996