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
24 changes: 24 additions & 0 deletions src/Accessibility/AXPrefers.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#nullable enable

using System;
using System.Runtime.InteropServices;
using CoreGraphics;
using Foundation;
using ObjCRuntime;

namespace Accessibility {

// accessibility.cs already provide the following attributes on the type
// [Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
public static partial class AXPrefers {

[DllImport (Constants.AccessibilityLibrary)]
static extern byte AXPrefersHorizontalTextLayout ();

public static bool HorizontalTextEnabled ()
{
return AXPrefersHorizontalTextLayout () != 0;
}

}
}
10 changes: 10 additions & 0 deletions src/accessibility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -352,4 +352,14 @@ partial interface AXAnimatedImagesUtilities {
[Field ("AXAnimatedImagesEnabledDidChangeNotification")]
NSString AnimatedImagesEnabledDidChangeNotification { get; }
}

[Watch (10, 0), TV (17, 0), Mac (14, 0), iOS (17, 0), MacCatalyst (17, 0)]
[Static]
[Partial]
partial interface AXPrefers {
[Notification]
[Field ("AXPrefersHorizontalTextLayoutDidChangeNotification")]
NSString HorizontalTextLayoutDidChangeNotification { get; }
}

}
1 change: 1 addition & 0 deletions src/frameworks.sources
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ ACCELERATE_SOURCES = \
ACCESSIBILITY_SOURCES = \
Accessibility/AXHearingUtilities.cs \
Accessibility/AXAnimatedImagesUtilities.cs \
Accessibility/AXPrefers.cs \

# Accounts

Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions tests/xtro-sharpie/iOS-Accessibility.todo

This file was deleted.

2 changes: 0 additions & 2 deletions tests/xtro-sharpie/macOS-Accessibility.todo

This file was deleted.

2 changes: 0 additions & 2 deletions tests/xtro-sharpie/tvOS-Accessibility.todo

This file was deleted.

2 changes: 0 additions & 2 deletions tests/xtro-sharpie/watchOS-Accessibility.todo

This file was deleted.