From 3b8af02be94a510e385f44d58c35c86bb89424a6 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 08:41:51 +0300 Subject: refactor: simplify public API and isolate native extensions Separate loop/timer and native interoperability APIs from the portable surface header. Unify dispatch, geometry queries, and timer callbacks; keep framebuffer bookkeeping and frame clocks private, and hide implementation symbols. Update backends, documentation, examples, and API/integration coverage. Verify exports, strict C/C++ installed consumers, and normal plus ASan/UBSan suites. --- tests/cocoa/test_ownership.m | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/cocoa/test_ownership.m') diff --git a/tests/cocoa/test_ownership.m b/tests/cocoa/test_ownership.m index aa75b1c..168a47b 100644 --- a/tests/cocoa/test_ownership.m +++ b/tests/cocoa/test_ownership.m @@ -1,3 +1,4 @@ +#include "yasl/native.h" #import #include "yasl/yasl.h" #include @@ -11,6 +12,9 @@ int main(void) struct yasl_surface_spec spec = {.title = "Ownership test", .size = {160, 100}}; struct yasl_surface *s = yasl_surface_create_toplevel(d, &spec); assert(s); + assert(yasl_display_get_native_handle(d) == (void *)NSApp); + NSWindow *window = (NSWindow *)yasl_surface_get_native_handle(s); + assert([window isKindOfClass:[NSWindow class]] && window.contentView); struct yasl_input_event event; while (yasl_surface_input_poll(s, &event)) {} @autoreleasepool { -- cgit v1.2.3