// ------------------------------------------------------------------------------
//
// 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;
using Dalamud.Bindings.ImGui;
namespace Dalamud.Bindings.ImPlot
{
///
/// To be documented.
///
[StructLayout(LayoutKind.Sequential)]
public partial struct ImPlotTick
{
///
/// To be documented.
///
public double PlotPos;
///
/// To be documented.
///
public float PixelPos;
///
/// To be documented.
///
public Vector2 LabelSize;
///
/// To be documented.
///
public int TextOffset;
///
/// To be documented.
///
public byte Major;
///
/// To be documented.
///
public byte ShowLabel;
///
/// To be documented.
///
public int Level;
///
/// To be documented.
///
public int Idx;
///
/// To be documented.
///
public unsafe ImPlotTick(double plotPos = default, float pixelPos = default, Vector2 labelSize = default, int textOffset = default, bool major = default, bool showLabel = default, int level = default, int idx = default)
{
PlotPos = plotPos;
PixelPos = pixelPos;
LabelSize = labelSize;
TextOffset = textOffset;
Major = major ? (byte)1 : (byte)0;
ShowLabel = showLabel ? (byte)1 : (byte)0;
Level = level;
Idx = idx;
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImPlotTick* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotTickPtr : IEquatable
{
public ImPlotTickPtr(ImPlotTick* handle) { Handle = handle; }
public ImPlotTick* Handle;
public bool IsNull => Handle == null;
public static ImPlotTickPtr Null => new ImPlotTickPtr(null);
public ImPlotTick this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotTickPtr(ImPlotTick* handle) => new ImPlotTickPtr(handle);
public static implicit operator ImPlotTick*(ImPlotTickPtr handle) => handle.Handle;
public static bool operator ==(ImPlotTickPtr left, ImPlotTickPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotTickPtr left, ImPlotTickPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotTickPtr left, ImPlotTick* right) => left.Handle == right;
public static bool operator !=(ImPlotTickPtr left, ImPlotTick* right) => left.Handle != right;
public bool Equals(ImPlotTickPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImPlotTickPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotTickPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref double PlotPos => ref Unsafe.AsRef(&Handle->PlotPos);
///
/// To be documented.
///
public ref float PixelPos => ref Unsafe.AsRef(&Handle->PixelPos);
///
/// To be documented.
///
public ref Vector2 LabelSize => ref Unsafe.AsRef(&Handle->LabelSize);
///
/// To be documented.
///
public ref int TextOffset => ref Unsafe.AsRef(&Handle->TextOffset);
///
/// To be documented.
///
public ref bool Major => ref Unsafe.AsRef(&Handle->Major);
///
/// To be documented.
///
public ref bool ShowLabel => ref Unsafe.AsRef(&Handle->ShowLabel);
///
/// To be documented.
///
public ref int Level => ref Unsafe.AsRef(&Handle->Level);
///
/// To be documented.
///
public ref int Idx => ref Unsafe.AsRef(&Handle->Idx);
///
/// To be documented.
///
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
}
}