system-header-simulator-objc.h revision ca23eb212c78ac5bc62d0881635579dbe7095639
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- (oneway void)release; 43- (id)autorelease; 44- (id)init; 45@end @protocol NSCopying - (id)copyWithZone:(NSZone *)zone; 46@end @protocol NSMutableCopying - (id)mutableCopyWithZone:(NSZone *)zone; 47@end @protocol NSCoding - (void)encodeWithCoder:(NSCoder *)aCoder; 48@end 49@interface NSObject <NSObject> {} 50+ (id)allocWithZone:(NSZone *)zone; 51+ (id)alloc; 52- (void)dealloc; 53@end 54@interface NSObject (NSCoderMethods) 55- (id)awakeAfterUsingCoder:(NSCoder *)aDecoder; 56@end 57extern id NSAllocateObject(Class aClass, NSUInteger extraBytes, NSZone *zone); 58typedef struct { 59} 60NSFastEnumerationState; 61@protocol NSFastEnumeration - (NSUInteger)countByEnumeratingWithState:(NSFastEnumerationState *)state objects:(id *)stackbuf count:(NSUInteger)len; 62@end @class NSString, NSDictionary; 63@interface NSValue : NSObject <NSCopying, NSCoding> - (void)getValue:(void *)value; 64@end @interface NSNumber : NSValue - (char)charValue; 65- (id)initWithInt:(int)value; 66@end @class NSString; 67@interface NSArray : NSObject <NSCopying, NSMutableCopying, NSCoding, NSFastEnumeration> - (NSUInteger)count; 68@end @interface NSArray (NSArrayCreation) + (id)array; 69@end @interface NSAutoreleasePool : NSObject { 70} 71- (void)drain; 72@end extern NSString * const NSBundleDidLoadNotification; 73typedef double NSTimeInterval; 74@interface NSDate : NSObject <NSCopying, NSCoding> - (NSTimeInterval)timeIntervalSinceReferenceDate; 75@end 76 77@interface NSString : NSObject <NSCopying, NSMutableCopying, NSCoding> 78- (NSUInteger)length; 79- (NSString *)stringByAppendingString:(NSString *)aString; 80- ( const char *)UTF8String; 81- (id)initWithUTF8String:(const char *)nullTerminatedCString; 82- (id)initWithCharactersNoCopy:(unichar *)characters length:(NSUInteger)length freeWhenDone:(BOOL)freeBuffer; 83- (id)initWithCharacters:(const unichar *)characters length:(NSUInteger)length; 84- (id)initWithBytes:(const void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding; 85- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)len encoding:(NSStringEncoding)encoding freeWhenDone:(BOOL)freeBuffer; 86+ (id)stringWithUTF8String:(const char *)nullTerminatedCString; 87@end @class NSString, NSURL, NSError; 88@interface NSData : NSObject <NSCopying, NSMutableCopying, NSCoding> - (NSUInteger)length; 89+ (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; 90+ (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; 91- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length; 92- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b; 93@end 94 95typedef struct { 96} 97CFDictionaryKeyCallBacks; 98extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks; 99typedef struct { 100} 101CFDictionaryValueCallBacks; 102extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks; 103typedef const struct __CFDictionary * CFDictionaryRef; 104typedef struct __CFDictionary * CFMutableDictionaryRef; 105extern CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks); 106void CFDictionarySetValue(CFMutableDictionaryRef, const void *, const void *); 107 108 109extern void CFRelease(CFTypeRef cf); 110 111extern CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars, CFIndex capacity, CFAllocatorRef externalCharactersAllocator); 112extern CFStringRef CFStringCreateWithCStringNoCopy(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator); 113extern void CFStringAppend(CFMutableStringRef theString, CFStringRef appendedString); 114