[foundation] Add a few types to complete bindings for Intents.framework (#402)

and uncomment those bindings.
This commit is contained in:
Sebastien Pouliot 2016-07-15 08:12:29 -04:00 коммит произвёл GitHub
Родитель d2c1b63ec0
Коммит 4f68d7cb0f
2 изменённых файлов: 101 добавлений и 9 удалений

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

@ -11823,6 +11823,100 @@ namespace XamCore.Foundation
nint UnderlineByWordMaskAttributeName { get; }
}
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
[BaseType (typeof (NSObject))]
interface NSDateInterval : NSCopying, NSSecureCoding {
[Export ("startDate", ArgumentSemantic.Copy)]
NSDate StartDate { get; }
[Export ("endDate", ArgumentSemantic.Copy)]
NSDate EndDate { get; }
[Export ("duration")]
double Duration { get; }
[Export ("initWithStartDate:duration:")]
[DesignatedInitializer]
IntPtr Constructor (NSDate startDate, double duration);
[Export ("initWithStartDate:endDate:")]
IntPtr Constructor (NSDate startDate, NSDate endDate);
[Export ("compare:")]
NSComparisonResult Compare (NSDateInterval dateInterval);
[Export ("isEqualToDateInterval:")]
bool IsEqualTo (NSDateInterval dateInterval);
[Export ("intersectsDateInterval:")]
bool Intersects (NSDateInterval dateInterval);
[Export ("intersectionWithDateInterval:")]
[return: NullAllowed]
NSDateInterval GetIntersection (NSDateInterval dateInterval);
[Export ("containsDate:")]
bool ContainsDate (NSDate date);
}
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
[BaseType (typeof (NSObject))]
interface NSUnit : NSCopying, NSSecureCoding {
[Export ("symbol")]
string Symbol { get; }
[Export ("initWithSymbol:")]
IntPtr Constructor (string symbol);
}
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
[BaseType (typeof (NSObject))]
interface NSUnitConverter {
[Export ("baseUnitValueFromValue:")]
double GetBaseUnitValue (double value);
[Export ("valueFromBaseUnitValue:")]
double GetValue (double baseUnitValue);
}
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
[BaseType (typeof (NSUnit))]
[DisableDefaultCtor] // there's a designated initializer
interface NSDimension : NSSecureCoding {
[Export ("converter", ArgumentSemantic.Copy)]
NSUnitConverter Converter { get; }
[Export ("initWithSymbol:converter:")]
[DesignatedInitializer]
IntPtr Constructor (string symbol, NSUnitConverter converter);
[Static]
[Export ("baseUnit")]
NSDimension BaseUnit { get; }
}
[Watch (3,0)][TV (10,0)][Mac (10,12)][iOS (10,0)]
[BaseType (typeof (NSDimension))]
[DisableDefaultCtor] // base type has a designated initializer
interface NSUnitTemperature : NSSecureCoding {
// inline from base type
[Export ("initWithSymbol:converter:")]
[DesignatedInitializer]
IntPtr Constructor (string symbol, NSUnitConverter converter);
[Static]
[Export ("kelvin", ArgumentSemantic.Copy)]
NSUnitTemperature Kelvin { get; }
[Static]
[Export ("celsius", ArgumentSemantic.Copy)]
NSUnitTemperature Celsius { get; }
[Static]
[Export ("fahrenheit", ArgumentSemantic.Copy)]
NSUnitTemperature Fahrenheit { get; }
}
#if MONOMAC
partial interface NSFileManager {

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

@ -1474,9 +1474,8 @@ namespace XamCore.Intents {
[Export ("direction", ArgumentSemantic.Assign)]
INInteractionDirection Direction { get; set; }
// FIXME: NSDateInterval needs to be bound! New type
//[NullAllowed, Export ("dateInterval", ArgumentSemantic.Copy)]
//NSDateInterval DateInterval { get; set; }
[NullAllowed, Export ("dateInterval", ArgumentSemantic.Copy)]
NSDateInterval DateInterval { get; set; }
[Export ("identifier")]
string Identifier { get; set; }
@ -3656,13 +3655,12 @@ namespace XamCore.Intents {
[DisableDefaultCtor]
interface INTemperature : NSCopying, NSSecureCoding {
// FIXME: Bind NSUnitTemperature new type
//[Export ("initWithUnit:value:")]
//[DesignatedInitializer]
//IntPtr Constructor (NSUnitTemperature unit, NSNumber value);
[Export ("initWithUnit:value:")]
[DesignatedInitializer]
IntPtr Constructor (NSUnitTemperature unit, NSNumber value);
//[NullAllowed, Export ("unit", ArgumentSemantic.Copy)]
//NSUnitTemperature Unit { get; }
[NullAllowed, Export ("unit", ArgumentSemantic.Copy)]
NSUnitTemperature Unit { get; }
[NullAllowed, Export ("value", ArgumentSemantic.Copy)]
NSNumber Value { get; }