Skip to content

Instantly share code, notes, and snippets.

@mattpodwysocki
Last active September 6, 2016 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mattpodwysocki/52e03f445c58a091c280afdaf0f2a935 to your computer and use it in GitHub Desktop.
Save mattpodwysocki/52e03f445c58a091c280afdaf0f2a935 to your computer and use it in GitHub Desktop.
using System;
using System.Runtime.InteropServices;
namespace CSSLayoutApp
{
public static class Native
{
[DllImport("CSSLayout.dll")]
public static extern IntPtr CSSNodeNew();
[DllImport("CSSLayout.dll")]
public static extern void CSSNodeInit(IntPtr cssNode);
[DllImport("CSSLayout.dll")]
public static extern void CSSNodeFree(IntPtr cssNode);
[DllImport("CSSLayout.dll")]
public static extern void CSSNodeInsertChild(IntPtr node, IntPtr child, uint index);
[DllImport("CSSLayout.dll")]
public static extern void CSSNodeRemoveChild(IntPtr node, IntPtr child);
[DllImport("CSSLayout.dll")]
public static extern IntPtr CSSNodeGetChild(IntPtr node, uint index);
[DllImport("CSSLayout.dll")]
public static extern uint CSSNodeChildCount(IntPtr node);
[DllImport("CSSLayout.dll")]
public static extern void CSSNodeCalculateLayout(IntPtr node,
float availableWidth,
float availableHeight,
CSSDirection parentDirection);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment