mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
109 lines
3.3 KiB
C#
109 lines
3.3 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>
|
|
/// Helper: Execute a block of code at maximum once a frame. Convenient if you want to quickly create a UI within deep-nested code that runs multiple times every frame.<br/>
|
|
/// Usage: static ImGuiOnceUponAFrame oaf; if (oaf) ImGui::Text("This will be called only once per frame");<br/>
|
|
/// </summary>
|
|
[StructLayout(LayoutKind.Sequential)]
|
|
public partial struct ImGuiOnceUponAFrame
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public int RefFrame;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImGuiOnceUponAFrame(int refFrame = default)
|
|
{
|
|
RefFrame = refFrame;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
fixed (ImGuiOnceUponAFrame* @this = &this)
|
|
{
|
|
ImGui.DestroyNative(@this);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImGuiOnceUponAFramePtr : IEquatable<ImGuiOnceUponAFramePtr>
|
|
{
|
|
public ImGuiOnceUponAFramePtr(ImGuiOnceUponAFrame* handle) { Handle = handle; }
|
|
|
|
public ImGuiOnceUponAFrame* Handle;
|
|
|
|
public bool IsNull => Handle == null;
|
|
|
|
public static ImGuiOnceUponAFramePtr Null => new ImGuiOnceUponAFramePtr(null);
|
|
|
|
public ImGuiOnceUponAFrame this[int index] { get => Handle[index]; set => Handle[index] = value; }
|
|
|
|
public static implicit operator ImGuiOnceUponAFramePtr(ImGuiOnceUponAFrame* handle) => new ImGuiOnceUponAFramePtr(handle);
|
|
|
|
public static implicit operator ImGuiOnceUponAFrame*(ImGuiOnceUponAFramePtr handle) => handle.Handle;
|
|
|
|
public static bool operator ==(ImGuiOnceUponAFramePtr left, ImGuiOnceUponAFramePtr right) => left.Handle == right.Handle;
|
|
|
|
public static bool operator !=(ImGuiOnceUponAFramePtr left, ImGuiOnceUponAFramePtr right) => left.Handle != right.Handle;
|
|
|
|
public static bool operator ==(ImGuiOnceUponAFramePtr left, ImGuiOnceUponAFrame* right) => left.Handle == right;
|
|
|
|
public static bool operator !=(ImGuiOnceUponAFramePtr left, ImGuiOnceUponAFrame* right) => left.Handle != right;
|
|
|
|
public bool Equals(ImGuiOnceUponAFramePtr other) => Handle == other.Handle;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImGuiOnceUponAFramePtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
|
|
|
|
#if NET5_0_OR_GREATER
|
|
private string DebuggerDisplay => string.Format("ImGuiOnceUponAFramePtr [0x{0}]", ((nuint)Handle).ToString("X"));
|
|
#endif
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref int RefFrame => ref Unsafe.AsRef<int>(&Handle->RefFrame);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
ImGui.DestroyNative(Handle);
|
|
}
|
|
|
|
}
|
|
|
|
}
|