XQueryExtension(3) X FUNCTIONS XQueryExtension(3)

# [NAME](#NAME)

XQueryExtension, XListExtensions, XFreeExtensionList - list available extensions

# [SYNTAX](#SYNTAX)

Bool XQueryExtension(*display, name, major\_opcode\_return, first\_event\_return, first\_error\_return)*

char \*\*XListExtensions(*display*, *nextensions\_return*)

XFreeExtensionList(*list*)

# [ARGUMENTS](#ARGUMENTS)

[*display*](#display)

Specifies the connection to the X server.

[*name*](#name)

Specifies the extension name.

[*major\_opcode\_return*](#major_opcode_return)

Returns the major opcode.

[*first\_event\_return*](#first_event_return)

Returns the first event code, if any.

[*first\_error\_return*](#first_error_return)

Returns the first error code, if any.

[*nextensions\_return*](#nextensions_return)

Returns the number of extensions listed.

[*list*](#list)

Specifies the list of extension names.

# [DESCRIPTION](#DESCRIPTION)

The *XQueryExtension* function determines if the named extension is present. If the extension is not present, *XQueryExtension* returns *False*; otherwise, it returns *True*. If the extension is present, *XQueryExtension* returns the major opcode for the extension to major\_opcode\_return; otherwise, it returns zero. Any minor opcode and the request formats are specific to the extension. If the extension involves additional event types, *XQueryExtension* returns the base event type code to first\_event\_return; otherwise, it returns zero. The format of the events is specific to the extension. If the extension involves additional error codes, *XQueryExtension* returns the base error code to first\_error\_return; otherwise, it returns zero. The format of additional data in the errors is specific to the extension. If the extension name is not in the Host Portable Character Encoding the result is implementation-dependent. Uppercase and lowercase matter; the strings “thing”, “Thing”, and “thinG” are all considered different names.

The *XListExtensions* function returns a list of all extensions supported by the server. If the data returned by the server is in the Latin Portable Character Encoding, then the returned strings are in the Host Portable Character Encoding. Otherwise, the result is implementation-dependent.

The *XFreeExtensionList* function frees the memory allocated by *XListExtensions*.

libX11 1.8.14 X Version 11

---

Document: XListExtensions(3) from libx11 1.8.14-r0 (Chainguard OS)
Source: https://gitlab.freedesktop.org/xorg/lib/libx11.git
