Dalamud/imgui/Dalamud.Bindings.ImPlot/Generated/Structs/ImPlotTick.cs
2025-04-06 21:08:34 +02:00

179 lines
4.6 KiB
C#
Generated

// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
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
{
/// <summary>
/// To be documented.
/// </summary>
[StructLayout(LayoutKind.Sequential)]
public partial struct ImPlotTick
{
/// <summary>
/// To be documented.
/// </summary>
public double PlotPos;
/// <summary>
/// To be documented.
/// </summary>
public float PixelPos;
/// <summary>
/// To be documented.
/// </summary>
public Vector2 LabelSize;
/// <summary>
/// To be documented.
/// </summary>
public int TextOffset;
/// <summary>
/// To be documented.
/// </summary>
public byte Major;
/// <summary>
/// To be documented.
/// </summary>
public byte ShowLabel;
/// <summary>
/// To be documented.
/// </summary>
public int Level;
/// <summary>
/// To be documented.
/// </summary>
public int Idx;
/// <summary>
/// To be documented.
/// </summary>
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;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
fixed (ImPlotTick* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotTickPtr : IEquatable<ImPlotTickPtr>
{
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;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImPlotTickPtr handle && Equals(handle);
/// <inheritdoc/>
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
/// <summary>
/// To be documented.
/// </summary>
public ref double PlotPos => ref Unsafe.AsRef<double>(&Handle->PlotPos);
/// <summary>
/// To be documented.
/// </summary>
public ref float PixelPos => ref Unsafe.AsRef<float>(&Handle->PixelPos);
/// <summary>
/// To be documented.
/// </summary>
public ref Vector2 LabelSize => ref Unsafe.AsRef<Vector2>(&Handle->LabelSize);
/// <summary>
/// To be documented.
/// </summary>
public ref int TextOffset => ref Unsafe.AsRef<int>(&Handle->TextOffset);
/// <summary>
/// To be documented.
/// </summary>
public ref bool Major => ref Unsafe.AsRef<bool>(&Handle->Major);
/// <summary>
/// To be documented.
/// </summary>
public ref bool ShowLabel => ref Unsafe.AsRef<bool>(&Handle->ShowLabel);
/// <summary>
/// To be documented.
/// </summary>
public ref int Level => ref Unsafe.AsRef<int>(&Handle->Level);
/// <summary>
/// To be documented.
/// </summary>
public ref int Idx => ref Unsafe.AsRef<int>(&Handle->Idx);
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
}
}