@@ -60,32 +60,6 @@ pub use windows::{Win32WindowHandle, WinRtWindowHandle, WindowsDisplayHandle};
6060
6161use core:: fmt;
6262
63- /// Window that wraps around a raw window handle.
64- ///
65- /// # Safety
66- ///
67- /// Users can safely assume that pointers and non-zero fields are valid, and it is up to the
68- /// implementer of this trait to ensure that condition is upheld.
69- ///
70- /// Despite that qualification, implementers should still make a best-effort attempt to fill in all
71- /// available fields. If an implementation doesn't, and a downstream user needs the field, it should
72- /// try to derive the field from other fields the implementer *does* provide via whatever methods the
73- /// platform provides.
74- ///
75- /// The exact handles returned by `raw_window_handle` must remain consistent between multiple calls
76- /// to `raw_window_handle` as long as not indicated otherwise by platform specific events.
77- #[ deprecated = "Use `HasWindowHandle` instead" ]
78- pub unsafe trait HasRawWindowHandle {
79- fn raw_window_handle ( & self ) -> Result < RawWindowHandle , HandleError > ;
80- }
81-
82- #[ allow( deprecated) ]
83- unsafe impl < T : HasWindowHandle + ?Sized > HasRawWindowHandle for T {
84- fn raw_window_handle ( & self ) -> Result < RawWindowHandle , HandleError > {
85- self . window_handle ( ) . map ( Into :: into)
86- }
87- }
88-
8963/// A window handle for a particular windowing system.
9064///
9165/// Each variant contains a struct with fields specific to that windowing system
@@ -202,32 +176,6 @@ pub enum RawWindowHandle {
202176 Haiku ( HaikuWindowHandle ) ,
203177}
204178
205- /// Display that wraps around a raw display handle.
206- ///
207- /// # Safety
208- ///
209- /// Users can safely assume that pointers and non-zero fields are valid, and it is up to the
210- /// implementer of this trait to ensure that condition is upheld.
211- ///
212- /// Despite that qualification, implementers should still make a best-effort attempt to fill in all
213- /// available fields. If an implementation doesn't, and a downstream user needs the field, it should
214- /// try to derive the field from other fields the implementer *does* provide via whatever methods the
215- /// platform provides.
216- ///
217- /// The exact handles returned by `raw_display_handle` must remain consistent between multiple calls
218- /// to `raw_display_handle` as long as not indicated otherwise by platform specific events.
219- #[ deprecated = "Use `HasDisplayHandle` instead" ]
220- pub unsafe trait HasRawDisplayHandle {
221- fn raw_display_handle ( & self ) -> Result < RawDisplayHandle , HandleError > ;
222- }
223-
224- #[ allow( deprecated) ]
225- unsafe impl < T : HasDisplayHandle + ?Sized > HasRawDisplayHandle for T {
226- fn raw_display_handle ( & self ) -> Result < RawDisplayHandle , HandleError > {
227- self . display_handle ( ) . map ( Into :: into)
228- }
229- }
230-
231179/// A display server handle for a particular windowing system.
232180///
233181/// The display usually represents a connection to some display server, but it is not necessarily
@@ -480,11 +428,5 @@ mod tests {
480428 }
481429
482430 #[ allow( deprecated, unused) ]
483- fn assert_object_safe (
484- _: & dyn HasRawWindowHandle ,
485- _: & dyn HasRawDisplayHandle ,
486- _: & dyn HasWindowHandle ,
487- _: & dyn HasDisplayHandle ,
488- ) {
489- }
431+ fn assert_object_safe ( _: & dyn HasWindowHandle , _: & dyn HasDisplayHandle ) { }
490432}
0 commit comments