Anna Zaks | 3cd89ad | 2012-02-24 23:56:53 +0000 | [diff] [blame] | 1 | #pragma clang system_header |
| 2 | |
| 3 | typedef unsigned int UInt32; |
Anna Zaks | 07d39a4 | 2012-02-28 01:54:22 +0000 | [diff] [blame] | 4 | typedef unsigned short UInt16; |
| 5 | |
Anna Zaks | 3cd89ad | 2012-02-24 23:56:53 +0000 | [diff] [blame] | 6 | typedef signed long CFIndex; |
| 7 | typedef signed char BOOL; |
| 8 | typedef unsigned long NSUInteger; |
Anna Zaks | 07d39a4 | 2012-02-28 01:54:22 +0000 | [diff] [blame] | 9 | typedef unsigned short unichar; |
| 10 | typedef UInt16 UniChar; |
| 11 | |
| 12 | enum { |
| 13 | NSASCIIStringEncoding = 1, |
| 14 | NSNEXTSTEPStringEncoding = 2, |
| 15 | NSJapaneseEUCStringEncoding = 3, |
| 16 | NSUTF8StringEncoding = 4, |
| 17 | NSISOLatin1StringEncoding = 5, |
| 18 | NSSymbolStringEncoding = 6, |
| 19 | NSNonLossyASCIIStringEncoding = 7, |
| 20 | }; |
| 21 | typedef const struct __CFString * CFStringRef; |
| 22 | typedef struct __CFString * CFMutableStringRef; |
| 23 | typedef NSUInteger NSStringEncoding; |
| 24 | typedef UInt32 CFStringEncoding; |
| 25 | |
| 26 | typedef const void * CFTypeRef; |
| 27 | |
| 28 | typedef const struct __CFAllocator * CFAllocatorRef; |
| 29 | extern const CFAllocatorRef kCFAllocatorDefault; |
| 30 | extern const CFAllocatorRef kCFAllocatorSystemDefault; |
| 31 | extern const CFAllocatorRef kCFAllocatorMalloc; |
| 32 | extern const CFAllocatorRef kCFAllocatorMallocZone; |
| 33 | extern const CFAllocatorRef kCFAllocatorNull; |
| 34 | |
Anna Zaks | 3cd89ad | 2012-02-24 23:56:53 +0000 | [diff] [blame] | 35 | @class NSString, Protocol; |
| 36 | extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); |
| 37 | typedef struct _NSZone NSZone; |
| 38 | @class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; |
| 39 | @protocol NSObject |
| 40 | - (BOOL)isEqual:(id)object; |
| 41 | - (id)retain; |
Anna Zaks | 62a5c34 | 2012-03-30 05:48:16 +0000 | [diff] [blame] | 42 | - (id)copy; |
Anna Zaks | 3cd89ad | 2012-02-24 23:56:53 +0000 | [diff] [blame] | 43 | - (oneway void)release; |
| 44 | - (id)autorelease; |
| 45 | - (id)init; |
| 46 | @end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone; |
| 47 | @end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone; |
| 48 | @end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; |
| 49 | @end |
| 50 | @interface NSObject <NSObject> {} |
| 51 | + (id)allocWithZone:(NSZone *)zone; |
| 52 | + (id)alloc; |
| 53 | - (void)dealloc; |
| 54 | @end |
| 55 | @interface NSObject (NSCoderMethods) |
| 56 | - (id)awakeAfterUsingCoder:(NSCoder *)aDecoder; |
| 57 | @end |
| 58 | extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); |
| 59 | typedef struct { |
| 60 | } |
| 61 | NSFastEnumerationState; |
| 62 | @protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; |
| 63 | @end @class NSString, NSDictionary; |
| 64 | @interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value; |
| 65 | @end @interface NSNumber : NSValue - (char)charValue; |
| 66 | - (id)initWithInt:(int)value; |
| 67 | @end @class NSString; |
| 68 | @interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> - (NSUInteger)count; |
| 69 | @end @interface NSArray (NSArrayCreation) + (id)array; |
| 70 | @end @interface NSAutoreleasePool : NSObject { |
| 71 | } |
| 72 | - (void)drain; |
| 73 | @end extern NSString * const NSBundleDidLoadNotification; |
| 74 | typedef double NSTimeInterval; |
| 75 | @interface NSDate : NSObject <NSCopying, NSCoding> - (NSTimeInterval)timeIntervalSinceReferenceDate; |
Anna Zaks | 07d39a4 | 2012-02-28 01:54:22 +0000 | [diff] [blame] | 76 | @end |
Anna Zaks | 3cd89ad | 2012-02-24 23:56:53 +0000 | [diff] [blame] | 77 | |
| 78 | @interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding> |
| 79 | - (NSUInteger)length; |
| 80 | - (NSString *)stringByAppendingString:(NSString *)aString; |
| 81 | - ( const char *)UTF8String; |
| 82 | - (id)initWithUTF8String:(const char *)nullTerminatedCString; |
| 83 | - (id)initWithCharactersNoCopy:(unichar *)characters length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer; |
| 84 | - (id)initWithCharacters:(const unichar *)characters length:(NSUInteger)length; |
| 85 | - (id)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding; |
| 86 | - (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer; |
| 87 | + (id)stringWithUTF8String:(const char *)nullTerminatedCString; |
| 88 | @end @class NSString, NSURL, NSError; |
| 89 | @interface NSData : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSUInteger)length; |
| 90 | + (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; |
| 91 | + (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; |
| 92 | - (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; |
| 93 | - (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; |
| 94 | @end |
Anna Zaks | 07d39a4 | 2012-02-28 01:54:22 +0000 | [diff] [blame] | 95 | |
Anna Zaks | ca23eb2 | 2012-02-29 18:42:47 +0000 | [diff] [blame] | 96 | typedef struct { |
| 97 | } |
| 98 | CFDictionaryKeyCallBacks; |
| 99 | extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks; |
| 100 | typedef struct { |
| 101 | } |
| 102 | CFDictionaryValueCallBacks; |
| 103 | extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks; |
| 104 | typedef const struct __CFDictionary * CFDictionaryRef; |
| 105 | typedef struct __CFDictionary * CFMutableDictionaryRef; |
| 106 | extern CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks); |
| 107 | void CFDictionarySetValue(CFMutableDictionaryRef, const void *, const void *); |
| 108 | |
Anna Zaks | 07d39a4 | 2012-02-28 01:54:22 +0000 | [diff] [blame] | 109 | |
| 110 | extern void CFRelease(CFTypeRef cf); |
| 111 | |
| 112 | extern CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars, CFIndex capacity, CFAllocatorRef externalCharactersAllocator); |
| 113 | extern CFStringRef CFStringCreateWithCStringNoCopy(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator); |
| 114 | extern void CFStringAppend(CFMutableStringRef theString, CFStringRef appendedString); |
Anna Zaks | aca0ac5 | 2012-05-03 23:50:28 +0000 | [diff] [blame] | 115 | |
| 116 | void SystemHeaderFunctionWithBlockParam(void *, void (^block)(void *), unsigned); |