//
// Generated by Brutal.ImGui.Generator; do not edit by hand.
#nullable enable
namespace Brutal.ImGuiApi
{
public static partial class ImGuiIOExtensions
{
///
///
/// Queue a new key down/up event. Key should be "translated" (as in, generally ImGuiKey_A matches the key
/// end-user would use to emit an 'A' character)
///
///
/// C++:
/// imgui.h:2577
/// ,
/// imgui.cpp:1808
///
void AddKeyEvent(ImGuiKey key, bool down)
///
///
///
///
/// Input Functions
///
///
public static unsafe void AddKeyEvent(this ImGuiIOPtr target, ImGuiKey key, bool down) =>
PInvoke.ImGuiIO_AddKeyEvent(target, key, down);
///
///
/// Queue a new key down/up event for analog values (e.g. ImGuiKey_Gamepad_ values). Dead-zones should be
/// handled by the backend.
///
///
/// C++:
/// imgui.h:2578
/// ,
/// imgui.cpp:1768
///
void AddKeyAnalogEvent(ImGuiKey key, bool down, float v)
///
///
///
///
/// Input Functions
///
///
/// Queue a new key down/up event.
/// - ImGuiKey key: Translated key (as in, generally ImGuiKey_A matches the key end-user would use to emit an 'A' character)
/// - bool down: Is the key down? use false to signify a key release.
/// - float analog_value: 0.0f..1.0f
/// IMPORTANT: THIS FUNCTION AND OTHER "ADD" GRABS THE CONTEXT FROM OUR INSTANCE.
/// WE NEED TO ENSURE THAT ALL FUNCTION CALLS ARE FULFILLING THIS, WHICH IS WHY GetKeyData() HAS AN EXPLICIT CONTEXT.
///
///
public static unsafe void AddKeyAnalogEvent(this ImGuiIOPtr target, ImGuiKey key, bool down, float v) =>
PInvoke.ImGuiIO_AddKeyAnalogEvent(target, key, down, v);
///
///
/// Queue a mouse position update. Use -FLT_MAX,-FLT_MAX to signify no mouse (e.g. app not focused and not
/// hovered)
///
///
/// C++:
/// imgui.h:2579
/// ,
/// imgui.cpp:1837
///
void AddMousePosEvent(float x, float y)
///
///
///
///
/// Input Functions
///
///
/// Queue a mouse move event
///
///
public static unsafe void AddMousePosEvent(this ImGuiIOPtr target, float x, float y) =>
PInvoke.ImGuiIO_AddMousePosEvent(target, x, y);
///
///
/// Queue a mouse button change
///
///
/// C++:
/// imgui.h:2580
/// ,
/// imgui.cpp:1863
///
void AddMouseButtonEvent(int button, bool down)
///
///
///
///
/// Input Functions
///
///
public static unsafe void AddMouseButtonEvent(this ImGuiIOPtr target, int button, bool down) =>
PInvoke.ImGuiIO_AddMouseButtonEvent(target, button, down);
///
///
/// Queue a mouse wheel update. wheel_y<0: scroll down, wheel_y>0: scroll up, wheel_x<0: scroll
/// right, wheel_x>0: scroll left.
///
///
/// C++:
/// imgui.h:2581
/// ,
/// imgui.cpp:1912
///
void AddMouseWheelEvent(float wheel_x, float wheel_y)
///
///
///
///
/// Input Functions
///
///
/// Queue a mouse wheel event (some mouse/API may only have a Y component)
///
///
public static unsafe void AddMouseWheelEvent(this ImGuiIOPtr target, float wheelX, float wheelY) =>
PInvoke.ImGuiIO_AddMouseWheelEvent(target, wheelX, wheelY);
///
///
/// Queue a mouse source change (Mouse/TouchScreen/Pen)
///
///
/// C++:
/// imgui.h:2582
/// ,
/// imgui.cpp:1933
///
void AddMouseSourceEvent(ImGuiMouseSource source)
///
///
///
///
/// Input Functions
///
///
/// This is not a real event, the data is latched in order to be stored in actual Mouse events.
/// This is so that duplicate events (e.g. Windows sending extraneous WM_MOUSEMOVE) gets filtered and are not leading to actual source changes.
///
///
public static unsafe void AddMouseSourceEvent(this ImGuiIOPtr target, ImGuiMouseSource source) =>
PInvoke.ImGuiIO_AddMouseSourceEvent(target, source);
///
///
/// Queue a mouse hovered viewport. Requires backend to set ImGuiBackendFlags_HasMouseHoveredViewport to
/// call this (for multi-viewport support).
///
///
/// C++:
/// imgui.h:2583
/// ,
/// imgui.cpp:1940
///
void AddMouseViewportEvent(ImGuiID id)
///
///
///
///
/// Input Functions
///
///
public static unsafe void AddMouseViewportEvent(this ImGuiIOPtr target, ImGuiID id) =>
PInvoke.ImGuiIO_AddMouseViewportEvent(target, id);
///
///
/// Queue a gain/loss of focus for the application (generally based on OS/platform focus of your window)
///
///
/// C++:
/// imgui.h:2584
/// ,
/// imgui.cpp:1961
///
void AddFocusEvent(bool focused)
///
///
///
///
/// Input Functions
///
///
public static unsafe void AddFocusEvent(this ImGuiIOPtr target, bool focused) =>
PInvoke.ImGuiIO_AddFocusEvent(target, focused);
///
///
/// Queue a new character input
///
///
/// C++:
/// imgui.h:2585
/// ,
/// imgui.cpp:1629
///
void AddInputCharacter(unsigned int c)
///
///
///
///
/// Input Functions
///
///
/// Pass in translated ASCII characters for text input.
/// - with glfw you can get those from the callback set in glfwSetCharCallback()
/// - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message
/// FIXME: Should in theory be called "AddCharacterEvent()" to be consistent with new API
///
///
public static unsafe void AddInputCharacter(this ImGuiIOPtr target, uint c) =>
PInvoke.ImGuiIO_AddInputCharacter(target, c);
///
///
/// Queue a new character input from a UTF-16 character, it can be a surrogate
///
///
/// C++:
/// imgui.h:2586
/// ,
/// imgui.cpp:1646
///
void AddInputCharacterUTF16(ImWchar16 c)
///
///
///
///
/// Input Functions
///
///
/// UTF16 strings use surrogate pairs to encode codepoints >= 0x10000, so
/// we should save the high surrogate.
///
///
public static unsafe void AddInputCharacterUTF16(this ImGuiIOPtr target, ushort c) =>
PInvoke.ImGuiIO_AddInputCharacterUTF16(target, c);
///
///
/// Queue a new characters input from a UTF-8 string
///
///
/// C++:
/// imgui.h:2587
/// ,
/// imgui.cpp:1680
///
void AddInputCharactersUTF8(const char* str)
///
///
///
///
/// Input Functions
///
///
public static unsafe void AddInputCharactersUTF8(this ImGuiIOPtr target, ImString str)
{
fixed (byte* str_fixed = str)
{
PInvoke.ImGuiIO_AddInputCharactersUTF8(target, str_fixed);
}
}
///
///
/// [Optional] Specify index for legacy <1.87 IsKeyXXX() functions with native indices + specify native
/// keycode, scancode.
///
///
/// C++:
/// imgui.h:2589
/// ,
/// imgui.cpp:1818
///
/// void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index = -1)
///
///
///
///
/// [Optional] Call after AddKeyEvent().
/// Specify native keycode, scancode + Specify index for legacy <1.87 IsKeyXXX() functions with native indices.
/// If you are writing a backend in 2022 or don't use IsKeyXXX() with native values that are not ImGuiKey values, you can avoid calling this.
///
///
public static unsafe void SetKeyEventNativeData(
this ImGuiIOPtr target,
ImGuiKey key,
int nativeKeycode,
int nativeScancode,
int nativeLegacyIndex = -1
) => PInvoke.ImGuiIO_SetKeyEventNativeData(target, key, nativeKeycode, nativeScancode, nativeLegacyIndex);
///
///
/// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog
/// boxes that are interrupting your application loop/refresh, and you want to disable events being queued
/// while your app is frozen.
///
///
/// C++:
/// imgui.h:2590
/// ,
/// imgui.cpp:1831
///
void SetAppAcceptingEvents(bool accepting_events)
///
///
///
///
/// Set master flag for accepting key/mouse/text events (default to true). Useful if you have native dialog
/// boxes that are interrupting your application loop/refresh, and you want to disable events being queued
/// while your app is frozen.
///
///
public static unsafe void SetAppAcceptingEvents(this ImGuiIOPtr target, bool acceptingEvents) =>
PInvoke.ImGuiIO_SetAppAcceptingEvents(target, acceptingEvents);
///
///
/// Clear all incoming events.
///
///
/// C++:
/// imgui.h:2591
/// ,
/// imgui.cpp:1693
///
void ClearEventsQueue()
///
///
///
///
/// Clear all incoming events.
///
///
public static unsafe void ClearEventsQueue(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearEventsQueue(target);
///
///
/// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all
/// keys/buttons.
///
///
/// C++:
/// imgui.h:2592
/// ,
/// imgui.cpp:1701
///
void ClearInputKeys()
///
///
///
///
/// Clear current keyboard/gamepad state + current frame text input buffer. Equivalent to releasing all
/// keys/buttons.
///
///
public static unsafe void ClearInputKeys(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearInputKeys(target);
///
///
/// Clear current mouse state.
///
///
/// C++:
/// imgui.h:2593
/// ,
/// imgui.cpp:1718
///
void ClearInputMouse()
///
///
public static unsafe void ClearInputMouse(this ImGuiIOPtr target) => PInvoke.ImGuiIO_ClearInputMouse(target);
}
}