| 8544 | } |
| 8545 | |
| 8546 | ImGuiID ImGui::GetKeyOwner(ImGuiKey key) |
| 8547 | { |
| 8548 | if (!IsNamedKeyOrModKey(key)) |
| 8549 | return ImGuiKeyOwner_None; |
| 8550 | |
| 8551 | ImGuiContext& g = *GImGui; |
| 8552 | ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(key); |
| 8553 | ImGuiID owner_id = owner_data->OwnerCurr; |
| 8554 | |
| 8555 | if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any) |
| 8556 | if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END) |
| 8557 | return ImGuiKeyOwner_None; |
| 8558 | |
| 8559 | return owner_id; |
| 8560 | } |
| 8561 | |
| 8562 | // TestKeyOwner(..., ID) : (owner == None || owner == ID) |
| 8563 | // TestKeyOwner(..., None) : (owner == None) |
nothing calls this directly
no test coverage detected