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