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/test_api.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'tests/test_api.cpp') diff --git a/tests/test_api.cpp b/tests/test_api.cpp index 70c4ff7..9fb8525 100644 --- a/tests/test_api.cpp +++ b/tests/test_api.cpp @@ -1,4 +1,10 @@ #include "yasl/native.h" +#if YASL_HAS_WAYLAND +#include "yasl/native/wayland.h" +#endif +#if YASL_HAS_X11 +#include "yasl/native/x11.h" +#endif #include "yasl/loop.h" #include #include @@ -23,5 +29,18 @@ int main() yasl_input_event event{}; assert(!yasl_surface_input_poll(nullptr, &event)); + assert(!yasl_display_drag_start(nullptr, nullptr, nullptr, nullptr, nullptr)); + assert(!yasl_surface_drag_carry(nullptr, {0, 0})); + +#if YASL_HAS_WAYLAND + assert(!yasl_wayland_display_get_wl_display(nullptr)); + assert(!yasl_wayland_surface_get_wl_surface(nullptr)); +#endif + +#if YASL_HAS_X11 + assert(!yasl_x11_display_get_display(nullptr)); + assert(!yasl_x11_surface_get_window(nullptr)); +#endif + return 0; } -- cgit v1.2.3