Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ XQueryExten(3x) — HP-UX ANSI C A.09.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

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

displaySpecifies a connection to an X server; returned from XOpenDisplay(). 

nameSpecifies the name of the desired extension.  Upper or lower case is important.  If the extension name is not in the Host Portable 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.

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 generated 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 13, 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(). 

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026