-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add ability to get underlying window handle #193
Conversation
Adds the `get_ref` and `get_mut` functions, which can be used to get references (mutable or otherwise) to the underlying window handle. cc rust-windowing/raw-window-handle#158 (comment) Signed-off-by: John Nunley <[email protected]>
For iced-rs/iced#2191, I also ended up needing Using Having accessors like this seems reasonable, regardless. |
Probably by using an owned display handle, tracked in rust-windowing/winit#3365 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about calling them window()
and window_mut()
?
See the Rust API Guidelines.
Signed-off-by: John Nunley <[email protected]>
In a previous much-different version of If that invariant still applies, then |
Good catch! Yes that still happens, let me fix it |
There are considerations to be made here, so remove it for now. Signed-off-by: John Nunley <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the removal of window_mut
Perhaps it would also make sense to have a |
Adds the
get_ref
andget_mut
functions, which can be used to getreferences (mutable or otherwise) to the underlying window handle.
cc rust-windowing/raw-window-handle#158 (comment)