[csharp] Implement static methods for callbacks so they work on aot on iOS, use YogaRef to store pointer to managed YogaNode

This commit is contained in:
Rui Marinho
2017-02-10 15:45:15 +00:00
parent b7fbe1c986
commit f90633cec5
3 changed files with 65 additions and 9 deletions

View File

@@ -111,6 +111,13 @@ namespace Facebook.Yoga
[return: MarshalAs(UnmanagedType.I1)]
public static extern bool YGNodeGetHasNewLayout(YGNodeHandle node);
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern void YGNodeSetContext(YGNodeHandle node, IntPtr context);
[DllImport(DllName, ExactSpelling = true, CallingConvention = CallingConvention.Cdecl)]
public static extern IntPtr YGNodeGetContext(IntPtr node);
#endregion
#region YG_NODE_STYLE_PROPERTY