diff options
Diffstat (limited to 'tests/cocoa/test_ownership.m')
| -rw-r--r-- | tests/cocoa/test_ownership.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/cocoa/test_ownership.m b/tests/cocoa/test_ownership.m index 4e3bbd6..5fd5cbf 100644 --- a/tests/cocoa/test_ownership.m +++ b/tests/cocoa/test_ownership.m @@ -19,8 +19,8 @@ int main(void) assert(yasl_cocoa_surface_get_window(s) == window); assert(yasl_cocoa_surface_get_view(s) == window.contentView); assert([window isKindOfClass:[NSWindow class]] && window.contentView); - struct yasl_input_event event; - while (yasl_surface_input_poll(s, &event)) {} + struct yasl_event event; + while (yasl_surface_poll_event(s, &event)) {} @autoreleasepool { for (int i = 0; i < 600; i++) { char text[32]; @@ -34,19 +34,19 @@ int main(void) for (int i = 0; i < 600; i++) { char text[32]; snprintf(text, sizeof(text), "paste-%d", i); - assert(yasl_surface_input_poll(s, &event)); - assert(event.kind == YASL_INPUT_PASTE && strcmp(event.paste.text, text) == 0); + assert(yasl_surface_poll_event(s, &event)); + assert(event.type == YASL_EVENT_PASTE && strcmp(event.text.data, text) == 0); } - const char *last = event.paste.text; - assert(!yasl_surface_input_poll(s, &event)); + const char *last = event.text.data; + assert(!yasl_surface_poll_event(s, &event)); @autoreleasepool { yasl_display_copy(d, YASL_CLIPBOARD, "new selection"); } assert(strcmp(last, "paste-599") == 0); @autoreleasepool { yasl_display_copy(d, YASL_CLIPBOARD, ""); yasl_display_paste(d, YASL_CLIPBOARD, s); } - assert(yasl_surface_input_poll(s, &event)); - assert(event.kind == YASL_INPUT_PASTE && !event.paste.len && !event.paste.text[0]); + assert(yasl_surface_poll_event(s, &event)); + assert(event.type == YASL_EVENT_PASTE && !event.text.len && !event.text.data[0]); yasl_surface_destroy(s); yasl_display_close(d); return 0; |
