20#ifndef OBJFWRT_OBJFWRT_H
21#define OBJFWRT_OBJFWRT_H
23#ifndef __STDC_LIMIT_MACROS
24# define __STDC_LIMIT_MACROS
26#ifndef __STDC_CONSTANT_MACROS
27# define __STDC_CONSTANT_MACROS
37# define __has_feature(x) 0
40#ifndef __has_attribute
41# define __has_attribute(x) 0
44#if !__has_feature(nullability)
51# ifndef _Null_unspecified
52# define _Null_unspecified
56#if !__has_feature(objc_arc) && !defined(__unsafe_unretained)
57# define __unsafe_unretained
63#define Nil (Class _Null_unspecified)0
68#define nil (id _Null_unspecified)0
102typedef const struct objc_selector *
SEL;
114#if defined(__OBJC__) && !defined(DOXYGEN)
117typedef const struct objc_protocol *Protocol;
123typedef const struct objc_ivar *
Ivar;
130#if !defined(__wii__) && !defined(__amigaos__)
146typedef id _Nullable (*
IMP)(
id _Nonnull object,
SEL _Nonnull selector, ...);
169 id __unsafe_unretained _Nullable
self;
174 Class _Nonnull class_;
176 Class _Nonnull
class;
213extern const char *_Nonnull
sel_getName(
SEL _Nonnull selector);
225extern bool sel_isEqual(
SEL _Nonnull selector1,
SEL _Nonnull selector2);
235extern Class _Nonnull objc_allocateClassPair(Class _Nullable superclass,
236 const char *_Nonnull name,
size_t extraBytes);
243extern void objc_registerClassPair(Class _Nonnull class_);
253extern unsigned int objc_getClassList(Class _Nonnull *_Nullable buffer,
267extern Class _Nonnull *_Nonnull objc_copyClassList(
268 unsigned int *_Nullable length);
276extern bool class_isMetaClass(Class _Nullable class_);
284extern const char *_Nullable class_getName(Class _Nullable class_);
292extern Class _Nullable class_getSuperclass(Class _Nullable class_);
300extern unsigned long class_getInstanceSize(Class _Nullable class_);
310extern bool class_respondsToSelector(Class _Nullable class_,
311 SEL _Nonnull selector);
322 Protocol *_Nonnull protocol);
336extern IMP _Nullable class_getMethodImplementation(Class _Nullable class_,
337 SEL _Nonnull selector);
351extern IMP _Nullable class_getMethodImplementation_stret(Class _Nullable class_,
352 SEL _Nonnull selector);
361extern Method _Nullable class_getInstanceMethod(Class _Nullable class_,
362 SEL _Nonnull selector);
373extern bool class_addMethod(Class _Nonnull class_,
SEL _Nonnull selector,
374 IMP _Nonnull implementation,
const char *_Nullable typeEncoding);
386extern IMP _Nullable class_replaceMethod(Class _Nonnull class_,
387 SEL _Nonnull selector,
IMP _Nonnull implementation,
388 const char *_Nullable typeEncoding);
396extern Class _Nullable object_getClass(
id _Nullable
object);
407extern Class _Nullable object_setClass(
id _Nullable
object,
408 Class _Nonnull class_);
416extern const char *_Nullable object_getClassName(
id _Nullable
object);
434 Protocol *_Nonnull protocol2);
444 Protocol *_Nonnull protocol2);
455extern Method _Nullable *_Nullable class_copyMethodList(Class _Nullable class_,
456 unsigned int *_Nullable outCount);
464extern SEL _Nonnull method_getName(
Method _Nonnull method);
472extern const char *_Nullable method_getTypeEncoding(
Method _Nonnull method);
483extern Ivar _Nullable *_Nullable class_copyIvarList(Class _Nullable class_,
484 unsigned int *_Nullable outCount);
492extern const char *_Nonnull ivar_getName(
Ivar _Nonnull ivar);
500extern const char *_Nonnull ivar_getTypeEncoding(
Ivar _Nonnull ivar);
508extern ptrdiff_t ivar_getOffset(
Ivar _Nonnull ivar);
520 Class _Nullable class_,
unsigned int *_Nullable outCount);
548extern void objc_deinit(
void);
557 objc_setUncaughtExceptionHandler(
567extern void objc_setForwardHandler(
IMP _Nullable forward,
568 IMP _Nullable stretForward);
575extern void objc_setEnumerationMutationHandler(
591extern id _Nullable objc_constructInstance(Class _Nullable class_,
592 void *_Nullable bytes);
600extern void *_Nullable objc_destructInstance(
id _Nullable
object);
610extern id _Nullable class_createInstance(Class _Nullable class_,
621extern id _Nullable object_dispose(
id _Nullable
object);
631extern id _Nonnull _objc_rootRetain(
id _Nonnull
object);
642extern unsigned int _objc_rootRetainCount(
id _Nonnull
object);
651extern void _objc_rootRelease(
id _Nonnull
object);
660extern void *_Null_unspecified objc_autoreleasePoolPush(
void);
669extern void objc_autoreleasePoolPop(
void *_Null_unspecified pool);
680extern id _Nullable _objc_rootAutorelease(
id _Nullable
object);
704extern bool object_isTaggedPointer(
id _Nullable
object);
734 const void *_Nonnull key,
id _Nullable value,
745extern id _Nullable objc_getAssociatedObject(
id _Nonnull
object,
746 const void *_Nonnull key);
753extern void objc_removeAssociatedObjects(
id _Nonnull
object);
763extern void __objc_exec_class(
struct objc_module *_Nonnull module);
765extern IMP _Nonnull objc_msg_lookup(
id _Nullable
object,
SEL _Nonnull selector);
766extern IMP _Nonnull objc_msg_lookup_stret(
id _Nullable
object,
767 SEL _Nonnull selector);
768extern IMP _Nonnull objc_msg_lookup_super(
struct objc_super *_Nonnull super,
769 SEL _Nonnull selector);
770extern IMP _Nonnull objc_msg_lookup_super_stret(
771 struct objc_super *_Nonnull super,
SEL _Nonnull selector);
772extern Class _Nullable objc_lookUpClass(
const char *_Nonnull name);
773extern Class _Nullable objc_getClass(
const char *_Nonnull name);
774extern Class _Nonnull objc_getRequiredClass(
const char *_Nonnull name);
775extern Class _Nullable objc_lookup_class(
const char *_Nonnull name);
776extern Class _Nonnull objc_get_class(
const char *_Nonnull name);
777extern void objc_exception_throw(
id _Nullable
object);
778extern int objc_sync_enter(
id _Nullable
object);
779extern int objc_sync_exit(
id _Nullable
object);
780extern id _Nullable objc_getProperty(
id _Nonnull self,
SEL _Nonnull _cmd,
781 ptrdiff_t offset,
bool atomic);
782extern void objc_setProperty(
id _Nonnull self,
SEL _Nonnull _cmd,
783 ptrdiff_t offset,
id _Nullable value,
bool atomic,
signed char copy);
784extern void objc_getPropertyStruct(
void *_Nonnull dest,
785 const void *_Nonnull src, ptrdiff_t size,
bool atomic,
bool strong);
786extern void objc_setPropertyStruct(
void *_Nonnull dest,
787 const void *_Nonnull src, ptrdiff_t size,
bool atomic,
bool strong);
788extern void objc_enumerationMutation(
id _Nonnull
object);
789#ifndef OBJC_NO_PERSONALITY_DECLARATION
794extern int __gnu_objc_personality_v0(
int version,
int actions,
795 uint64_t exClass,
void *_Nonnull ex,
void *_Nonnull ctx);
796extern int __gnu_objc_personality_sj0(
int version,
int actions,
797 uint64_t exClass,
void *_Nonnull ex,
void *_Nonnull ctx);
799extern id _Nullable objc_retain(
id _Nullable
object);
800extern id _Nullable objc_retainBlock(
id _Nullable block);
801extern id _Nullable objc_retainAutorelease(
id _Nullable
object);
802extern void objc_release(
id _Nullable
object);
803extern id _Nullable objc_autorelease(
id _Nullable
object);
804extern id _Nullable objc_autoreleaseReturnValue(
id _Nullable
object);
805extern id _Nullable objc_retainAutoreleaseReturnValue(
id _Nullable
object);
806extern id _Nullable objc_retainAutoreleasedReturnValue(
id _Nullable
object);
807extern id _Nullable objc_storeStrong(
id _Nullable *_Nonnull
object,
809extern id _Nullable objc_storeWeak(
id _Nullable *_Nonnull
object,
811extern id _Nullable objc_loadWeakRetained(
id _Nullable *_Nonnull
object);
812extern _Nullable
id objc_initWeak(
id _Nullable *_Nonnull
object,
814extern void objc_destroyWeak(
id _Nullable *_Nonnull
object);
815extern id _Nullable objc_loadWeak(
id _Nullable *_Nonnull
object);
816extern void objc_copyWeak(
id _Nullable *_Nonnull dest,
817 id _Nullable *_Nonnull src);
818extern void objc_moveWeak(
id _Nullable *_Nonnull dest,
819 id _Nullable *_Nonnull src);
const struct objc_property * objc_property_t
A property.
Definition ObjFWRT.h:128
SEL sel_registerName(const char *name)
Registers a selector with the specified name with the runtime.
Definition selector.m:75
char * property_copyAttributeValue(objc_property_t property, const char *name)
Copies the specified attribute value.
Definition property.m:233
uintptr_t object_getTaggedPointerValue(id object)
Returns the value of the specified tagged pointer.
Definition tagged-pointer.m:82
void objc_setTaggedPointerSecret(uintptr_t secret)
Sets the tagged pointer secret.
Definition tagged-pointer.m:34
const struct objc_ivar * Ivar
An instance variable.
Definition ObjFWRT.h:123
bool class_conformsToProtocol(Class class_, Protocol *protocol)
Returns whether the specified class conforms to the specified protocol.
Definition protocol.m:60
void(*) objc_enumeration_mutation_handler(id object)
A handler for mutation during enumeration.
Definition ObjFWRT.h:160
const char * sel_getName(SEL selector)
Returns the name of the specified selector.
Definition selector.m:119
const char * protocol_getName(Protocol *protocol)
Returns the name of the specified protocol.
Definition protocol.m:31
void objc_setAssociatedObject(id object, const void *key, id value, objc_associationPolicy policy)
Sets an associated object on the specified object for the specified key.
Definition association.m:131
bool protocol_isEqual(Protocol *protocol1, Protocol *protocol2)
Returns whether two protocols are equal.
Definition protocol.m:37
objc_property_t * class_copyPropertyList(Class class_, unsigned int *outCount)
Copies the property list of the specified class.
Definition property.m:175
void(*) objc_uncaught_exception_handler(id exception)
A handler for uncaught exceptions.
Definition ObjFWRT.h:153
bool protocol_conformsToProtocol(Protocol *protocol1, Protocol *protocol2)
Returns whether the first protocol conforms to the second protocol.
Definition protocol.m:44
bool BOOL
An Objective-C boolean. Either YES or NO.
Definition ObjFWRT.h:137
bool sel_isEqual(SEL selector1, SEL selector2)
Checks two selectors for equality.
Definition selector.m:125
const struct objc_method * Method
A method.
Definition ObjFWRT.h:109
const struct objc_selector * SEL
A selector.
Definition ObjFWRT.h:102
id objc_createTaggedPointer(int class_, uintptr_t value)
Creates a new tagged pointer.
Definition tagged-pointer.m:92
const char * property_getName(objc_property_t property)
Returns the name of the specified property.
Definition property.m:227
int objc_registerTaggedPointerClass(Class class_)
Registers a class for tagged pointers.
Definition tagged-pointer.m:40
objc_associationPolicy
A policy for object association, see objc_setAssociatedObject.
Definition ObjFWRT.h:183
@ OBJC_ASSOCIATION_RETAIN_NONATOMIC
Associate the object like a retained, nonatomic property.
Definition ObjFWRT.h:187
@ OBJC_ASSOCIATION_COPY
Associate the object like a copied property.
Definition ObjFWRT.h:193
@ OBJC_ASSOCIATION_RETAIN
Associate the object like a retained property.
Definition ObjFWRT.h:189
@ OBJC_ASSOCIATION_ASSIGN
Associate the object like an assigned property.
Definition ObjFWRT.h:185
@ OBJC_ASSOCIATION_COPY_NONATOMIC
Associate the object like a copied, nonatomic property.
Definition ObjFWRT.h:191
id(*) IMP(id object, SEL selector,...)
A method implementation.
Definition ObjFWRT.h:146
A pointer to a class.
Definition private.h:36
A pointer to any object.
Definition private.h:66
A struct representing a call to super.
Definition ObjFWRT.h:165
id __unsafe_unretained self
The object on which to perform the super call.
Definition ObjFWRT.h:169