2011-06-14 17:08:48 +00:00
|
|
|
/**
|
|
|
|
\defgroup runtime Objective Runtime
|
|
|
|
\{
|
|
|
|
*/
|
2010-12-24 06:34:54 +00:00
|
|
|
#ifndef __ruamoko_runtime_h_
|
|
|
|
#define __ruamoko_runtime_h_
|
2010-12-16 11:46:59 +00:00
|
|
|
|
2012-11-12 01:28:31 +00:00
|
|
|
#define INT_MAX 2147483647
|
2010-12-16 11:46:59 +00:00
|
|
|
#define INT_MIN (-INT_MAX - 1)
|
|
|
|
|
2010-12-24 10:09:14 +00:00
|
|
|
#define UINT_MAX 4294967295U
|
2010-12-16 11:46:59 +00:00
|
|
|
|
|
|
|
enum {
|
|
|
|
NotFound = INT_MAX ///< A value indicating a requested item can't be found.
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
Standard boolean type
|
|
|
|
*/
|
|
|
|
typedef enum {
|
|
|
|
NO = 0, ///< the false value
|
|
|
|
YES ///< a true value
|
|
|
|
} BOOL;
|
|
|
|
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern void obj_error (id object, int code, string fmt, ...);
|
|
|
|
@extern void obj_verror (id object, int code, string fmt, @va_list args);
|
2010-12-16 11:46:59 +00:00
|
|
|
//obj_error_handler obj_set_error_handler (objc_error_handler func);
|
|
|
|
@extern IMP obj_msg_lookup (id receiver, SEL op);
|
|
|
|
@extern IMP obj_msg_lookup_super (Super class, SEL op);
|
|
|
|
@extern @param obj_msg_sendv (id receiver, SEL op, @va_list args);
|
2012-11-08 11:24:25 +00:00
|
|
|
@extern BOOL obj_decrement_ref_was_zero (id object);
|
|
|
|
@extern BOOL obj_increment_ref_was_zero (id object);
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern void *obj_malloc (int size);
|
|
|
|
@extern void *obj_atomic_malloc (int size);
|
|
|
|
@extern void *obj_valloc (int size);
|
|
|
|
@extern void *obj_realloc (void *mem, int size);
|
|
|
|
@extern void *obj_calloc (int nelem, int size);
|
2011-02-07 13:16:16 +00:00
|
|
|
@extern void obj_free (void *mem);
|
|
|
|
//(void *) obj_get_uninstalled_dtable (void);
|
2010-12-16 11:46:59 +00:00
|
|
|
|
|
|
|
@extern Class obj_get_class (string name);
|
|
|
|
@extern Class obj_lookup_class (string name);
|
2011-02-07 13:16:16 +00:00
|
|
|
//Class obj_next_class (void **enum_stage);
|
2010-12-16 11:46:59 +00:00
|
|
|
|
|
|
|
@extern string sel_get_name (SEL selector);
|
|
|
|
@extern string sel_get_type (SEL selector);
|
|
|
|
@extern SEL sel_get_uid (string name);
|
|
|
|
//@extern SEL sel_get_any_uid (string name);
|
|
|
|
//@extern SEL sel_get_any_typed_uid (string name);
|
|
|
|
//@extern SEL sel_get_typed_uid (string name, string type);
|
|
|
|
@extern SEL sel_register_name (string name);
|
|
|
|
//@extern SEL sel_register_typed_name (string name, string type);
|
|
|
|
@extern BOOL sel_is_mapped (SEL aSel);
|
|
|
|
|
2011-02-07 13:16:16 +00:00
|
|
|
@extern Method *class_get_class_method (Class class, SEL aSel);
|
|
|
|
@extern Method *class_get_instance_method (Class class, SEL aSel);
|
2010-12-16 11:46:59 +00:00
|
|
|
@extern Class class_pose_as (Class imposter, Class superclass);
|
|
|
|
@extern id class_create_instance (Class class);
|
|
|
|
@extern string class_get_class_name (Class class);
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern int class_get_instance_size (Class class);
|
2010-12-16 11:46:59 +00:00
|
|
|
@extern Class class_get_meta_class (Class class);
|
|
|
|
@extern Class class_get_super_class (Class class);
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern int class_get_version (Class class);
|
2010-12-16 11:46:59 +00:00
|
|
|
@extern BOOL class_is_class (Class class);
|
|
|
|
@extern BOOL class_is_meta_class (Class class);
|
2011-03-25 07:46:32 +00:00
|
|
|
@extern void class_set_version (Class class, int version);
|
2011-02-07 13:16:16 +00:00
|
|
|
@extern void *class_get_gc_object_type (Class class);
|
2010-12-16 11:46:59 +00:00
|
|
|
@extern void class_ivar_set_gcinvisible (Class class, string ivarname, BOOL gcInvisible);
|
|
|
|
|
2011-02-07 13:16:16 +00:00
|
|
|
@extern IMP method_get_imp (Method *method);
|
2010-12-16 11:46:59 +00:00
|
|
|
@extern IMP get_imp (Class class, SEL sel);
|
|
|
|
|
|
|
|
@extern id object_copy (id object);
|
|
|
|
@extern id object_dispose (id object);
|
|
|
|
@extern Class object_get_class (id object);
|
|
|
|
@extern string object_get_class_name (id object);
|
|
|
|
@extern Class object_get_meta_class (id object);
|
|
|
|
@extern Class object_get_super_class (id object);
|
|
|
|
@extern BOOL object_is_class (id object);
|
|
|
|
@extern BOOL object_is_instance (id object);
|
|
|
|
@extern BOOL object_is_meta_class (id object);
|
|
|
|
|
2012-11-15 04:40:11 +00:00
|
|
|
@extern void *PR_FindGlobal (string name); //FIXME where?
|
|
|
|
|
2010-12-24 06:34:54 +00:00
|
|
|
#endif //__ruamoko_runtime_h_
|
2011-06-14 17:08:48 +00:00
|
|
|
/**
|
|
|
|
\}
|
|
|
|
*/
|