diff options
| author | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
|---|---|---|
| committer | Berke Güzel <wenekar1@gmail.com> | 2026-10-13 13:44:13 +0300 |
| commit | c059e3aa7f93da470f052a5cd8ee0d8dc969e679 (patch) | |
| tree | 63ffa378287ed2c606eda2e940501b9edc3d2b8b /docs/migrating.md | |
| parent | 87d0bc50d53dc216efb2b04495f090616318bc5c (diff) | |
rename and simplification
Diffstat (limited to 'docs/migrating.md')
| -rw-r--r-- | docs/migrating.md | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/docs/migrating.md b/docs/migrating.md index d224cd4..da4e591 100644 --- a/docs/migrating.md +++ b/docs/migrating.md @@ -2,8 +2,23 @@ YASL 0.1 has no stable source or binary compatibility promise. Rebuild all consumers against the matching installed headers and library after updating. -The following changes replace backend-specific input fields with a common -contract. See the [application guide](guide.md) for the full input workflow. +See the [application guide](guide.md) for the full window and input workflow. + +## Window creation + +Rename `struct yasl_surface_spec` to `struct yasl_window_spec` and +`struct yasl_surface_cbs` to `struct yasl_window_cbs`. Surface handles and +functions retain their names. Supply the window's callback table in `spec.cbs` +and its userdata in `spec.ud` when calling `yasl_surface_create_toplevel()` or +`yasl_surface_create_native()`. Callback tables are copied, and userdata is +borrowed. The new window's callbacks cannot run before creation returns; read +initial geometry with `yasl_surface_geometry()` and request the first redraw +after initializing application state. + +`yasl_surface_set_callbacks()` remains available to replace callbacks after +creation and to configure popups. A NULL `spec.cbs` creates a window without +callbacks. Displays owned by `yasl_run()` use the runner's callbacks instead; +provide application notifications through `yasl_app_desc.event` and `.frame`. ## Keyboard events |
