Commit Graph
368 Commits
Author SHA1 Message Date
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
waozi 61cf2f26cd Add acknowledged document storage flush and readiness 2026-10-30 20:46:47 -03:00
waozi 3e790807d8 Add owned Media asset audio lifecycle 2026-10-30 20:16:31 -03:00
waozi b8ff4618fd Publish frame input snapshots in Desktop and Canvas hosts 2026-10-30 20:06:17 -03:00
waozi cdf4dffb07 Add owned per-frame input snapshots for native and hosted apps 2026-10-30 19:47:02 -03:00
waozi e565b99d17 Add caller-owned TextField state application 2026-10-30 19:22:37 -03:00
waozi f761e3292a Support optional source crops in carousel artwork 2026-10-30 15:10:35 -03:00
waozi 5427f011d2 Clip images to retained polygons across rendering hosts 2026-10-28 17:02:27 -03:00
waozi dd29b98ce4 Add a shared responsive loading screen for native and hosted apps 2026-10-27 22:56:44 -03:00
waozi b52c3986ed Share swipe feedback and mobile direction pad layout 2026-10-26 11:47:54 -03:00
waozi 45ab2d6133 Expose the page origin to applications
GetRouteOrigin returns the browser location's scheme://host[:port] once,
so a DOM or Canvas application can turn its own relative paths into the
absolute http/https URLs the HTTP transfer layer requires. The route
test checks the file: origin the headless harness loads.
2026-10-26 04:08:39 -03:00
waozi c7e7a3aa8c Allow right clicks as game board taps 2026-10-26 03:14:20 -03:00
waozi 919a18d7fc Keep complete game frames visible while pictures load 2026-10-26 02:44:01 -03:00
waozi 46c52b83db Support explicit rounded image corners across hosted UI 2026-10-25 16:01:47 -03:00
waozi fade061f2e Bundles draw sliders and progress bars through their host
Inner Breeze's practice manuals and settings move into the Practices
package, and they change speeds and durations with sliders and show a hold
with a progress bar. Slider, DiscreteSlider and Progress are now hosted:
the host drags the slider with its own pointer and answers the value, and
paints the progress bar.
2026-10-24 21:10:50 -03:00
waozi 8e2d0bc46b Bundles draw lines, circles, rings and triangles through their host
A portable bundle could draw boxes and icons but no line at an angle, so a
chart's trend lines and dots needed compiled screens. Kryon's shapes are now
hosted like Box: the bundle sends their props and the host fills them with
its renderer's RasterTriangles, which every Kryon renderer provides. The
widget host test stubs that rasterizer, as it draws nothing.
2026-10-24 20:24:00 -03:00
waozi 235f28cda2 Bundles frame form sections and size toggles through their host
A portable form could not draw a fieldset around its sections or place a
toggle at a row's end, because both needed the host's style and font
metrics. Fieldset is now hosted like Box, and the new toggle_measure module
answers the size a toggle needs, from its host as ToggleSize. The host
encodes the answer with the Vector2 encoder, now part of the widget codec.
2026-10-24 20:00:33 -03:00
waozi 2da3b99f87 Bundles draw segmented controls through their host
A portable bundle could not show a row of choices such as Habits' week and
calendar views, so Inner Breeze drew them in compiled screens. Segmented
controls are now hosted like tab bars: the bundle sends its props and up to
32 options and the host draws them with its own widget and style.
2026-10-24 19:27:27 -03:00
waozi 349a01fbdd Support text pagination and scoped reader fonts
Measure screen-sized text pages from the drawing props, preserve UTF-8 boundaries, and apply typeface and line spacing consistently through hosted widgets and queued paint. Keep hosted font assets inside their app resource policy.
2026-10-24 04:14:11 -03:00
waozi f912ce929d Retire the Plan 9 and plan9port Libdraw hosts 2026-10-23 23:08:47 -03:00
waozi c38a0d7b70 Let DirectionPad float over a game board
A floating pad has lighter arms, a lighter hub and outlined arrows, so the
pieces under it stay readable. Drawn after the board, it takes the presses
there, as the topmost widget does. The hosted ZX probe uses the floating pad.
2026-10-23 22:38:50 -03:00
waozi cb637eabcd Use ZX portable executables throughout players and project tools 2026-10-23 18:55:42 -03:00
waozi 55af1b53b1 Keep Canvas widget pixels between frames and reduce sprite bridge work 2026-10-23 17:50:54 -03:00
waozi b1d4faa4de Keep reader scrollports independent of focused fields 2026-10-23 17:23:14 -03:00
waozi d1d167df9b Let text readers preserve manually chosen scroll position 2026-10-23 17:19:32 -03:00
waozi 399c008c57 Retain hosted reply text through the updated portable runtime 2026-10-23 15:27:25 -03:00
waozi df24f40ad7 Add DirectionPad, a four-way pad for touch games, and run the test driver on Android
Pressing an arm steps at once, holding repeats like an arrow key, sliding
onto another arm turns and the hub stops; a quick tap steps once. Laws prove
the arm and timing rules, and the hosted browser test holds, slides, rests
and taps it. A debuggable Android build runs the test driver when its
private files hold a kryon-test-driver folder, so phone tests can press
widgets by label.
2026-10-23 13:40:46 -03:00
waozi 7f9008bc19 Give each secondary window its own pointer for the widgets drawn in it 2026-10-23 01:18:50 -03:00
waozi 0af2fae4f9 Share cover carousel navigation and artwork across portable and native apps 2026-10-22 17:54:22 -03:00
waozi e1617a7ab2 Scope palette tokens and share tile sampling and image transforms 2026-10-22 16:45:51 -03:00
waozi 538ff10dcd Batch browser image meshes and refresh changed resources 2026-10-22 08:22:56 -03:00
waozi 3f9dc9505f Report bounded HTTP response capacity failures 2026-10-22 02:33:08 -03:00
waozi 08969407c4 Dismiss the topmost modal or popup with Escape 2026-10-22 00:05:01 -03:00
waozi 20b187a5ef Keep manual scrolling usable while text inputs stay focused 2026-10-21 23:15:59 -03:00
waozi b3ea1c813e Support system-picked Android document saves 2026-10-21 22:19:35 -03:00
waozi 018e94781b Expose session-scoped pointer samples to hosted apps 2026-10-21 21:55:06 -03:00
waozi 9f50fb47c0 Share input protocol and native file picker with hosted apps 2026-10-20 11:35:29 -03:00
waozi e985d83cdd Paint icons from one texture each where the host draws textures
A screen of icons queued hundreds of rectangles per icon: on a Moto e6
the habit shop's grid of 75 symbols spent over half of each 95 ms frame
queueing and drawing them. A host can now register SvgIconUseTextures,
and each cached icon is then one image of exactly the pixels its cells
paint. raylib registers in OpenRaylib, or through RaylibUseIconTextures
for hosts with their own window, and drops the textures with a lost
context. A texture leaving the cache is freed only after 64 more have
left, so a frame that still queued it draws it. Other hosts keep the
cells.
2026-10-19 16:43:30 -03:00
waozi 7fa8826538 Let portable apps measure a wrapped paragraph with TextHeight
A bundle could measure a line's width but not how tall a paragraph wraps,
so pages guessed from character counts. TextHeight returns the height
Text takes for the text in its bounds' width, from the host's fonts.
2026-10-19 16:10:16 -03:00
waozi ca749f72a5 Let portable apps draw a vector icon on its own with SvgIcon
A symbol beside a name or a coin beside an amount had no hosted widget:
only buttons carried icons. SvgIcon paints a Shape in the caller's color,
and bundles submit it to their host like the other widgets.
2026-10-19 16:05:44 -03:00
waozi a5170651c4 Add Line, Circle, Ring and Triangle widgets and a fading Box
Apps drew lines at an angle, circles, arcs, triangles and gradients with
raylib calls of their own, outside the widget tree. Line, Circle (with an
optional fade from centre to rim), Ring (whole or an arc) and Triangle now
draw them as decorative widgets like Box, and BoxProps.fill_bottom fades a
box's fill from top to bottom.

Each queues one paint command whose inputs the paint queue compares, so an
unchanged frame stays reusable. Kryon cuts the shape into triangles, clips
them to the parent's clip, and hands each colour's triangles to the host in
one RasterTriangles call, which raylib, the canvas, Cairo, the pixmap host,
Plan 9's libdraw and the terminal implement. The canvas fills a call as one
path, so its antialiasing leaves no seam between triangles.
2026-10-17 18:57:23 -03:00
waozi d448109e5a Let a TextArea line hold several boxes, one under another
A line of text with several pictures in it draws them all: a line's
blocks follow it in list order, one under another, and only its first may
take the place of its last row with cover. Content height, carets, presses
and painting walk all of a line's boxes; a press inside any of them is the
end of the line. A list where a later box of a line covers it, or whose
starts go back, is ignored as a whole, as before.

Tests: two boxes after a covered line and after a shown line, in every
target and bundle; both boxes of a line paint their picture.
2026-10-17 18:27:00 -03:00
waozi b49f5eb1e5 Let a TextArea draw pictures, headings and italic in its lines
A TextArea can now preview a markup language such as Markdown without
changing its value:

- blocks: a box under a logical line, or in place of its last row with
  cover, drawing an asset fitted inside it, or a soft frame with a label
  while the picture is missing. A press inside a box is the end of its line.
- lines: a logical line at its own size, which wraps, takes caret stops and
  takes height at that size, as a heading does.
- italic: bytes drawn slanted with unchanged advances. Raylib leans the
  glyph quads with an rlgl shear; other backends draw them upright.

Rows are placed by one walk shared by content height, carets, presses,
arrow keys and painting. During an IME composition, lines and boxes after
it move with the preedit. Each list is sorted, one entry per line at line
starts, or ignored as a whole; without them the layout is the plain area's.
The widget host passes the new fields to hosted apps and draws a box's
picture only when the bundle may draw that asset.

Tests: placement, carets, presses, row keys, line sizes, validation and
composition offsets checked against the plain layout in C, C++, Go, Python,
Rust and bundles; a covered line paints its picture and not its bytes.
2026-10-17 18:08:13 -03:00
waozi 197d21f2f8 Draw images warped over a grid of points
ImageProps.mesh holds a columns x rows grid of screen points; Image
stretches the picture across it, two textured triangles per cell, so a
painted limb can bend at its joint like a paper puppet. Mirrored grids
draw (nothing is culled), the bounds still clip, and fit, origin,
rotation and the style radius do not apply. A grid with too few points
draws nothing, and no placeholder covers its bounds.

The paint queue copies the points into per-session blocks when queued,
moves them with their node, and compares them in the retained snapshot,
so a moved vertex repaints and an unchanged grid reuses the frame.

RasterImageMesh draws the grid in every host: raylib (desktop and
Android) sends front-facing textured triangles in one batch, the web
canvas and Cairo draw each triangle through its affine transform under a
clip, the pixmap host and Plan 9 libdraw rasterize pixel centers with a
shared edge rule (bilinear when smooth), and the terminal shows a marker.
The bundle player, zib tool and frame replay bind it, and hosted bundles
send up to 256 points with a plain Image (a per-field slice bound in the
codec generator keeps every ImageProps codec small).

Tests: pixmap mesh test (C, C++, Go, bundles; copy, snapshot reuse,
mirror, bend, clip, seams), Cairo mesh test, RGBA canvas cases, web
canvas pixels and seam at three densities, hosted widget mesh, and a
raylib pixel test on a private Xvfb (make raylib-mesh-pixels-test).
2026-10-14 20:05:57 -03:00