Important: The information in this document is obsolete and should not be used for new development.
GXSetUserGraphicsWarningYou can use the
GXSetUserGraphicsWarningfunction to install an application-defined warning handler.
void GXSetUserGraphicsWarning(gxUserWarningFunction userFunction, long reference);
The application's warning function that is to be passed the warning code.
longvalue that gets called each time a warning occurs. This value can be used by the application for any purpose.
GXSetUserGraphicsWarningfunction installs an application-defined warning handler. This function installs a function pointer that is called whenever a warning is posted. Setting the
nilremoves the error function.
userFunctionparameter points to an application-defined warning handler defined by the following type:
typedef void (*gxUserWarningProcPtr)(gxGraphicsWarning status, long refcon) typedef gxUserWarningProcPtr gxUserWarningFunction;The second parameter is the
longreference parameter. Whenever a warning is posted by the application, the installed warning handler is called with the warning number. The reference number is passed to the
You can install a warning handler before calling the
GXEnterGraphicsfunction , but you should call the
GXNewGraphicsClientfunction first. If you don't,
GXNewGraphicsClientwill be called for you.
SEE ALSOThe use of this function is described in the section "Installing an Error, Warning, or Notice Handler" beginning on page 3-38.
GXGetUserGraphicsWarningfunction described in the next section is used to return a pointer to the application-defined warning handler.
An alternative method of posting warnings is to use the QuickDraw GX warning messages. This topic is discussed in the section "Obtaining Errors, Warnings, and Notices" beginning on page 3-30.
GXGetGraphicsErrorfunction described on page 3-54 is used to obtain the first and last QuickDraw GX errors posted.
The application-defined warning handler is described on page 3-71.