From 97e5cc61ac4a4aa986770ebc6cb28574f56813ae Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Mon, 12 Oct 2026 10:55:05 +0300 Subject: docs: update README with native platform headers and X11/Cocoa drag support --- README.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 542b4a6..5240329 100644 --- a/README.md +++ b/README.md @@ -89,8 +89,8 @@ Use `yasl_display_caps()` to check optional features. X11 supports CPU pixel buffers, keyboard and pointer input, and clipboard transfer. Tablet pressure, tilt, and erasers use XInput 2 when the server exposes it. -It supports the primary selection and window placement. -It does not yet support YASL popups, drag operations, or IME preedit text. +It supports the primary selection, window placement, and drag operations. +It does not yet support YASL popups or IME preedit text. Those features return their normal unsupported result. The surface spec needs no native graphics device for CPU drawing. @@ -100,13 +100,12 @@ An app that renders with Metal includes `` and calls `yasl_surface_get_native_frame()` returns the current Metal drawable. The app submits and presents it, then calls `yasl_surface_present()` to record submission. -The native display handle is a `wl_display *` on Wayland. -It is a `Display *` on X11. -The native surface handle is a `wl_surface *` on Wayland. -On X11, convert it to `Window` through `uintptr_t`. -On Cocoa, the native display handle is `NSApplication *` and the surface handle -is `NSWindow *`. Access its view through `window.contentView`. Native getters -are declared only in ``; handles are borrowed until destruction. +Type-safe native handles are declared in ``, +``, and ``: +- Wayland: `wl_display *` and `wl_surface *` via `yasl_wayland_display_get_wl_display()` and `yasl_wayland_surface_get_wl_surface()`. +- X11: `Display *` and `uintptr_t` window ID via `yasl_x11_display_get_display()` and `yasl_x11_surface_get_window()`. +- Cocoa: `NSApplication *`, `NSWindow *`, and `NSView *` via `yasl_cocoa_display_get_application()`, `yasl_cocoa_surface_get_window()`, and `yasl_cocoa_surface_get_view()`. +Generic untyped borrowed handles (`void *`) remain accessible via ``. All handles expire on object destruction. ## Ownership and backend contracts -- cgit v1.2.3