I have this cross-platform webview wrapper (works well on Linux and Windows so far), but I’m not sure if its API is correct. Does anyone have any advice?
The main problem I can see is that you can’t open a window from inside the handler. Possible solutions:
- Make the context reference counted, too. Unfortunately, this would also let the user call
Context::run(&self)from the window, so it won’t work.
Windowobject. The problem with this is that it’s very confusing, but I think it succeeds at ensuring that the
Windowis only ever created on the same thread that
Context::initwas called on, which I think is the only necessary constraint. Maybe it could also be made less confusing by naming it