X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcbint.h;h=f3830f9313ec7a252584645d0e4d3b2e5e769756;hb=5437032c7dee85da99b612a707fa94d012d40282;hp=eb1afc1a498887aba3341e97acdebf09ba21836f;hpb=7875040fa179d8ca3fa4ec046c1b8c2a351a6621;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcbint.h b/src/xcbint.h index eb1afc1..f3830f9 100644 --- a/src/xcbint.h +++ b/src/xcbint.h @@ -41,32 +41,13 @@ enum workarounds { /* xcb_list.c */ -typedef struct _xcb_list _xcb_list; typedef void (*XCBListFreeFunc)(void *); -_xcb_list *_xcb_list_new(void); -void _xcb_list_delete(_xcb_list *list, XCBListFreeFunc do_free); -int _xcb_list_insert(_xcb_list *list, void *data); -int _xcb_list_append(_xcb_list *list, void *data); -void *_xcb_list_peek_head(_xcb_list *list); -void *_xcb_list_remove_head(_xcb_list *list); -void *_xcb_list_remove(_xcb_list *list, int (*cmp)(const void *, const void *), const void *data); -void *_xcb_list_find(_xcb_list *list, int (*cmp)(const void *, const void *), const void *data); - -typedef _xcb_list _xcb_queue; - -_xcb_queue *_xcb_queue_new(void); -void _xcb_queue_delete(_xcb_queue *q, XCBListFreeFunc do_free); -int _xcb_queue_enqueue(_xcb_queue *q, void *data); -void *_xcb_queue_dequeue(_xcb_queue *q); -int _xcb_queue_is_empty(_xcb_queue *q); - -typedef _xcb_list _xcb_map; +typedef struct _xcb_map _xcb_map; _xcb_map *_xcb_map_new(void); void _xcb_map_delete(_xcb_map *q, XCBListFreeFunc do_free); int _xcb_map_put(_xcb_map *q, unsigned int key, void *data); -void *_xcb_map_get(_xcb_map *q, unsigned int key); void *_xcb_map_remove(_xcb_map *q, unsigned int key); @@ -105,12 +86,16 @@ typedef struct _xcb_in { char queue[4096]; int queue_len; + unsigned int request_expected; unsigned int request_read; - _xcb_queue *current_reply; + unsigned int request_completed; + struct reply_list *current_reply; + struct reply_list **current_reply_tail; _xcb_map *replies; - _xcb_queue *events; - _xcb_list *readers; + struct event_list *events; + struct event_list **events_tail; + struct reader_list *readers; struct pending_reply *pending_replies; struct pending_reply **pending_replies_tail; @@ -119,7 +104,7 @@ typedef struct _xcb_in { int _xcb_in_init(_xcb_in *in); void _xcb_in_destroy(_xcb_in *in); -int _xcb_in_expect_reply(XCBConnection *c, unsigned int request, enum workarounds workaround); +int _xcb_in_expect_reply(XCBConnection *c, unsigned int request, enum workarounds workaround, int flags); int _xcb_in_read(XCBConnection *c); int _xcb_in_read_block(XCBConnection *c, void *buf, int nread);