Files
breeze/tests/node_app_icons_host.c
T
waozi 017d3565d3 Build on Ziran 0.5.0 and Kryon's namespaced widgets, with the Tao picture page
Pin only pushed commits, with no local overrides: Ziran v0.5.0
(f9f92b46), Kryon b45cc524 (one lock entry, ref master, shared with the
Css and Plot master edges), Apps 352901e, Entity b30dd4a and practices
893e5b6f, whose sharpened banners and regenerated Lumi guide clips the
narration check now matches.

The Library opens each Tao Te Ching chapter on its own picture page: the
chapter art and its title, centered together; the text pages follow.
The reader keeps the picture page across reflow, and a chapter start or
a Contents pick opens it. The 81 approved chapter pictures are included.

Breeze now uses Kryon's namespaced widgets (Text.Draw/Text.Props,
Button, Image, Modal.ActionModal, Layout, TabBar, LoadingScreen,
LoadingIndicator, Shape.Circle) instead of the removed Kryon/Widgets
facades. Hosted apps import std/text explicitly, since a short "text"
import now names Kryon's widget. AGENTS.md and the Text/Button API checks
describe the namespaced forms; two unused test doubles are removed.

Build fixes for the new toolchain: the bundle runtime carries Ziran's
instruction engine (no BOOTSTRAP=1) and takes the pinned host zi2c for
cross builds; the Apps controller's lock context has the manifest's
module roots; the app codec generator lists Kryon's raw modules only;
the package scripts read ZX revision 28 bundle assets. The Apps
controller digest matches the Apps 352901e build.

Also included: the stopped lanes' work in this tree (Radio download,
Photos install, Lists, Lumi, Habits shop rewards, astral exercise
selection, appearance and download recovery) and the raylib-free desktop
lane's host modules (app_trace, host_input, host_window, host_clock),
inactive unless DESKTOP_HOST is defined.

Not included: the crash-recovery lane's picture-window and storage
crash-safety changes, which that lane commits itself.

Local tests: zi-check (510 modules), native and Android source checks,
hosted app checks, build-laws, clean-text-api-check, button-api-check,
library-reader-test, library-ui-test, storage-crash-zi-test and
native-image-decode-test pass. The bundled Arcade is still ZX revision 26
and waits for an Arcade build on these pins.
2026-11-16 14:20:12 -03:00

76 lines
1.8 KiB
C

#define _DEFAULT_SOURCE
#include "ziran_host.h"
#include <assert.h>
#include <stdatomic.h>
#include <stdbool.h>
#include <stdarg.h>
#include <stdio.h>
#include <time.h>
#include <unistd.h>
static atomic_bool parser_blocked;
static atomic_bool parser_started;
static atomic_int bundle_opens;
static bool other_account;
/* Snapshot integration uses the real variadic logger's calling convention. */
void __wrap_TraceLog(int32_t level, const char *format, ...)
{
(void)level;
va_list arguments;
va_start(arguments, format);
vfprintf(stderr, format, arguments);
va_end(arguments);
fputc('\n', stderr);
}
void IconsBlockParser(bool blocked)
{
if (blocked) atomic_store(&parser_started, false);
atomic_store(&parser_blocked, blocked);
}
bool IconsParserStarted(void)
{
return atomic_load(&parser_started);
}
int32_t IconsBundleOpens(void)
{
return atomic_load(&bundle_opens);
}
void IconsYield(void)
{
usleep(1000);
}
double IconsNow(void)
{
struct timespec now;
assert(clock_gettime(CLOCK_MONOTONIC, &now) == 0);
return (double)now.tv_sec + (double)now.tv_nsec / 1e9;
}
void IconsOtherAccount(bool enabled)
{
other_account = enabled;
}
unsigned char *__real_storage_user_id_buffer(void);
unsigned char *__wrap_storage_user_id_buffer(void)
{
return other_account ? (unsigned char *)"another-account" : __real_storage_user_id_buffer();
}
Bundle *__real_BundleOpenBytes(const unsigned char *bytes, size_t size);
Bundle *__wrap_BundleOpenBytes(const unsigned char *bytes, size_t size)
{
atomic_fetch_add(&bundle_opens, 1);
if (atomic_load(&parser_blocked)) {
atomic_store(&parser_started, true);
while (atomic_load(&parser_blocked)) usleep(1000);
}
return __real_BundleOpenBytes(bytes, size);
}