typedef struct _MonoReflectionMethodBody MonoReflectionMethodBody;
typedef struct _MonoAppContext MonoAppContext;
-typedef struct {
+typedef struct _MonoObject {
MonoVTable *vtable;
MonoThreadsSync *synchronisation;
} MonoObject;
MONO_API MonoString*
mono_string_new_len (MonoDomain *domain, const char *text, unsigned int length);
+MONO_API MonoString*
+mono_string_new_utf32 (MonoDomain *domain, const mono_unichar4 *text, int32_t len);
+
MONO_API char *
mono_string_to_utf8 (MonoString *string_obj);
MONO_API mono_unichar2 *
mono_string_to_utf16 (MonoString *string_obj);
+MONO_API mono_unichar4 *
+mono_string_to_utf32 (MonoString *string_obj);
+
MONO_API MonoString *
mono_string_from_utf16 (mono_unichar2 *data);
+MONO_API MonoString *
+mono_string_from_utf32 (mono_unichar4 *data);
+
MONO_API mono_bool
mono_string_equal (MonoString *s1, MonoString *s2);
mono_runtime_exec_main (MonoMethod *method, MonoArray *args,
MonoObject **exc);
+MONO_API int
+mono_runtime_set_main_args (int argc, char* argv[]);
+
/* The following functions won't be available with mono was configured with remoting disabled. */
/*#ifndef DISABLE_REMOTING */
MONO_API void*
MONO_API MonoObject* mono_gchandle_get_target (uint32_t gchandle);
MONO_API void mono_gchandle_free (uint32_t gchandle);
+/* Reference queue support
+ *
+ * A reference queue is used to get notifications of when objects are collected.
+ * Call mono_gc_reference_queue_new to create a new queue and pass the callback that
+ * will be invoked when registered objects are collected.
+ * Call mono_gc_reference_queue_add to register a pair of objects and data within a queue.
+ * The callback will be triggered once an object is both unreachable and finalized.
+ */
+
+typedef void (*mono_reference_queue_callback) (void *user_data);
+typedef struct _MonoReferenceQueue MonoReferenceQueue;
+
+MONO_API MonoReferenceQueue* mono_gc_reference_queue_new (mono_reference_queue_callback callback);
+MONO_API void mono_gc_reference_queue_free (MonoReferenceQueue *queue);
+MONO_API mono_bool mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data);
+
+
+
/* GC write barriers support */
MONO_API void mono_gc_wbarrier_set_field (MonoObject *obj, void* field_ptr, MonoObject* value);
MONO_API void mono_gc_wbarrier_set_arrayref (MonoArray *arr, void* slot_ptr, MonoObject* value);
MONO_API void mono_gc_wbarrier_arrayref_copy (void* dest_ptr, void* src_ptr, int count);
MONO_API void mono_gc_wbarrier_generic_store (void* ptr, MonoObject* value);
+MONO_API void mono_gc_wbarrier_generic_store_atomic (void *ptr, MonoObject *value);
MONO_API void mono_gc_wbarrier_generic_nostore (void* ptr);
MONO_API void mono_gc_wbarrier_value_copy (void* dest, void* src, int count, MonoClass *klass);
MONO_API void mono_gc_wbarrier_object_copy (MonoObject* obj, MonoObject *src);