diff options
author | Ian Osgood <iano@quirkster.com> | 2006-09-24 13:34:03 -0700 |
---|---|---|
committer | Ian Osgood <iano@quirkster.com> | 2006-09-24 13:34:03 -0700 |
commit | a76558d985a2a0172e452e705249c37c5dafae0b (patch) | |
tree | 5dc8fb6598e537e6dfcb4108e71a7c66d432cf81 /reply/test_reply.c | |
parent | ab76fa5412e8f707031fe012c411a8702c1bcf45 (diff) |
All xcb-util libraries compile after the Great Renaming.
Many of the exported library functions still need to follow the new convention.
Diffstat (limited to 'reply/test_reply.c')
-rw-r--r-- | reply/test_reply.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/reply/test_reply.c b/reply/test_reply.c index a8ba254..8c44c6d 100644 --- a/reply/test_reply.c +++ b/reply/test_reply.c @@ -6,16 +6,16 @@ #include <stdlib.h> #include <unistd.h> -void fontinfo_handler(void *data, XCBConnection *c, XCBGenericRep *rg, XCBGenericError *eg) +void fontinfo_handler(void *data, xcb_connection_t *c, xcb_generic_reply_t *rg, xcb_generic_error_t *eg) { - XCBListFontsWithInfoRep *rep = (XCBListFontsWithInfoRep *) rg; + xcb_list_fonts_with_info_reply_t *rep = (xcb_list_fonts_with_info_reply_t *) rg; if(rep) { - int len = XCBListFontsWithInfoNameLength(rep); + int len = xcb_list_fonts_with_info_name_length(rep); if(len) printf("(+%u) Font \"%.*s\"\n", (unsigned int) rep->replies_hint, - len, XCBListFontsWithInfoName(rep)); + len, xcb_list_fonts_with_info_name(rep)); else printf("End of font list.\n"); } @@ -27,8 +27,8 @@ int main(int argc, char **argv) { int count = 10; char *pattern = "*"; - XCBConnection *c = XCBConnect(NULL, NULL); - ReplyHandlers *h = allocReplyHandlers(c); + xcb_connection_t *c = xcb_connect(NULL, NULL); + reply_handlers_t *h = alloc_reply_handlers(c); pthread_t reply_thread; if(argc > 1) @@ -36,12 +36,12 @@ int main(int argc, char **argv) if(argc > 2) pattern = argv[2]; - AddReplyHandler(h, XCBListFontsWithInfo(c, count, strlen(pattern), pattern).sequence, fontinfo_handler, 0); - reply_thread = StartReplyThread(h); + add_reply_handler(h, xcb_list_fonts_with_info(c, count, strlen(pattern), pattern).sequence, fontinfo_handler, 0); + reply_thread = start_reply_thread(h); - XCBSync(c, 0); - StopReplyThreads(h); + free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL)); + stop_reply_threads(h); pthread_join(reply_thread, 0); - XCBDisconnect(c); + xcb_disconnect(c); exit(0); } |