brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · 1f6a2b1 Raw
106 lines · c
1#pragma clang system_header2 3#define nil 04#define BOOL int5 6#define NS_ASSUME_NONNULL_BEGIN _Pragma("clang assume_nonnull begin")7#define NS_ASSUME_NONNULL_END   _Pragma("clang assume_nonnull end")8 9NS_ASSUME_NONNULL_BEGIN10 11typedef struct _NSZone NSZone;12typedef unsigned long NSUInteger;13@class NSCoder, NSEnumerator;14 15@protocol NSObject16+ (instancetype)alloc;17- (instancetype)init;18- (instancetype)autorelease;19@end20 21@protocol NSCopying22- (id)copyWithZone:(nullable NSZone *)zone;23@end24 25@protocol NSMutableCopying26- (id)mutableCopyWithZone:(nullable NSZone *)zone;27@end28 29@protocol NSCoding30- (void)encodeWithCoder:(NSCoder *)aCoder;31@end32 33@protocol NSSecureCoding <NSCoding>34@required35+ (BOOL)supportsSecureCoding;36@end37 38typedef struct {39  unsigned long state;40  id *itemsPtr;41  unsigned long *mutationsPtr;42  unsigned long extra[5];43} NSFastEnumerationState;44 45__attribute__((objc_root_class))46@interface47NSObject<NSObject>48@end49 50@interface NSString : NSObject<NSCopying>51- (BOOL)isEqualToString : (NSString *)aString;52- (NSString *)stringByAppendingString:(NSString *)aString;53- (nullable NSString *)nullableStringByAppendingString:(NSString *)aString;54+ (NSString * _Nonnull) generateString;55+ (NSString *) generateImplicitlyNonnullString;56+ (NSString * _Nullable) generatePossiblyNullString;57@end58 59void NSSystemFunctionTakingNonnull(NSString *s);60 61@interface NSSystemClass : NSObject62- (void) takesNonnull:(NSString *)s;63@end64 65NSString* _Nullable getPossiblyNullString();66NSString* _Nonnull  getString();67 68@protocol MyProtocol69- (NSString * _Nonnull) getString;70@end71 72NS_ASSUME_NONNULL_END73 74@interface NSDictionary : NSObject <NSCopying, NSMutableCopying, NSSecureCoding>75 76- (NSUInteger)count;77- (id)objectForKey:(id)aKey;78- (NSEnumerator *)keyEnumerator;79- (id)objectForKeyedSubscript:(id)aKey;80 81@end82 83@interface NSDictionary (NSDictionaryCreation)84 85+ (id)dictionary;86+ (id)dictionaryWithObject:(id)object forKey:(id <NSCopying>)key;87+ (instancetype)dictionaryWithObjects:(const id [])objects forKeys:(const id <NSCopying> [])keys count:(NSUInteger)cnt;88 89@end90 91@interface NSMutableDictionary : NSDictionary92 93- (void)removeObjectForKey:(id)aKey;94- (void)setObject:(id)anObject forKey:(id <NSCopying>)aKey;95 96@end97 98@interface NSMutableDictionary (NSExtendedMutableDictionary)99 100- (void)addEntriesFromDictionary:(NSDictionary *)otherDictionary;101- (void)removeAllObjects;102- (void)setDictionary:(NSDictionary *)otherDictionary;103- (void)setObject:(id)obj forKeyedSubscript:(id <NSCopying>)key __attribute__((availability(macosx,introduced=10.8)));104 105@end106