[Xcb] XShmGetEventBase()
Barton C Massey
bart at cs.pdx.edu
Wed May 20 01:10:13 PDT 2009
There's also some shm support in xcb-util that may or may
not be relevant.
Bart
In message <4A12CBC3.3000907 at opentext.com> you wrote:
> Russell Shaw wrote:
> > Hi,
> > How do i get XCB events for X extensions? I'm trying to figure out the
> > equivalent of:
> >
> >
> > #include<X11/extensions/XShm.h>
> >
> > XEvent xevent;
> > XNextEvent(app->display, &xevent);
> >
> > int ShmCompletiontype = XShmGetEventBase(Display) + ShmCompletion;
> >
> > if(xevent.type == ShmCompletiontype) {
>
> #include <xcb/shm.h>
>
> xcb_generic_event_t *xevent;
> xcb_flush(Display);
> xevent = xcb_wait_for_event(Display);
>
> int ShmCompletiontype = xcb_get_extension_data(Display,
> &xcb_shm_id)->first_event + XCB_SHM_COMPLETION;
>
> if (xevent->response_type == ShmCompletiontype) {
> ...
> }
> free(xevent);
>
> Peter Harris
More information about the Xcb
mailing list