[IntentsUI] Update bindings to Xcode 10 Beta 1 (#4262)

* [IntentsUI] Update bindings to Xcode 10 Beta 1

This commit also adds a strong dictionary version to
INPlayMediaIntentResponse.WeakNowPlayingInfo.

* Implement feedback
This commit is contained in:
Alex Soto 2018-06-15 00:35:27 -05:00 коммит произвёл GitHub
Родитель 5de3cdb848
Коммит a6cbd48fab
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
6 изменённых файлов: 100 добавлений и 12 удалений

Просмотреть файл

@ -0,0 +1,26 @@
//
// INPlayMediaIntentResponse.cs
//
// Authors:
// Alex Soto <alexsoto@microsoft.com>
//
// Copyright 2018 Microsoft Corporation.
//
#if XAMCORE_2_0 && !MONOMAC && !WATCH // We must remove !WATCH when MediaPlayer is enabled in watchOS
using System;
using Foundation;
using ObjCRuntime;
using MediaPlayer;
namespace Intents {
public partial class INPlayMediaIntentResponse {
// MPNowPlayingInfo is not a DictionaryContainer but a manual NSDictionary wrapper class.
MPNowPlayingInfo NowPlayingInfo {
get => new MPNowPlayingInfo (WeakNowPlayingInfo);
set => WeakNowPlayingInfo = value?.ToDictionary ();
}
}
}
#endif

Просмотреть файл

@ -902,6 +902,7 @@ INTENTS_SOURCES = \
Intents/INRelativeReferenceResolutionResult.cs \ Intents/INRelativeReferenceResolutionResult.cs \
Intents/INRelativeSettingResolutionResult.cs \ Intents/INRelativeSettingResolutionResult.cs \
Intents/INRideOption.cs \ Intents/INRideOption.cs \
Intents/INPlayMediaIntentResponse.cs \
Intents/INSaveProfileInCarIntent.cs \ Intents/INSaveProfileInCarIntent.cs \
Intents/INSearchCallHistoryIntent.cs \ Intents/INSearchCallHistoryIntent.cs \
Intents/INSetCarLockStatusIntent.cs \ Intents/INSetCarLockStatusIntent.cs \

Просмотреть файл

@ -10,6 +10,7 @@
#if XAMCORE_2_0 // The Intents framework uses generics which is only supported in Unified #if XAMCORE_2_0 // The Intents framework uses generics which is only supported in Unified
using System; using System;
using System.ComponentModel;
using CoreGraphics; using CoreGraphics;
using Foundation; using Foundation;
using ObjCRuntime; using ObjCRuntime;
@ -8818,6 +8819,7 @@ namespace Intents {
[Export ("code")] [Export ("code")]
INPlayMediaIntentResponseCode Code { get; } INPlayMediaIntentResponseCode Code { get; }
[EditorBrowsable (EditorBrowsableState.Advanced)]
[NullAllowed, Export ("nowPlayingInfo", ArgumentSemantic.Copy)] [NullAllowed, Export ("nowPlayingInfo", ArgumentSemantic.Copy)]
NSDictionary WeakNowPlayingInfo { get; set; } NSDictionary WeakNowPlayingInfo { get; set; }
} }

Просмотреть файл

@ -81,6 +81,74 @@ namespace IntentsUI {
[Export ("displaysPaymentTransaction")] [Export ("displaysPaymentTransaction")]
bool DisplaysPaymentTransaction { get; } bool DisplaysPaymentTransaction { get; }
} }
[iOS (12,0)]
[BaseType (typeof (UIViewController))]
[DisableDefaultCtor]
interface INUIAddVoiceShortcutViewController {
[Wrap ("WeakDelegate")]
[NullAllowed]
IINUIAddVoiceShortcutViewControllerDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[Export ("initWithShortcut:")]
IntPtr Constructor (INShortcut shortcut);
}
interface IINUIAddVoiceShortcutViewControllerDelegate { }
[iOS (12,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface INUIAddVoiceShortcutViewControllerDelegate {
[Abstract]
[Export ("addVoiceShortcutViewController:didFinishWithVoiceShortcut:error:")]
void DidFinish (INUIAddVoiceShortcutViewController controller, [NullAllowed] INVoiceShortcut voiceShortcut, [NullAllowed] NSError error);
[Abstract]
[Export ("addVoiceShortcutViewControllerDidCancel:")]
void DidCancel (INUIAddVoiceShortcutViewController controller);
}
[iOS (12,0)]
[BaseType (typeof (UIViewController))]
[DisableDefaultCtor]
interface INUIEditVoiceShortcutViewController {
[Wrap ("WeakDelegate")]
[NullAllowed]
IINUIEditVoiceShortcutViewControllerDelegate Delegate { get; set; }
[NullAllowed, Export ("delegate", ArgumentSemantic.Weak)]
NSObject WeakDelegate { get; set; }
[Export ("initWithVoiceShortcut:")]
IntPtr Constructor (INVoiceShortcut voiceShortcut);
}
interface IINUIEditVoiceShortcutViewControllerDelegate { }
[iOS (12,0)]
[Protocol, Model (AutoGeneratedName = true)]
[BaseType (typeof (NSObject))]
interface INUIEditVoiceShortcutViewControllerDelegate {
[Abstract]
[Export ("editVoiceShortcutViewController:didUpdateVoiceShortcut:error:")]
void DidUpdate (INUIEditVoiceShortcutViewController controller, [NullAllowed] INVoiceShortcut voiceShortcut, [NullAllowed] NSError error);
[Abstract]
[Export ("editVoiceShortcutViewController:didDeleteVoiceShortcutWithIdentifier:")]
void DidDelete (INUIEditVoiceShortcutViewController controller, NSUuid deletedVoiceShortcutIdentifier);
[Abstract]
[Export ("editVoiceShortcutViewControllerDidCancel:")]
void DidCancel (INUIEditVoiceShortcutViewController controller);
}
} }
#endif #endif

Просмотреть файл

@ -418,8 +418,9 @@ namespace Introspection {
case "MDLColorSwatchTexture": case "MDLColorSwatchTexture":
// they don't make sense without extra arguments // they don't make sense without extra arguments
return true; return true;
case "ASCredentialProviderViewController": case "ASCredentialProviderViewController": // goal is to "provides a standard interface for creating a credential provider extension", not a custom one
// goal is to "provides a standard interface for creating a credential provider extension", not a custom one case "INUIAddVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
case "INUIEditVoiceShortcutViewController": // Doesn't make sense without INVoiceShortcut and there is no other way to set this unless you use the other only .ctor
if (ctor.ToString () == "Void .ctor(String, NSBundle)") if (ctor.ToString () == "Void .ctor(String, NSBundle)")
return true; return true;
break; break;

Просмотреть файл

@ -1,10 +0,0 @@
!missing-protocol! INUIAddVoiceShortcutViewControllerDelegate not bound
!missing-protocol! INUIEditVoiceShortcutViewControllerDelegate not bound
!missing-selector! INUIAddVoiceShortcutViewController::delegate not bound
!missing-selector! INUIAddVoiceShortcutViewController::initWithShortcut: not bound
!missing-selector! INUIAddVoiceShortcutViewController::setDelegate: not bound
!missing-selector! INUIEditVoiceShortcutViewController::delegate not bound
!missing-selector! INUIEditVoiceShortcutViewController::initWithVoiceShortcut: not bound
!missing-selector! INUIEditVoiceShortcutViewController::setDelegate: not bound
!missing-type! INUIAddVoiceShortcutViewController not bound
!missing-type! INUIEditVoiceShortcutViewController not bound