summaryrefslogtreecommitdiff
path: root/docs/getting-started.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/getting-started.md')
-rw-r--r--docs/getting-started.md6
1 files changed, 4 insertions, 2 deletions
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,