pub enum ParentWindowHandle {
XlibWindow(c_ulong),
XcbWindow(NonZeroU32),
AppKitNsView(NonNull<c_void>),
Win32Hwnd(NonZeroIsize),
}Expand description
A raw window handle for platform and GUI framework agnostic editors. This implements
HasWindowHandle so it can be used directly with GUI libraries that use the same
raw_window_handle version. If the library links against a different version of
raw_window_handle, then you’ll need to wrap around this type and implement the trait yourself.
Variants§
XlibWindow(c_ulong)
The ID of the host’s parent window. Used with X11.
XcbWindow(NonZeroU32)
The ID of the host’s parent window. Used with X11.
AppKitNsView(NonNull<c_void>)
A handle to the host’s parent window. Used only on macOS.
Win32Hwnd(NonZeroIsize)
A handle to the host’s parent window. Used only on Windows.
Trait Implementations§
Source§impl Clone for ParentWindowHandle
impl Clone for ParentWindowHandle
Source§fn clone(&self) -> ParentWindowHandle
fn clone(&self) -> ParentWindowHandle
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for ParentWindowHandle
Source§impl Debug for ParentWindowHandle
impl Debug for ParentWindowHandle
Source§impl HasWindowHandle for ParentWindowHandle
impl HasWindowHandle for ParentWindowHandle
Source§fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
fn window_handle(&self) -> Result<WindowHandle<'_>, HandleError>
Get a handle to the window.
Auto Trait Implementations§
impl !Send for ParentWindowHandle
impl !Sync for ParentWindowHandle
impl Freeze for ParentWindowHandle
impl RefUnwindSafe for ParentWindowHandle
impl Unpin for ParentWindowHandle
impl UnsafeUnpin for ParentWindowHandle
impl UnwindSafe for ParentWindowHandle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
impl<T> HasRawWindowHandle for Twhere
T: HasWindowHandle + ?Sized,
Source§fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
fn raw_window_handle(&self) -> Result<RawWindowHandle, HandleError>
👎Deprecated:
Use HasWindowHandle instead