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 DRAFTextension. If the extension involves additional event types, XQueryExtension returns the baseevent type code to first_event_return; otherwise, it returns zero. The format of the events is specificto the extension. If the extension involves additional error codes, XQueryExtension returnsthe base error code to first_error_return; otherwise, it returns zero. The format of additional datain the errors is specific to the extension.If the extension name is not in the Host Portable Character Encoding the result is implementationdependent.Uppercase and lowercase matter; the strings ‘‘thing’’, ‘‘Thing’’, and ‘‘thinG’’ are allconsidered different names.char **XListExtensions(display, nextensions_return)Display *display;int *nextensions_return;displaySpecifies the connection to the X server.nextensions_returnReturns the number of extensions listed.The XListExtensions function returns a list of all extensions supported by the server. Ifthe datareturned by the server is in the Latin Portable Character Encoding, then the returned strings are inthe Host Portable Character Encoding. Otherwise, the result is implementation-dependent.XFreeExtensionList(list)char **list;listSpecifies the list of extension names.The XFreeExtensionList function frees the memory allocated by XListExtensions.Hooking into <strong>Xlib</strong>These functions allow you to hook into the library. They are not normally used by applicationprogrammers but are used by people who need to extend the core X protocol and the X libraryinterface. The functions, which generate protocol requests for X, are typically called stubs.In extensions, stubs first should check to see if they have initialized themselves on a connection.If they have not, they then should call XInitExtension to attempt to initialize themselves on theconnection.If the extension needs to be informed of GC/font allocation or deallocation or if the extensiondefines new event types, the functions described here allow the extension to be called when theseevents occur.The XExtCodes structure returns the information from XInitExtension and is defined in:439

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

Saved successfully!

Ooh no, something went wrong!