mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
48 lines
3.2 KiB
C#
48 lines
3.2 KiB
C#
// <auto-generated/>
|
|
// Generated by Brutal.ImGui.Generator; do not edit by hand.
|
|
#nullable enable
|
|
|
|
namespace Brutal.ImGuiApi.Internal
|
|
{
|
|
public unsafe partial class PInvoke
|
|
{
|
|
/// <summary>
|
|
/// <para>
|
|
/// Set key owner to last item if it is hovered or active. Equivalent to 'if (IsItemHovered() ||
|
|
/// IsItemActive()) { SetKeyOwner(key, GetItemID());'.
|
|
/// </para>
|
|
/// <para>
|
|
/// C++:
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui_internal.h#L3581">imgui_internal.h:3581</see>
|
|
/// ,
|
|
/// <see href="https://github.com/RocketWerkz/imgui/blob/v1.92.2-docking-brutal/imgui.cpp#L11046">imgui.cpp:11046</see>
|
|
/// <br/><c>void SetItemKeyOwner(ImGuiKey key, ImGuiInputFlags flags)</c>
|
|
/// </para>
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <code>
|
|
/// [EXPERIMENTAL] Low-Level: Key/Input Ownership
|
|
/// - The idea is that instead of "eating" a given input, we can link to an owner id.
|
|
/// - Ownership is most often claimed as a result of reacting to a press/down event (but occasionally may be claimed ahead).
|
|
/// - Input queries can then read input by specifying ImGuiKeyOwner_Any (== 0), ImGuiKeyOwner_NoOwner (== -1) or a custom ID.
|
|
/// - Legacy input queries (without specifying an owner or _Any or _None) are equivalent to using ImGuiKeyOwner_Any (== 0).
|
|
/// - Input ownership is automatically released on the frame after a key is released. Therefore:
|
|
/// - for ownership registration happening as a result of a down/press event, the SetKeyOwner() call may be done once (common case).
|
|
/// - for ownership registration happening ahead of a down/press event, the SetKeyOwner() call needs to be made every frame (happens if e.g. claiming ownership on hover).
|
|
/// - SetItemKeyOwner() is a shortcut for common simple case. A custom widget will probably want to call SetKeyOwner() multiple times directly based on its interaction state.
|
|
/// - This is marked experimental because not all widgets are fully honoring the Set/Test idioms. We will need to move forward step by step.
|
|
/// Please open a GitHub Issue to submit your usage scenario or if there's a use case you need solved.
|
|
/// </code>
|
|
/// <code>
|
|
/// This is more or less equivalent to:
|
|
/// if (IsItemHovered() || IsItemActive())
|
|
/// SetKeyOwner(key, GetItemID());
|
|
/// Extensive uses of that (e.g. many calls for a single item) may want to manually perform the tests once and then call SetKeyOwner() multiple times.
|
|
/// More advanced usage scenarios may want to call SetKeyOwner() manually based on different condition.
|
|
/// Worth noting is that only one item can be hovered and only one item can be active, therefore this usage pattern doesn't need to bother with routing and priority.
|
|
/// </code>
|
|
/// </remarks>
|
|
[LibraryImport("imgui")]
|
|
public static unsafe partial void SetItemKeyOwner_internal(ImGuiKey key, ImGuiInputFlags flags);
|
|
}
|
|
}
|