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

119 lines
3 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 ImPlotPoint
{
/// <summary>
/// To be documented.
/// </summary>
public double X;
/// <summary>
/// To be documented.
/// </summary>
public double Y;
/// <summary>
/// To be documented.
/// </summary>
public unsafe ImPlotPoint(double x = default, double y = default)
{
X = x;
Y = y;
}
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
fixed (ImPlotPoint* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
}
/// <summary>
/// To be documented.
/// </summary>
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotPointPtr : IEquatable<ImPlotPointPtr>
{
public ImPlotPointPtr(ImPlotPoint* handle) { Handle = handle; }
public ImPlotPoint* Handle;
public bool IsNull => Handle == null;
public static ImPlotPointPtr Null => new ImPlotPointPtr(null);
public ImPlotPoint this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotPointPtr(ImPlotPoint* handle) => new ImPlotPointPtr(handle);
public static implicit operator ImPlotPoint*(ImPlotPointPtr handle) => handle.Handle;
public static bool operator ==(ImPlotPointPtr left, ImPlotPointPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotPointPtr left, ImPlotPointPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotPointPtr left, ImPlotPoint* right) => left.Handle == right;
public static bool operator !=(ImPlotPointPtr left, ImPlotPoint* right) => left.Handle != right;
public bool Equals(ImPlotPointPtr other) => Handle == other.Handle;
/// <inheritdoc/>
public override bool Equals(object obj) => obj is ImPlotPointPtr handle && Equals(handle);
/// <inheritdoc/>
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotPointPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
/// <summary>
/// To be documented.
/// </summary>
public ref double X => ref Unsafe.AsRef<double>(&Handle->X);
/// <summary>
/// To be documented.
/// </summary>
public ref double Y => ref Unsafe.AsRef<double>(&Handle->Y);
/// <summary>
/// To be documented.
/// </summary>
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
}
}