Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the way you get a window #175

Closed
tomaka opened this issue Dec 28, 2014 · 7 comments
Closed

Change the way you get a window #175

tomaka opened this issue Dec 28, 2014 · 7 comments

Comments

@tomaka
Copy link
Contributor

tomaka commented Dec 28, 2014

On some platforms like Android, iOS, emscripten, etc. you only ever get one "window", and it is already created when you start.

Therefore the API should be more like glutin::get_window() instead of glutin::Window::new.

@milibopp
Copy link
Contributor

Is this API still compatible with multi-window applications on desktop platforms?

@tomaka
Copy link
Contributor Author

tomaka commented Jan 19, 2015

I don't really know how the API would look like yet.
I opened this issue because it's not correct to "create" a window on android, since you already have one when the program starts. The consequence is that the windows settings that you specify in the builder are ignored.

If you or someone happens to have a suggestion, that would be welcome.

@milibopp
Copy link
Contributor

Well, I would say that such a fundamental difference in platform behaviour should be reflected in the API. So getting the single Android window should be something different than creating a window on a regular desktop. In my opinion either should fail on the wrong platform. On top of that we could provide a platform-agnostic wrapper function that gets the single window on Android, while it creates some default window on another platform. Let's just make sure that we do not impose any limitations of mobile apps on desktop apps.

@tomaka
Copy link
Contributor Author

tomaka commented Nov 3, 2016

Closing for rust-windowing/winit#33

@tomaka tomaka closed this as completed Nov 3, 2016
@seivan
Copy link

seivan commented Oct 2, 2018

@tomaka You can have multiple windows (if you're referring to UIWindow) and it's not a bad idea to be able to create one if you want to switch between multiple Windows. One scenario could be toggling between Game and Menu states where Menu is using native UIKit/Swift and Game is written in Rust.

@francesca64
Copy link
Member

@seivan your comment would have better visibility on the relevant winit issue (rust-windowing/winit#33).

@seivan
Copy link

seivan commented Oct 17, 2018

@francesca64 Thanks! Wrote a bit more there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants