// ------------------------------------------------------------------------------
//
// 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 ImPlotDateTimeSpec
{
///
/// To be documented.
///
public ImPlotDateFmt Date;
///
/// To be documented.
///
public ImPlotTimeFmt Time;
///
/// To be documented.
///
public byte UseISO8601;
///
/// To be documented.
///
public byte Use24HourClock;
///
/// To be documented.
///
public unsafe ImPlotDateTimeSpec(ImPlotDateFmt date = default, ImPlotTimeFmt time = default, bool useIso8601 = default, bool use24HourClock = default)
{
Date = date;
Time = time;
UseISO8601 = useIso8601 ? (byte)1 : (byte)0;
Use24HourClock = use24HourClock ? (byte)1 : (byte)0;
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImPlotDateTimeSpec* @this = &this)
{
ImPlot.DestroyNative(@this);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotDateTimeSpecPtr : IEquatable
{
public ImPlotDateTimeSpecPtr(ImPlotDateTimeSpec* handle) { Handle = handle; }
public ImPlotDateTimeSpec* Handle;
public bool IsNull => Handle == null;
public static ImPlotDateTimeSpecPtr Null => new ImPlotDateTimeSpecPtr(null);
public ImPlotDateTimeSpec this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotDateTimeSpecPtr(ImPlotDateTimeSpec* handle) => new ImPlotDateTimeSpecPtr(handle);
public static implicit operator ImPlotDateTimeSpec*(ImPlotDateTimeSpecPtr handle) => handle.Handle;
public static bool operator ==(ImPlotDateTimeSpecPtr left, ImPlotDateTimeSpecPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotDateTimeSpecPtr left, ImPlotDateTimeSpecPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotDateTimeSpecPtr left, ImPlotDateTimeSpec* right) => left.Handle == right;
public static bool operator !=(ImPlotDateTimeSpecPtr left, ImPlotDateTimeSpec* right) => left.Handle != right;
public bool Equals(ImPlotDateTimeSpecPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImPlotDateTimeSpecPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotDateTimeSpecPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref ImPlotDateFmt Date => ref Unsafe.AsRef(&Handle->Date);
///
/// To be documented.
///
public ref ImPlotTimeFmt Time => ref Unsafe.AsRef(&Handle->Time);
///
/// To be documented.
///
public ref bool UseISO8601 => ref Unsafe.AsRef(&Handle->UseISO8601);
///
/// To be documented.
///
public ref bool Use24HourClock => ref Unsafe.AsRef(&Handle->Use24HourClock);
///
/// To be documented.
///
public unsafe void Destroy()
{
ImPlot.DestroyNative(Handle);
}
}
}