mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
188 lines
4.9 KiB
C#
188 lines
4.9 KiB
C#
// ------------------------------------------------------------------------------
|
|
// <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;
|
|
|
|
namespace Dalamud.Bindings.ImGui
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public partial struct ImDrawCmd
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public Vector4 ClipRect;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImTextureID TextureId;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public uint VtxOffset;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public uint IdxOffset;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public uint ElemCount;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* UserCallback;
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* UserCallbackData;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImDrawCmd(Vector4 clipRect = default, ImTextureID textureId = default, uint vtxOffset = default, uint idxOffset = default, uint elemCount = default, ImDrawCallback userCallback = default, void* userCallbackData = default)
|
|
{
|
|
ClipRect = clipRect;
|
|
TextureId = textureId;
|
|
VtxOffset = vtxOffset;
|
|
IdxOffset = idxOffset;
|
|
ElemCount = elemCount;
|
|
UserCallback = (void*)Marshal.GetFunctionPointerForDelegate(userCallback);
|
|
UserCallbackData = userCallbackData;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
fixed (ImDrawCmd* @this = &this)
|
|
{
|
|
ImGui.DestroyNative(@this);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImTextureID GetTexID()
|
|
{
|
|
fixed (ImDrawCmd* @this = &this)
|
|
{
|
|
ImTextureID ret = ImGui.GetTexIDNative(@this);
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImDrawCmdPtr : IEquatable<ImDrawCmdPtr>
|
|
{
|
|
public ImDrawCmdPtr(ImDrawCmd* handle) { Handle = handle; }
|
|
|
|
public ImDrawCmd* Handle;
|
|
|
|
public bool IsNull => Handle == null;
|
|
|
|
public static ImDrawCmdPtr Null => new ImDrawCmdPtr(null);
|
|
|
|
public ImDrawCmd this[int index] { get => Handle[index]; set => Handle[index] = value; }
|
|
|
|
public static implicit operator ImDrawCmdPtr(ImDrawCmd* handle) => new ImDrawCmdPtr(handle);
|
|
|
|
public static implicit operator ImDrawCmd*(ImDrawCmdPtr handle) => handle.Handle;
|
|
|
|
public static bool operator ==(ImDrawCmdPtr left, ImDrawCmdPtr right) => left.Handle == right.Handle;
|
|
|
|
public static bool operator !=(ImDrawCmdPtr left, ImDrawCmdPtr right) => left.Handle != right.Handle;
|
|
|
|
public static bool operator ==(ImDrawCmdPtr left, ImDrawCmd* right) => left.Handle == right;
|
|
|
|
public static bool operator !=(ImDrawCmdPtr left, ImDrawCmd* right) => left.Handle != right;
|
|
|
|
public bool Equals(ImDrawCmdPtr other) => Handle == other.Handle;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImDrawCmdPtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
|
|
|
|
#if NET5_0_OR_GREATER
|
|
private string DebuggerDisplay => string.Format("ImDrawCmdPtr [0x{0}]", ((nuint)Handle).ToString("X"));
|
|
#endif
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref Vector4 ClipRect => ref Unsafe.AsRef<Vector4>(&Handle->ClipRect);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImTextureID TextureId => ref Unsafe.AsRef<ImTextureID>(&Handle->TextureId);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref uint VtxOffset => ref Unsafe.AsRef<uint>(&Handle->VtxOffset);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref uint IdxOffset => ref Unsafe.AsRef<uint>(&Handle->IdxOffset);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref uint ElemCount => ref Unsafe.AsRef<uint>(&Handle->ElemCount);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public void* UserCallback { get => Handle->UserCallback; set => Handle->UserCallback = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public void* UserCallbackData { get => Handle->UserCallbackData; set => Handle->UserCallbackData = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
ImGui.DestroyNative(Handle);
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImTextureID GetTexID()
|
|
{
|
|
ImTextureID ret = ImGui.GetTexIDNative(Handle);
|
|
return ret;
|
|
}
|
|
|
|
}
|
|
|
|
}
|