Get mouse position relative to window

I was wondering why SDL2 does not have a function to get the mouse position relative to a given window.
Other functions regarding the mouse like SDL_WarpMouseInWindow allow you to specify a window, while SDL_GetMouseState only works relative to the focus window (this seems inconsistent to me).
Even though I do know how to calculate the relative position using SDL_GetGlobalMouseState, I am curious about any specific reason behind the absence of the function in question.
Furthermore, alternative window/input libraries such as glfw and sfml do have this functionality.
Is the SDL_GetGlobalMouseState solution as efficient as their implementations?
Thanks in advance.