2010-05-18 13:28:54 -06:00
|
|
|
'\" t
|
|
|
|
.\" Title: xiqueryversion
|
|
|
|
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
|
2011-07-02 15:14:36 -06:00
|
|
|
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
|
2012-06-11 13:24:48 -06:00
|
|
|
.\" Date: 04/23/2012
|
2011-07-02 15:21:11 -06:00
|
|
|
.\" Manual: [FIXME: manual]
|
|
|
|
.\" Source: [FIXME: source]
|
2010-05-18 13:28:54 -06:00
|
|
|
.\" Language: English
|
|
|
|
.\"
|
2012-06-11 13:24:48 -06:00
|
|
|
.TH "XIQUERYVERSION" "libmansuffix" "04/23/2012" "[FIXME: source]" "[FIXME: manual]"
|
2011-07-02 15:14:36 -06:00
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.\" * Define some portability stuff
|
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.\" http://bugs.debian.org/507673
|
|
|
|
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
|
|
|
|
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
.ie \n(.g .ds Aq \(aq
|
|
|
|
.el .ds Aq '
|
2010-05-18 13:28:54 -06:00
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.\" * set default formatting
|
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.\" disable hyphenation
|
|
|
|
.nh
|
|
|
|
.\" disable justification (adjust text to left margin only)
|
|
|
|
.ad l
|
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.\" * MAIN CONTENT STARTS HERE *
|
|
|
|
.\" -----------------------------------------------------------------
|
|
|
|
.SH "NAME"
|
|
|
|
XIQueryVersion \- announce and query the support XI2 version\&.
|
|
|
|
.SH "SYNOPSIS"
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
#include <X11/extensions/XInput2\&.h>
|
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
Status XIQueryVersion( Display *display,
|
|
|
|
int *major_version_inout,
|
|
|
|
int *minor_version_inout);
|
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
display
|
|
|
|
Specifies the connection to the X server\&.
|
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
major_version_inout
|
2011-07-02 15:14:36 -06:00
|
|
|
Specifies the client\*(Aqs supported XI2 version, and
|
|
|
|
returns the server\*(Aqs supported version\&.
|
2010-05-18 13:28:54 -06:00
|
|
|
.fi
|
|
|
|
.sp
|
|
|
|
.nf
|
|
|
|
minor_version_inout
|
2011-07-02 15:14:36 -06:00
|
|
|
Specifies the client\*(Aqs supported XI2 version, and
|
|
|
|
returns the server\*(Aqs supported version\&.
|
2010-05-18 13:28:54 -06:00
|
|
|
.fi
|
|
|
|
.SH "DESCRIPTION"
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
2011-07-02 15:14:36 -06:00
|
|
|
XIQueryVersion announces the client\*(Aqs supported XI2 version to
|
|
|
|
the server and returns server\*(Aqs supported X Input version\&. Clients
|
2010-05-18 13:28:54 -06:00
|
|
|
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\&.
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
|
|
|
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
|
2011-07-02 15:14:36 -06:00
|
|
|
server\*(Aqs supported version\&.
|
2010-05-18 13:28:54 -06:00
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
2012-06-11 13:24:48 -06:00
|
|
|
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\&.
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
2010-05-18 13:28:54 -06:00
|
|
|
XIQueryVersion can generate a BadValue error\&.
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.SH "EXAMPLES"
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
|
|
|
int rc;
|
|
|
|
int major = 2;
|
|
|
|
int minor = 0;
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
|
|
|
rc = XIQueryVersion(dpy, &major, &minor);
|
|
|
|
if (rc == Success)
|
|
|
|
printf("XI2 supported\&. (%d\&.%d)\en", major, minor);
|
|
|
|
else if (rc == BadRequest)
|
|
|
|
printf("No XI2 support\&. (%d\&.%d only)\en", major, minor);
|
|
|
|
else
|
|
|
|
printf("Internal error\en");
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|
|
|
|
.SH "DIAGNOSTICS"
|
|
|
|
.sp
|
|
|
|
.if n \{\
|
|
|
|
.RS 4
|
|
|
|
.\}
|
|
|
|
.nf
|
|
|
|
BadValue
|
|
|
|
A value is outside of the permitted range\&.
|
|
|
|
.fi
|
|
|
|
.if n \{\
|
|
|
|
.RE
|
|
|
|
.\}
|