Skip to content

Commit

Permalink
Merge branch 'main' into darc-main-38ef8300-a7b5-4ebc-9dd4-75e9ac8721ed
Browse files Browse the repository at this point in the history
  • Loading branch information
dalexsoto committed Apr 11, 2021
2 parents 6b2203c + 605bc43 commit 04ceb7d
Show file tree
Hide file tree
Showing 74 changed files with 886 additions and 63 deletions.
2 changes: 2 additions & 0 deletions src/CoreAnimation/CALayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public virtual CAAutoresizingMask AutoresizinMask {
}
}
#endif
#if !NET
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
#endif
public CAContentsFormat ContentsFormat {
get { return CAContentsFormatExtensions.GetValue (_ContentsFormat); }
set { _ContentsFormat = value.GetConstant ()!; }
Expand Down
32 changes: 32 additions & 0 deletions src/CoreFoundation/Dispatch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -152,20 +152,24 @@ public void SetTargetQueue (DispatchQueue queue)
[DllImport (Constants.libcLibrary)]
internal extern static void dispatch_suspend (IntPtr o);

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
public void Activate ()
{
dispatch_activate (GetCheckedHandle ());
}

[DllImport (Constants.libcLibrary)]
#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
extern static void dispatch_activate (/* dispatch_object_t */ IntPtr @object);
#endif // !COREBUILD
}
Expand Down Expand Up @@ -204,10 +208,12 @@ public DispatchQueue (string label, bool concurrent)
throw new Exception ("Error creating dispatch queue");
}

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
public DispatchQueue (string label, Attributes attributes, DispatchQueue target = null)
: base (dispatch_queue_create_with_target (label, attributes?.Create () ?? IntPtr.Zero, target.GetHandle ()), true)
{
Expand All @@ -223,7 +229,9 @@ public string Label {
}
}

#if !NET
[iOS (7,0)]
#endif
public static string CurrentQueueLabel {
get {
return Marshal.PtrToStringAnsi (dispatch_queue_get_label (IntPtr.Zero));
Expand Down Expand Up @@ -467,8 +475,10 @@ public object GetSpecific (IntPtr key)
return gchandle.Target;
}

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
public DispatchQualityOfService GetQualityOfService (out int relative_priority)
{
unsafe {
Expand All @@ -477,8 +487,10 @@ public DispatchQualityOfService GetQualityOfService (out int relative_priority)
}
}

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
public DispatchQualityOfService QualityOfService {
get {
unsafe {
Expand All @@ -493,10 +505,12 @@ public DispatchQualityOfService QualityOfService {
[DllImport (Constants.libcLibrary)]
extern static IntPtr dispatch_queue_create (string label, IntPtr attr);

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
[DllImport (Constants.libcLibrary)]
extern static IntPtr dispatch_queue_create_with_target (string label, IntPtr attr, IntPtr target);

Expand Down Expand Up @@ -549,8 +563,10 @@ public DispatchQualityOfService QualityOfService {
[DllImport(Constants.libcLibrary)]
extern static IntPtr dispatch_queue_get_specific (IntPtr queue, /* const void* */ IntPtr key);

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
[DllImport (Constants.libcLibrary)]
unsafe extern static /* dispatch_qos_class_t */ DispatchQualityOfService dispatch_queue_get_qos_class (/* dispatch_queue_t */ IntPtr queue, /* int *_Nullable */ int* relative_priority);

Expand Down Expand Up @@ -599,24 +615,32 @@ public class Attributes
{
public bool Concurrent { get; set; }

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
public bool IsInitiallyInactive { get; set; }

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
public AutoreleaseFrequency? AutoreleaseFrequency { get; set; }

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
public int RelativePriority { get; set; }

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
public DispatchQualityOfService? QualityOfService { get; set; }

internal IntPtr Create ()
Expand All @@ -638,30 +662,38 @@ internal IntPtr Create ()
return rv;
}

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
[DllImport (Constants.libcLibrary)]
static extern /* dispatch_queue_attr_t */ IntPtr dispatch_queue_attr_make_initially_inactive (/* dispatch_queue_attr_t _Nullable */ IntPtr attr);

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
[DllImport (Constants.libcLibrary)]
static extern /* dispatch_queue_attr_t */ IntPtr dispatch_queue_attr_make_with_autorelease_frequency (/* dispatch_queue_attr_t _Nullable */ IntPtr attr, /* dispatch_autorelease_frequency_t */ nuint frequency);

#if !NET
[Mac (10,10)]
[iOS (8,0)]
#endif
[DllImport (Constants.libcLibrary)]
static extern /* dispatch_queue_attr_t */ IntPtr dispatch_queue_attr_make_with_qos_class (/* dispatch_queue_attr_t _Nullable */ IntPtr attr, /* dispatch_qos_class_t */ DispatchQualityOfService qos_class, int relative_priority);
}

#if !NET
[Mac (10,12)]
[iOS (10,0)]
[TV (10,0)]
[Watch (3,0)]
#endif
[Native]
public enum AutoreleaseFrequency : ulong /* unsigned long */
{
Expand Down
3 changes: 3 additions & 0 deletions src/CoreFoundation/OSLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,11 @@
using System.Collections.Generic;

namespace CoreFoundation {

#if !NET
[Mac (10,12), iOS (10,0), Watch (3,0), TV (10,0)]
[Introduced (PlatformName.MacCatalyst, 13, 0)]
#endif
public sealed class OSLog : NativeObject {

static OSLog _default;
Expand Down
4 changes: 4 additions & 0 deletions src/CoreGraphics/CGColorConversionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@

namespace CoreGraphics {

#if !NET
[iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)]
#endif
[StructLayout (LayoutKind.Sequential)]
public struct GColorConversionInfoTriple {
public CGColorSpace Space;
Expand All @@ -25,7 +27,9 @@ public struct GColorConversionInfoTriple {
}

// CGColorConverter.h
#if !NET
[iOS (10,0)][TV (10,0)][Watch (3,0)][Mac (10,12)]
#endif
public partial class CGColorConversionInfo : INativeObject, IDisposable {

/* invoked by marshallers */
Expand Down
16 changes: 12 additions & 4 deletions src/CoreGraphics/CGColorConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@

namespace CoreGraphics {

[TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")]
[iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")]
#if !NET
[TV (9,2)]
[iOS (9,3)]
#endif
[Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")]
[Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'GColorConversionInfoTriple'.")]
[StructLayout (LayoutKind.Sequential)]
public struct CGColorConverterTriple {
public CGColorSpace Space;
Expand All @@ -30,8 +34,12 @@ public struct CGColorConverterTriple {
}

// CGColorConverter.h
[TV (9,2)][Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")]
[iOS (9,3)][Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")]
#if !NET
[TV (9,2)]
[iOS (9,3)]
#endif
[Obsoleted (PlatformName.TvOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")]
[Obsoleted (PlatformName.iOS, 10,0, message: "Replaced by 'CGColorConversionInfo'.")]
public class CGColorConverter : INativeObject, IDisposable
{
/* invoked by marshallers */
Expand Down
Loading

4 comments on commit 04ceb7d

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Tests failed on Build ❌

Tests failed on Build.

API diff

✅ API Diff from stable

View API diff

Packages generated

View packages

Test results

15 tests failed, 166 tests passed.

Failed tests

  • interdependent-binding-projects/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • introspection/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • introspection/iOS Unified 64-bits - simulator/Debug (iOS 11.4) [dotnet]: Failed
  • introspection/watchOS 32-bits - simulator/Debug (watchOS 5.0): LaunchFailure
  • monotouch-test/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (LinkSdk) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (static registrar) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Release (all optimizations) [dotnet]: Failed
  • monotouch-test/iOS Unified 64-bits - simulator/Debug (all optimizations) [dotnet]: Failed
  • dont link/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • dont link/iOS Unified 64-bits - simulator/Release [dotnet]: Failed
  • link all/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • link all/iOS Unified 64-bits - simulator/Release [dotnet]: Failed
  • link sdk/iOS Unified 64-bits - simulator/Debug [dotnet]: Failed
  • link sdk/iOS Unified 64-bits - simulator/Release [dotnet]: Failed

Pipeline on Agent XAMBOT-1033

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests iOS32b (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests tvOS (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

@vs-mobiletools-engineering-service2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥 Tests failed catastrophically on VSTS: device tests iOS (no summary found). 🔥

Result file $(TEST_SUMMARY_PATH) not found.

Pipeline on Agent

Please sign in to comment.