test_bitmap.c | test_bitmap.c | |||
---|---|---|---|---|
#include <stdlib.h> | #include <stdlib.h> | |||
#include <stdio.h> | #include <stdio.h> | |||
#include <string.h> | #include <string.h> | |||
#include <assert.h> | #include <assert.h> | |||
#include <xcb/xcb.h> | #include <xcb/xcb.h> | |||
#include "../aux/xcb_aux.h" | #include "../aux/xcb_aux.h" | |||
#include "../event/xcb_event.h" | ||||
#include "xcb_image.h" | #include "xcb_image.h" | |||
#include "test.xbm" | #include "test.xbm" | |||
static xcb_window_t make_window(xcb_connection_t *c, | static xcb_window_t make_window(xcb_connection_t *c, | |||
xcb_screen_t *s, | xcb_screen_t *s, | |||
uint32_t bg, | uint32_t bg, | |||
uint32_t fg, | uint32_t fg, | |||
uint32_t width, | uint32_t width, | |||
uint32_t height) { | uint32_t height) { | |||
skipping to change at line 52 | skipping to change at line 53 | |||
void process_events(xcb_connection_t *c, | void process_events(xcb_connection_t *c, | |||
xcb_gcontext_t g, | xcb_gcontext_t g, | |||
xcb_window_t w, | xcb_window_t w, | |||
xcb_pixmap_t p, | xcb_pixmap_t p, | |||
uint32_t width, | uint32_t width, | |||
uint32_t height) { | uint32_t height) { | |||
xcb_generic_event_t *e; | xcb_generic_event_t *e; | |||
xcb_void_cookie_t cookie; | xcb_void_cookie_t cookie; | |||
while ((e = xcb_wait_for_event(c))) { | while ((e = xcb_wait_for_event(c))) { | |||
uint32_t r = e->response_type & 0x7f; | uint32_t r = XCB_EVENT_RESPONSE_TYPE(e); | |||
xcb_generic_error_t *err; | xcb_generic_error_t *err; | |||
fprintf(stderr, "event %d\n", r); | fprintf(stderr, "event %d\n", r); | |||
switch (r) { | switch (r) { | |||
case XCB_EXPOSE: | case XCB_EXPOSE: | |||
case XCB_MAP_NOTIFY: | case XCB_MAP_NOTIFY: | |||
cookie = xcb_copy_area_checked(c, p, w, g, | cookie = xcb_copy_area_checked(c, p, w, g, | |||
0, 0, 0, 0, | 0, 0, 0, 0, | |||
width, height); | width, height); | |||
assert(!xcb_request_check(c, cookie)); | assert(!xcb_request_check(c, cookie)); | |||
End of changes. 2 change blocks. | ||||
1 lines changed or deleted | 2 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |