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/test_api.cpp | |
| 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/test_api.cpp')
| -rw-r--r-- | tests/test_api.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
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 <yasl/timing.h> #include <yasl/yasl.h> @@ -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; } |
