MCPcopy Create free account
hub / github.com/cinder/Cinder / GetKeyOwner

Method GetKeyOwner

src/imgui/imgui.cpp:10386–10400  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10384}
10385
10386ImGuiID ImGui::GetKeyOwner(ImGuiKey key)
10387{
10388 if (!IsNamedKeyOrMod(key))
10389 return ImGuiKeyOwner_NoOwner;
10390
10391 ImGuiContext& g = *GImGui;
10392 ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key);
10393 ImGuiID owner_id = owner_data->OwnerCurr;
10394
10395 if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any)
10396 if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END)
10397 return ImGuiKeyOwner_NoOwner;
10398
10399 return owner_id;
10400}
10401
10402// TestKeyOwner(..., ID) : (owner == None || owner == ID)
10403// TestKeyOwner(..., None) : (owner == None)

Callers

nothing calls this directly

Calls 2

IsNamedKeyOrModFunction · 0.85
GetKeyOwnerDataFunction · 0.85

Tested by

no test coverage detected