1 use core::ptr; 2 use libc::c_void; 3 4 /// Raw window handle for Windows. 5 /// 6 /// ## Construction 7 /// ``` 8 /// # use raw_window_handle::windows::WindowsHandle; 9 /// let handle = WindowsHandle { 10 /// /* fields */ 11 /// ..WindowsHandle::empty() 12 /// }; 13 /// ``` 14 #[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)] 15 pub struct WindowsHandle { 16 /// A Win32 HWND handle. 17 pub hwnd: *mut c_void, 18 /// The HINSTANCE associated with this type's HWND. 19 pub hinstance: *mut c_void, 20 #[doc(hidden)] 21 #[deprecated = "This field is used to ensure that this struct is non-exhaustive, so that it may be extended in the future. Do not refer to this field."] 22 pub _non_exhaustive_do_not_use: crate::seal::Seal, 23 } 24 25 impl WindowsHandle { empty() -> WindowsHandle26 pub fn empty() -> WindowsHandle { 27 #[allow(deprecated)] 28 WindowsHandle { 29 hwnd: ptr::null_mut(), 30 hinstance: ptr::null_mut(), 31 _non_exhaustive_do_not_use: crate::seal::Seal, 32 } 33 } 34 } 35