WIP [iOS10, UIKit] More work (#566)
This commit is contained in:
Родитель
921b254adc
Коммит
9728897c86
|
@ -316,8 +316,28 @@ namespace XamCore.UIKit {
|
|||
return UIAccessibilityIsSpeakScreenEnabled ();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
[DllImport (Constants.UIKitLibrary)]
|
||||
static extern bool UIAccessibilityIsAssistiveTouchRunning ();
|
||||
[iOS (10,0)]
|
||||
public static bool IsAssistiveTouchRunning {
|
||||
get {
|
||||
return UIAccessibilityIsAssistiveTouchRunning ();
|
||||
}
|
||||
}
|
||||
|
||||
[DllImport (Constants.UIKitLibrary)]
|
||||
static extern nuint UIAccessibilityHearingDevicePairedEar ();
|
||||
|
||||
[iOS (10,0)]
|
||||
public static UIAccessibilityHearingDeviceEar HearingDevicePairedEar {
|
||||
get {
|
||||
return (UIAccessibilityHearingDeviceEar)(ulong) UIAccessibilityHearingDevicePairedEar ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
#endif // !WATCH
|
||||
|
|
|
@ -1914,5 +1914,21 @@ namespace XamCore.UIKit {
|
|||
Spring,
|
||||
Composed
|
||||
}
|
||||
|
||||
|
||||
[iOS(10,0)]
|
||||
[Native]
|
||||
public enum UIAccessibilityHearingDeviceEar : nuint {
|
||||
None = 0,
|
||||
Left = 1 << 1,
|
||||
Right = 1 << 2,
|
||||
Both = Left | Right
|
||||
}
|
||||
|
||||
[iOS(10,0)]
|
||||
[Native]
|
||||
public enum UIAccessibilityCustomRotorDirection : nint
|
||||
{
|
||||
Previous,
|
||||
Next
|
||||
}
|
||||
}
|
||||
|
|
124
src/uikit.cs
124
src/uikit.cs
|
@ -1248,6 +1248,10 @@ namespace XamCore.UIKit {
|
|||
long TraitCausesPageTurn { get; }
|
||||
|
||||
|
||||
[iOS (10,0)]
|
||||
[Field ("UIAccessibilityTraitTabBar")]
|
||||
long TraitTabBar { get; }
|
||||
|
||||
[Since (6,0)]
|
||||
[Field ("UIAccessibilityAnnouncementDidFinishNotification")]
|
||||
[Notification (typeof (UIAccessibilityAnnouncementFinishedEventArgs))]
|
||||
|
@ -1417,6 +1421,16 @@ namespace XamCore.UIKit {
|
|||
[iOS (9, 0)]
|
||||
[Field ("UIAccessibilityNotificationVoiceOverIdentifier")]
|
||||
NSString NotificationVoiceOverIdentifier { get; }
|
||||
|
||||
[iOS (10,0)]
|
||||
[Notification]
|
||||
[Field ("UIAccessibilityHearingDevicePairedEarDidChangeNotification")]
|
||||
NSString HearingDevicePairedEarDidChangeNotification { get; }
|
||||
|
||||
[iOS (10,0)]
|
||||
[Notification]
|
||||
[Field ("UIAccessibilityAssistiveTouchStatusDidChangeNotification")]
|
||||
NSString AssistiveTouchStatusDidChangeNotification { get; }
|
||||
}
|
||||
|
||||
interface UIAccessibilityAnnouncementFinishedEventArgs {
|
||||
|
@ -1468,6 +1482,60 @@ namespace XamCore.UIKit {
|
|||
Selector Selector { get; set; }
|
||||
}
|
||||
|
||||
delegate UIAccessibilityCustomRotorItemResult UIAccessibilityCustomRotorSearch (UIAccessibilityCustomRotorSearchPredicate predicate);
|
||||
|
||||
[iOS (10,0)]
|
||||
[BaseType (typeof (NSObject))]
|
||||
interface UIAccessibilityCustomRotor {
|
||||
|
||||
[Export ("initWithName:itemSearchBlock:")]
|
||||
IntPtr Constructor (string name, UIAccessibilityCustomRotorSearch itemSearchHandler);
|
||||
|
||||
[Export ("name")]
|
||||
string Name { get; set; }
|
||||
|
||||
[Export ("itemSearchBlock", ArgumentSemantic.Copy)]
|
||||
UIAccessibilityCustomRotorSearch ItemSearchHandler { get; set; }
|
||||
}
|
||||
|
||||
[iOS (10, 0)]
|
||||
[Category]
|
||||
[BaseType (typeof (NSObject))]
|
||||
interface NSObject_UIAccessibilityCustomRotor {
|
||||
|
||||
[Export ("accessibilityCustomRotors")]
|
||||
[return: NullAllowed]
|
||||
UIAccessibilityCustomRotor [] GetAccessibilityCustomRotors ();
|
||||
|
||||
[Export ("setAccessibilityCustomRotors:")]
|
||||
void SetAccessibilityCustomRotors ([NullAllowed] UIAccessibilityCustomRotor [] customRotors);
|
||||
}
|
||||
|
||||
[iOS (10,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface UIAccessibilityCustomRotorItemResult {
|
||||
|
||||
[Export ("initWithTargetElement:targetRange:")]
|
||||
IntPtr Constructor (NSObject targetElement, [NullAllowed] UITextRange targetRange);
|
||||
|
||||
[NullAllowed, Export ("targetElement", ArgumentSemantic.Weak)]
|
||||
NSObject TargetElement { get; set; }
|
||||
|
||||
[NullAllowed, Export ("targetRange", ArgumentSemantic.Retain)]
|
||||
UITextRange TargetRange { get; set; }
|
||||
}
|
||||
|
||||
[iOS (10,0)]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface UIAccessibilityCustomRotorSearchPredicate {
|
||||
|
||||
[Export ("currentItem", ArgumentSemantic.Retain)]
|
||||
UIAccessibilityCustomRotorItemResult CurrentItem { get; set; }
|
||||
|
||||
[Export ("searchDirection", ArgumentSemantic.Assign)]
|
||||
UIAccessibilityCustomRotorDirection SearchDirection { get; set; }
|
||||
}
|
||||
|
||||
[BaseType (typeof (NSObject))]
|
||||
#if XAMCORE_2_0
|
||||
// only happens on the simulator (not devices) on iOS8 (still make sense)
|
||||
|
@ -1501,6 +1569,10 @@ namespace XamCore.UIKit {
|
|||
|
||||
[Export ("accessibilityTraits", ArgumentSemantic.UnsafeUnretained)]
|
||||
ulong AccessibilityTraits { get; set; }
|
||||
|
||||
[iOS (10, 0)]
|
||||
[Export ("accessibilityFrameInContainerSpace", ArgumentSemantic.Assign)]
|
||||
CGRect AccessibilityFrameInContainerSpace { get; set; }
|
||||
}
|
||||
|
||||
public interface UIAccessibilityFocus {
|
||||
|
@ -15068,6 +15140,7 @@ namespace XamCore.UIKit {
|
|||
|
||||
interface IUIAccessibilityIdentification {}
|
||||
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Soft deprecated in iOS 10, use UserNotifications.UNNotificationSettings")]
|
||||
[NoWatch]
|
||||
[NoTV]
|
||||
[iOS (8,0)]
|
||||
|
@ -15097,6 +15170,7 @@ namespace XamCore.UIKit {
|
|||
UIUserNotificationAction [] GetActionsForContext (UIUserNotificationActionContext context);
|
||||
}
|
||||
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Soft deprecated in iOS 10, use UserNotifications.UNNotificationAction or UserNotifications.UNTextInputNotificationAction")]
|
||||
[NoWatch]
|
||||
[NoTV]
|
||||
[iOS (8,0)]
|
||||
|
@ -15111,6 +15185,7 @@ namespace XamCore.UIKit {
|
|||
void SetActions (UIUserNotificationAction [] actions, UIUserNotificationActionContext context);
|
||||
}
|
||||
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Soft deprecated in iOS 10, use UserNotifications.UNNotificationAction or UserNotifications.UNTextInputNotificationAction")]
|
||||
[NoWatch]
|
||||
[NoTV]
|
||||
[iOS (8,0)]
|
||||
|
@ -15152,6 +15227,7 @@ namespace XamCore.UIKit {
|
|||
#else
|
||||
[Watch (2,0)]
|
||||
[Static]
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Soft deprecated in iOS 10, use UserNotifications.UNNotificationAction or UserNotifications.UNTextInputNotificationAction")]
|
||||
interface UIUserNotificationAction {
|
||||
// note: defined twice, where watchOS is defined it says it's not in iOS, the other one (for iOS 9) says it's not in tvOS
|
||||
[Field ("UIUserNotificationActionResponseTypedTextKey")]
|
||||
|
@ -15159,6 +15235,7 @@ namespace XamCore.UIKit {
|
|||
}
|
||||
#endif
|
||||
|
||||
[Deprecated (PlatformName.iOS, 10, 0, message: "Soft deprecated in iOS 10, use UserNotifications.UNNotificationAction or UserNotifications.UNTextInputNotificationAction")]
|
||||
[NoWatch]
|
||||
[NoTV]
|
||||
[iOS (8,0)]
|
||||
|
@ -15492,6 +15569,53 @@ namespace XamCore.UIKit {
|
|||
NSSet<UIPress> GetPresses (UIGestureRecognizer gesture);
|
||||
}
|
||||
|
||||
[NoWatch, NoTV, iOS (10,0)]
|
||||
[BaseType (typeof(NSObject), Delegates=new string [] {"Delegate"}, Events=new Type [] { typeof (UIPreviewInteractionDelegate)})]
|
||||
[DisableDefaultCtor]
|
||||
interface UIPreviewInteraction {
|
||||
|
||||
[Export ("initWithView:")]
|
||||
[DesignatedInitializer]
|
||||
IntPtr Constructor (UIView view);
|
||||
|
||||
[NullAllowed, Export ("view", ArgumentSemantic.Weak)]
|
||||
UIView View { get; }
|
||||
|
||||
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
|
||||
IUIPreviewInteractionDelegate Delegate { get; set; }
|
||||
|
||||
[Export ("locationInCoordinateSpace:")]
|
||||
CGPoint GetLocationInCoordinateSpace ([NullAllowed] UICoordinateSpace coordinateSpace);
|
||||
|
||||
[Export ("cancelInteraction")]
|
||||
void CancelInteraction ();
|
||||
}
|
||||
|
||||
interface IUIPreviewInteractionDelegate { }
|
||||
|
||||
[NoWatch, NoTV, iOS (10, 0)]
|
||||
[Protocol, Model]
|
||||
[BaseType (typeof(NSObject))]
|
||||
interface UIPreviewInteractionDelegate {
|
||||
|
||||
[Abstract]
|
||||
[Export ("previewInteraction:didUpdatePreviewTransition:ended:")]
|
||||
[EventArgs ("NSPreviewInteractionPreviewUpdate")]
|
||||
void DidUpdatePreviewTransition (UIPreviewInteraction previewInteraction, nfloat transitionProgress, bool ended);
|
||||
|
||||
[Abstract]
|
||||
[Export ("previewInteractionDidCancel:")]
|
||||
void DidCancel (UIPreviewInteraction previewInteraction);
|
||||
|
||||
[Export ("previewInteractionShouldBegin:")]
|
||||
[DelegateName ("Func<UIPreviewInteraction,bool>"), DefaultValue(true)]
|
||||
bool ShouldBegin (UIPreviewInteraction previewInteraction);
|
||||
|
||||
[Export ("previewInteraction:didUpdateCommitTransition:ended:")]
|
||||
[EventArgs ("NSPreviewInteractionPreviewUpdate")]
|
||||
void DidUpdateCommit (UIPreviewInteraction previewInteraction, nfloat transitionProgress, bool ended);
|
||||
}
|
||||
|
||||
[NoWatch]
|
||||
[iOS (9,0)]
|
||||
[BaseType (typeof (UIFocusUpdateContext))]
|
||||
|
|
Загрузка…
Ссылка в новой задаче