Inner Breeze's platform services now come from their shared homes: - Kryon: file_download (runtime assets and music), file_export (data and key file downloads and Android's share sheet), android_picker (document picker and QR scanner), page_socket (live sync events in the browser), browser_viewport (canvas sizing), and Android's device, insets and input method text editing. - Daochi client: crypto (SHA-256, HMAC, ChaCha20-Poly1305), account keys (now wiping secrets as Inbe's copy did), and signed package release parsing; Inbe keeps only its own package policy. About 5,000 lines of duplicated Zi, C and JavaScript are gone. The lock pins Kryon f2c230be and the Daochi client d453a26.
22 lines
622 B
Ziran
22 lines
622 B
Ziran
#import, file "../src/platform/web_window.zi";
|
|
#import "browser_viewport"
|
|
|
|
#program_export
|
|
main :: () -> s32 {
|
|
portrait := BrowserOrientationSize(BrowserViewport.{1200, 800}, 1)
|
|
landscape := BrowserOrientationSize(BrowserViewport.{600, 1000}, 2)
|
|
if portrait.width != 450 || portrait.height != 800 ||
|
|
landscape.width != 600 || landscape.height != 337 {
|
|
return 1
|
|
}
|
|
SetBrowserOrientation(1)
|
|
if BrowserViewportSize(1200, 800).width != 450 {
|
|
return 4
|
|
}
|
|
SetBrowserOrientation(99)
|
|
if BrowserViewportSize(1200, 800).width != 1200 {
|
|
return 5
|
|
}
|
|
return 0
|
|
}
|