// ------------------------------------------------------------------------------
//
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
// ------------------------------------------------------------------------------
using System;
using System.Diagnostics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using HexaGen.Runtime;
using System.Numerics;
namespace Dalamud.Bindings.ImGui
{
///
/// ImGuiViewport PrivateInternals fields (cardinal sin: we are using inheritance!)
/// Every instance of ImGuiViewport is in fact a ImGuiViewportP.
///
[StructLayout(LayoutKind.Sequential)]
public partial struct ImGuiViewportP
{
///
/// To be documented.
///
public ImGuiViewport ImGuiViewport;
///
/// To be documented.
///
public int Idx;
///
/// To be documented.
///
public int LastFrameActive;
///
/// To be documented.
///
public int LastFrontMostStampCount;
///
/// To be documented.
///
public uint LastNameHash;
///
/// To be documented.
///
public Vector2 LastPos;
///
/// To be documented.
///
public float Alpha;
///
/// To be documented.
///
public float LastAlpha;
///
/// To be documented.
///
public short PlatformMonitor;
///
/// To be documented.
///
public byte PlatformWindowCreated;
///
/// To be documented.
///
public unsafe ImGuiWindow* Window;
///
/// To be documented.
///
public int DrawListsLastFrame_0;
public int DrawListsLastFrame_1;
///
/// To be documented.
///
public unsafe ImDrawList* DrawLists_0;
public unsafe ImDrawList* DrawLists_1;
///
/// To be documented.
///
public ImDrawData DrawDataP;
///
/// To be documented.
///
public ImDrawDataBuilder DrawDataBuilder;
///
/// To be documented.
///
public Vector2 LastPlatformPos;
///
/// To be documented.
///
public Vector2 LastPlatformSize;
///
/// To be documented.
///
public Vector2 LastRendererSize;
///
/// To be documented.
///
public Vector2 WorkOffsetMin;
///
/// To be documented.
///
public Vector2 WorkOffsetMax;
///
/// To be documented.
///
public Vector2 BuildWorkOffsetMin;
///
/// To be documented.
///
public Vector2 BuildWorkOffsetMax;
///
/// To be documented.
///
public unsafe ImGuiViewportP(ImGuiViewport imGuiViewport = default, int idx = default, int lastFrameActive = default, int lastFrontMostStampCount = default, uint lastNameHash = default, Vector2 lastPos = default, float alpha = default, float lastAlpha = default, short platformMonitor = default, bool platformWindowCreated = default, ImGuiWindowPtr window = default, int* drawListsLastFrame = default, ImDrawListPtrPtr drawLists = default, ImDrawData drawDataP = default, ImDrawDataBuilder drawDataBuilder = default, Vector2 lastPlatformPos = default, Vector2 lastPlatformSize = default, Vector2 lastRendererSize = default, Vector2 workOffsetMin = default, Vector2 workOffsetMax = default, Vector2 buildWorkOffsetMin = default, Vector2 buildWorkOffsetMax = default)
{
ImGuiViewport = imGuiViewport;
Idx = idx;
LastFrameActive = lastFrameActive;
LastFrontMostStampCount = lastFrontMostStampCount;
LastNameHash = lastNameHash;
LastPos = lastPos;
Alpha = alpha;
LastAlpha = lastAlpha;
PlatformMonitor = platformMonitor;
PlatformWindowCreated = platformWindowCreated ? (byte)1 : (byte)0;
Window = window;
if (drawListsLastFrame != default(int*))
{
DrawListsLastFrame_0 = drawListsLastFrame[0];
DrawListsLastFrame_1 = drawListsLastFrame[1];
}
if (drawLists != default(ImDrawListPtrPtr))
{
DrawLists_0 = drawLists[0];
DrawLists_1 = drawLists[1];
}
DrawDataP = drawDataP;
DrawDataBuilder = drawDataBuilder;
LastPlatformPos = lastPlatformPos;
LastPlatformSize = lastPlatformSize;
LastRendererSize = lastRendererSize;
WorkOffsetMin = workOffsetMin;
WorkOffsetMax = workOffsetMax;
BuildWorkOffsetMin = buildWorkOffsetMin;
BuildWorkOffsetMax = buildWorkOffsetMax;
}
///
/// To be documented.
///
public unsafe ImGuiViewportP(ImGuiViewport imGuiViewport = default, int idx = default, int lastFrameActive = default, int lastFrontMostStampCount = default, uint lastNameHash = default, Vector2 lastPos = default, float alpha = default, float lastAlpha = default, short platformMonitor = default, bool platformWindowCreated = default, ImGuiWindowPtr window = default, Span drawListsLastFrame = default, Span> drawLists = default, ImDrawData drawDataP = default, ImDrawDataBuilder drawDataBuilder = default, Vector2 lastPlatformPos = default, Vector2 lastPlatformSize = default, Vector2 lastRendererSize = default, Vector2 workOffsetMin = default, Vector2 workOffsetMax = default, Vector2 buildWorkOffsetMin = default, Vector2 buildWorkOffsetMax = default)
{
ImGuiViewport = imGuiViewport;
Idx = idx;
LastFrameActive = lastFrameActive;
LastFrontMostStampCount = lastFrontMostStampCount;
LastNameHash = lastNameHash;
LastPos = lastPos;
Alpha = alpha;
LastAlpha = lastAlpha;
PlatformMonitor = platformMonitor;
PlatformWindowCreated = platformWindowCreated ? (byte)1 : (byte)0;
Window = window;
if (drawListsLastFrame != default(Span))
{
DrawListsLastFrame_0 = drawListsLastFrame[0];
DrawListsLastFrame_1 = drawListsLastFrame[1];
}
if (drawLists != default(Span>))
{
DrawLists_0 = drawLists[0];
DrawLists_1 = drawLists[1];
}
DrawDataP = drawDataP;
DrawDataBuilder = drawDataBuilder;
LastPlatformPos = lastPlatformPos;
LastPlatformSize = lastPlatformSize;
LastRendererSize = lastRendererSize;
WorkOffsetMin = workOffsetMin;
WorkOffsetMax = workOffsetMax;
BuildWorkOffsetMin = buildWorkOffsetMin;
BuildWorkOffsetMax = buildWorkOffsetMax;
}
///
/// To be documented.
///
public unsafe Span> DrawLists
{
get
{
fixed (ImDrawList** p = &this.DrawLists_0)
{
return new Span>(p, 2);
}
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiViewportPPtr : IEquatable
{
public ImGuiViewportPPtr(ImGuiViewportP* handle) { Handle = handle; }
public ImGuiViewportP* Handle;
public bool IsNull => Handle == null;
public static ImGuiViewportPPtr Null => new ImGuiViewportPPtr(null);
public ImGuiViewportP this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImGuiViewportPPtr(ImGuiViewportP* handle) => new ImGuiViewportPPtr(handle);
public static implicit operator ImGuiViewportP*(ImGuiViewportPPtr handle) => handle.Handle;
public static bool operator ==(ImGuiViewportPPtr left, ImGuiViewportPPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImGuiViewportPPtr left, ImGuiViewportPPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImGuiViewportPPtr left, ImGuiViewportP* right) => left.Handle == right;
public static bool operator !=(ImGuiViewportPPtr left, ImGuiViewportP* right) => left.Handle != right;
public bool Equals(ImGuiViewportPPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImGuiViewportPPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImGuiViewportPPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref ImGuiViewport ImGuiViewport => ref Unsafe.AsRef(&Handle->ImGuiViewport);
///
/// To be documented.
///
public ref int Idx => ref Unsafe.AsRef(&Handle->Idx);
///
/// To be documented.
///
public ref int LastFrameActive => ref Unsafe.AsRef(&Handle->LastFrameActive);
///
/// To be documented.
///
public ref int LastFrontMostStampCount => ref Unsafe.AsRef(&Handle->LastFrontMostStampCount);
///
/// To be documented.
///
public ref uint LastNameHash => ref Unsafe.AsRef(&Handle->LastNameHash);
///
/// To be documented.
///
public ref Vector2 LastPos => ref Unsafe.AsRef(&Handle->LastPos);
///
/// To be documented.
///
public ref float Alpha => ref Unsafe.AsRef(&Handle->Alpha);
///
/// To be documented.
///
public ref float LastAlpha => ref Unsafe.AsRef(&Handle->LastAlpha);
///
/// To be documented.
///
public ref short PlatformMonitor => ref Unsafe.AsRef(&Handle->PlatformMonitor);
///
/// To be documented.
///
public ref bool PlatformWindowCreated => ref Unsafe.AsRef(&Handle->PlatformWindowCreated);
///
/// To be documented.
///
public ref ImGuiWindowPtr Window => ref Unsafe.AsRef(&Handle->Window);
///
/// To be documented.
///
public unsafe Span DrawListsLastFrame
{
get
{
return new Span(&Handle->DrawListsLastFrame_0, 2);
}
}
///
/// To be documented.
///
///
/// To be documented.
///
public ref ImDrawData DrawDataP => ref Unsafe.AsRef(&Handle->DrawDataP);
///
/// To be documented.
///
public ref ImDrawDataBuilder DrawDataBuilder => ref Unsafe.AsRef(&Handle->DrawDataBuilder);
///
/// To be documented.
///
public ref Vector2 LastPlatformPos => ref Unsafe.AsRef(&Handle->LastPlatformPos);
///
/// To be documented.
///
public ref Vector2 LastPlatformSize => ref Unsafe.AsRef(&Handle->LastPlatformSize);
///
/// To be documented.
///
public ref Vector2 LastRendererSize => ref Unsafe.AsRef(&Handle->LastRendererSize);
///
/// To be documented.
///
public ref Vector2 WorkOffsetMin => ref Unsafe.AsRef(&Handle->WorkOffsetMin);
///
/// To be documented.
///
public ref Vector2 WorkOffsetMax => ref Unsafe.AsRef(&Handle->WorkOffsetMax);
///
/// To be documented.
///
public ref Vector2 BuildWorkOffsetMin => ref Unsafe.AsRef(&Handle->BuildWorkOffsetMin);
///
/// To be documented.
///
public ref Vector2 BuildWorkOffsetMax => ref Unsafe.AsRef(&Handle->BuildWorkOffsetMax);
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiViewportPPtrPtr : IEquatable
{
public ImGuiViewportPPtrPtr(ImGuiViewportP** handle) { Handle = handle; }
public ImGuiViewportP** Handle;
public bool IsNull => Handle == null;
public static ImGuiViewportPPtrPtr Null => new ImGuiViewportPPtrPtr(null);
public ImGuiViewportP* this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImGuiViewportPPtrPtr(ImGuiViewportP** handle) => new ImGuiViewportPPtrPtr(handle);
public static implicit operator ImGuiViewportP**(ImGuiViewportPPtrPtr handle) => handle.Handle;
public static bool operator ==(ImGuiViewportPPtrPtr left, ImGuiViewportPPtrPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImGuiViewportPPtrPtr left, ImGuiViewportPPtrPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImGuiViewportPPtrPtr left, ImGuiViewportP** right) => left.Handle == right;
public static bool operator !=(ImGuiViewportPPtrPtr left, ImGuiViewportP** right) => left.Handle != right;
public bool Equals(ImGuiViewportPPtrPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImGuiViewportPPtrPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImGuiViewportPPtrPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
}
}