mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
move bindings around
This commit is contained in:
parent
1bce618684
commit
b5a8bfe399
546 changed files with 8 additions and 8 deletions
45
imgui/Dalamud.Bindings.ImGui/STBTexteditStatePtr.cs
Normal file
45
imgui/Dalamud.Bindings.ImGui/STBTexteditStatePtr.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
#nullable disable
|
||||
|
||||
namespace Dalamud.Bindings.ImGui
|
||||
{
|
||||
using System;
|
||||
|
||||
public unsafe struct STBTexteditStatePtr : IEquatable<STBTexteditStatePtr>
|
||||
{
|
||||
public STBTexteditState* Handle;
|
||||
|
||||
public unsafe STBTexteditStatePtr(STBTexteditState* handle)
|
||||
{
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
public override readonly bool Equals(object obj)
|
||||
{
|
||||
return obj is STBTexteditStatePtr ptr && Equals(ptr);
|
||||
}
|
||||
|
||||
public readonly bool Equals(STBTexteditStatePtr other)
|
||||
{
|
||||
return Handle == other.Handle;
|
||||
}
|
||||
|
||||
public override readonly int GetHashCode()
|
||||
{
|
||||
return ((nint)Handle).GetHashCode();
|
||||
}
|
||||
|
||||
public static bool operator ==(STBTexteditStatePtr left, STBTexteditStatePtr right)
|
||||
{
|
||||
return left.Equals(right);
|
||||
}
|
||||
|
||||
public static bool operator !=(STBTexteditStatePtr left, STBTexteditStatePtr right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
public static implicit operator STBTexteditState*(STBTexteditStatePtr handle) => handle.Handle;
|
||||
|
||||
public static implicit operator STBTexteditStatePtr(STBTexteditState* handle) => new(handle);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue