// ------------------------------------------------------------------------------
//
// 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 ImPlotRange
{
///
/// To be documented.
///
public double Min;
///
/// To be documented.
///
public double Max;
///
/// To be documented.
///
public unsafe ImPlotRange(double min = default, double max = default)
{
Min = min;
Max = max;
}
///
/// To be documented.
///
public unsafe double Clamp(double value)
{
fixed (ImPlotRange* @this = &this)
{
double ret = ImPlot.ClampNative(@this, value);
return ret;
}
}
///
/// To be documented.
///
public unsafe bool Contains(double value)
{
fixed (ImPlotRange* @this = &this)
{
byte ret = ImPlot.ContainsNative(@this, value);
return ret != 0;
}
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImPlotRange* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
///
/// To be documented.
///
public unsafe double Size()
{
fixed (ImPlotRange* @this = &this)
{
double ret = ImPlot.SizeNative(@this);
return ret;
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotRangePtr : IEquatable
{
public ImPlotRangePtr(ImPlotRange* handle) { Handle = handle; }
public ImPlotRange* Handle;
public bool IsNull => Handle == null;
public static ImPlotRangePtr Null => new ImPlotRangePtr(null);
public ImPlotRange this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotRangePtr(ImPlotRange* handle) => new ImPlotRangePtr(handle);
public static implicit operator ImPlotRange*(ImPlotRangePtr handle) => handle.Handle;
public static bool operator ==(ImPlotRangePtr left, ImPlotRangePtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotRangePtr left, ImPlotRangePtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotRangePtr left, ImPlotRange* right) => left.Handle == right;
public static bool operator !=(ImPlotRangePtr left, ImPlotRange* right) => left.Handle != right;
public bool Equals(ImPlotRangePtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImPlotRangePtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotRangePtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref double Min => ref Unsafe.AsRef(&Handle->Min);
///
/// To be documented.
///
public ref double Max => ref Unsafe.AsRef(&Handle->Max);
///
/// To be documented.
///
public unsafe double Clamp(double value)
{
double ret = ImPlot.ClampNative(Handle, value);
return ret;
}
///
/// To be documented.
///
public unsafe bool Contains(double value)
{
byte ret = ImPlot.ContainsNative(Handle, value);
return ret != 0;
}
///
/// To be documented.
///
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
///
/// To be documented.
///
public unsafe double Size()
{
double ret = ImPlot.SizeNative(Handle);
return ret;
}
}
}