Xxcbint.h revision 61b2299d
1/* Copyright (C) 2003-2006 Jamey Sharp, Josh Triplett
2 * This file is licensed under the MIT license. See the file COPYING. */
3
4#ifndef XXCBINT_H
5#define XXCBINT_H
6
7#include <assert.h>
8#include <stdint.h>
9#include <X11/Xlibint.h>
10#include <X11/Xlib-xcb.h>
11#include "locking.h"
12
13#define XLIB_SEQUENCE_COMPARE(a,op,b)	(((long) (a) - (long) (b)) op 0)
14
15typedef struct PendingRequest PendingRequest;
16struct PendingRequest {
17	PendingRequest *next;
18	unsigned long sequence;
19};
20
21typedef struct _X11XCBPrivate {
22	xcb_connection_t *connection;
23	PendingRequest *pending_requests;
24	PendingRequest **pending_requests_tail;
25	xcb_generic_event_t *next_event;
26	char *real_bufmax;
27	char *reply_data;
28	int reply_length;
29	int reply_consumed;
30	uint64_t last_flushed;
31	enum XEventQueueOwner event_owner;
32	XID next_xid;
33
34	/* handle simultaneous threads waiting for events,
35	 * used in wait_or_poll_for_event
36	 */
37	xcondition_t event_notify;
38	int event_waiter;
39} _X11XCBPrivate;
40
41/* xcb_disp.c */
42
43int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *screenp);
44void _XFreeX11XCBStructure(Display *dpy);
45
46#endif /* XXCBINT_H */
47