302 lines
4.3 KiB
HTML
302 lines
4.3 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of XISELECTEVENTS</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>XISELECTEVENTS</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>
|
|
|
|
XISelectEvents, XIGetSelectedEvents - select for or get selected XI2 events on the window.
|
|
<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 XISelectEvents( Display *display,
|
|
Window win,
|
|
XIEventMask *masks,
|
|
int num_masks);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
masks
|
|
Device event mask.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
num_masks
|
|
Number of masks in masks.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
win
|
|
Specifies the window.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
XIEventMask *XIGetSelectedEvents( Display *display,
|
|
Window win,
|
|
int *num_masks_return);
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
display
|
|
Specifies the connection to the X server.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
num_masks_return
|
|
Number of masks in the return value.
|
|
</PRE>
|
|
|
|
<P>
|
|
<PRE>
|
|
win
|
|
Specifies the window.
|
|
</PRE>
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="1"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XI2 events must be selected using XISelectEvents.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="2"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
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.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="3"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
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.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="4"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
typedef struct {
|
|
int deviceid;
|
|
int mask_len;
|
|
unsigned char* mask;
|
|
} XIEventMask;
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="5"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
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.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="6"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
XISelectEvents can generate a BadValue, a BadDevice, and a
|
|
BadWindow error.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="7"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
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
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="8"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
The caller must free the returned data using XFree().
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<A NAME="lbAE"> </A>
|
|
<H2>DIAGNOSTICS</H2>
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="9"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadValue
|
|
A value is outside of the permitted range.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="10"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadWindow
|
|
A value for a Window argument does not name a defined
|
|
window.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
<DL COMPACT><DT id="11"><DD>
|
|
|
|
|
|
|
|
<PRE>
|
|
BadDevice
|
|
An invalid device was specified. The device does not
|
|
exist.
|
|
</PRE>
|
|
|
|
</DL>
|
|
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="12"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="13"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="14"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="15"><A HREF="#lbAE">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>
|