~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/Xxcbint.h

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
#define XXCBINT_H
6
6
 
7
7
#include <assert.h>
 
8
#include <stdint.h>
8
9
#include <X11/Xlibint.h>
9
10
#include <X11/Xlib-xcb.h>
10
 
#include "locking.h" /* really just want X11/Xthreads.h but can't have it. */
 
11
#include "locking.h"
11
12
 
12
 
#define XCB_SEQUENCE_COMPARE(a,op,b)    ((int) ((a) - (b)) op 0)
13
 
#define assert_sequence_less(a,b) assert(XCB_SEQUENCE_COMPARE((a), <=, (b)))
 
13
#define XLIB_SEQUENCE_COMPARE(a,op,b)   (((long) (a) - (long) (b)) op 0)
14
14
 
15
15
typedef struct PendingRequest PendingRequest;
16
16
struct PendingRequest {
17
17
        PendingRequest *next;
18
 
        xcondition_rec condition;
19
 
        int waiters; /* Number of threads waiting; -1 if no wait needed */
20
 
        unsigned int sequence;
 
18
        unsigned long sequence;
21
19
};
22
20
 
23
21
typedef struct _X11XCBPrivate {
24
 
        struct _XLockPtrs lock_fns;
25
22
        xcb_connection_t *connection;
26
23
        PendingRequest *pending_requests;
27
24
        PendingRequest **pending_requests_tail;
28
25
        xcb_generic_event_t *next_event;
29
 
        const char *request_extra;
30
 
        int request_extra_size;
31
 
        char *partial_request;
32
 
        int partial_request_offset;
 
26
        char *real_bufmax;
33
27
        char *reply_data;
34
28
        int reply_length;
35
29
        int reply_consumed;
 
30
        uint64_t last_flushed;
36
31
        enum XEventQueueOwner event_owner;
37
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;
38
39
} _X11XCBPrivate;
39
40
 
40
41
/* xcb_disp.c */
42
43
int _XConnectXCB(Display *dpy, _Xconst char *display, char **fullnamep, int *screenp);
43
44
void _XFreeX11XCBStructure(Display *dpy);
44
45
 
45
 
/* xcb_lock.c */
46
 
 
47
 
int _XCBInitDisplayLock(Display *dpy);
48
 
void _XCBShutdownDisplayLock(Display *dpy);
49
 
 
50
 
/* _XGetXCBBuffer and _XPutXCBBuffer calls must be paired and must not
51
 
 * be nested. */
52
 
 
53
 
void _XGetXCBBuffer(Display *dpy);
54
 
void _XPutXCBBuffer(Display *dpy);
55
 
 
56
46
#endif /* XXCBINT_H */