17 #import "objfw-defs.h"
19 #ifndef __STDC_LIMIT_MACROS
20 # define __STDC_LIMIT_MACROS
22 #ifndef __STDC_CONSTANT_MACROS
23 # define __STDC_CONSTANT_MACROS
34 OF_ASSUME_NONNULL_BEGIN
80 of_range(
size_t start,
size_t length)
112 of_point(
float x,
float y)
139 of_dimension(
float width,
float height)
168 of_rectangle(
float x,
float y,
float width,
float height)
172 of_dimension(width, height)
207 - (bool)isKindOfClass: (Class)class_;
216 - (bool)isMemberOfClass: (Class)class_;
225 - (bool)respondsToSelector: (
SEL)selector;
233 - (bool)conformsToProtocol: (Protocol*)protocol;
241 - (nullable IMP)methodForSelector: (
SEL)selector;
249 - (nullable const char*)typeEncodingForSelector: (
SEL)selector;
257 - (nullable id)performSelector: (
SEL)selector;
267 - (nullable id)performSelector: (
SEL)selector
268 withObject: (nullable
id)object;
280 - (nullable id)performSelector: (
SEL)selector
281 withObject: (nullable
id)object1
282 withObject: (nullable
id)object2;
296 - (bool)isEqual: (nullable
id)object;
442 + (bool)isSubclassOfClass: (Class)class_;
458 + (bool)instancesRespondToSelector: (
SEL)selector;
466 + (bool)conformsToProtocol: (Protocol*)protocol;
476 + (nullable IMP)instanceMethodForSelector: (
SEL)selector;
485 + (nullable const char*)typeEncodingForInstanceSelector: (
SEL)selector;
503 + (nullable IMP)replaceClassMethod: (
SEL)selector
504 withMethodFromClass: (Class)class_;
514 + (nullable IMP)replaceInstanceMethod: (
SEL)selector
515 withMethodFromClass: (Class)class_;
529 + (nullable IMP)replaceClassMethod: (
SEL)selector
530 withImplementation: (IMP)implementation
531 typeEncoding: (const
char*)typeEncoding;
545 + (nullable IMP)replaceInstanceMethod: (
SEL)selector
546 withImplementation: (IMP)implementation
547 typeEncoding: (const
char*)typeEncoding;
567 + (void)inheritMethodsFromClass: (Class)class_;
577 + (bool)resolveClassMethod: (
SEL)selector;
587 + (bool)resolveInstanceMethod: (
SEL)selector;
638 - (void*)allocMemoryWithSize: (
size_t)size;
650 - (void*)allocMemoryWithSize: (
size_t)size
651 count: (
size_t)count;
663 - (nullable void*)resizeMemory: (nullable
void*)pointer
678 - (nullable void*)resizeMemory: (nullable
void*)pointer
680 count: (
size_t)count;
689 - (void)freeMemory: (nullable
void*)pointer;
706 - (void)performSelector: (
SEL)selector
718 - (void)performSelector: (
SEL)selector
719 withObject: (nullable
id)object
733 - (void)performSelector: (
SEL)selector
734 withObject: (nullable
id)object1
735 withObject: (nullable
id)object2
738 #ifdef OF_HAVE_THREADS
746 - (void)performSelector: (
SEL)selector
748 waitUntilDone: (
bool)waitUntilDone;
760 - (void)performSelector: (
SEL)selector
762 withObject: (nullable
id)object
763 waitUntilDone: (
bool)waitUntilDone;
777 - (void)performSelector: (
SEL)selector
779 withObject: (nullable
id)object1
780 withObject: (nullable
id)object2
781 waitUntilDone: (
bool)waitUntilDone;
789 - (void)performSelectorOnMainThread: (
SEL)selector
790 waitUntilDone: (
bool)waitUntilDone;
801 - (void)performSelectorOnMainThread: (
SEL)selector
802 withObject: (nullable
id)object
803 waitUntilDone: (
bool)waitUntilDone;
816 - (void)performSelectorOnMainThread: (
SEL)selector
817 withObject: (nullable
id)object1
818 withObject: (nullable
id)object2
819 waitUntilDone: (
bool)waitUntilDone;
829 - (void)performSelector: (
SEL)selector
843 - (void)performSelector: (
SEL)selector
845 withObject: (nullable
id)object
860 - (void)performSelector: (
SEL)selector
862 withObject: (nullable
id)object1
863 withObject: (nullable
id)object2
877 - (nullable id)forwardingTargetForSelector: (
SEL)selector;
887 - (void)doesNotRecognizeSelector: (
SEL)selector OF_NO_RETURN;
945 extern id of_alloc_object(Class class_,
size_t extraSize,
946 size_t extraAlignment,
void *OF_NULLABLE *OF_NULLABLE extra);
947 extern void OF_NO_RETURN_FUNC of_method_not_found(
id self,
SEL _cmd);
948 extern uint32_t of_hash_seed;
953 OF_ASSUME_NONNULL_END
955 #import "OFObject+Serialization.h"
id init()
Initializes an already allocated object.
Definition: OFObject.m:484
void load()
A method which is called once when the class is loaded into the runtime.
Definition: OFObject.m:217
of_dimension_t size
Definition: OFObject.h:155
uint32_t hash()
Calculates a hash for the object.
A protocol for comparing objects.
Definition: OFObject.h:933
A point.
Definition: OFObject.h:97
void release()
Decreases the retain count.
of_byte_order_t
An enum for storing endianess.
Definition: OFObject.h:53
id copy()
Copies the object.
The root class for all other classes inside ObjFW.
Definition: OFObject.h:364
A dimension.
Definition: OFObject.h:124
OFString * description()
Returns a description for the class, which is usually the class name.
Definition: OFObject.m:328
Class superclass()
Returns the superclass of the class.
Definition: OFObject.m:288
Definition: OFObject.h:43
id autorelease()
Adds the object to the topmost OFAutoreleasePool of the thread's autorelease pool stack...
float x
Definition: OFObject.h:99
id mutableCopy()
Creates a mutable copy of the object.
A class for handling strings.
Definition: OFString.h:91
float height
Definition: OFObject.h:128
float y
Definition: OFObject.h:101
id copy()
Returns the class.
Definition: OFObject.m:1114
id retain()
Increases the retain count.
A class which provides portable threads.
Definition: OFThread.h:53
float width
Definition: OFObject.h:126
id alloc()
Allocates memory for an instance of the class and sets up the memory pool for the object...
Definition: OFObject.m:256
Definition: OFObject.h:47
unsigned int retainCount()
Returns the retain count.
void dealloc()
Deallocates the object.
Definition: OFObject.m:1012
of_comparison_result_t
A result of a comparison.
Definition: OFObject.h:41
of_point_t origin
Definition: OFObject.h:153
bool isProxy()
Returns whether the object is a proxy object.
void initialize()
A method which is called the moment before the first call to the class is being made.
Definition: OFObject.m:252
OFString * className()
Returns the name of the class as a string.
Definition: OFObject.m:271
size_t length
Definition: OFObject.h:69
A rectangle.
Definition: OFObject.h:151
id self()
Returns the receiver.
A range.
Definition: OFObject.h:65
A protocol for the creation of mutable copies.
Definition: OFObject.h:917
A protocol for the creation of copies.
Definition: OFObject.h:896
Definition: OFObject.h:45
Definition: OFObject.h:57
Class class()
Returns the class.
Definition: OFObject.m:266
id new()
Allocates memory for a new instance and calls init on it.
Definition: OFObject.m:261
Definition: OFObject.h:55
double of_time_interval_t
A time interval in seconds.
Definition: OFObject.h:90
size_t location
Definition: OFObject.h:67
void unload()
A method which is called when the class is unloaded from the runtime.
Definition: OFObject.m:248