XESetEventToWire

Syntax

Status (*XESetEventToWire(display, event_number, proc))()
      Display *display;
      int event_number;
      int (*proc)();

Arguments

display Specifies the connection to the X server.
event_number Specifies the event code.
proc Specifies the procedure to call when converting an event.

Description

The XESetEventToWire() function defines a procedure to be called when an event needs to be converted from host format (XEvent) to wire format (xEvent) form. The event number defines which protocol event number to install a conversion procedure for. XESetEventToWire() returns any previously defined procedure. It returns zero if the conversion fails or nonzero otherwise.

Note

You can replace a core event conversion function with one of your own, although this is not encouraged. It would, however, allow you to intercept a core event and modify it before being sent to another client.
When Xlib needs to convert an event from host format to wire format, your procedure is called with these arguments:


(*proc)(display, re, event)
	Display *display;
	XEvent *re;
	xEvent *event;

The re argument is a pointer to the host format event, and the event argument is a pointer to where the 32-byte wire event structure should be stored. You should fill in the type with the type from the XEvent structure. All other members then should be copied from the host format to the xEvent structure.

See also

XESetBeforeFlush(), XESetCloseDisplay(), XESetCopyGC(), XESetCreateFont(), XESetCreateGC(), XESetError(), XESetErrorString(), XESetFlushGC(), XESetFreeFont(), XESetFreeGC(), XESetPrintErrorValues(), XESetWireToError(), XESetWireToEvent(), _XSetLastRequestRead(), "Hooks into the Library"
Christophe Tronche, [email protected]