Add basic Xamarin.Mac support

- Does not contain "magic" found in YogaKit yet, but enough to get started
- Simple test project showing use
This commit is contained in:
Chris Hamons
2016-12-08 09:41:59 -06:00
parent 73662ebf83
commit 05ab9be814
28 changed files with 1211 additions and 1 deletions

View File

@@ -14,21 +14,25 @@ namespace Facebook.Yoga
{
internal static class Native
{
#if UNITY_IOS && !UNITY_EDITOR
#if (UNITY_IOS && !UNITY_EDITOR) || MONOMAC
private const string DllName = "__Internal";
#else
private const string DllName = "yoga";
#endif
#if !MONOMAC
[DllImport(DllName)]
public static extern void YGInteropSetLogger(
[MarshalAs(UnmanagedType.FunctionPtr)] YogaLogger.Func func);
#endif
[DllImport(DllName)]
public static extern IntPtr YGNodeNew();
#if !MONOMAC
[DllImport(DllName)]
public static extern void YGNodeInit(IntPtr node);
#endif
[DllImport(DllName)]
public static extern void YGNodeFree(IntPtr node);