diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-04 15:01:53 +0200 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2007-08-04 15:01:53 +0200 |
commit | 4765624c39dffb085554b1459b3e80bcbf347791 (patch) | |
tree | 55408134eb69247c8020c540bd65060ba951c439 /Objective-C/libobjcl.h | |
parent | 533f953b4dd068e1c76c67e7c27e820606f649bf (diff) |
Refactor directory and source file layout.
darcs-hash:0eb031a60f3b86a678869960867410811ca5325c
Diffstat (limited to 'Objective-C/libobjcl.h')
-rw-r--r-- | Objective-C/libobjcl.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h new file mode 100644 index 0000000..4d6d092 --- /dev/null +++ b/Objective-C/libobjcl.h @@ -0,0 +1,62 @@ +/* -*- mode: objc; coding: utf-8 -*- */ + +#import "Foundation/Foundation.h" +#include <objc/objc-api.h> + +typedef struct objcl_object +{ + char* type; + + union + { + id id_val; + Class class_val; + NSException *exc_val; + SEL sel_val; + char char_val; + short short_val; + int int_val; + long long_val; + long long long_long_val; + float float_val; + double double_val; + BOOL bool_val; + char *charptr_val; + void *ptr_val; + } data; +} *OBJCL_OBJ_DATA; + + +#define EXCEPTION_TYPESPEC "ERROR" + + +void +objcl_initialise_runtime (void); + +void +objcl_shutdown_runtime (void); + +void * +objcl_invoke_instance_method (OBJCL_OBJ_DATA receiver, + const char *method_name, + int argc, + ...); + +void * +objcl_invoke_class_method (OBJCL_OBJ_DATA class, + const char *method_name, + int argc, + ...); + +void * +objcl_find_class (const char *class_name); + +/* Return a null-terminated list of type information strings. + The first entry describes the type of the method's return value. */ +char ** +objcl_query_arglist_info (void *receiver, + const char *method_name); + + +const char * +objcl_class_name (OBJCL_OBJ_DATA class); |