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

iOS Abstract Out the UIView type from winit #609

Merged
merged 6 commits into from
Jul 25, 2018

Conversation

mtak-
Copy link
Contributor

@mtak- mtak- commented Jul 24, 2018

  • Tested on all platforms changed
  • Added an entry to CHANGELOG.md if knowledge of this change could be valuable to users
  • Updated documentation to reflect any user-facing changes, including notes of platform-specific behavior

There are a lot of changes to iOS in this pull request.

  • The UIApplication setjmp hacks now happen in Window::new. This allows PlatformSpecificWindowBuilderAttributes to customize the specific UIView class.
  • The biggest breaking change here is that winit no longer sets up a GLKView. Putting responsibility on other libraries like glutin and vulkano-win to specify the exact UIView subclass.
  • EventsLoop now explicitly checks that it's created on the main thread. AFAICT this was required before, but it was just UB to create it anywhere else.
  • Only one Window can ever be created.
  • EventsLoop cannot be polled until a Window has been created - in order for the CFRunLoopRunInMode calls to work.

I have been testing it with glutin. mtak-/glutin@1a3066f

Let me know what needs to be changed/etc.

mtak- added 4 commits July 24, 2018 12:46
# Conflicts:
#	src/platform/ios/mod.rs
iOS: Window can only be made once, make Drop on Window thread safe
iOS: make DelegateState owned by Window, cleanup
iOS: fixes from merge (class! macro)
@francesca64
Copy link
Member

This looks fantastic, thanks!

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

Successfully merging this pull request may close these issues.

2 participants