1XISELECTEVENTS(3)                                            XISELECTEVENTS(3)
2
3
4

NAME

6       XISelectEvents, XIGetSelectedEvents - select for or get selected XI2
7       events on the window.
8

SYNOPSIS

10       #include <X11/extensions/XInput2.h>
11
12       Status XISelectEvents( Display *display,
13                              Window win,
14                              XIEventMask *masks,
15                              int num_masks);
16
17       display
18              Specifies the connection to the X server.
19
20       masks
21              Device event mask.
22
23       num_masks
24              Number of masks in masks.
25
26       win
27              Specifies the window.
28
29       XIEventMask *XIGetSelectedEvents( Display *display,
30                                         Window win,
31                                         int *num_masks_return);
32
33       display
34              Specifies the connection to the X server.
35
36       num_masks_return
37              Number of masks in the return value.
38
39       win
40              Specifies the window.
41

DESCRIPTION

43           XI2 events must be selected using XISelectEvents.
44
45           XISelectEvents sets the event mask for this client on win.
46           Further events are only reported to this client if the event
47           type matches the selected event mask. The masks overrides the
48           previously selected event mask for the given device.
49
50           If deviceid is a valid device, the event mask is selected only
51           for this device. If deviceid is XIAllDevices or
52           XIAllMasterDevices, the event mask is selected for all devices
53           or all master devices, respectively. The effective event mask
54           is the bit-wise OR of the XIAllDevices, XIAllMasterDevices and
55           the respective device's event mask.
56
57           typedef struct {
58               int deviceid;
59               int mask_len;
60               unsigned char* mask;
61           } XIEventMask;
62
63           The mask_len specifies the length of mask in bytes. mask is a
64           binary mask in the form of (1 << event type). deviceid must be
65           either a device or XIAllDevices or XIAllMasterDevices. A client
66           may submit several masks with the same deviceid in one request
67           but only the last mask will be effective.
68
69           XISelectEvents can generate a BadValue, a BadDevice, and a
70           BadWindow error.
71
72           XIGetSelectedEvents returns the events selected by this client on the given
73           window. If no events were selected on this window, XIGetSelectedEvents
74           returns NULL and num_masks_return is set to 0. If an internal error occurs,
75           XIGetSelectedEvents returns NULL and num_masks_return is set to -1.
76           Otherwise, XIGetSelectedEvent returns the selected event masks for all
77           devices including the masks for XIAllDevices and XIAllMasterDevices
78
79           The caller must free the returned data using XFree().
80

DIAGNOSTICS

82           BadValue
83                  A value is outside of the permitted range.
84
85           BadWindow
86                  A value for a Window argument does not name a defined
87                  window.
88
89           BadDevice
90                  An invalid device was specified. The device does not
91                  exist.
92
93
94
95                                  03/09/2013                 XISELECTEVENTS(3)
Impressum