-
Notifications
You must be signed in to change notification settings - Fork 48
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
MacOSHandle shouldn't have ns_view property #32
Comments
So, there's been a bit of back-and-forth recently about whether or not to expose If somebody submits a PR adding |
I don't know if I really agree, as this leaves more room for bugs caused by implementers of the RawWindowHandle trait, but it's not really my call to make. If you're keeping it, I strongly feel that the documentation should note which view it is precisely. as it is, it's just some view associated with the window. The contentView is probably the most obvious choice, but isn't the only one. (Additionally, if a user happens to hear they need to pass the window's contentView into something, they probably will have to look up and verify that the view they have is the contentView -- I would do this, at least). It's also possibly worth noting that NSWindow are safe to use from whichever thread you want, but the NSView is a main-thread-only type (e.g. NSWindow is send, NSView isn't and also has a special relationship with the main thread). I don't know if this matters here, though -- probably not as MacOSHandle isn't send (admittedly, it not being send is not enough for it to be sound to use the NSView, but only unsafe code can do anything meaningful with it anyway, so that's possibly fine). |
What sorts of bugs could happen as a result of not doing that? If users can associate multiple |
Audio plugins on macOS receive (or are expected to return) an Removing the |
Sold. |
It's redundant. Anybody who wants this can just get it via
or similar. Same goes for
ns_window_controller
(via thewindowController
message) andns_view_controller
(via thecontentViewController
message), which don't currently exist, but are mentioned in comments as potential future extensions.The text was updated successfully, but these errors were encountered: