diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 10:53:22 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-12 10:53:22 +0300 |
| commit | 5206933399775e5ff46baefbbb3a776c2a9bb84c (patch) | |
| tree | e7549216ac626c1f3ac22345f79fbf80cc5a90fb /tests/cocoa/test_ownership.m | |
| parent | 881fb6cb1d64868132287bd9637f4ae1cbc3504c (diff) | |
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.
Diffstat (limited to 'tests/cocoa/test_ownership.m')
| -rw-r--r-- | tests/cocoa/test_ownership.m | 4 |
1 files changed, 4 insertions, 0 deletions
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 <AppKit/AppKit.h> #include "yasl/yasl.h" #include <assert.h> @@ -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)) {} |
