int (*XESetError(display, extension, proc))()
Display *display;
int extension;
int (*proc)();
display | Specifies the connection to the X server. |
extension | Specifies the extension number. |
proc | Specifies the procedure to call when an error is received. |
When Xlib detects a protocol error in _XReply, it calls your procedure with these arguments:
int (*proc)(display, err, codes, ret_code)
Display *display;
xError *err;
XExtCodes *codes;
int *ret_code;
The err argument is a pointer to the 32-byte wire format error. The codes argument is a pointer to the extension codes structure. The ret_code argument is the return code you may want _XReply returned to.
If your procedure returns a zero value, the error is not suppressed, and the client's error handler is called. (For further information, see "Using the Default Error Handlers".) If your procedure returns nonzero, the error is suppressed, and _XReply returns the value of ret_code.