/src/foundation.cs
C# | 6779 lines | 4627 code | 1959 blank | 193 comment | 1 complexity | fd86bd4a55207ac9882d09cd1d103e34 MD5 | raw file
Possible License(s): Apache-2.0
Large files files are truncated, but you can click here to view the full file
- //
- // This file describes the API that the generator will produce
- //
- // Authors:
- // Geoff Norton
- // Miguel de Icaza
- // Aaron Bockover
- //
- // Copyright 2009, Novell, Inc.
- // Copyright 2010, Novell, Inc.
- // Copyright 2011-2013 Xamarin Inc.
- //
- // Permission is hereby granted, free of charge, to any person obtaining
- // a copy of this software and associated documentation files (the
- // "Software"), to deal in the Software without restriction, including
- // without limitation the rights to use, copy, modify, merge, publish,
- // distribute, sublicense, and/or sell copies of the Software, and to
- // permit persons to whom the Software is furnished to do so, subject to
- // the following conditions:
- //
- // The above copyright notice and this permission notice shall be
- // included in all copies or substantial portions of the Software.
- //
- // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
- // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
- // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
- // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
- // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
- // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
- // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- //
- //
- using MonoMac.ObjCRuntime;
- using MonoMac.CoreFoundation;
- using MonoMac.Foundation;
- using MonoMac.CoreGraphics;
- using MonoMac.CoreMedia;
- #if MONOMAC
- using MonoMac.AppKit;
- #else
- using MonoMac.CoreLocation;
- using MonoMac.UIKit;
- #endif
- using System;
- using System.Drawing;
- using System.ComponentModel;
- namespace MonoMac.Foundation
- {
- public delegate int NSComparator (NSObject obj1, NSObject obj2);
- public delegate void NSAttributedRangeCallback (NSDictionary attrs, NSRange range, ref bool stop);
- public delegate void NSAttributedStringCallback (NSObject value, NSRange range, ref bool stop);
- public delegate bool NSEnumerateErrorHandler (NSUrl url, NSError error);
- [BaseType (typeof (NSObject))]
- public interface NSArray {
- [Export ("count")]
- uint Count { get; }
- [Export ("objectAtIndex:")]
- IntPtr ValueAt (uint idx);
- [Export ("arrayWithObjects:count:")][Static][Internal]
- NSArray FromObjects (IntPtr array, int count);
- [Export ("valueForKey:")]
- [MarshalNativeExceptions]
- NSObject ValueForKey (NSString key);
- [Export ("setValue:forKey:")]
- void SetValueForKey (NSObject value, NSString key);
- [Export ("writeToFile:atomically:")]
- bool WriteToFile (string path, bool useAuxiliaryFile);
- [Export ("arrayWithContentsOfFile:")][Static]
- NSArray FromFile (string path);
-
- [Export ("sortedArrayUsingComparator:")]
- NSArray Sort (NSComparator cmptr);
-
- [Export ("filteredArrayUsingPredicate:")]
- NSArray Filter (NSPredicate predicate);
- }
- [Since (3,2)]
- [BaseType (typeof (NSObject))]
- public partial interface NSAttributedString {
- [Export ("string")]
- string Value { get; }
- [Export ("attributesAtIndex:effectiveRange:")]
- NSDictionary GetAttributes (int location, out NSRange effectiveRange);
- [Export ("length")]
- int Length { get; }
- // TODO: figure out the type, this deserves to be strongly typed if possble
- [Export ("attribute:atIndex:effectiveRange:")]
- NSObject GetAttribute (string attribute, int location, out NSRange effectiveRange);
- [Export ("attributedSubstringFromRange:"), Internal]
- NSAttributedString Substring (NSRange range);
- [Export ("attributesAtIndex:longestEffectiveRange:inRange:")]
- NSDictionary GetAttributes (int location, out NSRange longestEffectiveRange, NSRange rangeLimit);
- [Export ("attribute:atIndex:longestEffectiveRange:inRange:")]
- NSObject GetAttribute (string attribute, int location, out NSRange longestEffectiveRange, NSRange rangeLimit);
- [Export ("isEqualToAttributedString:")]
- bool IsEqual (NSAttributedString other);
- [Export ("initWithString:")]
- IntPtr Constructor (string str);
-
- [Export ("initWithString:attributes:")]
- [EditorBrowsable (EditorBrowsableState.Advanced)]
- IntPtr Constructor (string str, NSDictionary attributes);
- [Export ("initWithAttributedString:")]
- IntPtr Constructor (NSAttributedString other);
- [Export ("enumerateAttributesInRange:options:usingBlock:")]
- void EnumerateAttributes (NSRange range, NSAttributedStringEnumeration options, NSAttributedRangeCallback callback);
- [Export ("enumerateAttribute:inRange:options:usingBlock:")]
- void EnumerateAttribute (NSString attributeName, NSRange inRange, NSAttributedStringEnumeration options, NSAttributedStringCallback callback);
- #if MONOMAC
- [Export("size")]
- SizeF Size { get; }
- [Field ("NSFontAttributeName", "AppKit")]
- NSString FontAttributeName { get; }
- [Field ("NSLinkAttributeName", "AppKit")]
- NSString LinkAttributeName { get; }
- [Field ("NSUnderlineStyleAttributeName", "AppKit")]
- NSString UnderlineStyleAttributeName { get; }
- [Field ("NSStrikethroughStyleAttributeName", "AppKit")]
- NSString StrikethroughStyleAttributeName { get; }
- [Field ("NSStrokeWidthAttributeName", "AppKit")]
- NSString StrokeWidthAttributeName { get; }
- [Field ("NSParagraphStyleAttributeName", "AppKit")]
- NSString ParagraphStyleAttributeName { get; }
- [Field ("NSForegroundColorAttributeName", "AppKit")]
- NSString ForegroundColorAttributeName { get; }
- [Field ("NSBackgroundColorAttributeName", "AppKit")]
- NSString BackgroundColorAttributeName { get; }
- [Field ("NSLigatureAttributeName", "AppKit")]
- NSString LigatureAttributeName { get; }
- [Field ("NSObliquenessAttributeName", "AppKit")]
- NSString ObliquenessAttributeName { get; }
- [Field ("NSSuperscriptAttributeName", "AppKit")]
- NSString SuperscriptAttributeName { get; }
- [Field ("NSAttachmentAttributeName", "AppKit")]
- NSString AttachmentAttributeName { get; }
-
- [Field ("NSBaselineOffsetAttributeName", "AppKit")]
- NSString BaselineOffsetAttributeName { get; }
-
- [Field ("NSKernAttributeName", "AppKit")]
- NSString KernAttributeName { get; }
-
- [Field ("NSStrokeColorAttributeName", "AppKit")]
- NSString StrokeColorAttributeName { get; }
-
- [Field ("NSUnderlineColorAttributeName", "AppKit")]
- NSString UnderlineColorAttributeName { get; }
-
- [Field ("NSStrikethroughColorAttributeName", "AppKit")]
- NSString StrikethroughColorAttributeName { get; }
-
- [Field ("NSShadowAttributeName", "AppKit")]
- NSString ShadowAttributeName { get; }
-
- [Field ("NSExpansionAttributeName", "AppKit")]
- NSString ExpansionAttributeName { get; }
-
- [Field ("NSCursorAttributeName", "AppKit")]
- NSString CursorAttributeName { get; }
-
- [Field ("NSToolTipAttributeName", "AppKit")]
- NSString ToolTipAttributeName { get; }
-
- [Field ("NSMarkedClauseSegmentAttributeName", "AppKit")]
- NSString MarkedClauseSegmentAttributeName { get; }
-
- [Field ("NSWritingDirectionAttributeName", "AppKit")]
- NSString WritingDirectionAttributeName { get; }
-
- [Field ("NSVerticalGlyphFormAttributeName", "AppKit")]
- NSString VerticalGlyphFormAttributeName { get; }
-
- [Export ("initWithData:options:documentAttributes:error:")]
- IntPtr Constructor (NSData data, NSDictionary options, out NSDictionary docAttributes, out NSError error);
- [Export ("initWithDocFormat:documentAttributes:")]
- IntPtr Constructor(NSData wordDocFormat, out NSDictionary docAttributes);
- [Export ("initWithHTML:baseURL:documentAttributes:")]
- IntPtr Constructor (NSData htmlData, NSUrl baseUrl, out NSDictionary docAttributes);
-
- [Export ("drawAtPoint:")]
- void DrawString (PointF point);
-
- [Export ("drawInRect:")]
- void DrawString (RectangleF rect);
-
- [Export ("drawWithRect:options:")]
- void DrawString (RectangleF rect, NSStringDrawingOptions options);
-
- #else
- [Since (6,0)]
- [Export ("size")]
- SizeF Size { get; }
- [Since (6,0)]
- [Export ("drawAtPoint:")]
- void DrawString (PointF point);
- [Since (6,0)]
- [Export ("drawInRect:")]
- void DrawString (RectangleF rect);
- [Since (6,0)]
- [Export ("drawWithRect:options:context:")]
- void DrawString (RectangleF rect, NSStringDrawingOptions options, [NullAllowed] NSStringDrawingContext context);
- [Since (6,0)]
- [Export ("boundingRectWithSize:options:context:")]
- RectangleF GetBoundingRect (SizeF size, NSStringDrawingOptions options, [NullAllowed] NSStringDrawingContext context);
- #endif
- }
- [BaseType (typeof (NSObject),
- Delegates=new string [] { "WeakDelegate" },
- Events=new Type [] { typeof (NSCacheDelegate)} )]
- [Since (4,0)]
- public interface NSCache {
- [Export ("objectForKey:")]
- NSObject ObjectForKey (NSObject key);
- [Export ("setObject:forKey:")]
- void SetObjectforKey (NSObject obj, NSObject key);
- [Export ("setObject:forKey:cost:")]
- void SetCost (NSObject obj, NSObject key, uint cost);
- [Export ("removeObjectForKey:")]
- void RemoveObjectForKey (NSObject key);
- [Export ("removeAllObjects")]
- void RemoveAllObjects ();
- //Detected properties
- [Export ("name")]
- string Name { get; set; }
- [Export ("delegate")]
- NSObject WeakDelegate { get; set; }
- [Wrap ("WeakDelegate")]
- NSCacheDelegate Delegate { get; set; }
- [Export ("totalCostLimit")]
- uint TotalCostLimit { get; set; }
- [Export ("countLimit")]
- uint CountLimit { get; set; }
- [Export ("evictsObjectsWithDiscardedContent")]
- bool EvictsObjectsWithDiscardedContent { get; set; }
- }
- [BaseType (typeof (NSObject))]
- [Model]
- [Protocol]
- public interface NSCacheDelegate {
- [Export ("cache:willEvictObject:"), EventArgs ("NSObject")]
- void WillEvictObject (NSCache cache, NSObject obj);
- }
- [BaseType (typeof (NSObject), Name="NSCachedURLResponse")]
- // instance created with 'init' will crash when Dispose is called
- [DisableDefaultCtor]
- public interface NSCachedUrlResponse {
- [Export ("initWithResponse:data:userInfo:storagePolicy:")]
- IntPtr Constructor (NSUrlResponse response, NSData data, [NullAllowed] NSDictionary userInfo, NSUrlCacheStoragePolicy storagePolicy);
- [Export ("initWithResponse:data:")]
- IntPtr Constructor (NSUrlResponse response, NSData data);
-
- [Export ("response")]
- NSUrlResponse Response { get; }
- [Export ("data")]
- NSData Data { get; }
- [Export ("userInfo")]
- NSDictionary UserInfo { get; }
- [Export ("storagePolicy")]
- NSUrlCacheStoragePolicy StoragePolicy { get; }
- }
-
- [BaseType (typeof (NSObject))]
- // 'init' returns NIL
- [DisableDefaultCtor]
- public interface NSCalendar {
- [Export ("initWithCalendarIdentifier:")]
- IntPtr Constructor (NSString identifier);
- [Export ("calendarIdentifier")]
- string Identifier { get; }
- [Export ("currentCalendar")] [Static]
- NSCalendar CurrentCalendar { get; }
- [Export ("locale")]
- NSLocale Locale { get; set; }
- [Export ("timeZone")]
- NSTimeZone TimeZone { get; set; }
- [Export ("firstWeekday")]
- uint FirstWeekDay { get; set; }
- [Export ("minimumDaysInFirstWeek")]
- uint MinimumDaysInFirstWeek { get; set; }
- //- (NSRange)minimumRangeOfUnit:(NSCalendarUnit)unit;
- //- (NSRange)maximumRangeOfUnit:(NSCalendarUnit)unit;
- //- (NSRange)rangeOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date;
- //- (NSUInteger)ordinalityOfUnit:(NSCalendarUnit)smaller inUnit:(NSCalendarUnit)larger forDate:(NSDate *)date;
- //- (BOOL)rangeOfUnit:(NSCalendarUnit)unit startDate:(NSDate **)datep interval:(NSTimeInterval *)tip forDate:(NSDate *)date AVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER;
- [Export ("components:fromDate:")]
- NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate);
- [Export ("components:fromDate:toDate:options:")]
- NSDateComponents Components (NSCalendarUnit unitFlags, NSDate fromDate, NSDate toDate, NSDateComponentsWrappingBehavior opts);
- [Export ("dateByAddingComponents:toDate:options:")]
- NSDate DateByAddingComponents (NSDateComponents comps, NSDate date, NSDateComponentsWrappingBehavior opts);
- [Export ("dateFromComponents:")]
- NSDate DateFromComponents (NSDateComponents comps);
- [Field ("NSGregorianCalendar"), Internal]
- NSString NSGregorianCalendar { get; }
-
- [Field ("NSBuddhistCalendar"), Internal]
- NSString NSBuddhistCalendar { get; }
-
- [Field ("NSChineseCalendar"), Internal]
- NSString NSChineseCalendar { get; }
-
- [Field ("NSHebrewCalendar"), Internal]
- NSString NSHebrewCalendar { get; }
-
- [Field ("NSIslamicCalendar"), Internal]
- NSString NSIslamicCalendar { get; }
-
- [Field ("NSIslamicCivilCalendar"), Internal]
- NSString NSIslamicCivilCalendar { get; }
-
- [Field ("NSJapaneseCalendar"), Internal]
- NSString NSJapaneseCalendar { get; }
-
- [Field ("NSRepublicOfChinaCalendar"), Internal]
- NSString NSRepublicOfChinaCalendar { get; }
-
- [Field ("NSPersianCalendar"), Internal]
- NSString NSPersianCalendar { get; }
-
- [Field ("NSIndianCalendar"), Internal]
- NSString NSIndianCalendar { get; }
-
- [Field ("NSISO8601Calendar"), Internal]
- NSString NSISO8601Calendar { get; }
- }
- [Since (3,2)]
- [BaseType (typeof (NSObject))]
- public interface NSCharacterSet {
- [Static, Export ("alphanumericCharacterSet")]
- NSCharacterSet Alphanumerics {get;}
- [Static, Export ("capitalizedLetterCharacterSet")]
- NSCharacterSet Capitalized {get;}
- // TODO/FIXME: constructor?
- [Static, Export ("characterSetWithBitmapRepresentation:")]
- NSCharacterSet FromBitmap (NSData data);
- // TODO/FIXME: constructor?
- [Static, Export ("characterSetWithCharactersInString:")]
- NSCharacterSet FromString (string aString);
- [Static, Export ("characterSetWithContentsOfFile:")]
- NSCharacterSet FromFile (string path);
- [Static, Export ("characterSetWithRange:")]
- NSCharacterSet FromRange (NSRange aRange);
- [Static, Export ("controlCharacterSet")]
- NSCharacterSet Controls {get;}
- [Static, Export ("decimalDigitCharacterSet")]
- NSCharacterSet DecimalDigits {get;}
- [Static, Export ("decomposableCharacterSet")]
- NSCharacterSet Decomposables {get;}
- [Static, Export ("illegalCharacterSet")]
- NSCharacterSet Illegals {get;}
- [Static, Export ("letterCharacterSet")]
- NSCharacterSet Letters {get;}
- [Static, Export ("lowercaseLetterCharacterSet")]
- NSCharacterSet LowercaseLetters {get;}
- [Static, Export ("newlineCharacterSet")]
- NSCharacterSet Newlines {get;}
- [Static, Export ("nonBaseCharacterSet")]
- NSCharacterSet Marks {get;}
- [Static, Export ("punctuationCharacterSet")]
- NSCharacterSet Punctuation {get;}
- [Static, Export ("symbolCharacterSet")]
- NSCharacterSet Symbols {get;}
- [Static, Export ("uppercaseLetterCharacterSet")]
- NSCharacterSet UppercaseLetters {get;}
- [Static, Export ("whitespaceAndNewlineCharacterSet")]
- NSCharacterSet WhitespaceAndNewlines {get;}
- [Static, Export ("whitespaceCharacterSet")]
- NSCharacterSet Whitespaces {get;}
- [Export ("bitmapRepresentation")]
- NSData GetBitmapRepresentation ();
- [Export ("characterIsMember:")]
- bool Contains (char aCharacter);
- [Export ("hasMemberInPlane:")]
- bool HasMemberInPlane (byte thePlane);
- [Export ("invertedSet")]
- NSCharacterSet InvertedSet {get;}
- [Export ("isSupersetOfSet:")]
- bool IsSupersetOf (NSCharacterSet theOtherSet);
- [Export ("longCharacterIsMember:")]
- bool Contains (uint theLongChar);
- }
-
- [BaseType (typeof (NSObject))]
- public interface NSCoder {
- //
- // Encoding and decoding
- //
- [Export ("encodeObject:")]
- void Encode (NSObject obj);
-
- [Export ("encodeRootObject:")]
- void EncodeRoot (NSObject obj);
- [Export ("decodeObject")]
- NSObject DecodeObject ();
- //
- // Encoding and decoding with keys
- //
- [Export ("encodeConditionalObject:forKey:")]
- void EncodeConditionalObject (NSObject val, string key);
-
- [Export ("encodeObject:forKey:")]
- void Encode (NSObject val, string key);
-
- [Export ("encodeBool:forKey:")]
- void Encode (bool val, string key);
-
- [Export ("encodeDouble:forKey:")]
- void Encode (double val, string key);
-
- [Export ("encodeFloat:forKey:")]
- void Encode (float val, string key);
-
- [Export ("encodeInt32:forKey:")]
- void Encode (int val, string key);
-
- [Export ("encodeInt64:forKey:")]
- void Encode (long val, string key);
-
- [Export ("encodeBytes:length:forKey:")]
- void EncodeBlock (IntPtr bytes, int length, string key);
- [Export ("containsValueForKey:")]
- bool ContainsKey (string key);
-
- [Export ("decodeBoolForKey:")]
- bool DecodeBool (string key);
- [Export ("decodeDoubleForKey:")]
- double DecodeDouble (string key);
- [Export ("decodeFloatForKey:")]
- float DecodeFloat (string key);
- [Export ("decodeInt32ForKey:")]
- int DecodeInt (string key);
- [Export ("decodeInt64ForKey:")]
- long DecodeLong (string key);
- [Export ("decodeObjectForKey:")]
- NSObject DecodeObject (string key);
- [Internal, Export ("decodeBytesForKey:returnedLength:")]
- IntPtr DecodeBytes (string key, IntPtr length_ptr);
- [Since (6,0)]
- [Export ("allowedClasses")]
- NSSet AllowedClasses { get; }
- [Since (6,0)]
- [Export ("requiresSecureCoding")]
- bool RequiresSecureCoding ();
-
- }
-
- [BaseType (typeof (NSPredicate))]
- public interface NSComparisonPredicate {
- [Static, Export ("predicateWithLeftExpression:rightExpression:modifier:type:options:")]
- NSPredicate Create (NSExpression leftExpression, NSExpression rightExpression, NSComparisonPredicateModifier comparisonModifier, NSPredicateOperatorType operatorType, NSComparisonPredicateOptions comparisonOptions);
- [Static, Export ("predicateWithLeftExpression:rightExpression:customSelector:")]
- NSPredicate FromSelector (NSExpression leftExpression, NSExpression rightExpression, Selector selector);
- [Export ("initWithLeftExpression:rightExpression:modifier:type:options:")]
- IntPtr Constructor (NSExpression leftExpression, NSExpression rightExpression, NSComparisonPredicateModifier comparisonModifier, NSPredicateOperatorType operatorType, NSComparisonPredicateOptions comparisonOptions);
-
- [Export ("initWithLeftExpression:rightExpression:customSelector:")]
- IntPtr Constructor (NSExpression leftExpression, NSExpression rightExpression, Selector selector);
- [Export ("predicateOperatorType")]
- NSPredicateOperatorType PredicateOperatorType { get; }
- [Export ("comparisonPredicateModifier")]
- NSComparisonPredicateModifier ComparisonPredicateModifier { get; }
- [Export ("leftExpression")]
- NSExpression LeftExpression { get; }
- [Export ("rightExpression")]
- NSExpression RightExpression { get; }
- [Export ("customSelector")]
- Selector CustomSelector { get; }
- [Export ("options")]
- NSComparisonPredicateOptions Options { get; }
- }
- [BaseType (typeof (NSPredicate))]
- [DisableDefaultCtor] // An uncaught exception was raised: Can't have a NOT predicate with no subpredicate.
- public interface NSCompoundPredicate {
- [Export ("initWithType:subpredicates:")]
- IntPtr Constructor (NSCompoundPredicateType type, NSPredicate[] subpredicates);
- [Export ("compoundPredicateType")]
- NSCompoundPredicateType Type { get; }
- [Export ("subpredicates")]
- NSPredicate[] Subpredicates { get; }
- [Static]
- [Export ("andPredicateWithSubpredicates:")]
- NSPredicate CreateAndPredicate (NSPredicate[] subpredicates);
- [Static]
- [Export ("orPredicateWithSubpredicates:")]
- NSPredicate CreateOrPredicate (NSPredicate [] subpredicates);
- [Static]
- [Export ("notPredicateWithSubpredicate:")]
- NSPredicate CreateNotPredicate (NSPredicate predicate);
- }
- [BaseType (typeof (NSObject))]
- public interface NSData {
- [Export ("dataWithContentsOfURL:")]
- [Static]
- NSData FromUrl (NSUrl url);
- [Export ("dataWithContentsOfURL:options:error:")]
- [Static]
- NSData FromUrl (NSUrl url, NSDataReadingOptions mask, out NSError error);
- [Export ("dataWithContentsOfFile:")][Static]
- NSData FromFile (string path);
-
- [Export ("dataWithContentsOfFile:options:error:")]
- [Static]
- NSData FromFile (string path, NSDataReadingOptions mask, out NSError error);
- [Export ("dataWithData:")]
- [Static]
- NSData FromData (NSData source);
- [Export ("dataWithBytes:length:"), Static]
- NSData FromBytes (IntPtr bytes, uint size);
- [Export ("bytes")]
- IntPtr Bytes { get; }
- [Export ("length")]
- uint Length { get; [NotImplemented] set; }
- [Export ("writeToFile:options:error:")]
- bool _Save (string file, int options, IntPtr addr);
-
- [Export ("writeToURL:options:error:")]
- bool _Save (NSUrl url, int options, IntPtr addr);
- [Export ("rangeOfData:options:range:")]
- [Since (4,0)]
- NSRange Find (NSData dataToFind, NSDataSearchOptions searchOptions, NSRange searchRange);
- }
- [BaseType (typeof (NSObject))]
- public interface NSDateComponents {
- [Since (4,0)]
- [Export ("timeZone")]
- NSTimeZone TimeZone { get; set; }
- [Export ("calendar")]
- [Since (4,0)]
- NSCalendar Calendar { get; set; }
- [Export ("quarter")]
- [Since (4,0)]
- int Quarter { get; set; }
- [Export ("date")]
- [Since (4,0)]
- NSDate Date { get; }
- //Detected properties
- [Export ("era")]
- int Era { get; set; }
- [Export ("year")]
- int Year { get; set; }
- [Export ("month")]
- int Month { get; set; }
- [Export ("day")]
- int Day { get; set; }
- [Export ("hour")]
- int Hour { get; set; }
- [Export ("minute")]
- int Minute { get; set; }
- [Export ("second")]
- int Second { get; set; }
- [Export ("week")]
- int Week { get; set; }
- [Export ("weekday")]
- int Weekday { get; set; }
- [Export ("weekdayOrdinal")]
- int WeekdayOrdinal { get; set; }
- [Since (5,0)]
- [Export ("weekOfMonth")]
- int WeekOfMonth { get; set; }
- [Since (5,0)]
- [Export ("weekOfYear")]
- int WeekOfYear { get; set; }
-
- [Since (5,0)]
- [Export ("yearForWeekOfYear")]
- int YearForWeekOfYear { get; set; }
- [Since (6,0)]
- [Export ("leapMonth")]
- bool IsLeapMonth { [Bind ("isLeapMonth")] get; set; }
- }
-
- [Since (6,0)]
- [BaseType (typeof (NSFormatter))]
- interface NSByteCountFormatter {
- [Export ("allowsNonnumericFormatting")]
- bool AllowsNonnumericFormatting { get; set; }
- [Export ("includesUnit")]
- bool IncludesUnit { get; set; }
- [Export ("includesCount")]
- bool IncludesCount { get; set; }
- [Export ("includesActualByteCount")]
- bool IncludesActualByteCount { get; set; }
-
- [Export ("adaptive")]
- bool Adaptive { [Bind ("isAdaptive")] get; set; }
- [Export ("zeroPadsFractionDigits")]
- bool ZeroPadsFractionDigits { get; set; }
- [Static]
- [Export ("stringFromByteCount:countStyle:")]
- string Format (long byteCount, NSByteCountFormatterCountStyle countStyle);
- [Export ("stringFromByteCount:")]
- string Format (long byteCount);
- [Export ("allowedUnits")]
- NSByteCountFormatterUnits AllowedUnits { get; set; }
- [Export ("countStyle")]
- NSByteCountFormatterCountStyle CountStyle { get; set; }
- }
- [BaseType (typeof (NSFormatter))]
- public interface NSDateFormatter {
- [Export ("stringFromDate:")]
- string ToString (NSDate date);
- [Export ("dateFromString:")]
- NSDate Parse (string date);
- [Export ("dateFormat")]
- string DateFormat { get; set; }
- [Export ("dateStyle")]
- NSDateFormatterStyle DateStyle { get; set; }
- [Export ("timeStyle")]
- NSDateFormatterStyle TimeStyle { get; set; }
- [Export ("locale")]
- NSLocale Locale { get; set; }
- [Export ("generatesCalendarDates")]
- bool GeneratesCalendarDates { get; set; }
- [Export ("formatterBehavior")]
- NSDateFormatterBehavior Behavior { get; set; }
- [Export ("defaultFormatterBehavior"), Static]
- NSDateFormatterBehavior DefaultBehavior { get; set; }
- [Export ("timeZone")]
- NSTimeZone TimeZone { get; set; }
- [Export ("calendar")]
- NSCalendar Calendar { get; set; }
- // not exposed as a property in documentation
- [Export ("isLenient")]
- bool IsLenient { get; [Bind ("setLenient:")] set; }
- [Export ("twoDigitStartDate")]
- NSDate TwoDigitStartDate { get; set; }
- [Export ("defaultDate")]
- NSDate DefaultDate { get; set; }
- [Export ("eraSymbols")]
- string [] EraSymbols { get; set; }
- [Export ("monthSymbols")]
- string [] MonthSymbols { get; set; }
- [Export ("shortMonthSymbols")]
- string [] ShortMonthSymbols { get; set; }
- [Export ("weekdaySymbols")]
- string [] WeekdaySymbols { get; set; }
- [Export ("shortWeekdaySymbols")]
- string [] ShortWeekdaySymbols { get; set; }
- [Export ("AMSymbol")]
- string AMSymbol { get; set; }
- [Export ("PMSymbol")]
- string PMSymbol { get; set; }
- [Export ("longEraSymbols")]
- string [] LongEraSymbols { get; set; }
- [Export ("veryShortMonthSymbols")]
- string [] VeryShortMonthSymbols { get; set; }
-
- [Export ("standaloneMonthSymbols")]
- string [] StandaloneMonthSymbols { get; set; }
- [Export ("shortStandaloneMonthSymbols")]
- string [] ShortStandaloneMonthSymbols { get; set; }
- [Export ("veryShortStandaloneMonthSymbols")]
- string [] VeryShortStandaloneMonthSymbols { get; set; }
-
- [Export ("veryShortWeekdaySymbols")]
- string [] VeryShortWeekdaySymbols { get; set; }
- [Export ("standaloneWeekdaySymbols")]
- string [] StandaloneWeekdaySymbols { get; set; }
- [Export ("shortStandaloneWeekdaySymbols")]
- string [] ShortStandaloneWeekdaySymbols { get; set; }
-
- [Export ("veryShortStandaloneWeekdaySymbols")]
- string [] VeryShortStandaloneWeekdaySymbols { get; set; }
-
- [Export ("quarterSymbols")]
- string [] QuarterSymbols { get; set; }
- [Export ("shortQuarterSymbols")]
- string [] ShortQuarterSymbols { get; set; }
-
- [Export ("standaloneQuarterSymbols")]
- string [] StandaloneQuarterSymbols { get; set; }
- [Export ("shortStandaloneQuarterSymbols")]
- string [] ShortStandaloneQuarterSymbols { get; set; }
- [Export ("gregorianStartDate")]
- NSDate GregorianStartDate { get; set; }
- }
- public delegate void NSFileHandleUpdateHandler (NSFileHandle handle);
- public interface NSFileHandleReadEventArgs {
- [Export ("NSFileHandleNotificationDataItem")]
- NSData AvailableData { get; }
- [Export ("NSFileHandleError", ArgumentSemantic.Assign)]
- int UnixErrorCode { get; }
- }
- public interface NSFileHandleConnectionAcceptedEventArgs {
- [Export ("NSFileHandleNotificationFileHandleItem")]
- NSFileHandle NearSocketConnection { get; }
-
- [Export ("NSFileHandleError", ArgumentSemantic.Assign)]
- int UnixErrorCode { get; }
- }
-
- [BaseType (typeof (NSObject))]
- [DisableDefaultCtor] // return invalid handle
- public interface NSFileHandle
- {
- [Export ("availableData")]
- NSData AvailableData ();
-
- [Export ("readDataToEndOfFile")]
- NSData ReadDataToEndOfFile ();
- [Export ("readDataOfLength:")]
- NSData ReadDataOfLength (uint length);
- [Export ("writeData:")]
- void WriteData (NSData data);
- [Export ("offsetInFile")]
- ulong OffsetInFile ();
- [Export ("seekToEndOfFile")]
- ulong SeekToEndOfFile ();
- [Export ("seekToFileOffset:")]
- void SeekToFileOffset (ulong offset);
- [Export ("truncateFileAtOffset:")]
- void TruncateFileAtOffset (ulong offset);
- [Export ("synchronizeFile")]
- void SynchronizeFile ();
- [Export ("closeFile")]
- void CloseFile ();
-
- [Static]
- [Export ("fileHandleWithStandardInput")]
- NSFileHandle FromStandardInput ();
-
- [Static]
- [Export ("fileHandleWithStandardOutput")]
- NSFileHandle FromStandardOutput ();
- [Static]
- [Export ("fileHandleWithStandardError")]
- NSFileHandle FromStandardError ();
- [Static]
- [Export ("fileHandleWithNullDevice")]
- NSFileHandle FromNullDevice ();
- [Static]
- [Export ("fileHandleForReadingAtPath:")]
- NSFileHandle OpenRead (string path);
- [Static]
- [Export ("fileHandleForWritingAtPath:")]
- NSFileHandle OpenWrite (string path);
- [Static]
- [Export ("fileHandleForUpdatingAtPath:")]
- NSFileHandle OpenUpdate (string path);
- [Static]
- [Export ("fileHandleForReadingFromURL:error:")]
- NSFileHandle OpenReadUrl (NSUrl url, out NSError error);
- [Static]
- [Export ("fileHandleForWritingToURL:error:")]
- NSFileHandle OpenWriteUrl (NSUrl url, out NSError error);
- [Static]
- [Export ("fileHandleForUpdatingURL:error:")]
- NSFileHandle OpenUpdateUrl (NSUrl url, out NSError error);
-
- [Export ("readInBackgroundAndNotifyForModes:")]
- void ReadInBackground (NSString [] notifyRunLoopModes);
-
- [Export ("readInBackgroundAndNotify")]
- void ReadInBackground ();
- [Export ("readToEndOfFileInBackgroundAndNotifyForModes:")]
- void ReadToEndOfFileInBackground (NSString [] notifyRunLoopModes);
- [Export ("readToEndOfFileInBackgroundAndNotify")]
- void ReadToEndOfFileInBackground ();
- [Export ("acceptConnectionInBackgroundAndNotifyForModes:")]
- void AcceptConnectionInBackground (NSString [] notifyRunLoopModes);
- [Export ("acceptConnectionInBackgroundAndNotify")]
- void AcceptConnectionInBackground ();
- [Export ("waitForDataInBackgroundAndNotifyForModes:")]
- void WaitForDataInBackground (NSString [] notifyRunLoopModes);
- [Export ("waitForDataInBackgroundAndNotify")]
- void WaitForDataInBackground ();
-
- [Export ("initWithFileDescriptor:closeOnDealloc:")]
- IntPtr Constructor (int fd, bool closeOnDealloc);
-
- [Export ("initWithFileDescriptor:")]
- IntPtr Constructor (int fd);
- [Export ("fileDescriptor")]
- int FileDescriptor { get; }
- [Export ("setReadabilityHandler:")]
- void SetReadabilityHandler ([NullAllowed] NSFileHandleUpdateHandler readCallback);
- [Export ("setWriteabilityHandler:")]
- void SetWriteabilityHandle ([NullAllowed] NSFileHandleUpdateHandler writeCallback);
- [Field ("NSFileHandleOperationException")]
- NSString OperationException { get; }
- [Field ("NSFileHandleReadCompletionNotification")]
- [Notification (typeof (NSFileHandleReadEventArgs))]
- NSString ReadCompletionNotification { get; }
-
- [Field ("NSFileHandleReadToEndOfFileCompletionNotification")]
- [Notification (typeof (NSFileHandleReadEventArgs))]
- NSString ReadToEndOfFileCompletionNotification { get; }
-
- [Field ("NSFileHandleConnectionAcceptedNotification")]
- [Notification (typeof (NSFileHandleConnectionAcceptedEventArgs))]
- NSString ConnectionAcceptedNotification { get; }
-
- [Field ("NSFileHandleDataAvailableNotification")]
- [Notification]
- NSString DataAvailableNotification { get; }
- }
-
- [BaseType (typeof (NSObject))]
- public interface NSPipe {
-
- [Export ("fileHandleForReading")]
- NSFileHandle ReadHandle { get; }
-
- [Export ("fileHandleForWriting")]
- NSFileHandle WriteHandle { get; }
- [Static]
- [Export ("pipe")]
- NSPipe Create ();
- }
- //@interface NSFormatter : NSObject <NSCopying, NSCoding>
- [BaseType (typeof (NSObject))]
- public interface NSFormatter {
- [Export ("stringForObjectValue:")]
- string StringFor (NSObject value);
- // - (NSAttributedString *)attributedStringForObjectValue:(id)obj withDefaultAttributes:(NSDictionary *)attrs;
- [Export ("editingStringForObjectValue:")]
- string EditingStringFor (NSObject value);
- }
- [BaseType (typeof (NSObject))]
- [Model]
- [Protocol]
- public interface NSKeyedArchiverDelegate {
- [Export ("archiver:didEncodeObject:"), EventArgs ("NSObject")]
- void EncodedObject (NSKeyedArchiver archiver, NSObject obj);
-
- [Export ("archiverDidFinish:")]
- void Finished (NSKeyedArchiver archiver);
-
- [Export ("archiver:willEncodeObject:"), DelegateName ("NSEncodeHook"), DefaultValue (null)]
- NSObject WillEncode (NSKeyedArchiver archiver, NSObject obj);
-
- [Export ("archiverWillFinish:")]
- void Finishing (NSKeyedArchiver archiver);
-
- [Export ("archiver:willReplaceObject:withObject:"), EventArgs ("NSArchiveReplace")]
- void ReplacingObject (NSKeyedArchiver archiver, NSObject oldObject, NSObject newObject);
- }
- [BaseType (typeof (NSObject))]
- [Model]
- [Protocol]
- public interface NSKeyedUnarchiverDelegate {
- [Export ("unarchiver:didDecodeObject:"), DelegateName ("NSDecoderCallback"), DefaultValue (null)]
- NSObject DecodedObject (NSKeyedUnarchiver unarchiver, NSObject obj);
-
- [Export ("unarchiverDidFinish:")]
- void Finished (NSKeyedUnarchiver unarchiver);
-
- [Export ("unarchiver:cannotDecodeObjectOfClassName:originalClasses:"), DelegateName ("NSDecoderHandler"), DefaultValue (null)]
- Class CannotDecodeClass (NSKeyedUnarchiver unarchiver, string klass, string [] classes);
-
- [Export ("unarchiverWillFinish:")]
- void Finishing (NSKeyedUnarchiver unarchiver);
-
- [Export ("unarchiver:willReplaceObject:withObject:"), EventArgs ("NSArchiveReplace")]
- void ReplacingObject (NSKeyedUnarchiver unarchiver, NSObject oldObject, NSObject newObject);
- }
- [BaseType (typeof (NSCoder),
- Delegates=new string [] {"WeakDelegate"},
- Events=new Type [] { typeof (NSKeyedArchiverDelegate) })]
- // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[NSKeyedArchiver init]: cannot use -init for initialization
- [DisableDefaultCtor]
- public interface NSKeyedArchiver {
- [Export ("initForWritingWithMutableData:")]
- IntPtr Constructor (NSMutableData data);
-
- [Export ("archivedDataWithRootObject:")]
- [Static]
- NSData ArchivedDataWithRootObject (NSObject root);
-
- [Export ("archiveRootObject:toFile:")]
- [Static]
- bool ArchiveRootObjectToFile (NSObject root, string file);
- [Export ("finishEncoding")]
- void FinishEncoding ();
- [Export ("outputFormat")]
- NSPropertyListFormat PropertyListFormat { get; set; }
- [Wrap ("WeakDelegate")]
- NSKeyedArchiverDelegate Delegate { get; set; }
- [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
- NSObject WeakDelegate { get; set; }
- [Export ("setClassName:forClass:")]
- void SetClassName (string name, Class kls);
- [Export ("classNameForClass:")]
- string GetClassName (Class kls);
- }
-
- [BaseType (typeof (NSCoder),
- Delegates=new string [] {"WeakDelegate"},
- Events=new Type [] { typeof (NSKeyedUnarchiverDelegate) })]
- // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -[NSKeyedUnarchiver init]: cannot use -init for initialization
- [DisableDefaultCtor]
- public interface NSKeyedUnarchiver {
- [Export ("initForReadingWithData:")]
- [MarshalNativeExceptions]
- IntPtr Constructor (NSData data);
-
- [Static, Export ("unarchiveObjectWithData:")]
- [MarshalNativeExceptions]
- NSObject UnarchiveObject (NSData data);
-
- [Static, Export ("unarchiveObjectWithFile:")]
- [MarshalNativeExceptions]
- NSObject UnarchiveFile (string file);
- [Export ("finishDecoding")]
- void FinishDecoding ();
- [Wrap ("WeakDelegate")]
- NSKeyedUnarchiverDelegate Delegate { get; set; }
- [Export ("delegate", ArgumentSemantic.Assign)][NullAllowed]
- NSObject WeakDelegate { get; set; }
- [Export ("setClass:forClassName:")]
- void SetClass (Class kls, string codedName);
- [Export ("classForClassName:")]
- Class GetClass (string codedName);
- }
- [BaseType (typeof (NSObject), Delegates=new string [] { "Delegate" }, Events=new Type [] { typeof (NSMetadataQueryDelegate)})]
- public interface NSMetadataQuery {
- [Export ("startQuery")]
- bool StartQuery ();
- [Export ("stopQuery")]
- void StopQuery ();
- [Export ("isStarted")]
- bool IsStarted { get; }
- [Export ("isGathering")]
- bool IsGathering { get; }
- [Export ("isStopped")]
- bool IsStopped { get; }
- [Export ("disableUpdates")]
- void DisableUpdates ();
- [Export ("enableUpdates")]
- void EnableUpdates ();
- [Export ("resultCount")]
- int ResultCount { get; }
- [Export ("resultAtIndex:")]
- NSObject ResultAtIndex (int idx);
- [Export ("results")]
- NSMetadataItem[] Results { get; }
- [Export ("indexOfResult:")]
- int IndexOfResult (NSObject result);
- [Export ("valueLists")]
- NSDictionary ValueLists { get; }
- [Export ("groupedResults")]
- NSObject [] GroupedResults { get; }
- [Export ("valueOfAttribute:forResultAtIndex:")]
- NSObject ValueOfAttribute (string attribyteName, int atIndex);
- [Export ("delegate", ArgumentSemantic.Assign), NullAllowed]
- NSMetadataQueryDelegate WeakDelegate { get; set; }
- [Wrap ("WeakDelegate")]
- NSMetadataQueryDelegate Delegate { get; set; }
-
- [Export ("predicate")]
- NSPredicate Predicate { get; set; }
- [Export ("sortDescriptors")]
- NSSortDescriptor[] SortDescriptors { get; set; }
- [Export ("valueListAttributes")]
- NSObject[] ValueListAttributes { get; set; }
- [Export ("groupingAttributes")]
- NSArray GroupingAttributes { get; set; }
- [Export ("notificationBatchingInterval")]
- double NotificationBatchingInterval { get; set; }
- [Export ("searchScopes")]
- NSObject [] SearchScopes { get; set; }
-
- // There is no info associated with these notifications
- [Field ("NSMetadataQueryDidStartGatheringNotification")]
- [Notification]
- NSString DidStartGatheringNotification { get; }
-
- [Field ("NSMetadataQueryGatheringProgressNotification")]
- [Notification]
- NSString GatheringProgressNotification { get; }
-
- [Field ("NSMetadataQueryDidFinishGatheringNotification")]
- [Notification]
- NSString DidFinishGatheringNotification { get; }
-
- [Field ("NSMetadataQueryDidUpdateNotification")]
- [Notification]
- NSString DidUpdateNotification { get; }
-
- [Field ("NSMetadataQueryResultContentRelevanceAttribute")]
- NSString ResultContentRelevanceAttribute { get; }
-
- // Scope constants for defined search locations
- #if MONOMAC
- [Field ("NSMetadataQueryUserHomeScope")]
- NSString UserHomeScope { get; }
-
- [Field ("NSMetadataQueryLocalComputerScope")]
- NSString LocalComputerScope { get; }
-
- [Field ("NSMetadataQueryNetworkScope")]
- NSString QueryNetworkScope { get; }
- [Field ("NSMetadataQueryLocalDocumentsScope")]
- NSString QueryLocalDocumentsScope { get; }
- #endif
- [Field ("NSMetadataQueryUbiquitousDocumentsScope")]
- NSString QueryUbiquitousDocumentsScope { get; }
- [Field ("NSMetadataQueryUbiquitousDataScope")]
- NSString QueryUbiquitousDataScope { get; }
- [Field ("NSMetadataItemFSNameKey")]
- NSString ItemFSNameKey { get; }
- [Field ("NSMetadataItemDisplayNameKey")]
- NSString ItemDisplayNameKey { get; }
- [Field ("NSMetadataItemURLKey")]
- NSString ItemURLKey { get; }
- [Field ("NSMetadataItemPathKey")]
- NSString ItemPathKey { get; }
- [Field ("NSMetadataItemFSSizeKey")]
- NSString ItemFSSizeKey { get; }
- [Field ("NSMetadataItemFSCreationDateKey")]
- NSString ItemFSCreationDateKey { get; }
- [Field ("NSMetadataItemFSContentChangeDateKey")]
- NSString ItemFSContentChangeDateKey { get; }
- [Field ("NSMetadataItemIsUbiquitousKey")]
- NSString ItemIsUbiquitousKey { get; }
- [Field ("NSMetadataUbiquitousItemHasUnresolvedConflictsKey")]
- NSString UbiquitousItemHasUnresolvedConflictsKey { get; }
- [Field ("NSMetadataUbiquitousItemIsDownloadedKey")]
- NSString UbiquitousItemIsDownloadedKey { get; }
- [Field ("NSMetadataUbiquitousItemIsDownloadingKey")]
- NSString UbiquitousItemIsDownloadingKey { get; }
- [Field ("NSMetadataUbiquitousItemIsUploadedKey")]
- NSString UbiquitousItemIsUploadedKey { get; }
- [Field ("NSMetadataUbiquitousItemIsUploadingKey")]
- NSString UbiquitousItemIsUploadingKey { get; }
- [Field ("NSMetadataUbiquitousItemPercentDownloadedKey")]
- NSString UbiquitousItemPercentDownloadedKey { get; }
- [Field ("NSMetadataUbiquitousItemPercentUploadedKey")]
- NSString UbiquitousItemPercentUploadedKey { get; }
- }
- [BaseType (typeof (NSObject))]
- [Model]
- [Protocol]
- public interface NSMetadataQueryDelegate {
- [Export ("metadataQuery:replacementObjectForResultObject:"), DelegateName ("NSMetadataQueryObject"), DefaultValue(null)]
- NSObject ReplacementObjectForResultObject (NSMetadataQuery query, NSMetadataItem result);
- [Export ("metadataQuery:replacementValueForAttribute:value:"), DelegateName ("NSMetadataQueryValue"), DefaultValue(null)]
- NSObject ReplacementValueForAttributevalue (NSMetadataQuery query, string attributeName, NSObject value);
- }
- [BaseType (typeof (NSObject))]
- public interface NSMetadataItem {
- [Export ("valueForAttribute:")]
- NSObject ValueForAttribute (string key);
- [Export ("valuesForAttributes:")]
- NSDictionary ValuesForAttributes (NSArray keys);
- [Export ("attributes")]
- NSObject [] Attributes { get; }
- }
- [BaseType (typeof (NSObject))]
- public interface NSMetadataQueryAttributeValueTuple {
- [Export ("attribute")]
- string Attribute { get; }
- [Export ("value")]
- NSObject Value { get; }
- [Export ("count")]
- int Count { get; }
- }
- [BaseType (typeof (NSObject))]
- public interface NSMetadataQueryResultGroup {
- [Export ("attribute")]
- string Attribute { get; }
- [Export ("value")]
- NSObject Value { get; }
- [Export ("subgroups")]
- NSObject [] Subgroups { get; }
- [Export ("resultCount")]
- int ResultCount { get; }
- [Export ("resultAtIndex:")]
- NSObject ResultAtIndex (uint idx);
- [Export ("results")]
- NSObject [] Results { get; }
- }
- // This API is only supported because a bunch of third-party
- // APIs are so poorly designed that they expose NSMutableArray
- // as a public property.
- [Obsolete ("You really should avoid using NSMutableArray in MonoTouch/MonoMac, this is usually used by poorly designed public APIs")]
- [BaseType (typeof (NSArray))]
- public interface NSMutableArray {
- [Export ("initWithCapacity:")]
- IntPtr Constructor (int capacity);
-
- [Export ("addObject:")]
- void Add (NSObject obj);
- [Export ("insertObject:atIndex:")]
- void Insert (NSObject obj, int index);
- [Export ("removeLastObject")]
- void RemoveLastObject ();
- [Export ("removeObjectAtIndex:")]
- void RemoveObject (int index);
- [Export ("replaceObjectAtIndex:withObject:")]
- void ReplaceObject (int index, NSObject withObject);
- [Export ("removeAllObjects")]
- void RemoveAllObjects ();
- [Export ("addObjectsFromArray:")]
- void AddObjects (NSObject [] source);
- [Export ("insertObjects:atIndexes:")]
- void InsertObjects (NSObject [] objects, NSIndexSet atIndexes);
- [Export ("removeObjectsAtIndexes:")]
- void RemoveObjectsAtIndexes (NSIndexSet indexSet);
- }
-
- [Since (3,2)]
- [BaseType (typeof (NSAttributedString))]
- public interface NSMutableAttributedString {
- [Export ("initWithString:")]
- IntPtr Constructor (string str);
-
- [Export ("initWithString:attributes:")]
- IntPtr Constructor (string str, NSDictionary attributes);
- [Export ("initWithAttributedString:")]
- IntPtr Constructor (NSAttributedString other);
- [Export ("replaceCharactersInRange:withString:")]
- void Replace (NSRange range, string newValue);
- [Export ("setAttributes:range:")]
- void SetAttributes (NSDictionary attrs, NSRange range);
- [Export ("addAttribute:value:range:")]
- void AddAttribute (NSString attributeName, NSObject value, NSRange range);
- [Export ("addAttributes:range:")]
- void AddAttributes (NSDictionary attrs, NSRange range);
- [Export ("removeAttribute:range:")]
- void RemoveAttribute (string name, NSRange range);
-
- [Export ("replaceCharactersInRange:withAttributedString:")]
- void Replace (NSRange range, NSAttributedString value);
-
- [Export ("insertAttributedString:atIndex:")]
- void Insert (NSAttributedString attrString, int location);
- [Export ("appendAttributedString:")]
- void Append (NSAttributedString attrString);
- [Export ("deleteCharactersInRange:")]
- void DeleteRange (NSRange range);
- [Export ("setAttributedString:")]
- void SetString (NSAttributedString attrString);
- [Export ("beginEditing")]
- void BeginEditing ();
- [Export ("endEditing")]
- void EndEditing ();
- }
- [BaseType (typeof (NSData))]
- public interface NSMutableData {
- [Static, Export ("dataWithCapacity:")] [Autorelease]
- NSMutableData FromCapacity (int capacity);
- [Static, Export ("dataWithLength:")] [Autorelease]
- NSMutableData FromLength (int length);
-
- [Static, Export ("data")] [Autorelease]
- NSMutableData Create ();
-
- [Export ("setLength:")]
- void SetLength (uint len);
- [Export ("mutableBytes")]
- IntPtr MutableBytes { get; }
- [Export ("initWithCapacity:")]
- IntPtr Constructor (uint len);
- [Export ("appendData:")]
- void AppendData (NSData other);
- [Export ("appendBytes:length:")]
- void AppendBytes (IntPtr bytes, uint len);
- [Export ("setData:")]
- void SetData (NSData data);
- [Export ("length")]
- [Override]
- uint Length { get; set; }
- }
- [BaseType (typeof (NSObject))]
- public interface NSDate {
- [Export ("timeIntervalSinceReferenceDate")]
- double SecondsSinceReferenceDate { get; }
- [Export ("dateWithTimeIntervalSinceReferenceDate:")]
- [Static]
- NSDate FromTimeIntervalSinceReferenceDate (double secs);
- [Static, Export ("dateWithTimeIntervalSince1970:")]
- NSDate FromTimeIntervalSince1970 (double secs);
- [Export ("date")]
- [Static]
- NSDate Now { get; }
-
- [Export ("distantPast")]
- [Static]
- NSDate DistantPast { get; }
-
- [Export ("distantFuture")]
- [Static]
- NSDate DistantFuture { get; }
- [Export ("dateByAddingTimeInterval:")]
- NSDate AddSeconds (double seconds);
- [Export ("dateWithTimeIntervalSinceNow:")]
- [Static]
- NSDate FromTimeIntervalSinceNow (double secs);
- }
-
- [BaseType (typeof (NSObject))]
- public interface NSDictionary {
- [Export ("dictionaryWithContentsOfFile:")]
- [Static]
- NSDictionary FromFile (string path);
- [Export ("dictionaryWithContentsOfURL:")]
- [Static]
- NSDictionary FromUrl (NSUrl url);
- [Export ("dictionaryWithObject:forKey:")]
- [Static]
- NSDictionary FromObjectAndKey (NSObject obj, NSObject key);
- [Export ("dictionaryWithDictionary:")]
- [Static]
- NSDictionary FromDictionary (NSDictionary source);
- [Export ("dictionaryWithObjects:forKeys:count:")]
- [Static, Internal]
- NSDictionary FromObjectsAndKeysInternal ([NullAllowed] NSArray objects, [NullAllowed] NSArray keys, int count);
- [Export ("dictionaryWithObjects:forKeys:")]
- [Static, Internal]
- NSDictionary FromObjectsAndKeysInternal ([NullAllowed] NSArray objects, [NullAllowed] NSArray keys);
- [Export ("initWithDictionary:")]
- IntPtr Constructor (NSDictionary other);
- [Export ("initWithContentsOfFile:")]
- IntPtr Constructor (string fileName);
- [Export ("initWithObjects:forKeys:"), Internal]
- IntPtr Constructor (NSArray objects, NSArray keys);
- [Export ("initWithContentsOfURL:")]
- IntPtr Constructor (NSUrl url);
-
- [Export ("count")]
- uint Count { get; }
- [Export ("objectForKey:")]
- NSObject ObjectForKey (NSObject key);
- [Export ("allKeys")][Autorelease]
- NSObject [] Keys { get; }
- [Export ("allKeysForObject:")][Autorelease]
- NSObject [] KeysForObject (NSObject obj);
- [Export ("allValues")][Autorelease]
- NSObject [] Values { get; }
- [Export ("descriptionInStringsFileFormat")]
- string DescriptionInStringsFileFormat { get; }
- [Export ("isEqualToDictionary:")]
- bool IsEqualToDictionary (NSDictionary other);
-
- [Export ("objectEnumerator")]
- NSEnumerator ObjectEnumerator { get; }
- [Export ("objectsForKeys:notFoundMarker:")][Autorelease]
- NSObject [] ObjectsForKeys (NSArray keys, NSObject marker);
-
- [Export ("writeToFile:atomically:")]
- bool WriteToFile (string path, bool useAuxiliaryFile);
- [Export ("writeToURL:atomically:")]
- bool WriteToUrl (NSUrl url, bool atomically);
- [Since (6,0)]
- [Static]
- [Export ("sharedKeySetForKeys:")]
- NSObject GetSharedKeySetForKeys (NSObject [] keys);
- }
- [BaseType (typeof (NSObject))]
- public interface NSEnumerator {
- [Export ("nextObject")]
- NSObject NextObject ();
- }
- [BaseType (typeof (NSObject))]
- [DisableDefaultCtor]
- public interface NSError {
- [Static, Export ("errorWithDomain:code:userInfo:")]
- NSError FromDomain (NSString domain, int code, [NullAllowed] NSDictionary userInfo);
- [Export ("initWithDomain:code:userInfo:")]
- IntPtr Constructor (NSString domain, int code, [NullAllowed] NSDictionary userInfo);
-
- [Export ("domain")]
- string Domain { get; }
- [Export ("code")]
- int Code { get; }
- [Export ("userInfo")]
- NSDictionary UserInfo { get; }
- [Export ("localizedDescription")]
- string LocalizedDescription { get; }
- [Field ("NSCocoaErrorDomain")]
- NSString CocoaErrorDomain { get;}
- [Field ("NSPOSIXErrorDomain")]
- NSString PosixErrorDomain { get; }
- [Field ("NSOSStatusErrorDomain")]
- NSString OsStatusErrorDomain { get; }
- [Field ("NSMachErrorDomain")]
- NSString MachErrorDomain { get; }
- [Field ("NSUnderlyingErrorKey")]
- NSString UnderlyingErrorKey { get; }
- [Field ("NSLocalizedDescriptionKey")]
- NSString LocalizedDescriptionKey { get; }
- [Field ("NSLocalizedFailureReasonErrorKey")]
- NSString LocalizedFailureReasonErrorKey { get; }
- [Field ("NSLocalizedRecoverySuggestionErrorKey")]
- NSString LocalizedRecoverySuggestionErrorKey { get; }
- [Field ("NSLocalizedRecoveryOptionsErrorKey")]
- NSString LocalizedRecoveryOptionsErrorKey { get; }
- [Field ("NSRecoveryAttempterErrorKey")]
- NSString RecoveryAttempterErrorKey { get; }
- [Field ("NSHelpAnchorErrorKey")]
- NSString HelpAnchorErrorKey { get; }
- [Field ("NSStringEncodingErrorKey")]
- NSString StringEncodingErrorKey { get; }
- [Field ("NSURLErrorKey")]
- NSString UrlErrorKey { get; }
- [Field ("NSFilePathErrorKey")]
- NSString FilePathErrorKey { get; }
- }
- [BaseType (typeof (NSObject))]
- // 'init' returns NIL
- [DisableDefaultCtor]
- public interface NSException {
- [Export ("initWithName:reason:userInfo:")]
- IntPtr Constructor (string name, string reason, [NullAllowed] NSDictionary userInfo);
- [Export ("name")]
- string Name { get; }
-
- [Export ("reason")]
- string Reason { get; }
-
- [Export ("userInfo")]
- NSObject UserInfo { get; }
- [Export ("callStackReturnAddresses")]
- NSNumber[] CallStackReturnAddresses { get; }
- }
- public delegate void NSExpressionHandler (NSObject evaluatedObject, NSExpression [] expressions, NSMutableDictionary context);
-
- [BaseType (typeof (NSObject))]
- // Objective-C exception thrown. Name: NSInvalidArgumentException Reason: *** -predicateFormat cannot be sent to an abstract object of class NSExpression: Create a concrete instance!
- [DisableDefaultCtor]
- public interface NSExpression {
- [Static, Export ("expressionForConstantValue:")]
- NSExpression FromConstant (NSObject obj);
- [Static, Export ("expressionForEvaluatedObject")]
- NSExpression ExpressionForEvaluatedObject { get; }
- [Static, Export ("expressionForVariable:")]
- NSExpression FromVariable (string string1);
- [Static, Export ("expressionForKeyPath:")]
- NSExpression FromKeyPath (string keyPath);
- [Static, Export ("expressionForFunction:arguments:")]
- NSExpression FromFunction (string name, NSExpression[] parameters);
- [Static, Export ("expressionWithFormat:argumentArray:")]
- NSExpression FromFormat (string format, NSExpression [] parameters);
-
- //+ (NSExpression *)expressionForAggregate:(NSArray *)subexpressions;
- [Static, Export ("expressionForAggregate:")]
- NSExpression FromAggregate…
Large files files are truncated, but you can click here to view the full file