// ------------------------------------------------------------------------------
//
// 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 ImPlotAnnotation
{
///
/// To be documented.
///
public Vector2 Pos;
///
/// To be documented.
///
public Vector2 Offset;
///
/// To be documented.
///
public uint ColorBg;
///
/// To be documented.
///
public uint ColorFg;
///
/// To be documented.
///
public int TextOffset;
///
/// To be documented.
///
public byte Clamp;
///
/// To be documented.
///
public unsafe ImPlotAnnotation(Vector2 pos = default, Vector2 offset = default, uint colorBg = default, uint colorFg = default, int textOffset = default, bool clamp = default)
{
Pos = pos;
Offset = offset;
ColorBg = colorBg;
ColorFg = colorFg;
TextOffset = textOffset;
Clamp = clamp ? (byte)1 : (byte)0;
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImPlotAnnotationPtr : IEquatable
{
public ImPlotAnnotationPtr(ImPlotAnnotation* handle) { Handle = handle; }
public ImPlotAnnotation* Handle;
public bool IsNull => Handle == null;
public static ImPlotAnnotationPtr Null => new ImPlotAnnotationPtr(null);
public ImPlotAnnotation this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImPlotAnnotationPtr(ImPlotAnnotation* handle) => new ImPlotAnnotationPtr(handle);
public static implicit operator ImPlotAnnotation*(ImPlotAnnotationPtr handle) => handle.Handle;
public static bool operator ==(ImPlotAnnotationPtr left, ImPlotAnnotationPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImPlotAnnotationPtr left, ImPlotAnnotationPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImPlotAnnotationPtr left, ImPlotAnnotation* right) => left.Handle == right;
public static bool operator !=(ImPlotAnnotationPtr left, ImPlotAnnotation* right) => left.Handle != right;
public bool Equals(ImPlotAnnotationPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImPlotAnnotationPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImPlotAnnotationPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref Vector2 Pos => ref Unsafe.AsRef(&Handle->Pos);
///
/// To be documented.
///
public ref Vector2 Offset => ref Unsafe.AsRef(&Handle->Offset);
///
/// To be documented.
///
public ref uint ColorBg => ref Unsafe.AsRef(&Handle->ColorBg);
///
/// To be documented.
///
public ref uint ColorFg => ref Unsafe.AsRef(&Handle->ColorFg);
///
/// To be documented.
///
public ref int TextOffset => ref Unsafe.AsRef(&Handle->TextOffset);
///
/// To be documented.
///
public ref bool Clamp => ref Unsafe.AsRef(&Handle->Clamp);
}
}