-
Notifications
You must be signed in to change notification settings - Fork 54
macOS Animation Support #497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Sources/OpenSwiftUI/Integration/Hosting/AppKit/View/NSHostingView.swift
Outdated
Show resolved
Hide resolved
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #497 +/- ##
==========================================
+ Coverage 24.67% 24.68% +0.01%
==========================================
Files 474 474
Lines 27463 27579 +116
==========================================
+ Hits 6776 6809 +33
- Misses 20687 20770 +83 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
6360bf4 to
1670cbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements macOS animation support by adding display link functionality for smooth frame-based animations. The implementation provides a foundation for SwiftUI-style animations on macOS through CoreVideo's display link system.
Key changes include:
- Addition of a comprehensive DisplayLink C implementation for managing display-synchronized rendering
- Enhanced NSHostingView with animation timing, async rendering, and update scheduling capabilities
- New Swift wrapper attributes for improved interoperability between Swift and C types
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 10 comments.
| File | Description |
|---|---|
| Sources/OpenSwiftUI_SPI/OpenSwiftUIBase.h | Adds Swift wrapper attribute macro for C struct bridging |
| Sources/OpenSwiftUI/Integration/Hosting/AppKit/View/NSHostingView.swift | Implements animation timing, display link integration, and async rendering logic |
| Sources/COpenSwiftUI/CoreVideo/DisplayLink.h | Defines C API for display link management with Swift name attributes |
| Sources/COpenSwiftUI/CoreVideo/DisplayLink.c | Implements complete display link system with thread-safe management and CoreVideo integration |
No description provided.