Commit Graph
411 Commits
Author SHA1 Message Date
waozi 0e66e40ac3 Capture frames through the test driver and build canvas apps without raylib or EGL
The test driver gains a capture command: `capture path=` asks the host for
its next finished frame as a PNG, and DriverCapture sends it from a test.
The desktop host writes the raster it shows (RasterWritePNG); a host that
cannot capture answers "this host does not capture frames" instead of
leaving the test waiting. Hosts capture through TestDriverCapturePath and
TestDriverCaptured. The driver client test covers both answers.

On the web (OS == .WEB) image_pixels decodes with the browser's codecs
through PageImageDecode, so a canvas build no longer links raylib's image
transforms, and scene_gpu links no EGL or GL: its probe reports the GPU
unavailable and SceneGpuRenderOrCPU draws with RenderScene. Jungle's
website builds and draws its 3D rooms this way.
2026-11-14 22:39:16 -03:00
waozi c8a068e343 Keep modal backdrops open by default 2026-11-14 21:25:38 -03:00
waozi 7baf863221 Commit pending scene, input, export and asset work
- GPU scene renderer: moved, turned or scaled nodes re-send only their own
  triangles instead of rebuilding the scene; per-node matrices are reused;
  FreezeGeometry skips geometry comparisons; lights carry projected
  textures (LightCookie) in the CPU and GLES renderers.
- One ordered per-session key and text delivery path across Desktop,
  Canvas and Raylib.
- Context-menu rows show accelerator labels and checked state.
- Bundle apps keep extracted assets that already match instead of
  rewriting and syncing all of them on every open.
- Image and PDF export modules, hosted box tests, brand assets, plans,
  and the ZX changelog entry.
2026-11-14 16:27:22 -03:00
waozi 0cf2c54b50 Expose the PRIMARY selection and keep in-poll modifier taps for Raylib keys
SystemPrimaryText, SystemPrimaryAvailable and SystemPrimarySet read and set
the X11/Wayland PRIMARY selection through the host. The SDL desktop and
Linux Raylib hosts implement it with SDL's primary selection; the Android,
Canvas, pixmap, terminal and bundle hosts report it unavailable instead of
aliasing the ordinary clipboard. Terminal uses it for selections,
middle-click, Shift+Insert and Paste Selection.

RaylibInputPoll took modifiers only from keys still down or just released,
so a Control press released again within the same poll was lost and a
scripted Control+C reached the app as a plain C. Modifier presses from the
pressed-key queue now apply to the keys after them. raylib_window_test
covers the tap.
2026-11-14 10:53:34 -03:00
waozi 92a86b9f25 Add an XDND drag source and GTK check, radio and arrow indicators
Native Linux apps can drag data out to other applications with the optional
kryon/DragSourceLinux module, an XDND version 5 drag source on its own X
connection. It starts while the toolkit keeps its implicit button grab, so
the toolkit still sees the release; it follows the pointer, finds the
top-level XDND window under it (honouring XdndProxy and skipping its own
shaped drag icon), sends Enter, Position, Leave and Drop, answers
XdndStatus, serves the XdndSelection data including TARGETS, and reports
when the pointer is over one of the process's own windows so the app can
handle internal drops. The suggested action follows GTK's modifiers.
tests/drag_source_linux_test.py drops onto an independent python-xlib XDND
target on a private Xvfb from source and saved IR (make
drag-source-linux-test, already part of make test).

GtkStyleIndicatorRaster and GtkPainter kinds 9 to 11 draw the theme's own
check box, radio option and submenu arrow with gtk_render_check,
gtk_render_option and gtk_render_arrow, so native menus show check, radio
and submenu rows as GTK draws them.
2026-11-14 10:21:22 -03:00
waozi 1be70904a3 Remove the semantic DOM backend
No project used the dom profile, and it added a second browser host to
maintain beside Canvas. This removes dom_host, dom_tree, dom_paint, dom_run
and dom_app_run, the dom profile in the project tool, docs/dom.md, and the
DOM tests and their three make targets.

The shared browser code loses its DOM branches: page_events no longer tells
a DOM host about presses, blur and document layout, page_core and
page_texture drop the native DOM flag and the img decode kept for it, and
CanvasAppMainLoop takes no argument. The web template builds a Canvas2D
page. The cursor and rotated text tests cover the Canvas profile only.
2026-11-14 06:04:15 -03:00
waozi 797d7317c3 Decode cursor pictures in the host again, run browser bundles on the VM, drop duplicate test targets
Reaching the cursor picture decoder through a CursorPictureHost capability
broke the Go backend check, which refuses a host call reachable from global
startup, and four tests whose hosts link the hosted-widget host without
providing it. The desktop host decodes cursor pictures directly again, and
cursor_picture, cursor_api and the host stubs are gone. The image decoders
therefore stay in every desktop program; an empty window is 62 C files and
545 KB. The test driver and text reductions are unchanged.

Ziran's WebAssembly tier runs only s64 -> s64 host capabilities and no longer
hands other bundles to the VM, so the ZX Canvas player and hosted apps failed
to start in a page. bundle_player and hosted_app select the portable VM on the
web with InstantiateBundlePortable. zx-services-test, zx-hosted-test and
zx-canvas-test pass again.

Sixteen targets in make test, and video-test outside it, only reran one
tests/ziran_*_test.sh that the behavior test runner already runs. They are
removed, leaving 70 targets; make test-focus TEST=NAME runs one script, and
push-check runs the pixmap GPU script that way. The runner clears XAUTHORITY,
the session bus, the session manager and GDK_DISPLAY as those targets did.
2026-11-14 02:39:12 -03:00
waozi c80e022fe8 Leave the test driver and the image decoders out of programs that do not use them
The test driver is test code, yet every program carried it because the hosts
call it each frame. kryon/test_driver now passes the platform's input through
unchanged, and the driver itself, test_driver_engine, is compiled in only when
a build defines KRYON_TEST_DRIVER: --define KRYON_TEST_DRIVER on a direct
build, or the variable set in the environment of kryon build, which keeps a
stamp per setting so toggling it rebuilds. A program built without the driver
and started with the variable set stops at once and says how to build it.

The desktop host decoded cursor pictures directly, which kept PNG, WebP and
AVIF decoding in every desktop program. The decoder is now reached through a
procedure that cursor_picture registers from its initializer, using the new
CursorPictureHost host capability. kryon/cursor, which applications import,
and the hosted-widget host import cursor_picture; the cursor module the hosts
import does not, so hostless and custom-host builds need nothing new. Kryon's
hosts export the capability.

An empty window generates 43 C files and 370 KB instead of 62 and 627 KB, and
its executable is 196 KB instead of 296 KB. The program entry test asserts
that the decoders and the driver stay out, and that a build made for a test
gets the driver.
2026-11-14 01:58:44 -03:00
waozi 718572978d Build kryon/app programs with the project tool and name the web target
A project whose entry module declares main, such as examples/window.zi, is a
program. The project tool now generates a host that only calls that main, so
kryon build gives a desktop executable or a Canvas page from the same file. A
portable zx profile needs a Frame entry and is refused with that reason.

Browser builds pass --target=c --target-os web --target-cpu wasm32 when they
save IR. The Canvas host is selected by OS == .WEB, and untargeted IR is
portable, so with only PLATFORM_WEB defined every canvas, DOM and raylib-web
project and the ZX canvas player failed on unresolved Canvas functions. The
frame-input and password Canvas tests name the target the same way.

Kryon's manifest names the desktop host's system libraries in [package]
links, so ziran build --project --target=c --exe links a program in this
checkout without caller LDLIBS. The examples Makefile drops its pkg-config
link flags and its own compile of the desktop examples.
2026-11-13 21:10:18 -03:00
waozi ff07bddbec Simplify hello world and package widget APIs 2026-11-13 04:29:23 -03:00
waozi 681fd26ddf Checkpoint desktop painter and context menu work
Committed at the owner's request while the work continues.

- Detect unchanged GTK painter surfaces by exact byte comparison, clear
  and copy them in bulk, and reuse resolved GTK style metrics and CSS
  layers within a style generation.
- Present desktop frames before publishing accessibility changes.
- Context menu widget, keyboard and canvas input updates with tests.
2026-11-12 20:12:14 -03:00
waozi 73ff84637a Reduce native desktop input and GTK rendering latency 2026-11-12 02:09:28 -03:00
waozi 090a52fd82 Preserve retained frame snapshots during transitions 2026-11-12 02:03:01 -03:00
waozi 9383e95e57 Add the GPU scene renderer, hosted widget aggregates and component packages
Restructure maintained components into per-widget source folders, add the
portable scene GPU renderer with GLSL shaders, hosted widget aggregates,
GTK theming and multi-target clipboard support, rebuild the guide with
theming guidance, and move the toolchain to the Ziran revision without
module root limits so the eighty component roots resolve everywhere.
2026-11-12 00:12:06 -03:00
waozi e8c6aa25c1 Integrate components and the public UI surface 2026-11-10 15:37:48 +00:00
waozi af027a528c Add native GTK theme, painting and scrollbar integration 2026-11-09 03:39:51 -03:00
waozi 99c934a0ff Support staged swipes and preserve correction caret and image sizes 2026-11-08 11:40:12 -03:00
waozi b3e38a7bb8 Add GTK style providers and scoped settings
Support context CSS attachments, atomic provider replacement, nested dark
preferences and native style invalidation. Export the canonical F3 key.
2026-11-08 08:27:00 -03:00
waozi 63bf6c6c71 Fix modified Tab routing and retained TabBar focus 2026-11-08 06:17:41 -03:00
waozi 81afed12da Add reusable Breadcrumb and TextField completion input 2026-11-08 05:02:12 -03:00
waozi a08c459eeb Render managed bitmap revisions on native Raylib 2026-11-08 01:07:08 -03:00
waozi b6d6641a81 Add bounded native MIME clipboard transport and align artifact pins 2026-11-08 00:16:58 -03:00
waozi b570cf3d06 Add multi-select grids and native desktop integration 2026-11-07 23:08:18 -03:00
waozi 34d0ce4ed4 Play Ogg Opus on Windows and ship libopus in renderer artifacts
The native provider now decodes Ogg Opus through the audio package on
Windows too (audio f5eed1e). MinGW hosts link -lopus -lssp -lm, since the
package's libopus keeps its stack protector. The renderer-raylib artifact
builds the package's static libopus for Linux, Windows and Android, so
artifact consumers that use media_audio_raylib link without a system copy.

The Windows artifact sets CMAKE_SYSTEM_PROCESSOR, which dav1d's cross build
now requires, and the artifact test pins Kryon's locked toolchain. The Opus
test gains --windows: a MinGW cross build run under a private Wine prefix.
2026-11-06 20:58:14 -03:00
waozi 34e552dcab Play Ogg Opus through the native MediaAudio provider
The Raylib provider now chooses its decoder by content: an Ogg page whose
first packet is OpusHead decodes through the audio package on Linux and
Android, streamed in two 2048-frame blocks refilled by Status and the owner
tick. Other bytes, including Vorbis Ogg, stay on Raylib; macOS and Windows
return Unsupported for Ogg Opus and the browser keeps decoding it itself.

Play starts the stream before filling it, since PlayAudioStream discards
queued blocks. Linux links -lopus -lm, and the Android build compiles the
package's static opus target. The Opus tests now run the production
provider, including on an Android device with null audio.
2026-11-06 20:19:58 -03:00
waozi addec5e14f Give tall button tiles card corners, large pictures and tonal neutral fills 2026-11-05 16:50:35 -03:00
waozi c8eb02196a Draw app-owned RGBA bitmaps as images, add Opus audio transport and export image modules
Bitmap images and their store update in place on desktop, pixmap and web
renderers. Native Opus asset transport and a raylib audio sink join the
media audio host. Export the image and SVG shape modules for apps, and
read the shot profile's picture from standard output only so build
diagnostics on standard error never mix into it.
2026-11-05 16:36:09 -03:00
waozi 56af335572 Integrate Material widgets, image codecs and Kryon Labs website
Add Card elevation and consistent widget states, retained TextArea selection,
and rounded image rendering. Integrate published image-codec, WebP and AVIF
packages across native hosts and renderer artifacts with project-aware builds.

Modernize Kryon Labs around visual GUI apps and modules, with real previews,
honest availability, and rebuilt interactive editor and widget gallery assets.
Bound private browser test lifecycles and verify source, saved IR, native,
portable, browser, Windows and Android paths with the published compiler.
2026-11-05 11:12:10 -03:00
waozi 20b38574f2 Support rotated text and reuse scaled Cairo images 2026-11-04 02:59:58 -03:00
waozi 8f2291577c Show an application pointing cursor only over clickable targets
CursorSetPointing sets the cursor shown where a click does something:
clickable widgets and painted targets an app hit-tests itself and marks
with CursorHover while it builds the frame. The mark commits with the
tree, so retained or cancelled frames keep it and the cursor changes only
when the hovered target does. PressProps.cursor lets a press the app
refines with its own hit test name the arrow off its painted shape, on
desktop, Canvas and DOM, without changing presses, touch or keys.
2026-11-03 22:11:47 -03:00
waozi cbc605bd13 Keep custom cursors stable with an application-wide default
Cursor requests now persist until the next deliberate change instead of
lasting one frame, and CursorSetDefault gives every session an
application cursor that replaces the default, clickable and disabled
shapes. Desktop caches decoded cursors, sets the system cursor only when
the resolved cursor changes, keeps it across focus and leave, and gives
X11 premultiplied pixels so soft edges show no light fringe. Canvas and
DOM build one density-aware CSS cursor and apply it only on change.
2026-11-03 17:30:55 -03:00
waozi b5ac5d1a30 Preserve browser key modifiers through queued delivery 2026-11-03 08:05:28 -03:00
waozi 7865957626 Add account-bound purchases and reusable referral host support 2026-11-03 00:49:18 -03:00
waozi 29e8ef1fb2 Add grapheme-safe anywhere wrapping for text 2026-11-02 12:07:47 -03:00
waozi bab9c3d16e Preserve unread Canvas application keys across drawing frames 2026-11-02 06:10:34 -03:00
waozi 7dc6290238 Add persistent local reminders and edition-scoped push 2026-11-02 04:03:39 -03:00
waozi 5dc122f78a Snapshot bounded raylib touch coordinates during input polling 2026-11-02 00:26:46 -03:00
waozi e31434063c Decode WebP images on every host
Lossy, lossless and transparent WebP files, and the first frame of
animated ones, load through the existing image paths: raylib and Android
link Kryon's kryonwebp archive built from the locked libwebp source, the
Cairo desktop host opens the system libwebpdemux, and web hosts use the
browser's decoder. Files are recognized by content, not extension.

Fixtures cover each kind on the raylib, Cairo and browser paths, the
renderer artifact ships libkryonwebp.a, and android-webp-link-test links
the decoder for every Android ABI.
2026-11-01 23:03:37 -03:00
waozi 462bd234c8 Bound vector curve work to visible tiles 2026-11-01 22:26:53 -03:00
waozi 3b90bc13e3 Add vector path coverage rasterizer 2026-11-01 22:02:01 -03:00
waozi 4554808be1 Add pure view transforms 2026-11-01 21:01:47 -03:00
waozi f7a9ec2e1f Allow hosts to size and position carousel logos 2026-11-01 16:58:45 -03:00
waozi ddc2fce48e Show image previews while full pictures load 2026-11-01 13:50:07 -03:00
waozi f56950c17c Wait for window activity without losing input and reuse system font fallbacks 2026-10-31 14:57:10 -03:00
waozi 2efbb4b0b1 Follow the keyboard layout and quick modifiers on Raylib hosts 2026-10-31 13:08:03 -03:00
waozi f6299fa1c7 Export shape primitives for focused hosted imports 2026-10-31 11:58:11 -03:00
waozi a02feeb703 Restore surrounding themes after nested widget palettes 2026-10-31 02:30:11 -03:00
waozi d58a40a407 Support per-voice audio pause, resume and music position 2026-10-30 22:29:28 -03:00
waozi ee9d204548 Honor Android document MIME allowlists 2026-10-30 21:54:47 -03:00
waozi d307d0221a Add owned bounded PCM streams to MediaAudio 2026-10-30 20:57:05 -03:00