From b40f1e182740d70aaf18a5222c42696d9deb9fff Mon Sep 17 00:00:00 2001 From: Eric Mellino Date: Sun, 18 Feb 2018 13:41:07 -0800 Subject: [PATCH] Move source files into src directory (oops), and fix struct field warnings. * Warnings fixed by adding [StructLayout(LayoutKind.Sequential)]. --- src/ImGui.NET/ImGui.NET.csproj | 4 ---- src/ImGui.NET/NativeContext.cs | 2 ++ NativeDrawContext.cs => src/ImGui.NET/NativeDrawContext.cs | 0 src/ImGui.NET/NativePayload.cs | 5 ++++- .../ImGui.NET/NativeSimpleColumns.cs | 0 src/ImGui.NET/NativeWindow.cs | 2 ++ 6 files changed, 8 insertions(+), 5 deletions(-) rename NativeDrawContext.cs => src/ImGui.NET/NativeDrawContext.cs (100%) rename NativeSimpleColumns.cs => src/ImGui.NET/NativeSimpleColumns.cs (100%) diff --git a/src/ImGui.NET/ImGui.NET.csproj b/src/ImGui.NET/ImGui.NET.csproj index 5acf59a..55d98c6 100644 --- a/src/ImGui.NET/ImGui.NET.csproj +++ b/src/ImGui.NET/ImGui.NET.csproj @@ -16,10 +16,6 @@ $(OutputPath)\ImGui.NET.xml ImGuiNET - - - - diff --git a/src/ImGui.NET/NativeContext.cs b/src/ImGui.NET/NativeContext.cs index 44e1db4..de8e5fd 100644 --- a/src/ImGui.NET/NativeContext.cs +++ b/src/ImGui.NET/NativeContext.cs @@ -1,8 +1,10 @@ using System; using System.Numerics; +using System.Runtime.InteropServices; namespace ImGuiNET { + [StructLayout(LayoutKind.Sequential)] public unsafe struct NativeContext { public byte Initialized; diff --git a/NativeDrawContext.cs b/src/ImGui.NET/NativeDrawContext.cs similarity index 100% rename from NativeDrawContext.cs rename to src/ImGui.NET/NativeDrawContext.cs diff --git a/src/ImGui.NET/NativePayload.cs b/src/ImGui.NET/NativePayload.cs index 304f0f4..972e298 100644 --- a/src/ImGui.NET/NativePayload.cs +++ b/src/ImGui.NET/NativePayload.cs @@ -1,5 +1,8 @@ -namespace ImGuiNET +using System.Runtime.InteropServices; + +namespace ImGuiNET { + [StructLayout(LayoutKind.Sequential)] public unsafe struct NativePayload { public void* Data; diff --git a/NativeSimpleColumns.cs b/src/ImGui.NET/NativeSimpleColumns.cs similarity index 100% rename from NativeSimpleColumns.cs rename to src/ImGui.NET/NativeSimpleColumns.cs diff --git a/src/ImGui.NET/NativeWindow.cs b/src/ImGui.NET/NativeWindow.cs index e424abd..5d091cb 100644 --- a/src/ImGui.NET/NativeWindow.cs +++ b/src/ImGui.NET/NativeWindow.cs @@ -1,7 +1,9 @@ using System.Numerics; +using System.Runtime.InteropServices; namespace ImGuiNET { + [StructLayout(LayoutKind.Sequential)] public unsafe struct NativeWindow { public byte* Name;