| 8972 | } |
| 8973 | |
| 8974 | ImGuiID ImGui::GetKeyOwner(ImGuiKey key) |
| 8975 | { |
| 8976 | if (!IsNamedKeyOrModKey(key)) |
| 8977 | return ImGuiKeyOwner_None; |
| 8978 | |
| 8979 | ImGuiContext& g = *GImGui; |
| 8980 | ImGuiKeyOwnerData* owner_data = GetKeyOwnerData(&g, key); |
| 8981 | ImGuiID owner_id = owner_data->OwnerCurr; |
| 8982 | |
| 8983 | if (g.ActiveIdUsingAllKeyboardKeys && owner_id != g.ActiveId && owner_id != ImGuiKeyOwner_Any) |
| 8984 | if (key >= ImGuiKey_Keyboard_BEGIN && key < ImGuiKey_Keyboard_END) |
| 8985 | return ImGuiKeyOwner_None; |
| 8986 | |
| 8987 | return owner_id; |
| 8988 | } |
| 8989 | |
| 8990 | // TestKeyOwner(..., ID) : (owner == None || owner == ID) |
| 8991 | // TestKeyOwner(..., None) : (owner == None) |
nothing calls this directly
no test coverage detected