// ------------------------------------------------------------------------------
//
// 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;
namespace Dalamud.Bindings.ImGui
{
///
/// To be documented.
///
[StructLayout(LayoutKind.Sequential)]
public partial struct ImGuiPlatformMonitor
{
///
/// To be documented.
///
public Vector2 MainPos;
///
/// To be documented.
///
public Vector2 MainSize;
///
/// To be documented.
///
public Vector2 WorkPos;
///
/// To be documented.
///
public Vector2 WorkSize;
///
/// To be documented.
///
public float DpiScale;
///
/// To be documented.
///
public unsafe ImGuiPlatformMonitor(Vector2 mainPos = default, Vector2 mainSize = default, Vector2 workPos = default, Vector2 workSize = default, float dpiScale = default)
{
MainPos = mainPos;
MainSize = mainSize;
WorkPos = workPos;
WorkSize = workSize;
DpiScale = dpiScale;
}
///
/// To be documented.
///
public unsafe void Destroy()
{
fixed (ImGuiPlatformMonitor* @this = &this)
{
ImGui.DestroyNative(@this);
}
}
}
///
/// To be documented.
///
#if NET5_0_OR_GREATER
[DebuggerDisplay("{DebuggerDisplay,nq}")]
#endif
public unsafe struct ImGuiPlatformMonitorPtr : IEquatable
{
public ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* handle) { Handle = handle; }
public ImGuiPlatformMonitor* Handle;
public bool IsNull => Handle == null;
public static ImGuiPlatformMonitorPtr Null => new ImGuiPlatformMonitorPtr(null);
public ImGuiPlatformMonitor this[int index] { get => Handle[index]; set => Handle[index] = value; }
public static implicit operator ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* handle) => new ImGuiPlatformMonitorPtr(handle);
public static implicit operator ImGuiPlatformMonitor*(ImGuiPlatformMonitorPtr handle) => handle.Handle;
public static bool operator ==(ImGuiPlatformMonitorPtr left, ImGuiPlatformMonitorPtr right) => left.Handle == right.Handle;
public static bool operator !=(ImGuiPlatformMonitorPtr left, ImGuiPlatformMonitorPtr right) => left.Handle != right.Handle;
public static bool operator ==(ImGuiPlatformMonitorPtr left, ImGuiPlatformMonitor* right) => left.Handle == right;
public static bool operator !=(ImGuiPlatformMonitorPtr left, ImGuiPlatformMonitor* right) => left.Handle != right;
public bool Equals(ImGuiPlatformMonitorPtr other) => Handle == other.Handle;
///
public override bool Equals(object obj) => obj is ImGuiPlatformMonitorPtr handle && Equals(handle);
///
public override int GetHashCode() => ((nuint)Handle).GetHashCode();
#if NET5_0_OR_GREATER
private string DebuggerDisplay => string.Format("ImGuiPlatformMonitorPtr [0x{0}]", ((nuint)Handle).ToString("X"));
#endif
///
/// To be documented.
///
public ref Vector2 MainPos => ref Unsafe.AsRef(&Handle->MainPos);
///
/// To be documented.
///
public ref Vector2 MainSize => ref Unsafe.AsRef(&Handle->MainSize);
///
/// To be documented.
///
public ref Vector2 WorkPos => ref Unsafe.AsRef(&Handle->WorkPos);
///
/// To be documented.
///
public ref Vector2 WorkSize => ref Unsafe.AsRef(&Handle->WorkSize);
///
/// To be documented.
///
public ref float DpiScale => ref Unsafe.AsRef(&Handle->DpiScale);
///
/// To be documented.
///
public unsafe void Destroy()
{
ImGui.DestroyNative(Handle);
}
}
}