/ include / CoreFoundation / NSBlock.h
NSBlock.h
 1  #import <Foundation/NSObject.h>
 2  #import <Foundation/NSDate.h>
 3  
 4  BLOCK_EXPORT void * _NSConcreteMallocBlock[32];
 5  BLOCK_EXPORT void * _NSConcreteAutoBlock[32];
 6  BLOCK_EXPORT void * _NSConcreteFinalizingBlock[32];
 7  BLOCK_EXPORT void * _NSConcreteWeakBlockVariable[32];
 8  BLOCK_EXPORT void * _NSConcreteGlobalBlock[32];
 9  BLOCK_EXPORT void * _NSConcreteStackBlock[32];
10  
11  extern bool _Block_tryRetain(const void *aBlock);
12  extern bool _Block_isDeallocating(const void *aBlock);
13  
14  @interface NSBlock : NSObject
15  
16  - (void)performAfterDelay:(NSTimeInterval)delay;
17  - (void)invoke;
18  - (id)copyWithZone:(NSZone *)zone;
19  - (id)copy;
20  
21  @end
22  
23  @interface __NSStackBlock : NSBlock
24  
25  - (id)autorelease;
26  - (NSUInteger)retainCount;
27  - (oneway void)release;
28  - (id)retain;
29  
30  @end
31  
32  @interface __NSMallocBlock : NSBlock
33  
34  - (BOOL)_isDeallocating;
35  - (BOOL)_tryRetain;
36  - (unsigned int)retainCount;
37  - (oneway void)release;
38  - (id)retain;
39  
40  @end
41  
42  @interface __NSAutoBlock : NSBlock
43  
44  - (id)copyWithZone:(NSZone *)zone;
45  - (id)copy;
46  
47  @end
48  
49  @interface __NSFinalizingBlock : __NSAutoBlock
50  
51  - (void)finalize;
52  
53  @end
54  
55  @interface __NSGlobalBlock : NSBlock
56  
57  - (BOOL)_isDeallocating;
58  - (BOOL)_tryRetain;
59  - (NSUInteger)retainCount;
60  - (id)retain;
61  - (oneway void)release;
62  - (id)copyWithZone:(NSZone *)zone;
63  - (id)copy;
64  
65  @end
66  
67  struct Block_byref {
68      void *_field1;
69      struct Block_byref *_field2;
70      int _field3;
71      unsigned int _field4;
72      void *_field5;
73      void *_field6;
74  };
75  
76  @interface __NSBlockVariable : NSObject {
77      struct Block_byref *forwarding;
78      int flags;
79      int size;
80      void *byref_keep;
81      void *byref_destroy;
82      id containedObject;
83  }
84  
85  @end