Debian Codegraph @

man/XISelectEvents.txt

raw
1 XISELECTEVENTS(libmansuffix)
2 ============================
3
4 NAME
5 ----
6
7 XISelectEvents, XIGetSelectedEvents - select for or get selected XI2 events on the window.
8
9 SYNOPSIS
10 --------
11
12 #include <X11/extensions/XInput2.h>
13
14 Status XISelectEvents( Display *display,
15 Window win,
16 XIEventMask *masks,
17 int num_masks);
18
19 display
20 Specifies the connection to the X server.
21
22 masks
23 Device event mask.
24
25 num_masks
26 Number of masks in masks.
27
28 win
29 Specifies the window.
30
31 XIEventMask *XIGetSelectedEvents( Display *display,
32 Window win,
33 int *num_masks_return);
34
35 display
36 Specifies the connection to the X server.
37
38 num_masks_return
39 Number of masks in the return value.
40
41 win
42 Specifies the window.
43
44 DESCRIPTION
45 -----------
46
47 XI2 events must be selected using XISelectEvents.
48
49 XISelectEvents sets the event mask for this client on win.
50 Further events are only reported to this client if the event
51 type matches the selected event mask. The masks overrides the
52 previously selected event mask for the given device.
53
54 If deviceid is a valid device, the event mask is selected only
55 for this device. If deviceid is XIAllDevices or
56 XIAllMasterDevices, the event mask is selected for all devices
57 or all master devices, respectively. The effective event mask
58 is the bit-wise OR of the XIAllDevices, XIAllMasterDevices and
59 the respective device's event mask.
60
61 typedef struct {
62 int deviceid;
63 int mask_len;
64 unsigned char* mask;
65 } XIEventMask;
66
67 The mask_len specifies the length of mask in bytes. mask is a
68 binary mask in the form of (1 << event type). deviceid must be
69 either a device or XIAllDevices or XIAllMasterDevices. A client
70 may submit several masks with the same deviceid in one request
71 but only the last mask will be effective.
72
73 XISelectEvents can generate a BadValue, a BadDevice, and a
74 BadWindow error.
75
76 XIGetSelectedEvents returns the events selected by this client on the given
77 window. If no events were selected on this window, XIGetSelectedEvents
78 returns NULL and num_masks_return is set to 0. If an internal error occurs,
79 XIGetSelectedEvents returns NULL and num_masks_return is set to -1.
80 Otherwise, XIGetSelectedEvent returns the selected event masks for all
81 devices including the masks for XIAllDevices and XIAllMasterDevices
82
83 The caller must free the returned data using XFree().
84
85
86 DIAGNOSTICS
87 -----------
88
89 BadValue
90 A value is outside of the permitted range.
91
92 BadWindow
93 A value for a Window argument does not name a defined
94 window.
95
96 BadDevice
97 An invalid device was specified. The device does not
98 exist.