summaryrefslogtreecommitdiff
path: root/includes/compiler/objc.h
diff options
context:
space:
mode:
Diffstat (limited to 'includes/compiler/objc.h')
-rw-r--r--includes/compiler/objc.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/includes/compiler/objc.h b/includes/compiler/objc.h
new file mode 100644
index 0000000..ce3ebe4
--- /dev/null
+++ b/includes/compiler/objc.h
@@ -0,0 +1,80 @@
+#ifndef COMPILER_OBJC_H
+#define COMPILER_OBJC_H
+
+#include "compiler/common.h"
+
+#ifdef __MWERKS__
+#pragma options align=mac68k
+#endif
+
+typedef struct ObjCMethodArg { // bigger in v7 (0x20 vs 0x14)
+ struct ObjCMethodArg *next;
+ HashNameNode *selector;
+ HashNameNode *name;
+ Type *type;
+ UInt32 qual;
+ UInt32 unk14;
+ UInt32 unk18;
+ UInt32 unk1C;
+} ObjCMethodArg;
+
+typedef struct ObjCMethodList { // verified via CPrec
+ struct ObjCMethodList *next;
+ struct ObjCMethod *method;
+} ObjCMethodList;
+
+typedef struct ObjCSelector { // verified via CPrec
+ struct ObjCSelector *next;
+ Object *selobject;
+ HashNameNode *name;
+ struct ObjCMethodList *methods;
+} ObjCSelector;
+
+typedef struct ObjCMethod { // verified via CPrec
+ struct ObjCMethod *next;
+ Object *object;
+ TypeFunc *functype;
+ ObjCSelector *selector;
+ Type *return_type;
+ UInt32 return_qual;
+ ObjCMethodArg *selector_args;
+ Boolean has_valist;
+ Boolean is_class_method;
+ Boolean is_defined;
+} ObjCMethod;
+
+typedef struct ObjCProtocol { // verified via CPrec
+ struct ObjCProtocol *next;
+ HashNameNode *name;
+ struct ObjCProtocolList *protocols;
+ ObjCMethod *methods;
+ Object *object;
+} ObjCProtocol;
+
+typedef struct ObjCProtocolList { // verified via CPrec
+ struct ObjCProtocolList *next;
+ ObjCProtocol *protocol;
+} ObjCProtocolList;
+
+typedef struct ObjCCategory { // verified via CPrec
+ struct ObjCCategory *next;
+ HashNameNode *name;
+ ObjCProtocolList *protocols;
+ ObjCMethod *methods;
+} ObjCCategory;
+
+struct ObjCInfo { // verified via CPrec
+ Object *classobject;
+ Object *metaobject;
+ Object *classrefobj;
+ ObjCMethod *methods;
+ ObjCProtocolList *protocols;
+ ObjCCategory *categories;
+ Boolean is_implemented;
+};
+
+#ifdef __MWERKS__
+#pragma options align=reset
+#endif
+
+#endif