Bool (*XESetWireToError(display, error_number, proc)()
      Display *display;
      int error_number;
      Bool (*proc)();


display Specifies the connection to the X server.
error_number Specifies the error code.
proc Specifies the procedure to call when an error is received.


The XESetWireToError() function defines a procedure to be called when an extension error needs to be converted from wire format to host format. The error number defines which protocol error code to install the conversion procedure for. XESetWireToError() returns any previously defined procedure.

Use this function for extension errors that contain additional error values beyond those in a core X error, when multiple wire errors must be combined into a single Xlib error, or when it is necessary to intercept an X error before it is otherwise examined.

When Xlib needs to convert an error from wire format to host format, the procedure is called with these arguments:

Bool (*proc)(display, he, we)
	Display *display;
	XErrorEvent *he;
	xError *we;

The he argument is a pointer to where the host format error should be stored. The structure pointed at by he is guaranteed to be as large as an XEvent structure and so can be cast to a type larger than an XErrorEvent to store additional values. If the error is to be completely ignored by Xlib (for example, several protocol error structures will be combined into one Xlib error), then the function should return False; otherwise, it should return True.

See also

XESetBeforeFlush(), XESetCloseDisplay(), XESetCopyGC(), XESetCreateFont(), XESetCreateGC(), XESetError(), XESetErrorString(), XESetEventToWire(), XESetFlushGC(), XESetFreeFont(), XESetFreeGC(), XESetPrintErrorValues(), XESetWireToEvent(), _XSetLastRequestRead(), "Hooks into the Library"
Christophe Tronche, [email protected]