summaryrefslogtreecommitdiff
path: root/Objective-C/libobjcl.h
blob: 2ebea37354cd0a5e3e4f213292aa9c00c067a383 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/* -*- mode: objc; coding: utf-8 -*- */

#import "Foundation/Foundation.h"
#include <objc/objc-api.h>

#ifdef USE_LIBFFI
#include <ffi.h>
#endif


extern NSException *objcl_oom_exception;


void
objcl_initialise_runtime (void);

void
objcl_shutdown_runtime (void);

id
objcl_invoke_with_types (int argc,
                         char *return_typespec,
                         char *arg_typespecs[],
                         void *return_value,
                         void **argv);

Class
objcl_find_class (const char *class_name);

SEL
objcl_find_selector (const char *selector_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 (Class class);

const char *
objcl_selector_name (SEL selector);

IMP
objcl_get_method_implementation (id object,
                                 SEL selector);

BOOL
objcl_object_is_class (id obj);

BOOL
objcl_object_is_meta_class (id obj);

Class
objcl_object_get_class (id obj);

Class
objcl_object_get_meta_class (id obj);

id
objcl_get_nil (void);

/* In principle, we do not know whether a BOOL fits into a long.  In
   practise, it is very likely. */
long
objcl_get_yes (void);

long
objcl_get_no (void);

const char *
objcl_get_runtime_type (void);

long
objcl_sizeof_type (const char *typespec);

long
objcl_sizeof_return_type (const char *typespec);

long
objcl_alignof_type (const char *typespec);