Xxcbint.h revision 88de56cc
11ab64890Smrg/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett 21ab64890Smrg * This file is licensed under the MIT license. See the file COPYING. */ 31ab64890Smrg 41ab64890Smrg#ifndef XXCBINT_H 51ab64890Smrg#define XXCBINT_H 61ab64890Smrg 71ab64890Smrg#include <assert.h> 861b2299dSmrg#include <stdint.h> 91ab64890Smrg#include <X11/Xlibint.h> 101ab64890Smrg#include <X11/Xlib-xcb.h> 1161b2299dSmrg#include "locking.h" 121ab64890Smrg 1361b2299dSmrg#define XLIB_SEQUENCE_COMPARE(a,op,b) (((long) (a) - (long) (b)) op 0) 141ab64890Smrg 151ab64890Smrgtypedef struct PendingRequest PendingRequest; 161ab64890Smrgstruct PendingRequest { 171ab64890Smrg PendingRequest *next; 1861b2299dSmrg unsigned long sequence; 1988de56ccSmrg unsigned reply_waiter; 201ab64890Smrg}; 211ab64890Smrg 221ab64890Smrgtypedef struct _X11XCBPrivate { 231ab64890Smrg xcb_connection_t *connection; 241ab64890Smrg PendingRequest *pending_requests; 2588de56ccSmrg PendingRequest *pending_requests_tail; 261ab64890Smrg xcb_generic_event_t *next_event; 2761b2299dSmrg char *real_bufmax; 281ab64890Smrg char *reply_data; 291ab64890Smrg int reply_length; 301ab64890Smrg int reply_consumed; 3161b2299dSmrg uint64_t last_flushed; 321ab64890Smrg enum XEventQueueOwner event_owner; 331ab64890Smrg XID next_xid; 3461b2299dSmrg 3588de56ccSmrg /* handle simultaneous threads waiting for responses */ 3661b2299dSmrg xcondition_t event_notify; 3761b2299dSmrg int event_waiter; 3888de56ccSmrg xcondition_t reply_notify; 391ab64890Smrg} _X11XCBPrivate; 401ab64890Smrg 411ab64890Smrg/* xcb_disp.c */ 421ab64890Smrg 431ab64890Smrgint _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *screenp); 441ab64890Smrgvoid _XFreeX11XCBStructure(Display *dpy); 451ab64890Smrg 461ab64890Smrg#endif /* XXCBINT_H */ 47