12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTint (*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 tothe extension codes structure. The ret_code argument is the return code you may want _XReplyreturned to.If your procedure returns a zero value, the error is not suppressed, and the client’s error handler iscalled. (For further information, see section 11.8.2.) If your procedure returns nonzero, the erroris suppressed, and _XReply returns the value of ret_code.char *(*XESetErrorString(display, extension, proc))( )Display *display;int extension;char *(*proc)( );displayextensionprocSpecifies the connection to the X server.Specifies the extension number.Specifies the procedure to call to obtain an error string.The XGetErrorText function returns a string to the user for an error. XESetErrorString allowsyou to define a procedure to be called that should return a pointer to the error message. The followingis an example.(*proc)(display, code, codes, buffer, nbytes)Display *display;int code;XExtCodes *codes;char *buffer;int nbytes;Your procedure is called with the error code for every error detected. Youshould copy nbytes ofanull-terminated string containing the error message into buffer.void (*XESetPrintErrorValues(display, extension, proc))( )Display *display;int extension;void (*proc)( );displayextensionprocSpecifies the connection to the X server.Specifies the extension number.Specifies the procedure to call when an error is printed.The XESetPrintErrorValues function defines a procedure to be called when an extension error447

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!