You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
1.3 KiB
50 lines
1.3 KiB
using System; |
|
using System.Runtime.InteropServices; |
|
|
|
namespace ImGuiNET |
|
{ |
|
[StructLayout(LayoutKind.Sequential)] |
|
public unsafe struct Storage |
|
{ |
|
/// <summary> |
|
/// A vector of Storage.Pair values. |
|
/// </summary> |
|
public ImVector Data; |
|
|
|
[StructLayout(LayoutKind.Sequential)] |
|
public unsafe struct Pair |
|
{ |
|
public uint Key; |
|
private OverlappedDataItem _overlappedData; |
|
|
|
public float FloatData |
|
{ |
|
get { return _overlappedData.FloatData; } |
|
set { _overlappedData.FloatData = value; } |
|
} |
|
|
|
public int IntData |
|
{ |
|
get { return _overlappedData.IntData; } |
|
set { _overlappedData.IntData = value; } |
|
} |
|
|
|
public IntPtr PtrData |
|
{ |
|
get { return _overlappedData.PtrData; } |
|
set { _overlappedData.PtrData = value; } |
|
} |
|
} |
|
|
|
[StructLayout(LayoutKind.Explicit)] |
|
private unsafe struct OverlappedDataItem |
|
{ |
|
[FieldOffset(0)] |
|
public float FloatData; |
|
[FieldOffset(0)] |
|
public int IntData; |
|
[FieldOffset(0)] |
|
public IntPtr PtrData; |
|
} |
|
} |
|
}
|
|
|