pub struct RawWindow<'a> {
pub gtk_window: *mut c_void,
pub default_vbox: Option<*mut c_void>,
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§
§gtk_window: *mut c_voidA borrowed GtkApplicationWindow*. Never null.
default_vbox: Option<*mut c_void>A borrowed GtkBox*, or None when the runtime does not add a default vertical box.
When set, it is never null.
_marker: &'a PhantomData<()>Ties this struct to the lifetime of the window the pointers above are borrowed from.