Skip to content

Sync with core 8535b032c (add screen capture bindings, Swift support, and Flutter example) - #75

Open
lijy91 wants to merge 3 commits into
mainfrom
feat/screen-capture
Open

lijy91 wants to merge 3 commits into
mainfrom
feat/screen-capture

Conversation

@lijy91

@lijy91 lijy91 commented Dec 1, 2026

Copy link
Copy Markdown
Member

Fresh PR based cleanly on main (supersedes #19).

Depends on libnativeapi/nativeapi-core#112 (core commit 8535b032c). Merge core first; refresh the core gitlink if core is squash-merged.

Summary

  • Expose CaptureSource, ScreenCapturer, and ScreenRecorder across all 7 language bindings (Dart, Rust, C#, JS/TS, Python, Go, and Swift) plus the website API reference (website/content/api/).
  • Add static-only class codegen support (Class::is_static()) across C ABI and all bindings, including idiomatic caseless public enum ScreenCapturer in Swift.
  • Update native link settings in bindings/dart/cnativeapi/hook/build.dart, bindings/rust/cnativeapi/build.rs, and bindings/swift/Package.swift (weak-linking ScreenCaptureKit on macOS; adding WGC / D3D11 / Media Foundation libraries on Windows).
  • Add specs/screen-capture.md and examples/flutter_screen_capture_example.

Verification (macOS)

  • ./codegen check: passed (85 C ABI files, 426 binding/reference files, 0 new skipped APIs)
  • cargo test --manifest-path tools/codegen/Cargo.toml: 32 passed
  • Core: cmake --build + ctest -R screen_capture_test passed
  • Dart / Flutter: dart analyze (nativeapi) + flutter analyze (flutter_screen_capture_example) passed
  • Rust: cargo test -p nativeapi --test screen_capture passed
  • Swift: swift build + swift test (6 passed)
  • C#: dotnet build NativeAPI.slnx (0 warnings, 0 errors)
  • JS/TS: npx tsc -p tsconfig.json --noEmit passed
  • Go: cmake --build bindings/go/build + go test -run "Screen|Capture|Record" passed
  • Python: cmake --build bindings/python/build + pytest tests/test_screen_capture.py (2 passed)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant