12.07.2015 Views

Xlib − C Language X Interface

Xlib − C Language X Interface

Xlib − C Language X Interface

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>Xlib</strong> − C LibraryX11, Release 6.7 DRAFTunsigned long _XSetLastRequestRead(display, rep)Display *display;xGenericReply *rep;displayrepSpecifies the connection to the X server.Specifies the wire event structure.The _XSetLastRequestRead function computes and returns a complete serial number from thepartial serial number in the event.Status (*XESetEventToWire(display, event_number, proc))( )Display *display;int event_number;int (*proc)( );displayevent_numberprocSpecifies the connection to the X server.Specifies the event code.Specifies the procedure to call when converting an event.The XESetEventToWire function defines a procedure to be called when an event needs to beconverted from host format (XEvent) towire format (xEvent) form. The event number defineswhich protocol event number to install a conversion procedure for. XESetEventToWire returnsany previously defined procedure. It returns zero if the conversion fails or nonzero otherwise.NoteYoucan replace a core event conversion function with one of your own, although thisis not encouraged. It would, however, allow you to intercept a core event and modifyit before being sent to another client.When <strong>Xlib</strong> needs to convert an event from host format to wire format, your procedure is calledwith 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 wherethe 32-byte wire event structure should be stored. Youshould fill in the type with the type fromthe XEvent structure. All other members then should be copied from the host format to thexEvent structure.445

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!