XQueryExtension() XQueryExtension()
Name
XQueryExtension - get extension information.
Synopsis
Bool XQueryExtension(display, name, major_opcode_return, first_event_return, first_error_return)
Display *display;
char *name;
int *major_opcode_return;
int *first_event_return;
int *first_error_return;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
name Specifies the name of the desired extension. Uppercase or lowercase is important. If the extension name is not in the Host Por-
table Character Encoding, the result is implementation-dependent.
major_opcode_return
Returns the major opcode of the extension, for use in error handling routines.
first_event_return
Returns the code of the first custom event type created by the extension.
first_error_return
Returns the code of the first custom error defined by the extension.
Returns
True if the extension is present, else False.
Description
XQueryExtension() determines if the named extension is present, and returns True if it is. If so, the routines in the extension can be
used just as if they were core Xlib requests, except that they may return new types of events or new error codes. The available extensions
can be listed with XListExtensions().
The major_opcode_return for the extension is returned, if it has one. Otherwise, zero is returned. This opcode will appear in errors gen-
erated in the extension.
If the extension involves additional event types, the base event type code is returned in first_event_return. Otherwise, zero is returned
in first_event_return. The format of the events is specific to the extension.
If the extension involves additional error codes, the base error code is returned in first_error_return. Otherwise, zero is returned. The
format of additional data in the errors is specific to the extension.
See Volume One, Chapter 15, Other Programming Techniques, for more information on using extensions, and Volume One, Appendix C, Writing
Extensions to X, for information on writing them.
See Also
XFreeExtensionList(), XListExtensions().
Xlib - Extensions XQueryExtension()