-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update ProjectionTransform * Update protobuf implementation and test case * Update folder structure * Update EdgeInsets * Add ScrollGeometry implementation * Update ViewTransform implementation * Update ViewTransform.UnsafeBuffer * Update ViewTransform.append method * Update ViewTransfrom.apply method * Add ViewTransform convert API * Fix linux platform build issue
- Loading branch information
Showing
34 changed files
with
2,555 additions
and
368 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
// | ||
// EdgeInsets.swift | ||
// OpenSwiftUI | ||
// | ||
// Audited for iOS 18.0 | ||
// Status: Complete | ||
|
||
#if canImport(Darwin) | ||
// MARK: - EdgeInsets + Conversion | ||
|
||
#if canImport(UIKit) | ||
public import UIKit | ||
#elseif canImport(AppKit) | ||
public import AppKit | ||
#endif | ||
|
||
extension EdgeInsets { | ||
/// Create edge insets from the equivalent NSDirectionalEdgeInsets. | ||
@available(watchOS, unavailable) | ||
public init(_ nsEdgeInsets: NSDirectionalEdgeInsets) { | ||
self.init( | ||
top: nsEdgeInsets.top, | ||
leading: nsEdgeInsets.leading, | ||
bottom: nsEdgeInsets.bottom, | ||
trailing: nsEdgeInsets.trailing | ||
) | ||
} | ||
} | ||
|
||
extension NSDirectionalEdgeInsets { | ||
/// Create edge insets from the equivalent EdgeInsets. | ||
@available(watchOS, unavailable) | ||
public init(_ edgeInsets: EdgeInsets) { | ||
self.init( | ||
top: edgeInsets.top, | ||
leading: edgeInsets.leading, | ||
bottom: edgeInsets.bottom, | ||
trailing: edgeInsets.trailing | ||
) | ||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.