mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
147 lines
4.1 KiB
C#
147 lines
4.1 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 ImGuiContextHook
|
|
{
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public uint HookId;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ImGuiContextHookType Type;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public uint Owner;
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* Callback;
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void* UserData;
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe ImGuiContextHook(uint hookId = default, ImGuiContextHookType type = default, uint owner = default, ImGuiContextHookCallback callback = default, void* userData = default)
|
|
{
|
|
HookId = hookId;
|
|
Type = type;
|
|
Owner = owner;
|
|
Callback = (void*)Marshal.GetFunctionPointerForDelegate(callback);
|
|
UserData = userData;
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
fixed (ImGuiContextHook* @this = &this)
|
|
{
|
|
ImGui.DestroyNative(@this);
|
|
}
|
|
}
|
|
|
|
}
|
|
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
#if NET5_0_OR_GREATER
|
|
[DebuggerDisplay("{DebuggerDisplay,nq}")]
|
|
#endif
|
|
public unsafe struct ImGuiContextHookPtr : IEquatable<ImGuiContextHookPtr>
|
|
{
|
|
public ImGuiContextHookPtr(ImGuiContextHook* handle) { Handle = handle; }
|
|
|
|
public ImGuiContextHook* Handle;
|
|
|
|
public bool IsNull => Handle == null;
|
|
|
|
public static ImGuiContextHookPtr Null => new ImGuiContextHookPtr(null);
|
|
|
|
public ImGuiContextHook this[int index] { get => Handle[index]; set => Handle[index] = value; }
|
|
|
|
public static implicit operator ImGuiContextHookPtr(ImGuiContextHook* handle) => new ImGuiContextHookPtr(handle);
|
|
|
|
public static implicit operator ImGuiContextHook*(ImGuiContextHookPtr handle) => handle.Handle;
|
|
|
|
public static bool operator ==(ImGuiContextHookPtr left, ImGuiContextHookPtr right) => left.Handle == right.Handle;
|
|
|
|
public static bool operator !=(ImGuiContextHookPtr left, ImGuiContextHookPtr right) => left.Handle != right.Handle;
|
|
|
|
public static bool operator ==(ImGuiContextHookPtr left, ImGuiContextHook* right) => left.Handle == right;
|
|
|
|
public static bool operator !=(ImGuiContextHookPtr left, ImGuiContextHook* right) => left.Handle != right;
|
|
|
|
public bool Equals(ImGuiContextHookPtr other) => Handle == other.Handle;
|
|
|
|
/// <inheritdoc/>
|
|
public override bool Equals(object obj) => obj is ImGuiContextHookPtr handle && Equals(handle);
|
|
|
|
/// <inheritdoc/>
|
|
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
|
|
|
|
#if NET5_0_OR_GREATER
|
|
private string DebuggerDisplay => string.Format("ImGuiContextHookPtr [0x{0}]", ((nuint)Handle).ToString("X"));
|
|
#endif
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref uint HookId => ref Unsafe.AsRef<uint>(&Handle->HookId);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref ImGuiContextHookType Type => ref Unsafe.AsRef<ImGuiContextHookType>(&Handle->Type);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public ref uint Owner => ref Unsafe.AsRef<uint>(&Handle->Owner);
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public void* Callback { get => Handle->Callback; set => Handle->Callback = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public void* UserData { get => Handle->UserData; set => Handle->UserData = value; }
|
|
/// <summary>
|
|
/// To be documented.
|
|
/// </summary>
|
|
public unsafe void Destroy()
|
|
{
|
|
ImGui.DestroyNative(Handle);
|
|
}
|
|
|
|
}
|
|
|
|
}
|