system-header-simulator-objc.h revision 1b22cec353bc6112653d50b060a1d78d70c51527
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+ (id)stringWithString:(NSString *)string;
89@end        @class NSString, NSURL, NSError;
90
91@interface NSMutableString : NSString
92- (void)appendFormat:(NSString *)format, ... __attribute__((format(__NSString__, 1, 2)));
93@end
94
95@interface NSData : NSObject <NSCopying, NSMutableCopying, NSCoding>  - (NSUInteger)length;
96+ (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
97+ (id)dataWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
98- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length;
99- (id)initWithBytesNoCopy:(void *)bytes length:(NSUInteger)length freeWhenDone:(BOOL)b;
100@end
101
102typedef struct {
103}
104CFDictionaryKeyCallBacks;
105extern const CFDictionaryKeyCallBacks kCFTypeDictionaryKeyCallBacks;
106typedef struct {
107}
108CFDictionaryValueCallBacks;
109extern const CFDictionaryValueCallBacks kCFTypeDictionaryValueCallBacks;
110typedef const struct __CFDictionary * CFDictionaryRef;
111typedef struct __CFDictionary * CFMutableDictionaryRef;
112extern CFMutableDictionaryRef CFDictionaryCreateMutable(CFAllocatorRef allocator, CFIndex capacity, const CFDictionaryKeyCallBacks *keyCallBacks, const CFDictionaryValueCallBacks *valueCallBacks);
113void CFDictionarySetValue(CFMutableDictionaryRef, const void *, const void *);
114
115
116extern void CFRelease(CFTypeRef cf);
117
118extern CFMutableStringRef CFStringCreateMutableWithExternalCharactersNoCopy(CFAllocatorRef alloc, UniChar *chars, CFIndex numChars, CFIndex capacity, CFAllocatorRef externalCharactersAllocator);
119extern CFStringRef CFStringCreateWithCStringNoCopy(CFAllocatorRef alloc, const char *cStr, CFStringEncoding encoding, CFAllocatorRef contentsDeallocator);
120extern void CFStringAppend(CFMutableStringRef theString, CFStringRef appendedString);
121
122void SystemHeaderFunctionWithBlockParam(void *, void (^block)(void *), unsigned);
123
124@interface NSPointerArray : NSObject <NSFastEnumeration, NSCopying, NSCoding>
125- (void)addPointer:(void *)pointer;
126- (void)insertPointer:(void *)item atIndex:(NSUInteger)index;
127- (void)replacePointerAtIndex:(NSUInteger)index withPointer:(void *)item;
128- (void *)pointerAtIndex:(NSUInteger)index;
129@end
130
131