summaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorBerke Güzel <wenekar1@gmail.com>2026-10-12 10:55:05 +0300
committerBerke Güzel <wenekar1@gmail.com>2026-10-12 10:55:05 +0300
commit97e5cc61ac4a4aa986770ebc6cb28574f56813ae (patch)
treea0d5d37ee597684e9221b0bd5a0ac1f97d45317d /README.md
parent5206933399775e5ff46baefbbb3a776c2a9bb84c (diff)
docs: update README with native platform headers and X11/Cocoa drag support
Diffstat (limited to 'README.md')
-rw-r--r--README.md17
1 files 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 `<yasl/native.h>` 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 `<yasl/native.h>`; handles are borrowed until destruction.
+Type-safe native handles are declared in `<yasl/native/wayland.h>`,
+`<yasl/native/x11.h>`, and `<yasl/native/cocoa.h>`:
+- 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 `<yasl/native.h>`. All handles expire on object destruction.
## Ownership and backend contracts