Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xiqueryversion(3) [debian man page]

XIQUERYVERSION(3)														 XIQUERYVERSION(3)

NAME
XIQueryVersion - announce and query the support XI2 version. SYNOPSIS
#include <X11/extensions/XInput2.h> Status XIQueryVersion( Display *display, int *major_version_inout, int *minor_version_inout); display Specifies the connection to the X server. major_version_inout Specifies the client's supported XI2 version, and returns the server's supported version. minor_version_inout Specifies the client's supported XI2 version, and returns the server's supported version. DESCRIPTION
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. 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. 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. XIQueryVersion can generate a BadValue error. EXAMPLES
int rc; int major = 2; int minor = 0; rc = XIQueryVersion(dpy, &major, &minor); if (rc == Success) printf("XI2 supported. (%d.%d) ", major, minor); else if (rc == BadRequest) printf("No XI2 support. (%d.%d only) ", major, minor); else printf("Internal error "); DIAGNOSTICS
BadValue A value is outside of the permitted range. 05/15/2013 XIQUERYVERSION(3)

Check Out this Related Man Page

XISELECTEVENTS(3)														 XISELECTEVENTS(3)

NAME
XISelectEvents, XIGetSelectedEvents - select for or get selected XI2 events on the window. SYNOPSIS
#include <X11/extensions/XInput2.h> Status XISelectEvents( Display *display, Window win, XIEventMask *masks, int num_masks); display Specifies the connection to the X server. masks Device event mask. num_masks Number of masks in masks. win Specifies the window. XIEventMask *XIGetSelectedEvents( Display *display, Window win, int *num_masks_return); display Specifies the connection to the X server. num_masks_return Number of masks in the return value. win Specifies the window. DESCRIPTION
XI2 events must be selected using XISelectEvents. XISelectEvents sets the event mask for this client on win. Further events are only reported to this client if the event type matches the selected event mask. The masks overrides the previously selected event mask for the given device. If deviceid is a valid device, the event mask is selected only for this device. If deviceid is XIAllDevices or XIAllMasterDevices, the event mask is selected for all devices or all master devices, respectively. The effective event mask is the bit-wise OR of the XIAllDevices, XIAllMasterDevices and the respective device's event mask. typedef struct { int deviceid; int mask_len; unsigned char* mask; } XIEventMask; The mask_len specifies the length of mask in bytes. mask is a binary mask in the form of (1 << event type). deviceid must be either a device or XIAllDevices or XIAllMasterDevices. A client may submit several masks with the same deviceid in one request but only the last mask will be effective. XISelectEvents can generate a BadValue, a BadDevice, and a BadWindow error. XIGetSelectedEvents returns the events selected by this client on the given window. If no events were selected on this window, XIGetSelectedEvents returns NULL and num_masks_return is set to 0. If an internal error occurs, XIGetSelectedEvents returns NULL and num_masks_return is set to -1. Otherwise, XIGetSelectedEvent returns the selected event masks for all devices including the masks for XIAllDevices and XIAllMasterDevices The caller must free the returned data using XFree(). DIAGNOSTICS
BadValue A value is outside of the permitted range. BadWindow A value for a Window argument does not name a defined window. BadDevice An invalid device was specified. The device does not exist. 05/15/2013 XISELECTEVENTS(3)
Man Page