use core::ffi::c_void;
use core::num::NonZeroIsize;
use core::ptr::NonNull;
use super::DisplayHandle;
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WindowsDisplayHandle {}
impl WindowsDisplayHandle {
pub fn new() -> Self {
Self {}
}
}
impl DisplayHandle<'static> {
pub fn windows() -> Self {
unsafe { Self::borrow_raw(WindowsDisplayHandle::new().into()) }
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct Win32WindowHandle {
pub hwnd: NonZeroIsize,
pub hinstance: Option<NonZeroIsize>,
}
impl Win32WindowHandle {
pub fn new(hwnd: NonZeroIsize) -> Self {
Self {
hwnd,
hinstance: None,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WinRtWindowHandle {
pub core_window: NonNull<c_void>,
}
impl WinRtWindowHandle {
pub fn new(core_window: NonNull<c_void>) -> Self {
Self { core_window }
}
}