XInitExtension

Syntax

XExtCodes *XInitExtension(display, name)
      Display *display;
      char *name;

Arguments

display Specifies the connection to the X server.
name Specifies the extension name.

Description

The XInitExtension() function determines if the named extension exists. Then, it allocates storage for maintaining the information about the extension on the connection, chains this onto the extension list for the connection, and returns the information the stub implementor will need to access the extension. If the extension does not exist, XInitExtension() returns NULL.

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 extension number in the XExtCodes structure is needed in the other calls that follow. This extension number is unique only to a single connection.

See also

XAddExtension(), "Hooking into Xlib ".
Christophe Tronche, ch@tronche.com