xamarin-macios/runtime/runtime-internal.h

47 строки
1.2 KiB
C
Исходник Обычный вид История

2016-04-21 15:19:32 +03:00
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* runtime-internal.h: This header is not shipped with Xamarin.iOS/Mac.
*
* Authors: Rolf Bjarne Kvinge
*
* Copyright (C) 2014 Xamarin Inc. (www.xamarin.com)
*
*/
#ifndef __RUNTIME_INTERNAL_H__
#define __RUNTIME_INTERNAL_H__
#include "xamarin/xamarin.h"
#define PRINT(...) do { xamarin_printf (__VA_ARGS__); } while (0);
#define LOG(...) do { if (xamarin_log_level > 0) xamarin_printf (__VA_ARGS__); } while (0);
2016-04-21 15:19:32 +03:00
// #define DEBUG_LAUNCH_TIME
#ifdef DEBUG_LAUNCH_TIME
#define DEBUG_LAUNCH_TIME_PRINT(msg) \
debug_launch_time_print (msg);
#else
#define DEBUG_LAUNCH_TIME_PRINT(...)
#endif
void *xamarin_marshal_return_value (MonoType *mtype, const char *type, MonoObject *retval, bool retain, MonoMethod *method, guint32 *exception_gchandle);
MonoAssembly * xamarin_open_assembly (const char *name);
2016-04-21 15:19:32 +03:00
/*
* XamarinGCHandle
*
* This is an ObjC type that ties the lifetime of a GCHandle to the lifetime of itself.
* It stores a GCHandle, and frees the GCHandle in dealloc.
*/
@interface XamarinGCHandle : NSObject {
@public
int handle;
}
+(XamarinGCHandle *) createWithHandle: (int) handle;
-(void) dealloc;
-(int) getHandle;
@end
2016-04-21 15:19:32 +03:00
#endif /* __RUNTIME_INTERNAL_H__ */