The visual viewport, narrowed to the canvas frame, the canvas's parent or
the canvas, measured in Zi through the web bridge; and a debounce that
resizes only once a new size has held for two frames with no pointer
down. Moved from Inner Breeze's JavaScript and web window code so raylib
web builds share it.
The activity's document picker and camera scanner answer later, so a
numbered request is opened and polled each frame; each answer is taken
once by the request that asked, and a newer request replaces one still
waiting. Moved from Inner Breeze so other Android applications get it.
page_socket opens a WebSocket through the web bridge and queues its text
messages for polling each frame. Binary or oversized messages, a full
queue, or no open after ten seconds close the socket, and URLs with
credentials are refused; a token travels as the second subprotocol. A
headless-browser test runs against a small local WebSocket server. It
replaces Inner Breeze's JavaScript socket.
ExportBytes and ExportFile download a file in the browser, through a
blob link built on the web bridge, or open Android's share sheet through
the activity's shareFile. A headless-browser test checks the downloaded
names and bytes. It comes from Inner Breeze's data and account export.
fseek and ftell take a C long, 32 bits on wasm and 32-bit Android, so
file_export and file_download now declare it as isize.
android_text_editor lets an activity's input connection edit the focused
field as UTF-8 snapshots through TextRequest, so composition, autocorrect
and suggestions work. Stale revisions, a replaced field's late edits and
edits after blur are refused. android_device's text input calls it, and
falls back to code points when the activity has no input connection. It
comes from Inner Breeze.
The Android test host no longer replaces dlsym, which AddressSanitizer
needs at startup; the real one finds no raylib state either, so the
Android device tests now also pass under the sanitizers.
file_download fetches a large file, such as music or an app package, to a
path while the application keeps drawing; the file appears there only
once complete. Linux and BSD desktops run curl as a child process, the
browser streams fetch's body into the page's file system through the web
bridge, and Android asks the activity, whose callbacks the application
binds to FileDownloadNative*. Native and headless-browser tests download
from a local server. It comes from Inner Breeze.
http_transfer runs HTTP requests while the application keeps drawing:
curl on a detached worker thread on desktops, the activity's transport on
Android, and fetch through the web bridge in the browser. A cancelled
transfer never writes into the caller's buffer, answers that do not fit
fail instead of arriving cut, and only http and https URLs are accepted.
Native and headless-browser tests run against a local server.
raylib_secondary_window gives a raylib application on SDL up to three
extra windows, each drawing its own Kryon tree into a render texture that
is copied to the window, so the main OpenGL context stays current. Its
probe runs on a private Xvfb display.
Both come from Inner Breeze.
These come from Inner Breeze so any Kryon application can use them:
- file_picker: zenity on Linux and BSD, Windows' common dialog, and the
browser's file chooser through the web bridge, which copies the chosen
file into the page's file system. A browser test answers the chooser in
headless Chromium; a fake zenity checks the arguments natively.
- window_close: close requests for the application's own SDL or Win32
window.
- idle_time: session idle time from Mutter or the freedesktop screen saver
over D-Bus, and whether the session is Wayland.
- notification_desktop: the notification host for Linux and BSD through
notify-send.
- raylib_trace: raylib's log to the console or logcat with routine notes
dropped, or to a log file for Windows applications without a console.
open_uri opens a URI with the platform's handler: the desktop opener as a
child process, Windows' shell, Plan 9's plumber, an Android ACTION_VIEW
intent or a new browser tab through the web bridge. It moves here from
Inner Breeze so any Kryon application can open links.
android_jni's NativeAndroidApp now carries every field of the glue's
android_app, including the command pipe, and AndroidInternalDataPath
returns the app's files folder. A test checks the layouts against the NDK
headers for all four Android ABIs.
Applications that run another .zib in their window each opened the
bundle, checked its capabilities, bound them, limited its steps and kept a
working instance through restarts. hosted_app does that once:
HostedAppStart asks the host about every capability and binds them to one
HostCall with field names matched, HostedAppRun runs under a step limit and
marks a trap as failed, HostedAppRestart closes the old instance only once
the new one passes the host's handshake, and HostedAppAsset finds a packed
asset by its exact path.
An application that runs a .zib inside its own window answered each
widget's HostedHost call with its own codec and dispatcher. Kryon now owns
that host side next to the bundle side: widget_host draws a bundle's widgets
in the frame's session, refuses calls from another frame, foreign records,
texture handles and assets its host's callback rejects, and closes scrolls
the bundle leaves open. WidgetHostSupports lists the calls it answers,
including Toggle.
widget_codec is generated from Kryon's widget records by
scripts/generate-widget-codecs.py, whose --uses option lets an application
generate codecs for its own records on top of Kryon's. hosted_values holds
the shared helpers: fields match by name, so a bundle and its host may be
built against different layouts.
Hosts now agree on key codes, so Kryon names them (KeyEnter, KeyBackspace,
KeyLeft, ...) next to the modifier bits. TypedTextTake collects a frame's
typed codepoints as UTF-8, and TextFieldInputFor turns a key, modifiers, and
typed text into a focused TextField's input, which apps each wrote by hand.
Style sheet parsing, formatting, the style packs, and their tests now
live in kryonlabs/kss, which depends on Kryon. Kryon keeps the rule
table and style resolution, so an app that builds its rules in code no
longer carries a parser; apps that read .kss text add the KSS package
and import kss/Kss or kss/SystemStyle.
Canvas and DOM builds now check and save the app with `ziran ir
--project`, like native builds, so an app's Git dependencies and
package-qualified imports such as Kryon/Widgets work on the web too.
Browser routing is exported as PageRoute for apps that read or push
the page route.
PlotWidget now lives in kryonlabs/plot, TableView and TreeView in
kryonlabs/data-views, and the Ziran, C, and Make tokenizer in
ziranlang/syntax, which no longer depends on Kryon. Apps add them with
`ziran add URL` and import plot/Plot, data_views/TableView, or
syntax/Syntax.
Kryon exports the building blocks those packages draw with (session,
tree, surface, paint_queue, style, style_sheet, widget_kind, and the
rest), so a widget package imports kryon/NAME instead of reaching into
Kryon's source directories. The API guide describes writing one.