From c059e3aa7f93da470f052a5cd8ee0d8dc969e679 Mon Sep 17 00:00:00 2001 From: Berke Güzel Date: Tue, 13 Oct 2026 13:44:13 +0300 Subject: rename and simplification --- docs/getting-started.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'docs/getting-started.md') diff --git a/docs/getting-started.md b/docs/getting-started.md index ff40a9b..d21c9bd 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -78,9 +78,11 @@ can be included from C++11 or newer; the library itself builds as C23. 1. Open a display with `yasl_display_open(NULL, &spec)`. NULL creates a loop owned by the display. Supply your own loop only when you need shared loop ownership. -2. Create a toplevel with a positive **logical-pixel** size and install callbacks. +2. Create a toplevel with `yasl_window_spec`: supply a positive **logical-pixel** + size, a `yasl_window_cbs` table in `cbs`, and callback userdata in `ud`. Zero-initialize every option and callback struct. Callback tables are copied; - userdata must remain alive. Registration can call back synchronously. + userdata must remain alive. The new window's callbacks start after creation + returns. Read initial geometry with `yasl_surface_geometry()`. 3. Schedule the initial redraw. `draw` receives a borrowed target. Fill every pixel with premultiplied `0xAARRGGBB`, then present that exact target, once. 4. Dispatch, drain input for every live surface queue, update application state, -- cgit v1.2.3