Struct raw_window_handle::WindowHandle
source · pub struct WindowHandle<'a> { /* private fields */ }
Expand description
The handle to a window.
This is the primary return type of the HasWindowHandle
trait. All pointers within this type
are guaranteed to be valid and not dangling for the lifetime of the handle. This excludes window IDs
like XIDs and the window ID for web platforms. See the documentation on the HasWindowHandle
trait for more information about these safety requirements.
This handle is guaranteed to be safe and valid. Get the underlying raw window handle with the
HasRawWindowHandle
trait.
Implementations§
source§impl<'a> WindowHandle<'a>
impl<'a> WindowHandle<'a>
sourcepub unsafe fn borrow_raw(raw: RawWindowHandle, active: ActiveHandle<'a>) -> Self
pub unsafe fn borrow_raw(raw: RawWindowHandle, active: ActiveHandle<'a>) -> Self
Borrow a WindowHandle
from a RawWindowHandle
.
Safety
The RawWindowHandle
must be valid for the lifetime and the application must not be
suspended. The Active
object that the ActiveHandle
was created from must be
associated directly with the display that the window handle is associated with.
Trait Implementations§
source§impl<'a> Clone for WindowHandle<'a>
impl<'a> Clone for WindowHandle<'a>
source§fn clone(&self) -> WindowHandle<'a>
fn clone(&self) -> WindowHandle<'a>
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more