Important: The information in this document is obsolete and should not be used for new development.
GXSetUserGraphicsWarning
You can use theGXSetUserGraphicsWarning
function 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
long
value that gets called each time a warning occurs. This value can be used by the application for any purpose.DESCRIPTION
TheGXSetUserGraphicsWarning
function installs an application-defined warning handler. This function installs a function pointer that is called whenever a warning is posted. Setting theuserFunction
parameter tonil
removes the error function.The
userFunction
parameter 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 thelong
reference 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 theGXSetUserGraphicsError
function.You can install a warning handler before calling the
GXEnterGraphics
function , but you should call theGXNewGraphicsClient
function first. If you don't,GXNewGraphicsClient
will 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
GXGetUserGraphicsWarning
function 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
GXGetGraphicsError
function 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.