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

Add support for raw-window-handle #4918

Merged
merged 7 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions internal/core/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -324,9 +324,12 @@ pub enum SetRenderingNotifierError {
AlreadySet,
}

/// This struct represents a persistent handle to a window and implements the traits
/// for exposing raw window handles.
/// This struct represents a persistent handle to a window and implements the
/// [`raw_window_handle_06::HasWindowHandle`] and [`raw_window_handle_06::HasDisplayHandle`]
/// traits for accessing exposing raw window and display handles.
/// Obtain an instance of this by calling [`Window::window_handle()`].
#[cfg(feature = "raw-window-handle-06")]
#[derive(Clone)]
pub struct WindowHandle {
tronical marked this conversation as resolved.
Show resolved Hide resolved
adapter: alloc::rc::Rc<dyn WindowAdapter>,
}
Expand Down Expand Up @@ -598,9 +601,8 @@ impl Window {
}

/// Returns a struct that implements the raw window handle traits to access the windowing system specific window
/// and display handles.
/// and display handles. This function is only accessible if you enable the `raw-window-handle-06` crate feature.
#[cfg(feature = "raw-window-handle-06")]

pub fn window_handle(&self) -> WindowHandle {
WindowHandle { adapter: self.0.window_adapter() }
}
Expand Down
2 changes: 1 addition & 1 deletion internal/core/translations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ fn translate_gettext(string: &str, ctx: &str, domain: &str, n: i32, plural: &str
}

#[cfg(feature = "gettext-rs")]
/// Initialize the translation by calling the [`bindtextdomain`](https://man7.org/linux/man-pages/man3/bindtextdomain.3.html) function from gettext
/// Initialize the translation by calling the [`bindtextdomain`](https://man7.org/unix/man-pages/man3/bindtextdomain.3.html) function from gettext
tronical marked this conversation as resolved.
Show resolved Hide resolved
pub fn gettext_bindtextdomain(_domain: &str, _dirname: std::path::PathBuf) -> std::io::Result<()> {
#[cfg(target_family = "unix")]
{
Expand Down