pub struct RawWindow<'a> {
pub _marker: &'a PhantomData<()>,
}Expand description
A raw window type that contains fields to access the HWND on Windows, GTK object pointers on Linux
§Ownership
Unlike the WindowDispatch getters, the GTK pointers here are
transfer none: they are borrowed from the window that is being created and are only valid for
the duration of the callback that receives this struct. Wrap them with glib’s from_glib_none
(which takes its own reference) and do not store them - the 'a lifetime is not enforced by
the raw pointers, so retaining one past the callback dereferences freed memory.
The GTK major version of the objects is the one the runtime was built against, so consumers must wrap them with matching bindings.
Fields§
§_marker: &'a PhantomData<()>Ties this struct to the lifetime of the window the pointers above are borrowed from.
Auto Trait Implementations§
impl<'a> Freeze for RawWindow<'a>
impl<'a> RefUnwindSafe for RawWindow<'a>
impl<'a> Send for RawWindow<'a>
impl<'a> Sync for RawWindow<'a>
impl<'a> Unpin for RawWindow<'a>
impl<'a> UnsafeUnpin for RawWindow<'a>
impl<'a> UnwindSafe for RawWindow<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more