1XSENDEXTENSIONEVENT(3) XSENDEXTENSIONEVENT(3)
2
3
4
6 XSendExtensionEvent - send input extension events to a client
7
9 #include <X11/extensions/XInput.h>
10
11 Status XSendExtensionEvent( Display *display,
12 XDevice *device,
13 Window destination,
14 Bool propagate,
15 int event_count,
16 XEventClass *event_list,
17 XEvent *event_send);
18
19 display
20 Specifies the connection to the X server.
21
22 device
23 Specifies the device from which the events are to be
24 sent.
25
26 destination
27 Specifies the window the event is to be sent to. You can
28 pass window id, PointerWindow,or InputFocus.
29
30 propagate
31 Specifies a Boolean value that is either True or False.
32
33 event_count
34 Specifies the count of XEventClasses in event_list.
35
36 event_list
37 Specifies the list of event selections to be used.
38
39 event_send
40 Specifies a pointer to the event that is to be sent.
41
43 The XSendExtensionEvent request identifies the destination
44 window, determines which clients should receive the specified
45 events, and ignores any active grabs. This request requires you
46 to pass an event class list. For a discussion of the valid
47 event class names, see XOpenDevice(3) This
48 request uses the w argument to identify the destination window
49 as follows:
50 * If w is PointerWindow,the destination window is the window
51 that contains the pointer.
52 * If w is InputFocusand if the focus window contains the
53 pointer,the destination window is the window that contains
54 the pointer; otherwise, the destination window is the focus
55 window.
56
57 To determine which clients should receive the specified events,
58 XSendExtensionEventuses the propagate argument as follows:
59 * If event_list is the empty set,the event is sent to the
60 client that created the destination window. If that client
61 no longer exists,no event is sent.
62 * If propagate is False,the event is sent to every client
63 selecting on destination any of the eventtypes specified by
64 the event_list array.
65 * If propagate is Trueand no clients have selected on
66 destination any ofthe events specified by the event_list
67 array,the destination is replaced with theclosest ancestor
68 of destination for which some client has selected atype
69 specified by the event-list array and for which no
70 interveningwindow has that type in
71 itsdo-not-propagate-mask. If no such window exists or if
72 the window isan ancestor of the focus window and
73 InputFocuswas originally specifiedas the destination, the
74 event is not sent to any clients. Otherwise, the event is
75 reported to every client selecting on the finaldestination
76 any of the events specified in the event_list array.
77
78 The event in the XEventstructure must be one of the events
79 defined by the input extension (or a BadValueerror results) so
80 that the X server can correctly byte-swapthe contents as
81 necessary. The contents of the event areotherwise unaltered and
82 unchecked by the X server except to force send_event to Truein
83 the forwarded event and to set the serial number in the event
84 correctly.
85
86 XSendExtensionEventreturns zero if the conversion to wire
87 protocol format failedand returns nonzero
88 otherwise.XSendExtensionEventcan generate BadClass, BadDevice,
89 BadValue, and BadWindow errors.
90
92 BadDevice
93 An invalid device was specified. The specified device
94 does not exist or has not been opened by this client via
95 XOpenInputDevice. This error may also occur if the
96 specified device is the X keyboard or X pointer device.
97
98 BadValue
99 Some numeric value falls outside the range of values
100 accepted by the request. Unless a specific range is
101 specified for an argument, the full range defined by the
102 argument's type is accepted. Any argument defined as a
103 set of alternatives can generate this error.
104
105 BadWindow
106 A value for a Window argument does not name a defined
107 window.
108
109
110
111 06/19/2019 XSENDEXTENSIONEVENT(3)