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