These platform services now come from Kryon: raylib_trace routes raylib's log (trace_log.zi keeps only Inner Breeze's formatted lines), window_close watches the app's own window, idle_time reads the session's idle time for break reminders, notification_desktop sends desktop notifications, and file_picker opens data, photo and audio pickers, including the browser's chooser, which no longer needs Inner Breeze's JavaScript. Audio files are still picked only on Linux and BSD desktops. Tests that compile host services gain Kryon's backend module path; the tests of the moved code live in Kryon now.
38 lines
958 B
Ziran
38 lines
958 B
Ziran
#import, file "../src/platform/web_storage.zi";
|
|
#import, file "../src/platform/environment.zi";
|
|
#import, file "../src/platform/web_bridge.zi";
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
sync_web_storage()
|
|
return sync_web_storage_critical()
|
|
}
|
|
|
|
#program_export
|
|
PlatformFlags :: () -> s32 {
|
|
return DesktopPlatform() + WebPlatform() * 2 +
|
|
AndroidPlatform() * 4 + WindowsPlatform() * 8 +
|
|
WebExtensionHost() * 16
|
|
}
|
|
#import, file "../src/app/host_services.zi";
|
|
|
|
#program_export
|
|
main :: () -> s32 {
|
|
if app_desktop_platform() != DesktopPlatform() ||
|
|
app_web_extension_available() != WebExtensionHost() ||
|
|
app_web_storage_flush_critical(2000, 1) != 1 {
|
|
return 3
|
|
}
|
|
if Answer() != 1 {
|
|
return 1
|
|
}
|
|
expected: s32 = 1
|
|
#if #defined(ANDROID_BUILD) {
|
|
expected = 4
|
|
}
|
|
#if #defined(PLATFORM_WEB) {
|
|
expected = 2
|
|
}
|
|
return ifx PlatformFlags() == expected then 0 else 2
|
|
}
|