system-header-simulator-objc.h revision 62a5c34ddc54696725683f6c5af1c8e1592c5c38
1#pragma clang system_header 2 3typedef unsigned int UInt32; 4typedef unsigned short UInt16; 5 6typedef signed long CFIndex; 7typedef signed char BOOL; 8typedef unsigned long NSUInteger; 9typedef unsigned short unichar; 10typedef UInt16 UniChar; 11 12enum { 13 NSASCIIStringEncoding = 1, 14 NSNEXTSTEPStringEncoding = 2, 15 NSJapaneseEUCStringEncoding = 3, 16 NSUTF8StringEncoding = 4, 17 NSISOLatin1StringEncoding = 5, 18 NSSymbolStringEncoding = 6, 19 NSNonLossyASCIIStringEncoding = 7, 20}; 21typedef const struct __CFString * CFStringRef; 22typedef struct __CFString * CFMutableStringRef; 23typedef NSUInteger NSStringEncoding; 24typedef UInt32 CFStringEncoding; 25 26typedef const void * CFTypeRef; 27 28typedef const struct __CFAllocator * CFAllocatorRef; 29extern const CFAllocatorRef kCFAllocatorDefault; 30extern const CFAllocatorRef kCFAllocatorSystemDefault; 31extern const CFAllocatorRef kCFAllocatorMalloc; 32extern const CFAllocatorRef kCFAllocatorMallocZone; 33extern const CFAllocatorRef kCFAllocatorNull; 34 35@class NSString, Protocol; 36extern void NSLog(NSString *format, ...) __attribute__((format(__NSString__, 1, 2))); 37typedef struct _NSZone NSZone; 38@class NSInvocation, NSMethodSignature, NSCoder, NSString, NSEnumerator; 39@protocol NSObject 40- (BOOL)isEqual:(id)object; 41- (id)retain; 42- (id)copy; 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 58extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); 59typedef struct { 60} 61NSFastEnumerationState; 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; 74typedef double NSTimeInterval; 75@interface NSDate : NSObject <NSCopying, NSCoding> - (NSTimeInterval)timeIntervalSinceReferenceDate; 76@end 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 95 96typedef struct { 97} 98CFDictionaryKeyCallBacks; 99extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks; 100typedef struct { 101} 102CFDictionaryValueCallBacks; 103extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks; 104typedef const struct __CFDictionary * CFDictionaryRef; 105typedef struct __CFDictionary * CFMutableDictionaryRef; 106extern CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks); 107void CFDictionarySetValue(CFMutableDictionaryRef, const void *, const void *); 108 109 110extern void CFRelease(CFTypeRef cf); 111 112extern CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars, CFIndex capacity, CFAllocatorRef externalCharactersAllocator); 113extern CFStringRef CFStringCreateWithCStringNoCopy(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator); 114extern void CFStringAppend(CFMutableStringRef theString, CFStringRef appendedString); 115