Objective-C runtime, providing class introspection, protocols and resolution of selectors to the methods. More...
|
Modules | |
| Foundation Framework | |
| Foundational classes and types. | |
| Application Framework | |
| An application, and the run loop which dispatches its events on one or more cores. | |
| Graphics Framework | |
| Displays, which the application redraws when they've changed, and drawing on them. | |
| Devices Framework | |
| A class for each device, named after it: displays, such as SDLWindow, DRMDisplay, Pimoroni's boards and packs and Waveshare's e-paper HATs, which are NXDisplays, and inputs, such as LinuxInput, which send NXKeyEvents and NXMoveEvents. | |
| Network Framework | |
| It includes the Application framework, which it builds on. | |
Classes | |
| protocol | <ObjectProtocol> |
| Protocol for objects. More... | |
| class | Object |
| The root class of all Objective-C classes. More... | |
| class | Protocol |
| Protocol class definition. More... | |
Macros | |
| #define | objc_assert(condition) |
| Asserts that a condition is true. More... | |
| #define | OBJC_SYNC_CAPACITY 32 |
| Maximum number of objects which can be locked at any one time, by all threads together. More... | |
| #define | nil ((id)0) |
| A null object pointer. | |
| #define | Nil ((Class)0) |
| A null class pointer. | |
| #define | YES true |
The Boolean value true. | |
| #define | NO false |
The Boolean value false. | |
| #define | OBJC_ROOT_CLASS |
| A macro to declare a class as a root class. More... | |
| #define | OBJC_UNUSED |
| A macro to declare a method parameter is unused. More... | |
| #define | OBJC_REQUIRES_NIL_TERMINATION |
| A macro to indicate that a method requires a nil-terminated list of arguments. More... | |
Typedefs | |
| typedef struct objc_object * | id |
| A pointer to an instance of a class. | |
| typedef const struct objc_selector * | SEL |
| A pointer to a method selector. | |
| typedef struct objc_class * | Class |
| A pointer to a class definition. | |
| typedef id(* | IMP) (id, SEL,...) |
| A pointer to a method implementation. | |
| typedef struct objc_method * | Method |
| A pointer to a method. | |
| typedef struct objc_protocol | objc_protocol_t |
| An instance of a protocol. | |
| typedef bool | BOOL |
| A Boolean value. | |
Functions | |
| int | objc_sync_enter (id obj) |
| Acquire a lock on the specified object for thread synchronization. More... | |
| int | objc_sync_exit (id obj) |
| Release a lock on the specified object. More... | |
| Class | objc_lookupClass (const char *name) |
| Looks up a class by name. More... | |
| size_t | objc_getClassList (Class *classes, size_t count) |
| Returns the classes which are registered. More... | |
| const char * | class_getName (Class cls) |
| Returns the name of a class. More... | |
| const char * | object_getClassName (id obj) |
| Returns the name of an object's class. More... | |
| Class | object_getClass (id object) |
| Returns the class of an object. More... | |
| void | object_setClass (id object, Class cls) |
| Sets the class of an object. More... | |
| BOOL | object_respondsToSelector (id object, SEL sel) |
| Checks if an instance's class responds to a selector. More... | |
| const char * | object_getMethodTypes (id object, SEL sel) |
| Returns the types of a method's result and arguments. More... | |
| Class | object_getSuperclass (id obj) |
| Returns the superclass of an object. More... | |
| Class | class_getSuperclass (Class cls) |
| Returns the superclass of a class. More... | |
| BOOL | object_isKindOfClass (id object, Class cls) |
| Checks if an instance class matches, or subclass of another class. More... | |
| size_t | class_getInstanceSize (Class cls) |
| Returns the size of an instance of a class. More... | |
| BOOL | class_metaclassRespondsToSelector (Class cls, SEL sel) |
| Checks if a class object responds to a selector. More... | |
| BOOL | class_respondsToSelector (Class cls, SEL sel) |
| Checks if an instance of a class responds to a selector. More... | |
| IMP | objc_msg_lookup (id receiver, SEL selector) |
| Finds the implementation of a method, as when a message is sent. More... | |
| void | objc_enumerationMutation (id object) |
| Panics, as a collection changed while a for...in loop went through it. More... | |
| const char * | sel_getName (SEL sel) |
| Returns the name of a selector. More... | |
| const char * | proto_getName (objc_protocol_t *protocol) |
| Returns the name of a protocol. More... | |
| BOOL | proto_conformsTo (objc_protocol_t *protocol, objc_protocol_t *otherProtocol) |
| Checks if a protocol conforms to another protocol. More... | |
| BOOL | class_conformsTo (Class cls, objc_protocol_t *otherProtocol) |
| Checks if a class conforms to a protocol. More... | |
Objective-C runtime, providing class introspection, protocols and resolution of selectors to the methods.
| #define objc_assert | ( | condition | ) |
Asserts that a condition is true.
| condition | The condition to check. |
If the DEBUG macro is defined, this macro will check the given condition. If the condition is false, it will call panicf with an assertion failure message, including the condition, file name, and line number. If DEBUG is not defined, this macro does nothing.
| #define OBJC_REQUIRES_NIL_TERMINATION |
| #define OBJC_ROOT_CLASS |
| #define OBJC_SYNC_CAPACITY 32 |
| #define OBJC_UNUSED |
| BOOL class_conformsTo | ( | Class | cls, |
| objc_protocol_t * | otherProtocol | ||
| ) |
Checks if a class conforms to a protocol.
| cls | The class to test for conformance. |
| otherProtocol | The protocol to check conformance against. |
YES if methods of a cls conforms to otherProtocol, NO otherwise. | size_t class_getInstanceSize | ( | Class | cls | ) |
Returns the size of an instance of a class.
| cls | The class to inspect. |
Nil. | const char* class_getName | ( | Class | cls | ) |
Returns the name of a class.
| cls | The class to inspect. |
NULL if cls is Nil. Returns the superclass of a class.
| cls | The class to inspect. |
Nil if it is a root class. Checks if a class object responds to a selector.
| cls | The class to inspect. |
| sel | The selector to check. |
YES if the class responds to the selector, NO otherwise. Checks if an instance of a class responds to a selector.
| cls | The class to inspect. |
| sel | The selector to check. |
YES if instances of the class respond to the selector, NO otherwise. | void objc_enumerationMutation | ( | id | object | ) |
Panics, as a collection changed while a for...in loop went through it.
| object | The collection. |
The compiler calls this, when the count of changes which the collection gave the loop isn't what it was.
| size_t objc_getClassList | ( | Class * | classes, |
| size_t | count | ||
| ) |
Returns the classes which are registered.
| classes | A buffer for the classes, or NULL to only count them. |
| count | The number of classes the buffer has room for. |
| Class objc_lookupClass | ( | const char * | name | ) |
Looks up a class by name.
| name | The name of the class to look up. |
Nil if the class is not found. Finds the implementation of a method, as when a message is sent.
| receiver | The object or class which would receive the message. |
| selector | The selector for the message. |
| int objc_sync_enter | ( | id | obj | ) |
Acquire a lock on the specified object for thread synchronization.
| obj | The object to lock. Nothing is done if it's nil. |
If another thread holds the lock, this blocks until it's released. A thread can lock an object again which it has already locked, as long as it unlocks it as many times.
| int objc_sync_exit | ( | id | obj | ) |
Release a lock on the specified object.
| obj | The object to unlock. Must be the same object passed to objc_sync_enter(). |
Returns the class of an object.
| object | The object to inspect. |
Nil if the object is nil. | const char* object_getClassName | ( | id | obj | ) |
Returns the name of an object's class.
| obj | The object to inspect. |
NULL if obj is nil. Returns the types of a method's result and arguments.
| object | The object or class which has the method. |
| sel | The selector for the method. |
NULL if there's no such method. Returns the superclass of an object.
| obj | The object to inspect. |
Nil if it is a root class. Checks if an instance class matches, or subclass of another class.
| object | The object to inspect. |
| cls | The class to compare against. |
YES if object class matches or is a subclass of cls, NO otherwise. Checks if an instance's class responds to a selector.
| object | The object to inspect. |
| sel | The selector to check. |
YES if instances of the class respond to the selector, NO otherwise. Sets the class of an object.
| object | The object to modify. |
| cls | The new class for the object. |
| BOOL proto_conformsTo | ( | objc_protocol_t * | protocol, |
| objc_protocol_t * | otherProtocol | ||
| ) |
Checks if a protocol conforms to another protocol.
| protocol | The protocol to test for conformance. |
| otherProtocol | The protocol to check conformance against. |
YES if protocol conforms to otherProtocol, NO otherwise. | const char* proto_getName | ( | objc_protocol_t * | protocol | ) |
Returns the name of a protocol.
| protocol | The protocol to inspect. |
NULL if protocol is NULL. | const char* sel_getName | ( | SEL | sel | ) |
Returns the name of a selector.
| sel | The selector to inspect. |