From 5206933399775e5ff46baefbbb3a776c2a9bb84c Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 10:53:22 +0300 Subject: feat: add type-safe native platform headers and portable drag support - Add include/yasl/native/{wayland,cocoa,x11}.h with type-safe handle accessors. - Unify drag-and-drop and window carry support across Wayland, X11, and Cocoa. - Preserve full ABI compatibility for capability flags. - Install native headers conditionally based on enabled backend. - Include missing tablet example and backend test 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 168a47b..2b2f52d 100644 --- a/tests/cocoa/test_ownership.m +++ b/tests/cocoa/test_ownership.m @@ -1,4 +1,5 @@ #include "yasl/native.h" +#include "yasl/native/cocoa.h" #import #include "yasl/yasl.h" #include @@ -13,7 +14,10 @@ int main(void) struct yasl_surface *s = yasl_surface_create_toplevel(d, &spec); assert(s); assert(yasl_display_get_native_handle(d) == (void *)NSApp); + assert(yasl_cocoa_display_get_application(d) == NSApp); NSWindow *window = (NSWindow *)yasl_surface_get_native_handle(s); + 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)) {} -- cgit v1.2.3