250 lines
4.0 KiB
HTML
250 lines
4.0 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XIQUERYVERSION</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XIQUERYVERSION</H1>
|
|
Section: (3)<BR>Updated: 06/19/2019<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
XIQueryVersion - announce and query the support XI2 version.
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<P>
|
|
<PRE>
|
|
#include <<A HREF="file:///usr/include/X11/extensions/XInput2.h">X11/extensions/XInput2.h</A>>
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
Status XIQueryVersion( Display *display,
|
|
int *major_version_inout,
|
|
int *minor_version_inout);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
major_version_inout
|
|
Specifies the client's supported XI2 version, and
|
|
returns the server's supported version.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
minor_version_inout
|
|
Specifies the client's supported XI2 version, and
|
|
returns the server's supported version.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XIQueryVersion announces the client's supported XI2 version to
|
|
the server and returns server's supported X Input version. Clients
|
|
are required to use XIQueryVersion instead of XGetExtensionVersion
|
|
if they use XI2 calls. The server may treat a client differently
|
|
depending on the supported version announced by the client.
|
|
The major_version_inout must be 2 or greater, otherwise a BadValue
|
|
error occurs.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If the server does not support XI2, XIQueryVersion returns BadRequest
|
|
to the client. Otherwise, XIQueryVersion returns Success. In both
|
|
cases major_version_inout and minor_version_inout are set to the
|
|
server's supported version.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If the client has previously called XIQueryVersion, then the result
|
|
depends on the previously requested version and the currently
|
|
requested version.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If either the previous or current requested versions is less than
|
|
2.2, or if the requested major version numbers do not match, then
|
|
consecutive calls to XIQueryVersion by the same client always
|
|
return the first returned major.minor version. If the client
|
|
requests a version lower than the first returned major.minor
|
|
version in a subsequent call, a BadValue error occurs.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
If all of the requested versions are 2.2 or greater, then
|
|
consecutive calls to XIQueryVersion by the same client with the
|
|
same major version will return the requested version, but the server
|
|
will operate according to the highest requested version number or
|
|
the highest supported version, whichever is lower.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XIQueryVersion can generate a BadValue error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
int rc;
|
|
int major = 2;
|
|
int minor = 0;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
rc = XIQueryVersion(dpy, &major, &minor);
|
|
if (rc == Success)
|
|
printf("XI2 supported. (%d.%d)\n", major, minor);
|
|
else if (rc == BadRequest)
|
|
printf("No XI2 support. (%d.%d only)\n", major, minor);
|
|
else
|
|
printf("Internal error\n");
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAF"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadValue
|
|
A value is outside of the permitted range.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="10"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="11"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="12"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="13"><A HREF="#lbAE">EXAMPLES</A><DD>
|
|
<DT id="14"><A HREF="#lbAF">DIAGNOSTICS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:01 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|