@native-sdk/cli 0.0.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +176 -0
- package/README.md +50 -1
- package/app.zon +30 -0
- package/assets/icon.icns +0 -0
- package/assets/icon.ico +0 -0
- package/assets/icon.png +0 -0
- package/assets/icon.svg +15 -0
- package/assets/native-sdk.entitlements +10 -0
- package/assets/native-sdk.manifest +12 -0
- package/bin/native.js +156 -0
- package/build/app.zig +716 -0
- package/build.zig +2593 -0
- package/build.zig.zon +24 -0
- package/native-sdk.d.ts +615 -0
- package/package.json +45 -8
- package/skill-data/automation/SKILL.md +248 -0
- package/skill-data/core/SKILL.md +249 -0
- package/skill-data/core/references/app-model-runtime.md +141 -0
- package/skill-data/core/references/bridge-security-native-capabilities.md +230 -0
- package/skill-data/core/references/frontend-assets.md +124 -0
- package/skill-data/core/references/project-anatomy.md +108 -0
- package/skill-data/core/references/web-engines-packaging-debugging.md +199 -0
- package/skill-data/native-ui/SKILL.md +1080 -0
- package/skills/native-sdk/SKILL.md +33 -0
- package/src/app_runner/root.zig +740 -0
- package/src/assets/root.zig +20 -0
- package/src/automation/protocol.zig +285 -0
- package/src/automation/root.zig +13 -0
- package/src/automation/server.zig +506 -0
- package/src/automation/snapshot.zig +1202 -0
- package/src/automation/watcher.zig +165 -0
- package/src/bridge/root.zig +507 -0
- package/src/debug/root.zig +246 -0
- package/src/embed/app_exports.zig +11 -0
- package/src/embed/c_api.zig +793 -0
- package/src/embed/c_exports.zig +10 -0
- package/src/embed/chrome.zig +168 -0
- package/src/embed/conversions.zig +359 -0
- package/src/embed/host.zig +960 -0
- package/src/embed/root.zig +81 -0
- package/src/embed/tests.zig +2552 -0
- package/src/embed/types.zig +382 -0
- package/src/embed/ui_host.zig +289 -0
- package/src/extensions/root.zig +197 -0
- package/src/frontend/root.zig +48 -0
- package/src/js/root.zig +65 -0
- package/src/platform/android/NativeSdkActivity.java +1370 -0
- package/src/platform/android/android_host.c +696 -0
- package/src/platform/android/files.zig +9 -0
- package/src/platform/android/native_sdk_app.h +237 -0
- package/src/platform/ios/files.zig +8 -0
- package/src/platform/ios/native_sdk_app.h +289 -0
- package/src/platform/ios/uikit_host.m +2739 -0
- package/src/platform/linux/cef_host.cpp +599 -0
- package/src/platform/linux/gtk_host.c +5362 -0
- package/src/platform/linux/gtk_host.h +265 -0
- package/src/platform/linux/root.zig +1519 -0
- package/src/platform/macos/appkit_host.h +604 -0
- package/src/platform/macos/appkit_host.m +10392 -0
- package/src/platform/macos/automation_host.h +14 -0
- package/src/platform/macos/automation_host.m +12 -0
- package/src/platform/macos/cef_host.mm +3028 -0
- package/src/platform/macos/root.zig +2260 -0
- package/src/platform/null_platform.zig +2232 -0
- package/src/platform/null_platform_tests.zig +670 -0
- package/src/platform/policy_values.zig +14 -0
- package/src/platform/root.zig +181 -0
- package/src/platform/types.zig +2681 -0
- package/src/platform/windows/cef_host.cpp +3 -0
- package/src/platform/windows/root.zig +1521 -0
- package/src/platform/windows/webview2_host.cpp +6230 -0
- package/src/primitives/app_dirs/root.zig +440 -0
- package/src/primitives/app_manifest/root.zig +109 -0
- package/src/primitives/app_manifest/tests.zig +758 -0
- package/src/primitives/app_manifest/types.zig +587 -0
- package/src/primitives/app_manifest/validation.zig +828 -0
- package/src/primitives/assets/root.zig +520 -0
- package/src/primitives/canvas/a11y_audit.zig +390 -0
- package/src/primitives/canvas/a11y_audit_tests.zig +225 -0
- package/src/primitives/canvas/app_icon.zig +1590 -0
- package/src/primitives/canvas/chart.zig +392 -0
- package/src/primitives/canvas/chart_tests.zig +751 -0
- package/src/primitives/canvas/commands.zig +446 -0
- package/src/primitives/canvas/drawing.zig +309 -0
- package/src/primitives/canvas/equality.zig +316 -0
- package/src/primitives/canvas/events.zig +696 -0
- package/src/primitives/canvas/font_coverage.zig +118 -0
- package/src/primitives/canvas/font_ttf.zig +510 -0
- package/src/primitives/canvas/font_ttf_tests.zig +280 -0
- package/src/primitives/canvas/fonts/Geist-Regular.ttf +0 -0
- package/src/primitives/canvas/fonts/GeistMono-Regular.ttf +0 -0
- package/src/primitives/canvas/frame.zig +679 -0
- package/src/primitives/canvas/frame_metrics.zig +462 -0
- package/src/primitives/canvas/gpu.zig +639 -0
- package/src/primitives/canvas/hash.zig +112 -0
- package/src/primitives/canvas/icons/alert.svg +1 -0
- package/src/primitives/canvas/icons/archive.svg +1 -0
- package/src/primitives/canvas/icons/arrow-down.svg +1 -0
- package/src/primitives/canvas/icons/arrow-right.svg +1 -0
- package/src/primitives/canvas/icons/arrow-up.svg +1 -0
- package/src/primitives/canvas/icons/check-circle.svg +1 -0
- package/src/primitives/canvas/icons/check.svg +1 -0
- package/src/primitives/canvas/icons/chevron-down.svg +1 -0
- package/src/primitives/canvas/icons/chevron-left.svg +1 -0
- package/src/primitives/canvas/icons/chevron-right.svg +1 -0
- package/src/primitives/canvas/icons/chevron-up.svg +1 -0
- package/src/primitives/canvas/icons/circle-dot.svg +1 -0
- package/src/primitives/canvas/icons/clock.svg +1 -0
- package/src/primitives/canvas/icons/copy.svg +1 -0
- package/src/primitives/canvas/icons/download.svg +1 -0
- package/src/primitives/canvas/icons/edit.svg +1 -0
- package/src/primitives/canvas/icons/ellipsis.svg +1 -0
- package/src/primitives/canvas/icons/external-link.svg +1 -0
- package/src/primitives/canvas/icons/eye.svg +1 -0
- package/src/primitives/canvas/icons/file-text.svg +1 -0
- package/src/primitives/canvas/icons/folder-open.svg +1 -0
- package/src/primitives/canvas/icons/folder.svg +1 -0
- package/src/primitives/canvas/icons/git-branch.svg +1 -0
- package/src/primitives/canvas/icons/git-merge.svg +1 -0
- package/src/primitives/canvas/icons/git-pull-request.svg +1 -0
- package/src/primitives/canvas/icons/info.svg +1 -0
- package/src/primitives/canvas/icons/menu.svg +1 -0
- package/src/primitives/canvas/icons/missing.svg +1 -0
- package/src/primitives/canvas/icons/moon.svg +1 -0
- package/src/primitives/canvas/icons/music.svg +1 -0
- package/src/primitives/canvas/icons/panel-left.svg +1 -0
- package/src/primitives/canvas/icons/panel-right.svg +1 -0
- package/src/primitives/canvas/icons/pause.svg +1 -0
- package/src/primitives/canvas/icons/play.svg +1 -0
- package/src/primitives/canvas/icons/plus.svg +1 -0
- package/src/primitives/canvas/icons/refresh-cw.svg +1 -0
- package/src/primitives/canvas/icons/repeat.svg +1 -0
- package/src/primitives/canvas/icons/save.svg +1 -0
- package/src/primitives/canvas/icons/search.svg +1 -0
- package/src/primitives/canvas/icons/send.svg +1 -0
- package/src/primitives/canvas/icons/settings.svg +1 -0
- package/src/primitives/canvas/icons/shuffle.svg +1 -0
- package/src/primitives/canvas/icons/skip-back.svg +1 -0
- package/src/primitives/canvas/icons/skip-forward.svg +1 -0
- package/src/primitives/canvas/icons/sun.svg +1 -0
- package/src/primitives/canvas/icons/terminal.svg +1 -0
- package/src/primitives/canvas/icons/trash.svg +1 -0
- package/src/primitives/canvas/icons/volume.svg +1 -0
- package/src/primitives/canvas/icons/wrench.svg +1 -0
- package/src/primitives/canvas/icons/x-circle.svg +1 -0
- package/src/primitives/canvas/icons/x.svg +1 -0
- package/src/primitives/canvas/icons.zig +249 -0
- package/src/primitives/canvas/layout_audit.zig +744 -0
- package/src/primitives/canvas/layout_audit_tests.zig +426 -0
- package/src/primitives/canvas/markdown.zig +1031 -0
- package/src/primitives/canvas/markdown_hostile_tests.zig +471 -0
- package/src/primitives/canvas/markdown_tests.zig +538 -0
- package/src/primitives/canvas/plan_key_index.zig +120 -0
- package/src/primitives/canvas/png.zig +355 -0
- package/src/primitives/canvas/reference.zig +1457 -0
- package/src/primitives/canvas/reference_blur.zig +104 -0
- package/src/primitives/canvas/reference_memo.zig +322 -0
- package/src/primitives/canvas/reference_paths.zig +184 -0
- package/src/primitives/canvas/reference_tests.zig +1650 -0
- package/src/primitives/canvas/render.zig +747 -0
- package/src/primitives/canvas/render_effects.zig +255 -0
- package/src/primitives/canvas/render_fingerprints.zig +256 -0
- package/src/primitives/canvas/render_generic_resources.zig +376 -0
- package/src/primitives/canvas/render_images.zig +247 -0
- package/src/primitives/canvas/render_layers.zig +260 -0
- package/src/primitives/canvas/render_paths.zig +347 -0
- package/src/primitives/canvas/render_resources.zig +51 -0
- package/src/primitives/canvas/render_tests.zig +3186 -0
- package/src/primitives/canvas/root.zig +744 -0
- package/src/primitives/canvas/serialization.zig +1528 -0
- package/src/primitives/canvas/svg_icon.zig +636 -0
- package/src/primitives/canvas/svg_icon_tests.zig +312 -0
- package/src/primitives/canvas/test_support.zig +422 -0
- package/src/primitives/canvas/testdata/markdown_document.md +83 -0
- package/src/primitives/canvas/tests.zig +30 -0
- package/src/primitives/canvas/text.zig +82 -0
- package/src/primitives/canvas/text_atlas.zig +408 -0
- package/src/primitives/canvas/text_batch_tests.zig +431 -0
- package/src/primitives/canvas/text_interaction.zig +615 -0
- package/src/primitives/canvas/text_layout.zig +1069 -0
- package/src/primitives/canvas/text_layout_cache.zig +281 -0
- package/src/primitives/canvas/text_layout_hash.zig +113 -0
- package/src/primitives/canvas/text_layout_types.zig +128 -0
- package/src/primitives/canvas/text_measure_cache.zig +279 -0
- package/src/primitives/canvas/text_metrics.zig +309 -0
- package/src/primitives/canvas/text_metrics_tests.zig +262 -0
- package/src/primitives/canvas/text_span_tests.zig +608 -0
- package/src/primitives/canvas/text_spans.zig +1010 -0
- package/src/primitives/canvas/text_tests.zig +1949 -0
- package/src/primitives/canvas/themes/geist.zig +470 -0
- package/src/primitives/canvas/tokens.zig +1522 -0
- package/src/primitives/canvas/ui.zig +2686 -0
- package/src/primitives/canvas/ui_markup.zig +3791 -0
- package/src/primitives/canvas/ui_markup_binary.zig +522 -0
- package/src/primitives/canvas/ui_markup_binary_tests.zig +591 -0
- package/src/primitives/canvas/ui_markup_compiled.zig +2565 -0
- package/src/primitives/canvas/ui_markup_compiled_tests.zig +1669 -0
- package/src/primitives/canvas/ui_markup_contract.zig +1620 -0
- package/src/primitives/canvas/ui_markup_contract_tests.zig +953 -0
- package/src/primitives/canvas/ui_markup_edit.zig +416 -0
- package/src/primitives/canvas/ui_markup_edit_tests.zig +341 -0
- package/src/primitives/canvas/ui_markup_expr.zig +1152 -0
- package/src/primitives/canvas/ui_markup_expr_tests.zig +779 -0
- package/src/primitives/canvas/ui_markup_huge_model_tests.zig +505 -0
- package/src/primitives/canvas/ui_markup_reflect.zig +127 -0
- package/src/primitives/canvas/ui_markup_tests.zig +1545 -0
- package/src/primitives/canvas/ui_markup_view.zig +2352 -0
- package/src/primitives/canvas/ui_markup_view_tests.zig +3709 -0
- package/src/primitives/canvas/ui_provenance.zig +96 -0
- package/src/primitives/canvas/ui_provenance_tests.zig +186 -0
- package/src/primitives/canvas/ui_schema.zig +825 -0
- package/src/primitives/canvas/ui_schema_tests.zig +128 -0
- package/src/primitives/canvas/ui_tests.zig +1432 -0
- package/src/primitives/canvas/vector.zig +919 -0
- package/src/primitives/canvas/vector_tests.zig +547 -0
- package/src/primitives/canvas/virtual_extent_tests.zig +317 -0
- package/src/primitives/canvas/virtual_extents.zig +540 -0
- package/src/primitives/canvas/widget_access.zig +208 -0
- package/src/primitives/canvas/widget_anchored_tests.zig +264 -0
- package/src/primitives/canvas/widget_builtin_tests.zig +3160 -0
- package/src/primitives/canvas/widget_invalidation.zig +748 -0
- package/src/primitives/canvas/widget_layout.zig +2055 -0
- package/src/primitives/canvas/widget_layout_tests.zig +2691 -0
- package/src/primitives/canvas/widget_metrics.zig +228 -0
- package/src/primitives/canvas/widget_render.zig +2534 -0
- package/src/primitives/canvas/widget_render_controls.zig +1563 -0
- package/src/primitives/canvas/widget_render_scroll.zig +136 -0
- package/src/primitives/canvas/widget_render_style.zig +626 -0
- package/src/primitives/canvas/widget_render_surfaces.zig +794 -0
- package/src/primitives/canvas/widget_routing.zig +475 -0
- package/src/primitives/canvas/widget_runtime.zig +307 -0
- package/src/primitives/canvas/widget_runtime_tests.zig +3015 -0
- package/src/primitives/canvas/widget_semantics.zig +480 -0
- package/src/primitives/canvas/widget_semantics_tests.zig +2129 -0
- package/src/primitives/canvas/widget_tests.zig +8 -0
- package/src/primitives/canvas/widget_text_input.zig +351 -0
- package/src/primitives/canvas/widget_text_select.zig +147 -0
- package/src/primitives/canvas/widget_tree.zig +232 -0
- package/src/primitives/canvas/widgets.zig +1319 -0
- package/src/primitives/diagnostics/root.zig +445 -0
- package/src/primitives/geometry/root.zig +889 -0
- package/src/primitives/json/root.zig +272 -0
- package/src/primitives/platform_info/root.zig +450 -0
- package/src/primitives/trace/root.zig +569 -0
- package/src/root.zig +165 -0
- package/src/runtime/api.zig +431 -0
- package/src/runtime/async_bridge.zig +49 -0
- package/src/runtime/automation_commands.zig +686 -0
- package/src/runtime/automation_liveness_tests.zig +140 -0
- package/src/runtime/automation_snapshot.zig +246 -0
- package/src/runtime/automation_widget_dispatch.zig +617 -0
- package/src/runtime/bridge_dispatch_tests.zig +202 -0
- package/src/runtime/bridge_payload.zig +194 -0
- package/src/runtime/bridge_permission_tests.zig +551 -0
- package/src/runtime/bridge_responses.zig +414 -0
- package/src/runtime/builtin_bridge.zig +554 -0
- package/src/runtime/canvas_budget_edge_tests.zig +415 -0
- package/src/runtime/canvas_font_tests.zig +410 -0
- package/src/runtime/canvas_fonts.zig +229 -0
- package/src/runtime/canvas_frame.zig +1734 -0
- package/src/runtime/canvas_frame_animation_tests.zig +609 -0
- package/src/runtime/canvas_frame_cache_tests.zig +333 -0
- package/src/runtime/canvas_frame_helpers.zig +414 -0
- package/src/runtime/canvas_frame_invalidation_tests.zig +544 -0
- package/src/runtime/canvas_frame_packet_tests.zig +1353 -0
- package/src/runtime/canvas_frame_patch_tests.zig +1051 -0
- package/src/runtime/canvas_frame_retained_tests.zig +753 -0
- package/src/runtime/canvas_frame_tests.zig +9 -0
- package/src/runtime/canvas_frame_text_layout_budget_tests.zig +149 -0
- package/src/runtime/canvas_image_tests.zig +362 -0
- package/src/runtime/canvas_images.zig +224 -0
- package/src/runtime/canvas_limits.zig +317 -0
- package/src/runtime/canvas_screenshot_tests.zig +289 -0
- package/src/runtime/canvas_widget_accessibility_tests.zig +1494 -0
- package/src/runtime/canvas_widget_anchored_tests.zig +678 -0
- package/src/runtime/canvas_widget_chart_tests.zig +249 -0
- package/src/runtime/canvas_widget_clipboard_tests.zig +399 -0
- package/src/runtime/canvas_widget_context_menu.zig +318 -0
- package/src/runtime/canvas_widget_context_menu_tests.zig +462 -0
- package/src/runtime/canvas_widget_control_tests.zig +2164 -0
- package/src/runtime/canvas_widget_disclosure_tests.zig +440 -0
- package/src/runtime/canvas_widget_display.zig +677 -0
- package/src/runtime/canvas_widget_event_tests.zig +1779 -0
- package/src/runtime/canvas_widget_events.zig +1098 -0
- package/src/runtime/canvas_widget_floating_tests.zig +695 -0
- package/src/runtime/canvas_widget_layout_tests.zig +26 -0
- package/src/runtime/canvas_widget_runtime.zig +1335 -0
- package/src/runtime/canvas_widget_scroll_driver_tests.zig +582 -0
- package/src/runtime/canvas_widget_scroll_drivers.zig +202 -0
- package/src/runtime/canvas_widget_scroll_tests.zig +1549 -0
- package/src/runtime/canvas_widget_semantics_tests.zig +810 -0
- package/src/runtime/canvas_widget_split_tree_tests.zig +1031 -0
- package/src/runtime/canvas_widget_state.zig +798 -0
- package/src/runtime/canvas_widget_text_tests.zig +2104 -0
- package/src/runtime/canvas_widget_window_drag_tests.zig +284 -0
- package/src/runtime/clock.zig +231 -0
- package/src/runtime/core.zig +927 -0
- package/src/runtime/effects.zig +4197 -0
- package/src/runtime/effects_audio_tests.zig +690 -0
- package/src/runtime/effects_clipboard_tests.zig +317 -0
- package/src/runtime/effects_fetch_tests.zig +1031 -0
- package/src/runtime/effects_file_tests.zig +407 -0
- package/src/runtime/effects_tests.zig +1251 -0
- package/src/runtime/flow.zig +1175 -0
- package/src/runtime/frame_profile.zig +221 -0
- package/src/runtime/gpu_surface_events.zig +639 -0
- package/src/runtime/launch_timing.zig +59 -0
- package/src/runtime/markdown_app_tests.zig +224 -0
- package/src/runtime/native_command_event_tests.zig +431 -0
- package/src/runtime/platform_bridge_tests.zig +8 -0
- package/src/runtime/platform_config_tests.zig +392 -0
- package/src/runtime/root.zig +150 -0
- package/src/runtime/runtime_event_tests.zig +1079 -0
- package/src/runtime/session_journal.zig +1522 -0
- package/src/runtime/session_record.zig +332 -0
- package/src/runtime/session_replay.zig +274 -0
- package/src/runtime/session_state.zig +30 -0
- package/src/runtime/session_tests.zig +399 -0
- package/src/runtime/shell_layout.zig +472 -0
- package/src/runtime/shell_layout_tests.zig +1246 -0
- package/src/runtime/shell_view_tests.zig +604 -0
- package/src/runtime/state.zig +110 -0
- package/src/runtime/system_services.zig +392 -0
- package/src/runtime/test_support.zig +79 -0
- package/src/runtime/tests.zig +30 -0
- package/src/runtime/ui_app.zig +3290 -0
- package/src/runtime/ui_app_huge_model_tests.zig +351 -0
- package/src/runtime/ui_app_provenance.zig +370 -0
- package/src/runtime/ui_app_tests.zig +3254 -0
- package/src/runtime/ui_app_virtual_variable_tests.zig +485 -0
- package/src/runtime/ui_app_window_tests.zig +442 -0
- package/src/runtime/validation.zig +206 -0
- package/src/runtime/view.zig +908 -0
- package/src/runtime/view_canvas.zig +850 -0
- package/src/runtime/view_widget_control.zig +433 -0
- package/src/runtime/view_widget_scroll.zig +360 -0
- package/src/runtime/view_widget_text.zig +275 -0
- package/src/runtime/view_widget_tree.zig +843 -0
- package/src/runtime/webview_view_bridge_tests.zig +664 -0
- package/src/runtime/widget_bridge.zig +231 -0
- package/src/runtime/window_command_bridge_tests.zig +403 -0
- package/src/runtime/window_storage.zig +255 -0
- package/src/runtime/window_view_runtime.zig +727 -0
- package/src/runtime/window_views.zig +334 -0
- package/src/security/root.zig +118 -0
- package/src/tooling/android.zig +1172 -0
- package/src/tooling/assets.zig +128 -0
- package/src/tooling/buildgraph.zig +379 -0
- package/src/tooling/cef.zig +671 -0
- package/src/tooling/codesign.zig +172 -0
- package/src/tooling/components/identity_tests.zig +185 -0
- package/src/tooling/components/stepper.zig +113 -0
- package/src/tooling/components/timeline.native +27 -0
- package/src/tooling/components/timeline_item.zig +131 -0
- package/src/tooling/default_icon.icns +0 -0
- package/src/tooling/default_icon.png +0 -0
- package/src/tooling/dev.zig +172 -0
- package/src/tooling/doctor.zig +349 -0
- package/src/tooling/eject_components.zig +170 -0
- package/src/tooling/embedlib.zig +290 -0
- package/src/tooling/ios.zig +528 -0
- package/src/tooling/manifest.zig +1939 -0
- package/src/tooling/package.zig +2388 -0
- package/src/tooling/process_tree.zig +114 -0
- package/src/tooling/raw_manifest.zig +193 -0
- package/src/tooling/root.zig +22 -0
- package/src/tooling/templates.zig +3191 -0
- package/src/tooling/toolchain.zig +371 -0
- package/src/tooling/verbs.zig +204 -0
- package/src/tooling/web_engine.zig +135 -0
- package/src/tooling/xcodeproj.zig +462 -0
- package/src/window_state/root.zig +507 -0
- package/index.js +0 -2
|
@@ -0,0 +1,392 @@
|
|
|
1
|
+
const support = @import("test_support.zig");
|
|
2
|
+
const std = support.std;
|
|
3
|
+
const geometry = support.geometry;
|
|
4
|
+
const trace = support.trace;
|
|
5
|
+
const json = support.json;
|
|
6
|
+
const canvas = support.canvas;
|
|
7
|
+
const automation = support.automation;
|
|
8
|
+
const bridge = support.bridge;
|
|
9
|
+
const app_manifest = support.app_manifest;
|
|
10
|
+
const platform = support.platform;
|
|
11
|
+
const security = support.security;
|
|
12
|
+
const extensions = support.extensions;
|
|
13
|
+
const window_state = support.window_state;
|
|
14
|
+
const runtime_module = support.runtime_module;
|
|
15
|
+
const bridge_payload = support.bridge_payload;
|
|
16
|
+
const canvas_frame = support.canvas_frame;
|
|
17
|
+
const App = support.App;
|
|
18
|
+
const Runtime = support.Runtime;
|
|
19
|
+
const Options = support.Options;
|
|
20
|
+
const Event = support.Event;
|
|
21
|
+
const LifecycleEvent = support.LifecycleEvent;
|
|
22
|
+
const CommandEvent = support.CommandEvent;
|
|
23
|
+
const Command = support.Command;
|
|
24
|
+
const CommandSource = support.CommandSource;
|
|
25
|
+
const FrameDiagnostics = support.FrameDiagnostics;
|
|
26
|
+
const ShortcutEvent = support.ShortcutEvent;
|
|
27
|
+
const Appearance = support.Appearance;
|
|
28
|
+
const GpuFrame = support.GpuFrame;
|
|
29
|
+
const GpuSurfaceFrameEvent = support.GpuSurfaceFrameEvent;
|
|
30
|
+
const GpuSurfaceResizeEvent = support.GpuSurfaceResizeEvent;
|
|
31
|
+
const GpuSurfaceInputEvent = support.GpuSurfaceInputEvent;
|
|
32
|
+
const CanvasWidgetPointerEvent = support.CanvasWidgetPointerEvent;
|
|
33
|
+
const CanvasWidgetKeyboardEvent = support.CanvasWidgetKeyboardEvent;
|
|
34
|
+
const CanvasWidgetDisplayListChrome = support.CanvasWidgetDisplayListChrome;
|
|
35
|
+
const CanvasPresentationMode = support.CanvasPresentationMode;
|
|
36
|
+
const CanvasPresentationResult = support.CanvasPresentationResult;
|
|
37
|
+
const CanvasWidgetAccessibilityActionKind = support.CanvasWidgetAccessibilityActionKind;
|
|
38
|
+
const CanvasWidgetAccessibilityAction = support.CanvasWidgetAccessibilityAction;
|
|
39
|
+
const CanvasWidgetFileDropEvent = support.CanvasWidgetFileDropEvent;
|
|
40
|
+
const CanvasWidgetDragEvent = support.CanvasWidgetDragEvent;
|
|
41
|
+
const InvalidationReason = support.InvalidationReason;
|
|
42
|
+
const TestHarness = support.TestHarness;
|
|
43
|
+
const max_canvas_commands_per_view = support.max_canvas_commands_per_view;
|
|
44
|
+
const max_canvas_widget_nodes_per_view = support.max_canvas_widget_nodes_per_view;
|
|
45
|
+
const jsonStringField = support.jsonStringField;
|
|
46
|
+
const jsonNumberField = support.jsonNumberField;
|
|
47
|
+
const jsonBoolField = support.jsonBoolField;
|
|
48
|
+
const canvasRenderAnimationFinalOverrideNoop = support.canvasRenderAnimationFinalOverrideNoop;
|
|
49
|
+
const copyInto = support.copyInto;
|
|
50
|
+
const writeViewJson = support.writeViewJson;
|
|
51
|
+
const canvasFrameScratchStorage = support.canvasFrameScratchStorage;
|
|
52
|
+
const runtimeViewInfo = support.runtimeViewInfo;
|
|
53
|
+
const runtimeViewCanvasFrameRenderOverrides = support.runtimeViewCanvasFrameRenderOverrides;
|
|
54
|
+
const runtimeViewCanvasRenderAnimationDirtyBoundsForOverrides = support.runtimeViewCanvasRenderAnimationDirtyBoundsForOverrides;
|
|
55
|
+
const runtimeViewWidgetSemantics = support.runtimeViewWidgetSemantics;
|
|
56
|
+
const runtimeViewSetCanvasWidgetSelected = support.runtimeViewSetCanvasWidgetSelected;
|
|
57
|
+
const runtimeViewCanvasWidgetDirtyBounds = support.runtimeViewCanvasWidgetDirtyBounds;
|
|
58
|
+
const dispatchAutomationWidgetAction = support.dispatchAutomationWidgetAction;
|
|
59
|
+
const shellBoundsForWindow = support.shellBoundsForWindow;
|
|
60
|
+
const reloadWindows = support.reloadWindows;
|
|
61
|
+
const canvasWidgetSemanticsById = support.canvasWidgetSemanticsById;
|
|
62
|
+
const platformWidgetAccessibilityNodeById = support.platformWidgetAccessibilityNodeById;
|
|
63
|
+
const builtinBridgeErrorCode = support.builtinBridgeErrorCode;
|
|
64
|
+
const builtinBridgeErrorMessage = support.builtinBridgeErrorMessage;
|
|
65
|
+
const testViewByLabel = support.testViewByLabel;
|
|
66
|
+
const testCanvasWidgetPartId = support.testCanvasWidgetPartId;
|
|
67
|
+
|
|
68
|
+
test "runtime dispatches shortcut command events" {
|
|
69
|
+
const TestApp = struct {
|
|
70
|
+
command_count: u32 = 0,
|
|
71
|
+
shortcut_count: u32 = 0,
|
|
72
|
+
last_name: []const u8 = "",
|
|
73
|
+
last_source: CommandSource = .runtime,
|
|
74
|
+
last_window_id: platform.WindowId = 0,
|
|
75
|
+
|
|
76
|
+
fn app(self: *@This()) App {
|
|
77
|
+
return .{ .context = self, .name = "shortcut-command", .source = platform.WebViewSource.html("<h1>Shortcuts</h1>"), .event_fn = event };
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
fn event(context: *anyopaque, runtime: *Runtime, event_value: Event) anyerror!void {
|
|
81
|
+
_ = runtime;
|
|
82
|
+
const self: *@This() = @ptrCast(@alignCast(context));
|
|
83
|
+
switch (event_value) {
|
|
84
|
+
.command => |command| {
|
|
85
|
+
self.command_count += 1;
|
|
86
|
+
self.last_name = command.name;
|
|
87
|
+
self.last_source = command.source;
|
|
88
|
+
self.last_window_id = command.window_id;
|
|
89
|
+
},
|
|
90
|
+
.shortcut => {
|
|
91
|
+
self.shortcut_count += 1;
|
|
92
|
+
},
|
|
93
|
+
else => {},
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
99
|
+
defer harness.destroy(std.testing.allocator);
|
|
100
|
+
var app_state: TestApp = .{};
|
|
101
|
+
try harness.start(app_state.app());
|
|
102
|
+
|
|
103
|
+
try harness.runtime.dispatchPlatformEvent(app_state.app(), .{ .shortcut = .{
|
|
104
|
+
.id = "app.refresh",
|
|
105
|
+
.key = "r",
|
|
106
|
+
.window_id = 1,
|
|
107
|
+
.modifiers = .{ .primary = true },
|
|
108
|
+
} });
|
|
109
|
+
|
|
110
|
+
try std.testing.expectEqual(@as(u32, 1), app_state.command_count);
|
|
111
|
+
try std.testing.expectEqual(@as(u32, 1), app_state.shortcut_count);
|
|
112
|
+
try std.testing.expectEqualStrings("app.refresh", app_state.last_name);
|
|
113
|
+
try std.testing.expectEqual(CommandSource.shortcut, app_state.last_source);
|
|
114
|
+
try std.testing.expectEqual(@as(platform.WindowId, 1), app_state.last_window_id);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
test "runtime configures platform menus" {
|
|
118
|
+
const TestApp = struct {
|
|
119
|
+
fn app(self: *@This()) App {
|
|
120
|
+
return .{ .context = self, .name = "menus", .source = platform.WebViewSource.html("<h1>Menus</h1>") };
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const items = [_]platform.MenuItem{
|
|
125
|
+
.{ .label = "Refresh", .command = "app.refresh", .key = "r", .modifiers = .{ .primary = true } },
|
|
126
|
+
};
|
|
127
|
+
const menus = [_]platform.Menu{.{ .title = "View", .items = &items }};
|
|
128
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
129
|
+
defer harness.destroy(std.testing.allocator);
|
|
130
|
+
harness.runtime.options.menus = &menus;
|
|
131
|
+
var app_state: TestApp = .{};
|
|
132
|
+
try harness.runtime.run(app_state.app());
|
|
133
|
+
|
|
134
|
+
try std.testing.expectEqual(@as(usize, 1), harness.null_platform.configuredMenus().len);
|
|
135
|
+
try std.testing.expectEqualStrings("View", harness.null_platform.configuredMenus()[0].title);
|
|
136
|
+
try std.testing.expectEqualStrings("app.refresh", harness.null_platform.configuredMenus()[0].items[0].command);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
test "runtime rejects invalid platform menu shortcuts" {
|
|
140
|
+
const TestApp = struct {
|
|
141
|
+
fn app(self: *@This()) App {
|
|
142
|
+
return .{ .context = self, .name = "invalid-menus", .source = platform.WebViewSource.html("<h1>Menus</h1>") };
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
|
|
146
|
+
const items = [_]platform.MenuItem{
|
|
147
|
+
.{ .label = "Refresh", .command = "app.refresh", .key = "r" },
|
|
148
|
+
};
|
|
149
|
+
const menus = [_]platform.Menu{.{ .title = "View", .items = &items }};
|
|
150
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
151
|
+
defer harness.destroy(std.testing.allocator);
|
|
152
|
+
harness.runtime.options.menus = &menus;
|
|
153
|
+
var app_state: TestApp = .{};
|
|
154
|
+
|
|
155
|
+
try std.testing.expectError(error.InvalidShortcut, harness.runtime.run(app_state.app()));
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
test "runtime rejects invalid keyboard shortcuts" {
|
|
159
|
+
const TestApp = struct {
|
|
160
|
+
fn app(self: *@This()) App {
|
|
161
|
+
return .{ .context = self, .name = "invalid-shortcuts", .source = platform.WebViewSource.html("<h1>Shortcuts</h1>") };
|
|
162
|
+
}
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
const long_id = [_]u8{'x'} ** (platform.max_shortcut_id_bytes + 1);
|
|
166
|
+
const shortcuts = [_]platform.Shortcut{.{ .id = long_id[0..], .key = "p" }};
|
|
167
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
168
|
+
defer harness.destroy(std.testing.allocator);
|
|
169
|
+
harness.runtime.options.shortcuts = &shortcuts;
|
|
170
|
+
var app_state: TestApp = .{};
|
|
171
|
+
|
|
172
|
+
try std.testing.expectError(error.InvalidShortcut, harness.runtime.run(app_state.app()));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
test "runtime rejects invalid command catalog" {
|
|
176
|
+
const TestApp = struct {
|
|
177
|
+
fn app(self: *@This()) App {
|
|
178
|
+
return .{ .context = self, .name = "invalid-commands", .source = platform.WebViewSource.html("<h1>Commands</h1>") };
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
|
|
182
|
+
const commands = [_]Command{
|
|
183
|
+
.{ .id = "app.refresh", .title = "Refresh" },
|
|
184
|
+
.{ .id = "app.refresh", .title = "Duplicate Refresh" },
|
|
185
|
+
};
|
|
186
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
187
|
+
defer harness.destroy(std.testing.allocator);
|
|
188
|
+
harness.runtime.options.commands = &commands;
|
|
189
|
+
var app_state: TestApp = .{};
|
|
190
|
+
|
|
191
|
+
try std.testing.expectError(error.DuplicateCommand, harness.runtime.run(app_state.app()));
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
test "runtime rejects oversized webview source" {
|
|
195
|
+
const TestApp = struct {
|
|
196
|
+
bytes: [platform.max_window_source_bytes + 1]u8 = [_]u8{'x'} ** (platform.max_window_source_bytes + 1),
|
|
197
|
+
|
|
198
|
+
fn app(self: *@This()) App {
|
|
199
|
+
return .{ .context = self, .name = "oversized-source", .source = platform.WebViewSource.html(&self.bytes) };
|
|
200
|
+
}
|
|
201
|
+
};
|
|
202
|
+
|
|
203
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
204
|
+
defer harness.destroy(std.testing.allocator);
|
|
205
|
+
var app_state: TestApp = .{};
|
|
206
|
+
|
|
207
|
+
try std.testing.expectError(error.WindowSourceTooLarge, harness.start(app_state.app()));
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
test "runtime refreshes app source and keeps reload fields owned" {
|
|
211
|
+
const TestApp = struct {
|
|
212
|
+
root_path: [8]u8 = "dist-one".*,
|
|
213
|
+
entry: [10]u8 = "index.html".*,
|
|
214
|
+
origin: [13]u8 = "zero://assets".*,
|
|
215
|
+
|
|
216
|
+
fn source(context: *anyopaque) anyerror!platform.WebViewSource {
|
|
217
|
+
const self: *@This() = @ptrCast(@alignCast(context));
|
|
218
|
+
return platform.WebViewSource.assets(.{
|
|
219
|
+
.root_path = self.root_path[0..],
|
|
220
|
+
.entry = self.entry[0..],
|
|
221
|
+
.origin = self.origin[0..],
|
|
222
|
+
.spa_fallback = false,
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
fn app(self: *@This()) App {
|
|
227
|
+
return .{
|
|
228
|
+
.context = self,
|
|
229
|
+
.name = "asset-source",
|
|
230
|
+
.source_fn = source,
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
|
|
235
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
236
|
+
defer harness.destroy(std.testing.allocator);
|
|
237
|
+
var app_state: TestApp = .{};
|
|
238
|
+
try harness.start(app_state.app());
|
|
239
|
+
const secondary = try harness.runtime.createWindow(.{
|
|
240
|
+
.label = "external",
|
|
241
|
+
.title = "External",
|
|
242
|
+
.source = platform.WebViewSource.url("https://example.test"),
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
@memcpy(app_state.root_path[0..], "dist-two");
|
|
246
|
+
@memcpy(app_state.entry[0..], "other.html");
|
|
247
|
+
@memcpy(app_state.origin[0..], "zero://mutant");
|
|
248
|
+
try reloadWindows(&harness.runtime, app_state.app());
|
|
249
|
+
|
|
250
|
+
@memcpy(app_state.root_path[0..], "dist-bad");
|
|
251
|
+
@memcpy(app_state.entry[0..], "mutant.htm");
|
|
252
|
+
@memcpy(app_state.origin[0..], "zero://future");
|
|
253
|
+
|
|
254
|
+
const loaded = harness.null_platform.window_sources[0].?;
|
|
255
|
+
try std.testing.expectEqual(platform.WebViewSourceKind.assets, loaded.kind);
|
|
256
|
+
try std.testing.expectEqualStrings("zero://mutant", loaded.bytes);
|
|
257
|
+
const assets = loaded.asset_options.?;
|
|
258
|
+
try std.testing.expectEqualStrings("dist-two", assets.root_path);
|
|
259
|
+
try std.testing.expectEqualStrings("other.html", assets.entry);
|
|
260
|
+
try std.testing.expectEqualStrings("zero://mutant", assets.origin);
|
|
261
|
+
try std.testing.expect(!assets.spa_fallback);
|
|
262
|
+
|
|
263
|
+
const secondary_source = harness.null_platform.window_sources[@intCast(secondary.id - 1)].?;
|
|
264
|
+
try std.testing.expectEqual(platform.WebViewSourceKind.url, secondary_source.kind);
|
|
265
|
+
try std.testing.expectEqualStrings("https://example.test", secondary_source.bytes);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
test "extension registry receives runtime lifecycle and command hooks" {
|
|
269
|
+
const ModuleState = struct {
|
|
270
|
+
started: bool = false,
|
|
271
|
+
stopped: bool = false,
|
|
272
|
+
commands: u32 = 0,
|
|
273
|
+
|
|
274
|
+
fn start(context: *anyopaque, runtime_context: extensions.RuntimeContext) anyerror!void {
|
|
275
|
+
try std.testing.expectEqualStrings("null", runtime_context.platform_name);
|
|
276
|
+
const self: *@This() = @ptrCast(@alignCast(context));
|
|
277
|
+
self.started = true;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
fn stop(context: *anyopaque, runtime_context: extensions.RuntimeContext) anyerror!void {
|
|
281
|
+
_ = runtime_context;
|
|
282
|
+
const self: *@This() = @ptrCast(@alignCast(context));
|
|
283
|
+
self.stopped = true;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
fn command(context: *anyopaque, runtime_context: extensions.RuntimeContext, command_value: extensions.Command) anyerror!void {
|
|
287
|
+
_ = runtime_context;
|
|
288
|
+
const self: *@This() = @ptrCast(@alignCast(context));
|
|
289
|
+
if (std.mem.eql(u8, command_value.name, "native.ping")) self.commands += 1;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
var module_state: ModuleState = .{};
|
|
294
|
+
const modules = [_]extensions.Module{.{
|
|
295
|
+
.info = .{ .id = 1, .name = "native-test", .capabilities = &.{.{ .kind = .native_module }} },
|
|
296
|
+
.context = &module_state,
|
|
297
|
+
.hooks = .{ .start_fn = ModuleState.start, .stop_fn = ModuleState.stop, .command_fn = ModuleState.command },
|
|
298
|
+
}};
|
|
299
|
+
|
|
300
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
301
|
+
defer harness.destroy(std.testing.allocator);
|
|
302
|
+
harness.runtime.options.extensions = .{ .modules = &modules };
|
|
303
|
+
|
|
304
|
+
const app = App{ .context = &module_state, .name = "extensions", .source = platform.WebViewSource.html("<p>Extensions</p>") };
|
|
305
|
+
try harness.start(app);
|
|
306
|
+
try harness.runtime.dispatchEvent(app, .{ .command = .{ .name = "native.ping" } });
|
|
307
|
+
try harness.stop(app);
|
|
308
|
+
|
|
309
|
+
try std.testing.expect(module_state.started);
|
|
310
|
+
try std.testing.expect(module_state.stopped);
|
|
311
|
+
try std.testing.expectEqual(@as(u32, 1), module_state.commands);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
fn fixedTextMeasureForTests(context: ?*anyopaque, font_id: u64, size: f32, text: []const u8) f32 {
|
|
315
|
+
_ = context;
|
|
316
|
+
_ = font_id;
|
|
317
|
+
_ = size;
|
|
318
|
+
return @floatFromInt(text.len * 7);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
test "runtime exposes no text measure provider on the null platform" {
|
|
322
|
+
const harness = try TestHarness().create(std.testing.allocator, .{});
|
|
323
|
+
defer harness.destroy(std.testing.allocator);
|
|
324
|
+
|
|
325
|
+
try std.testing.expect(harness.runtime.textMeasureProvider() == null);
|
|
326
|
+
const tokens = harness.runtime.tokensWithTextMeasure(.{});
|
|
327
|
+
try std.testing.expect(tokens.text_measure == null);
|
|
328
|
+
try std.testing.expect(std.meta.eql(canvas.DesignTokens{}, tokens));
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
test "runtime wraps a platform text measure service into a canvas provider" {
|
|
332
|
+
var null_platform = platform.NullPlatform.init(.{});
|
|
333
|
+
var measured_platform = null_platform.platform();
|
|
334
|
+
measured_platform.services.measure_text_fn = fixedTextMeasureForTests;
|
|
335
|
+
|
|
336
|
+
const runtime = try std.testing.allocator.create(Runtime);
|
|
337
|
+
defer std.testing.allocator.destroy(runtime);
|
|
338
|
+
Runtime.initAt(runtime, .{ .platform = measured_platform });
|
|
339
|
+
|
|
340
|
+
const provider = runtime.textMeasureProvider() orelse return error.MissingProvider;
|
|
341
|
+
try std.testing.expectEqual(@as(f32, 35), provider.measureWidth(1, 12, "hello"));
|
|
342
|
+
|
|
343
|
+
const tokens = runtime.tokensWithTextMeasure(.{});
|
|
344
|
+
try std.testing.expect(tokens.text_measure != null);
|
|
345
|
+
try std.testing.expectEqual(
|
|
346
|
+
@as(f32, 21),
|
|
347
|
+
canvas.measureTextWidthForFont(tokens.text_measure, tokens.typography.font_id, "abc", 12),
|
|
348
|
+
);
|
|
349
|
+
// Stable identity: stamping twice compares equal so token equality
|
|
350
|
+
// checks in the reconcile path stay quiescent frame to frame.
|
|
351
|
+
try std.testing.expect(std.meta.eql(tokens, runtime.tokensWithTextMeasure(.{})));
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
fn countedBatchedMeasureForTests(context: ?*anyopaque, font_id: u64, size: f32, text: []const u8, advances: []f32) bool {
|
|
355
|
+
_ = context;
|
|
356
|
+
_ = font_id;
|
|
357
|
+
_ = size;
|
|
358
|
+
// Flat 7px per byte, matching fixedTextMeasureForTests so batched
|
|
359
|
+
// sums and per-prefix widths agree exactly.
|
|
360
|
+
for (advances[0..text.len]) |*advance| advance.* = 7;
|
|
361
|
+
return true;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
test "runtime threads the batched measure service into the canvas provider" {
|
|
365
|
+
var null_platform = platform.NullPlatform.init(.{});
|
|
366
|
+
var measured_platform = null_platform.platform();
|
|
367
|
+
measured_platform.services.measure_text_fn = fixedTextMeasureForTests;
|
|
368
|
+
measured_platform.services.measure_text_advances_fn = countedBatchedMeasureForTests;
|
|
369
|
+
|
|
370
|
+
const runtime = try std.testing.allocator.create(Runtime);
|
|
371
|
+
defer std.testing.allocator.destroy(runtime);
|
|
372
|
+
Runtime.initAt(runtime, .{ .platform = measured_platform });
|
|
373
|
+
|
|
374
|
+
const provider = runtime.textMeasureProvider() orelse return error.MissingProvider;
|
|
375
|
+
try std.testing.expect(provider.measure_advances_fn != null);
|
|
376
|
+
var advances: [5]f32 = undefined;
|
|
377
|
+
try std.testing.expect(provider.measureAdvances(1, 12, "hello", &advances));
|
|
378
|
+
for (advances) |advance| try std.testing.expectEqual(@as(f32, 7), advance);
|
|
379
|
+
// The batched sum agrees with the unbatched width for this provider.
|
|
380
|
+
try std.testing.expectEqual(@as(f32, 35), provider.measureWidth(1, 12, "hello"));
|
|
381
|
+
}
|
|
382
|
+
|
|
383
|
+
test "runtime construction bumps the text measure generation" {
|
|
384
|
+
var null_platform = platform.NullPlatform.init(.{});
|
|
385
|
+
const before = canvas.textMeasureGeneration();
|
|
386
|
+
const runtime = try std.testing.allocator.create(Runtime);
|
|
387
|
+
defer std.testing.allocator.destroy(runtime);
|
|
388
|
+
Runtime.initAt(runtime, .{ .platform = null_platform.platform() });
|
|
389
|
+
// A recycled provider context address from a destroyed runtime must
|
|
390
|
+
// never serve a fresh runtime stale advances or wrap results.
|
|
391
|
+
try std.testing.expect(canvas.textMeasureGeneration() > before);
|
|
392
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
const std = @import("std");
|
|
2
|
+
const core = @import("core.zig");
|
|
3
|
+
|
|
4
|
+
pub const launch_timing = @import("launch_timing.zig");
|
|
5
|
+
|
|
6
|
+
pub const max_canvas_commands_per_view = core.max_canvas_commands_per_view;
|
|
7
|
+
pub const max_canvas_gradient_stops_per_view = core.max_canvas_gradient_stops_per_view;
|
|
8
|
+
pub const max_canvas_path_elements_per_view = core.max_canvas_path_elements_per_view;
|
|
9
|
+
pub const max_canvas_glyphs_per_view = core.max_canvas_glyphs_per_view;
|
|
10
|
+
pub const max_canvas_text_bytes_per_view = core.max_canvas_text_bytes_per_view;
|
|
11
|
+
pub const max_canvas_widget_nodes_per_view = core.max_canvas_widget_nodes_per_view;
|
|
12
|
+
pub const max_canvas_widget_semantics_per_view = core.max_canvas_widget_semantics_per_view;
|
|
13
|
+
pub const max_canvas_widget_text_bytes_per_view = core.max_canvas_widget_text_bytes_per_view;
|
|
14
|
+
|
|
15
|
+
pub const LifecycleEvent = core.LifecycleEvent;
|
|
16
|
+
pub const CommandEvent = core.CommandEvent;
|
|
17
|
+
pub const Command = core.Command;
|
|
18
|
+
pub const CommandSource = core.CommandSource;
|
|
19
|
+
pub const ShortcutEvent = core.ShortcutEvent;
|
|
20
|
+
pub const Appearance = core.Appearance;
|
|
21
|
+
pub const GpuFrame = core.GpuFrame;
|
|
22
|
+
pub const GpuSurfaceFrameEvent = core.GpuSurfaceFrameEvent;
|
|
23
|
+
pub const GpuSurfaceResizeEvent = core.GpuSurfaceResizeEvent;
|
|
24
|
+
pub const GpuSurfaceInputEvent = core.GpuSurfaceInputEvent;
|
|
25
|
+
pub const CanvasWidgetPointerEvent = core.CanvasWidgetPointerEvent;
|
|
26
|
+
pub const CanvasWidgetKeyboardEvent = core.CanvasWidgetKeyboardEvent;
|
|
27
|
+
pub const CanvasWidgetScrollEvent = core.CanvasWidgetScrollEvent;
|
|
28
|
+
pub const CanvasWidgetDisplayListChrome = core.CanvasWidgetDisplayListChrome;
|
|
29
|
+
pub const CanvasPresentationMode = core.CanvasPresentationMode;
|
|
30
|
+
pub const CanvasPresentationResult = core.CanvasPresentationResult;
|
|
31
|
+
pub const CanvasWidgetAccessibilityActionKind = core.CanvasWidgetAccessibilityActionKind;
|
|
32
|
+
pub const CanvasWidgetAccessibilityAction = core.CanvasWidgetAccessibilityAction;
|
|
33
|
+
pub const CanvasWidgetFileDropEvent = core.CanvasWidgetFileDropEvent;
|
|
34
|
+
pub const CanvasWidgetDragEvent = core.CanvasWidgetDragEvent;
|
|
35
|
+
pub const CanvasWidgetDismissEvent = core.CanvasWidgetDismissEvent;
|
|
36
|
+
pub const CanvasWidgetContextPressEvent = core.CanvasWidgetContextPressEvent;
|
|
37
|
+
pub const InvalidationReason = core.InvalidationReason;
|
|
38
|
+
pub const FrameDiagnostics = core.FrameDiagnostics;
|
|
39
|
+
pub const Event = core.Event;
|
|
40
|
+
pub const App = core.App;
|
|
41
|
+
pub const Options = core.Options;
|
|
42
|
+
pub const Runtime = core.Runtime;
|
|
43
|
+
pub const TestHarness = core.TestHarness;
|
|
44
|
+
pub const DispatchError = core.DispatchError;
|
|
45
|
+
pub const max_dispatch_errors = core.max_dispatch_errors;
|
|
46
|
+
pub const UiApp = @import("ui_app.zig").UiApp;
|
|
47
|
+
pub const UiAppWithFeatures = @import("ui_app.zig").UiAppWithFeatures;
|
|
48
|
+
pub const UiAppFeatures = @import("ui_app.zig").UiAppFeatures;
|
|
49
|
+
|
|
50
|
+
const runtime_frame_profile = @import("frame_profile.zig");
|
|
51
|
+
pub const FrameProfile = runtime_frame_profile.FrameProfile;
|
|
52
|
+
pub const FrameProfileStage = runtime_frame_profile.FrameProfileStage;
|
|
53
|
+
pub const FrameProfileStageStats = runtime_frame_profile.FrameProfileStageStats;
|
|
54
|
+
pub const max_frame_profile_samples = runtime_frame_profile.max_frame_profile_samples;
|
|
55
|
+
|
|
56
|
+
const runtime_effects = @import("effects.zig");
|
|
57
|
+
pub const Effects = runtime_effects.Effects;
|
|
58
|
+
pub const EffectLine = runtime_effects.EffectLine;
|
|
59
|
+
pub const EffectExit = runtime_effects.EffectExit;
|
|
60
|
+
pub const EffectExitReason = runtime_effects.EffectExitReason;
|
|
61
|
+
pub const EffectExecutor = runtime_effects.EffectExecutor;
|
|
62
|
+
pub const EffectOutputMode = runtime_effects.EffectOutputMode;
|
|
63
|
+
pub const effect_error_exit_code = runtime_effects.effect_error_exit_code;
|
|
64
|
+
pub const max_effects = runtime_effects.max_effects;
|
|
65
|
+
pub const max_effect_argv = runtime_effects.max_effect_argv;
|
|
66
|
+
pub const max_effect_argv_bytes = runtime_effects.max_effect_argv_bytes;
|
|
67
|
+
pub const max_effect_stdin_bytes = runtime_effects.max_effect_stdin_bytes;
|
|
68
|
+
pub const max_effect_line_bytes = runtime_effects.max_effect_line_bytes;
|
|
69
|
+
pub const max_effect_line_bytes_ceiling = runtime_effects.max_effect_line_bytes_ceiling;
|
|
70
|
+
pub const FetchResponseMode = runtime_effects.FetchResponseMode;
|
|
71
|
+
pub const max_effect_collect_bytes = runtime_effects.max_effect_collect_bytes;
|
|
72
|
+
pub const max_effect_stderr_tail_bytes = runtime_effects.max_effect_stderr_tail_bytes;
|
|
73
|
+
pub const max_effect_queue_entries = runtime_effects.max_effect_queue_entries;
|
|
74
|
+
pub const EffectResponse = runtime_effects.EffectResponse;
|
|
75
|
+
pub const EffectFetchOutcome = runtime_effects.EffectFetchOutcome;
|
|
76
|
+
pub const max_effect_url_bytes = runtime_effects.max_effect_url_bytes;
|
|
77
|
+
pub const max_effect_fetch_headers = runtime_effects.max_effect_fetch_headers;
|
|
78
|
+
pub const max_effect_fetch_header_bytes = runtime_effects.max_effect_fetch_header_bytes;
|
|
79
|
+
pub const max_effect_fetch_payload_bytes = runtime_effects.max_effect_fetch_payload_bytes;
|
|
80
|
+
pub const max_effect_body_bytes = runtime_effects.max_effect_body_bytes;
|
|
81
|
+
pub const default_effect_fetch_timeout_ms = runtime_effects.default_effect_fetch_timeout_ms;
|
|
82
|
+
pub const EffectFileOp = runtime_effects.EffectFileOp;
|
|
83
|
+
pub const EffectFileOutcome = runtime_effects.EffectFileOutcome;
|
|
84
|
+
pub const EffectFileResult = runtime_effects.EffectFileResult;
|
|
85
|
+
pub const max_effect_file_path_bytes = runtime_effects.max_effect_file_path_bytes;
|
|
86
|
+
pub const max_effect_file_bytes = runtime_effects.max_effect_file_bytes;
|
|
87
|
+
pub const EffectClipboardOp = runtime_effects.EffectClipboardOp;
|
|
88
|
+
pub const EffectClipboardOutcome = runtime_effects.EffectClipboardOutcome;
|
|
89
|
+
pub const EffectClipboardResult = runtime_effects.EffectClipboardResult;
|
|
90
|
+
pub const max_effect_clipboard_bytes = runtime_effects.max_effect_clipboard_bytes;
|
|
91
|
+
pub const TimerMode = runtime_effects.TimerMode;
|
|
92
|
+
pub const EffectTimer = runtime_effects.EffectTimer;
|
|
93
|
+
pub const EffectTimerOutcome = runtime_effects.EffectTimerOutcome;
|
|
94
|
+
pub const max_effect_timers = runtime_effects.max_effect_timers;
|
|
95
|
+
pub const effect_timer_platform_id_base = runtime_effects.effect_timer_platform_id_base;
|
|
96
|
+
pub const EffectAudio = runtime_effects.EffectAudio;
|
|
97
|
+
pub const EffectAudioEventKind = runtime_effects.EffectAudioEventKind;
|
|
98
|
+
pub const EffectAudioSource = runtime_effects.EffectAudioSource;
|
|
99
|
+
pub const audioCachePath = runtime_effects.audioCachePath;
|
|
100
|
+
pub const max_effect_audio_path_bytes = runtime_effects.max_effect_audio_path_bytes;
|
|
101
|
+
|
|
102
|
+
const runtime_session_journal = @import("session_journal.zig");
|
|
103
|
+
const runtime_session_record = @import("session_record.zig");
|
|
104
|
+
const runtime_session_replay = @import("session_replay.zig");
|
|
105
|
+
pub const session_journal = runtime_session_journal;
|
|
106
|
+
pub const SessionRecorder = runtime_session_record.SessionRecorder;
|
|
107
|
+
pub const SessionRecorderSink = runtime_session_record.RecorderSink;
|
|
108
|
+
pub const SessionHeader = runtime_session_journal.Header;
|
|
109
|
+
pub const sessionHeaderNow = runtime_session_record.headerNow;
|
|
110
|
+
pub const sessionPlatformName = runtime_session_replay.currentPlatformName;
|
|
111
|
+
pub const replaySession = runtime_session_replay.replaySession;
|
|
112
|
+
pub const ReplayOptions = runtime_session_replay.ReplayOptions;
|
|
113
|
+
pub const ReplayReport = runtime_session_replay.ReplayReport;
|
|
114
|
+
pub const ReplayMismatch = runtime_session_replay.ReplayMismatch;
|
|
115
|
+
pub const ReplayControl = core.ReplayControl;
|
|
116
|
+
pub const EffectResultRecord = runtime_effects.EffectResultRecord;
|
|
117
|
+
pub const EffectResultKind = runtime_effects.EffectResultKind;
|
|
118
|
+
pub const EffectJournal = runtime_effects.EffectJournal;
|
|
119
|
+
pub const max_session_journal_bytes = runtime_session_journal.max_session_journal_bytes;
|
|
120
|
+
pub const max_session_record_bytes = runtime_session_journal.max_session_record_bytes;
|
|
121
|
+
pub const max_session_event_bytes = runtime_session_journal.max_session_event_bytes;
|
|
122
|
+
|
|
123
|
+
const runtime_clock = @import("clock.zig");
|
|
124
|
+
pub const Clock = runtime_clock.Clock;
|
|
125
|
+
pub const TestClock = runtime_clock.TestClock;
|
|
126
|
+
pub const nowMs = runtime_clock.nowMs;
|
|
127
|
+
pub const nowNanoseconds = runtime_clock.nowNanoseconds;
|
|
128
|
+
pub const monotonicMs = runtime_clock.monotonicMs;
|
|
129
|
+
pub const monotonicNanoseconds = runtime_clock.monotonicNanoseconds;
|
|
130
|
+
pub const setFreestandingMonotonicNanoseconds = runtime_clock.setFreestandingMonotonicNanoseconds;
|
|
131
|
+
pub const ImageRegistryBinding = runtime_effects.ImageRegistryBinding;
|
|
132
|
+
pub const RegisteredImage = runtime_effects.RegisteredImage;
|
|
133
|
+
|
|
134
|
+
const runtime_canvas_images = @import("canvas_images.zig");
|
|
135
|
+
pub const RegisteredCanvasImage = runtime_canvas_images.RegisteredCanvasImage;
|
|
136
|
+
pub const max_registered_canvas_images = runtime_canvas_images.max_registered_canvas_images;
|
|
137
|
+
pub const max_registered_canvas_image_pixel_bytes = runtime_canvas_images.max_registered_canvas_image_pixel_bytes;
|
|
138
|
+
|
|
139
|
+
const runtime_canvas_fonts = @import("canvas_fonts.zig");
|
|
140
|
+
pub const max_registered_canvas_fonts = runtime_canvas_fonts.max_registered_canvas_fonts;
|
|
141
|
+
pub const max_registered_canvas_font_bytes = runtime_canvas_fonts.max_registered_canvas_font_bytes;
|
|
142
|
+
pub const testing = core.testing;
|
|
143
|
+
pub const canvasSurfacePixelSize = core.canvasSurfacePixelSize;
|
|
144
|
+
pub const canvasFramePixelSize = core.canvasFramePixelSize;
|
|
145
|
+
pub const CanvasPixelSize = core.CanvasPixelSize;
|
|
146
|
+
|
|
147
|
+
test {
|
|
148
|
+
std.testing.refAllDecls(@This());
|
|
149
|
+
_ = @import("tests.zig");
|
|
150
|
+
}
|