Important: The information in this document is obsolete and should not be used for new development.
GXSetUserGraphicsWarning
You can use theGXSetUserGraphicsWarningfunction to install an application-defined warning handler.
void GXSetUserGraphicsWarning(gxUserWarningFunction userFunction, long reference);
userFunction
The application's warning function that is to be passed the warning code.reference- A
longvalue that gets called each time a warning occurs. This value can be used by the application for any purpose.DESCRIPTION
TheGXSetUserGraphicsWarningfunction installs an application-defined warning handler. This function installs a function pointer that is called whenever a warning is posted. Setting theuserFunctionparameter tonilremoves the error function.The
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 thelongreference 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 theGXSetUserGraphicsErrorfunction.You can install a warning handler before calling the
GXEnterGraphicsfunction , but you should call theGXNewGraphicsClientfunction first. If you don't,GXNewGraphicsClientwill be called for you.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
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.
The
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.