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
43 changes: 43 additions & 0 deletions src/Accessibility/AXSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public enum AXSettingsFeature : long {
[SupportedOSPlatform ("macos26.0")]
[SupportedOSPlatform ("tvos26.0")]
DwellControl,
/// <summary>Jump to the caption styles setting.</summary>
[SupportedOSPlatform ("ios26.4")]
[SupportedOSPlatform ("maccatalyst26.4")]
[SupportedOSPlatform ("macos26.4")]
[SupportedOSPlatform ("tvos26.4")]
CaptionStyles,
}

public static partial class AXSettings {
Expand Down Expand Up @@ -101,5 +107,42 @@ public static bool ShowBordersEnabled ()
{
return AXShowBordersEnabled () != 0;
}

[SupportedOSPlatform ("ios26.4")]
[SupportedOSPlatform ("maccatalyst26.4")]
[SupportedOSPlatform ("macos26.4")]
[SupportedOSPlatform ("tvos26.4")]
[DllImport (Constants.AccessibilityLibrary)]
static extern byte AXReduceHighlightingEffectsEnabled ();

/// <summary>Returns whether the system preference for reduce highlighting effects is enabled.</summary>
[SupportedOSPlatform ("ios26.4")]
[SupportedOSPlatform ("maccatalyst26.4")]
[SupportedOSPlatform ("macos26.4")]
[SupportedOSPlatform ("tvos26.4")]
public static bool IsReduceHighlightingEffectsEnabled {
get {
return AXReduceHighlightingEffectsEnabled () != 0;
}
}

[SupportedOSPlatform ("ios26.4")]
[SupportedOSPlatform ("maccatalyst26.4")]
[SupportedOSPlatform ("macos26.4")]
[SupportedOSPlatform ("tvos26.4")]
[DllImport (Constants.AccessibilityLibrary)]
static extern byte AXOpenSettingsFeatureIsSupported (nint /* AXSettingsFeature */ feature);

/// <summary>Returns whether the specified settings feature is supported on this device.</summary>
/// <param name="feature">The settings feature to check.</param>
/// <returns><see langword="true" /> if the feature is supported; otherwise, <see langword="false" />.</returns>
[SupportedOSPlatform ("ios26.4")]
[SupportedOSPlatform ("maccatalyst26.4")]
[SupportedOSPlatform ("macos26.4")]
[SupportedOSPlatform ("tvos26.4")]
public static bool OpenSettingsFeatureIsSupported (AXSettingsFeature feature)
{
return AXOpenSettingsFeatureIsSupported ((nint) (long) feature) != 0;
}
}
}
5 changes: 5 additions & 0 deletions src/accessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,11 @@ partial interface AXSettings {
[Notification]
[Field ("AXShowBordersEnabledStatusDidChangeNotification")]
NSString ShowBordersEnabledStatusDidChangeNotification { get; }

[TV (26, 4), Mac (26, 4), iOS (26, 4), MacCatalyst (26, 4)]
[Notification]
[Field ("AXReduceHighlightingEffectsEnabledDidChangeNotification")]
NSString ReduceHighlightingEffectsEnabledDidChangeNotification { get; }
}

[TV (18, 0), Mac (15, 0), iOS (18, 0), MacCatalyst (18, 0)]
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading