Would this work on Windows and osx? And if so is there a specific approach or method required?
I don't know the answer in practice (beyond "we don't promise this will work"), but my reading of the Windows-specific source code is that this should work as long as your stuff is all in the same thread.
If you need to catch events from a window not made with
SDL_CreateWindow, you can use
SDL_CreateWindowFrom and SDL should hook in appropriately, even if hooking into a different thread, but probably won't get events until the other thread pumps its own event queue.
It might be interesting to hook into the main window with
SDL_CreateWindowFrom so you can get a callback on the main thread when it pumps its event queue, and hook up all the things you need from there. Again, totally untried here.
I don't know if this will work on macOS. I haven't researched it. Please report back if you try it, though!