Dalamud/imgui/Dalamud.Bindings.ImGui/Custom/Generated/ImGuiIOPtr.gen.cs
Soreepeong 51a20300d8 wip2
2025-07-22 02:10:46 +09:00

118 lines
3.2 KiB
C#

// <auto-generated/>
using HexaGen.Runtime;
using System;
using System.Diagnostics;
using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
namespace Dalamud.Bindings.ImGui;
public unsafe partial struct ImGuiIOPtr
{
public unsafe void AddFocusEvent(bool focused)
{
ImGuiNative.AddFocusEvent(Handle, focused ? (byte)1 : (byte)0);
}
public unsafe void AddInputCharacter(uint c)
{
ImGuiNative.AddInputCharacter(Handle, c);
}
public unsafe void AddInputCharactersUTF8(byte* str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, str);
}
public unsafe void AddInputCharactersUTF8(ref byte str)
{
fixed (byte* pstr = &str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr);
}
}
public unsafe void AddInputCharactersUTF8(ReadOnlySpan<byte> str)
{
fixed (byte* pstr = str)
{
ImGuiNative.AddInputCharactersUTF8(Handle, (byte*)pstr);
}
}
public unsafe void AddInputCharactersUTF8(string str)
{
byte* pStr0 = null;
int pStrSize0 = 0;
if (str != null)
{
pStrSize0 = Utils.GetByteCountUTF8(str);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
pStr0 = Utils.Alloc<byte>(pStrSize0 + 1);
}
else
{
byte* pStrStack0 = stackalloc byte[pStrSize0 + 1];
pStr0 = pStrStack0;
}
int pStrOffset0 = Utils.EncodeStringUTF8(str, pStr0, pStrSize0);
pStr0[pStrOffset0] = 0;
}
ImGuiNative.AddInputCharactersUTF8(Handle, pStr0);
if (pStrSize0 >= Utils.MaxStackallocSize)
{
Utils.Free(pStr0);
}
}
public unsafe void AddInputCharacterUTF16(ushort c)
{
ImGuiNative.AddInputCharacterUTF16(Handle, c);
}
public unsafe void AddKeyAnalogEvent(ImGuiKey key, bool down, float v)
{
ImGuiNative.AddKeyAnalogEvent(Handle, key, down ? (byte)1 : (byte)0, v);
}
public unsafe void AddKeyEvent(ImGuiKey key, bool down)
{
ImGuiNative.AddKeyEvent(Handle, key, down ? (byte)1 : (byte)0);
}
public unsafe void AddMouseButtonEvent(int button, bool down)
{
ImGuiNative.AddMouseButtonEvent(Handle, button, down ? (byte)1 : (byte)0);
}
public unsafe void AddMousePosEvent(float x, float y)
{
ImGuiNative.AddMousePosEvent(Handle, x, y);
}
public unsafe void AddMouseViewportEvent(uint id)
{
ImGuiNative.AddMouseViewportEvent(Handle, id);
}
public unsafe void AddMouseWheelEvent(float whX, float whY)
{
ImGuiNative.AddMouseWheelEvent(Handle, whX, whY);
}
public unsafe void ClearInputCharacters()
{
ImGuiNative.ClearInputCharacters(Handle);
}
public unsafe void ClearInputKeys()
{
ImGuiNative.ClearInputKeys(Handle);
}
public unsafe void Destroy()
{
ImGuiNative.Destroy(Handle);
}
public unsafe void SetAppAcceptingEvents(bool acceptingEvents)
{
ImGuiNative.SetAppAcceptingEvents(Handle, acceptingEvents ? (byte)1 : (byte)0);
}
public unsafe void SetKeyEventNativeData(ImGuiKey key, int nativeKeycode, int nativeScancode, int nativeLegacyIndex)
{
ImGuiNative.SetKeyEventNativeData(Handle, key, nativeKeycode, nativeScancode, nativeLegacyIndex);
}
public unsafe void SetKeyEventNativeData(ImGuiKey key, int nativeKeycode, int nativeScancode)
{
ImGuiNative.SetKeyEventNativeData(Handle, key, nativeKeycode, nativeScancode, (int)(-1));
}
}