Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions runtime/bindings-generator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,15 @@ static IEnumerable<FunctionData> GetFunctionData ()
}
);

data.Add (
new FunctionData {
Comment = " // NVector3d func ()",
Prefix = "simd__",
Variants = Variants.All,
ReturnType = Types.NVector3d,
}
);

data.Add (
new FunctionData {
Comment = " // void func (NVector3)",
Expand Down
75 changes: 75 additions & 0 deletions src/nearbyinteraction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using ObjCRuntime;
using Foundation;
using CoreFoundation;
using CoreGraphics;
using System;
using System.Numerics;
#if __MACCATALYST__ || !IOS
Expand Down Expand Up @@ -173,6 +174,10 @@ interface NISessionDelegate {
[NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)]
[Export ("sessionDidStartRunning:")]
void DidSessionStartRunning (NISession session);

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[Export ("session:didUpdateDLTDOAMeasurements:")]
void DidUpdateDlTdoaMeasurements (NISession session, NIDlTdoaMeasurement [] measurements);
}

[NoTV, NoMac, iOS (15, 0), MacCatalyst (15, 0)]
Expand Down Expand Up @@ -230,6 +235,11 @@ interface NIDeviceCapability {
[Abstract (GenerateExtensionMethod = true)]
[Export ("supportsExtendedDistanceMeasurement")]
bool SupportsExtendedDistanceMeasurement { get; }

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[Abstract]
[Export ("supportsDLTDOAMeasurement")]
bool SupportsDlTdoaMeasurement { get; }
}

[NoTV, NoMac, iOS (16, 0), MacCatalyst (16, 0)]
Expand All @@ -242,4 +252,69 @@ interface NIAlgorithmConvergence : NSCopying, NSSecureCoding {
[Export ("reasons")]
string [] Reasons { get; }
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[BaseType (typeof (NIConfiguration), Name = "NIDLTDOAConfiguration")]
[DisableDefaultCtor]
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
interface NIDlTdoaConfiguration {
[Export ("networkIdentifier")]
nint NetworkIdentifier { get; set; }

[Export ("initWithNetworkIdentifier:")]
NativeHandle Constructor (nint networkIdentifier);
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[Native]
[NativeName ("NIDLTDOACoordinatesType")]
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
public enum NIDlTdoaCoordinatesType : long {
Geodetic = 0,
Relative = 1,
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[Native]
[NativeName ("NIDLTDOAMeasurementType")]
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
public enum NIDlTdoaMeasurementType : long {
Poll = 0,
Response = 1,
Final = 2,
}

[NoTV, NoMacCatalyst, NoMac, iOS (26, 0)]
[BaseType (typeof (NSObject), Name = "NIDLTDOAMeasurement")]
[DisableDefaultCtor]
// DLTDOA = Down Link Time Difference of Arrival(DL-TDoA)
interface NIDlTdoaMeasurement : NSCopying, NSSecureCoding {
[Export ("address")]
nuint Address { get; }

[Export ("measurementType", ArgumentSemantic.Assign)]
NIDlTdoaMeasurementType MeasurementType { get; }

[Export ("transmitTime")]
double TransmitTime { get; }

[Export ("receiveTime")]
double ReceiveTime { get; }

[Export ("signalStrength")]
double SignalStrength { get; }

[Export ("carrierFrequencyOffset")]
double CarrierFrequencyOffset { get; }

[Export ("coordinatesType", ArgumentSemantic.Assign)]
NIDlTdoaCoordinatesType CoordinatesType { get; }

[Export ("coordinates", ArgumentSemantic.Assign)]
NVector3d Coordinates {
[MarshalDirective (NativePrefix = "xamarin_simd__", Library = "__Internal")]
get;
}
}

}
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# This selector requires ARKit, which doesn't work on Mac Catalyst
!missing-selector! NISession::setARSession: not bound
# Headers are clear that these two enums are not supported on Mac Catalyst, don't know why xtro thinks they are
!missing-enum! NIDLTDOACoordinatesType not bound
!missing-enum! NIDLTDOAMeasurementType not bound

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Headers are clear that these two enums are not supported on macOS, don't know why xtro thinks they are
!missing-enum! NIDLTDOACoordinatesType not bound
!missing-enum! NIDLTDOAMeasurementType not bound

This file was deleted.

1 change: 1 addition & 0 deletions tests/xtro-sharpie/xtro-sharpie/SimdCheck.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class NativeSimdInfo {
{ "vector_uint4", new NativeSimdInfo { Managed = "Vector4i", }},
// simd_doubleX is typedefed to vector_doubleX
{ "simd_double2", new NativeSimdInfo { Managed = "Vector2d" }},
{ "simd_double3", new NativeSimdInfo { Managed = "NVector3d" }},
// simd_floatX is typedefed to vector_floatX
{ "simd_float2", new NativeSimdInfo { Managed = "Vector2" }},
{ "simd_float3", new NativeSimdInfo { Managed = "Vector3" }},
Expand Down
Loading