| 9215 | } |
| 9216 | |
| 9217 | ImGuiID ImGui::GetKeyOwner(ImGuiKey key) |
| 9218 | { |
| 9219 | if (!IsNamedKeyOrModKey(key)) |
| 9220 | return ImGuiKeyOwner_None; |
| 9221 | |
| 9222 | ImGuiContext& g = *GImGui; |
| 9223 | ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(key); |
| 9224 | ImGuiID owner_id = owner_data->OwnerCurr; |
| 9225 | |
| 9226 | if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any) |
| 9227 | if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END) |
| 9228 | return ImGuiKeyOwner_None; |
| 9229 | |
| 9230 | return owner_id; |
| 9231 | } |
| 9232 | |
| 9233 | // TestKeyOwner(..., ID) : (owner == None || owner == ID) |
| 9234 | // TestKeyOwner(..., None) : (owner == None) |
nothing calls this directly
no test coverage detected