send_event/[4,5]

     send_event(+WindowSpec, +Propagate, +EventMask, +XEvent)
     send_event(+Displayable, +WindowSpec, +Propagate, +EventMask, +XEvent)
     

Asks the server to send the event XEvent, an X11 event structure, to the specified window. Fail if XEvent could not be converted into the server format, usually a sign that the event type is invalid. The delivered event will have a value of true in its send_event field.

The argument WindowSpec can be:


A valid ProXL Window
In this case the event will be sent to the Window and its Display is used as the Display connection. If Displayable was specified, it must have the same Display as the Window.
pointer_window
In this case the event will be send to the window that the pointer is in. If Displayable was not specified, the default Display is used.
input_focus
In this case, if the focus window contains the pointer, the event will be sent to the window that contains the pointer. Otherwise, the event will be sent to the focus window. If Displayable was not specified, the default Display is used.

Propagate is a boolean value and EventMask an integer bitmask that specifies the selected events.

send_event/[4,5] uses the Propagate and EventMask arguments to determine which clients should receive the specified events as follows:


If EventMask is 0
The event is sent to the client that created the receiving window. If that client no longer exists, no event is sent.
If Propagate is false
The event is sent to every client selecting any of the event types from EventMask on the receiving window.
If Propagate is true
The event propagates up the receiving window hierarchy in the normal way.

The predicate event_list_mask/2 is useful to translate between X11 event mask names and bitmasks.

No checking on the validity of the event contents is performed.