-
Notifications
You must be signed in to change notification settings - Fork 511
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/xcode16' into dev/rolf/xcode16-b…
…1-metalperformanceshaders
- Loading branch information
Showing
64 changed files
with
837 additions
and
1,001 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
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,76 @@ | ||
#nullable enable | ||
|
||
using System; | ||
using System.Runtime.InteropServices; | ||
|
||
using CoreGraphics; | ||
using Foundation; | ||
using ObjCRuntime; | ||
|
||
#if NET | ||
|
||
namespace Accessibility { | ||
|
||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("tvos18.0")] | ||
[Native] | ||
public enum AXSettingsFeature : long { | ||
/// <summary>Jump to the "Allow Apps to Request to Use" setting in Personal Voice.</summary> | ||
PersonalVoiceAllowAppsToRequestToUse = 1, | ||
} | ||
|
||
public static class AXSettings { | ||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("tvos18.0")] | ||
[DllImport (Constants.AccessibilityLibrary)] | ||
static extern byte AXAssistiveAccessEnabled (); | ||
|
||
/// <summary>Returns whether Assistive Access is running.</summary> | ||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("tvos18.0")] | ||
public static bool IsAssistiveAccessEnabled { | ||
get { | ||
return AXAssistiveAccessEnabled () != 0; | ||
} | ||
} | ||
|
||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("tvos18.0")] | ||
[DllImport (Constants.AccessibilityLibrary)] | ||
unsafe static extern void AXOpenSettingsFeature (nint /* AXSettingsFeature */ feature, BlockLiteral *block); | ||
|
||
/// <summary>Open the Settings app to the specified section.</summary> | ||
/// <param name="feature">The section to open.</param> | ||
/// <param name="completionHandler">This callback is called when the section has been opened. The <see cref="Foundation.NSError" /> argument will be null if successful.</param> | ||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("tvos18.0")] | ||
public unsafe static void OpenSettingsFeature (AXSettingsFeature feature, Action<NSError?> completionHandler) | ||
{ | ||
delegate* unmanaged<IntPtr, IntPtr, void> trampoline = &OpenSettingsFeatureCompletionHandler; | ||
using var block = new BlockLiteral (trampoline, completionHandler, typeof (AXSettings), nameof (OpenSettingsFeatureCompletionHandler)); | ||
AXOpenSettingsFeature ((nint) (long) feature, &block); | ||
} | ||
|
||
[UnmanagedCallersOnly] | ||
static void OpenSettingsFeatureCompletionHandler (IntPtr block, IntPtr error) | ||
{ | ||
var del = BlockLiteral.GetTarget<Action<NSError?>> (block); | ||
if (del is not null) { | ||
var errorObject = Runtime.GetNSObject<NSError> (error); | ||
del (errorObject); | ||
} | ||
} | ||
} | ||
} | ||
|
||
#endif // NET |
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,23 @@ | ||
#if NET | ||
using System; | ||
using System.Runtime.Versioning; | ||
using System.Runtime.InteropServices; | ||
|
||
using ObjCRuntime; | ||
|
||
namespace CoreData { | ||
public partial class NSPersistentStoreCoordinator { | ||
#if !__TVOS__ | ||
[SupportedOSPlatform ("macos15.0")] | ||
[SupportedOSPlatform ("ios18.0")] | ||
[SupportedOSPlatform ("maccatalyst18.0")] | ||
[UnsupportedOSPlatform ("tvos")] | ||
public NSManagedObjectID GetManagedObjectId (string value) | ||
{ | ||
using var str = new TransientString (value); | ||
return GetManagedObjectId ((IntPtr) str, (nuint) value.Length); | ||
} | ||
#endif // !__TVOS__ | ||
} | ||
} | ||
#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
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.