-
Notifications
You must be signed in to change notification settings - Fork 559
[CarPlay] Update bindings to Xcode 26.4 Release Candidate #24961
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
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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,24 @@ | ||
| #nullable enable | ||
|
|
||
| using System.Runtime.InteropServices; | ||
| using System.Runtime.Versioning; | ||
|
|
||
| namespace CarPlay { | ||
|
|
||
| [SupportedOSPlatform ("ios26.4")] | ||
| [SupportedOSPlatform ("maccatalyst26.4")] | ||
| [UnsupportedOSPlatform ("tvos")] | ||
| [UnsupportedOSPlatform ("macos")] | ||
| [StructLayout (LayoutKind.Sequential)] | ||
| public struct CPLocationCoordinate3D { | ||
| double latitude; | ||
| double longitude; | ||
| double altitude; | ||
|
|
||
| #if !COREBUILD | ||
| public double Latitude { get => latitude; set => latitude = value; } | ||
| public double Longitude { get => longitude; set => longitude = value; } | ||
| public double Altitude { get => altitude; set => altitude = value; } | ||
| #endif | ||
| } | ||
| } |
This file contains hidden or 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,54 @@ | ||
| #nullable enable | ||
|
|
||
| using System; | ||
| using Foundation; | ||
| using MapKit; | ||
|
|
||
| namespace CarPlay { | ||
|
|
||
| public partial class CPNavigationWaypoint { | ||
|
|
||
| public static unsafe CPNavigationWaypoint Create (CPLocationCoordinate3D centerPoint, NSMeasurement<NSUnitLength>? locationThreshold, string? name, string? address, CPLocationCoordinate3D []? entryPoints, NSTimeZone? timeZone) | ||
| { | ||
| if (entryPoints is null || entryPoints.Length == 0) { | ||
| var obj = new CPNavigationWaypoint (NSObjectFlag.Empty); | ||
| obj.InitializeHandle (obj._InitWithCenterPoint (centerPoint, locationThreshold, name, address, IntPtr.Zero, 0, timeZone)); | ||
| return obj; | ||
| } | ||
|
|
||
| fixed (CPLocationCoordinate3D* first = entryPoints) { | ||
| var obj = new CPNavigationWaypoint (NSObjectFlag.Empty); | ||
| obj.InitializeHandle (obj._InitWithCenterPoint (centerPoint, locationThreshold, name, address, (IntPtr) first, (nuint) entryPoints.Length, timeZone)); | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return obj; | ||
| } | ||
| } | ||
|
|
||
| public static unsafe CPNavigationWaypoint Create (MKMapItem mapItem, NSMeasurement<NSUnitLength>? locationThreshold, CPLocationCoordinate3D []? entryPoints) | ||
| { | ||
| if (entryPoints is null || entryPoints.Length == 0) { | ||
| var obj = new CPNavigationWaypoint (NSObjectFlag.Empty); | ||
| obj.InitializeHandle (obj._InitWithMapItem (mapItem, locationThreshold, IntPtr.Zero, 0)); | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return obj; | ||
| } | ||
|
|
||
| fixed (CPLocationCoordinate3D* first = entryPoints) { | ||
| var obj = new CPNavigationWaypoint (NSObjectFlag.Empty); | ||
| obj.InitializeHandle (obj._InitWithMapItem (mapItem, locationThreshold, (IntPtr) first, (nuint) entryPoints.Length)); | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| return obj; | ||
| } | ||
| } | ||
|
|
||
| public unsafe CPLocationCoordinate3D [] EntryPoints { | ||
| get { | ||
| nuint n = EntryPointsCount; | ||
| if (n == 0) | ||
| return []; | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| var source = (CPLocationCoordinate3D*) _EntryPoints; | ||
rolfbjarne marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| var result = new CPLocationCoordinate3D [(int) n]; | ||
| for (int i = 0; i < (int) n; i++) | ||
| result [i] = source [i]; | ||
| return result; | ||
| } | ||
| } | ||
| } | ||
| } | ||
This file contains hidden or 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,34 @@ | ||
| #nullable enable | ||
|
|
||
| using System; | ||
|
|
||
| namespace CarPlay { | ||
|
|
||
| public partial class CPRouteSegment { | ||
|
|
||
| public static unsafe CPRouteSegment Create (CPNavigationWaypoint origin, CPNavigationWaypoint destination, CPManeuver [] maneuvers, CPLaneGuidance [] laneGuidances, CPManeuver [] currentManeuvers, CPLaneGuidance currentLaneGuidance, CPTravelEstimates tripTravelEstimates, CPTravelEstimates maneuverTravelEstimates, CPLocationCoordinate3D [] coordinates) | ||
| { | ||
| if (coordinates is null) | ||
| ObjCRuntime.ThrowHelper.ThrowArgumentNullException (nameof (coordinates)); | ||
| if (coordinates.Length == 0) | ||
| return new CPRouteSegment (origin, destination, maneuvers, laneGuidances, currentManeuvers, currentLaneGuidance, tripTravelEstimates, maneuverTravelEstimates, IntPtr.Zero, 0); | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| fixed (CPLocationCoordinate3D* first = coordinates) { | ||
| return new CPRouteSegment (origin, destination, maneuvers, laneGuidances, currentManeuvers, currentLaneGuidance, tripTravelEstimates, maneuverTravelEstimates, (IntPtr) first, (nint) coordinates.Length); | ||
| } | ||
| } | ||
|
|
||
| public unsafe CPLocationCoordinate3D [] Coordinates { | ||
| get { | ||
| nint n = CoordinatesCount; | ||
| if (n == 0) | ||
| return []; | ||
rolfbjarne marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| var source = (CPLocationCoordinate3D*) _Coordinates; | ||
rolfbjarne marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| var result = new CPLocationCoordinate3D [(int) n]; | ||
| for (int i = 0; i < (int) n; i++) | ||
| result [i] = source [i]; | ||
| return result; | ||
| } | ||
| } | ||
| } | ||
| } | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.