@@ -21,7 +21,9 @@ use crate::{
21
21
error:: { ExternalError , OsError } ,
22
22
event_loop:: { EventLoopBuilder , EventLoopWindowTarget } ,
23
23
monitor:: MonitorHandle ,
24
- platform_impl:: { x11:: xdisplay:: XError , Parent , Window as UnixWindow } ,
24
+ platform_impl:: {
25
+ gtk_window:: ApplicationWindow , x11:: xdisplay:: XError , Parent , Window as UnixWindow ,
26
+ } ,
25
27
window:: { Window , WindowBuilder } ,
26
28
} ;
27
29
@@ -67,11 +69,11 @@ pub trait WindowExtUnix {
67
69
/// and know what they're doing.
68
70
fn new_from_gtk_window < T : ' static > (
69
71
event_loop_window_target : & EventLoopWindowTarget < T > ,
70
- window : gtk :: ApplicationWindow ,
72
+ window : ApplicationWindow ,
71
73
) -> Result < Window , OsError > ;
72
74
73
75
/// Returns the `gtk::ApplicatonWindow` from gtk crate that is used by this window.
74
- fn gtk_window ( & self ) -> & gtk :: ApplicationWindow ;
76
+ fn gtk_window ( & self ) -> & ApplicationWindow ;
75
77
76
78
/// Returns the vertical `gtk::Box` that is added by default as the sole child of this window.
77
79
/// Returns `None` if the default vertical `gtk::Box` creation was disabled by [`WindowBuilderExtUnix::with_default_vbox`].
@@ -84,7 +86,7 @@ pub trait WindowExtUnix {
84
86
}
85
87
86
88
impl WindowExtUnix for Window {
87
- fn gtk_window ( & self ) -> & gtk :: ApplicationWindow {
89
+ fn gtk_window ( & self ) -> & ApplicationWindow {
88
90
& self . window . window
89
91
}
90
92
@@ -98,7 +100,7 @@ impl WindowExtUnix for Window {
98
100
99
101
fn new_from_gtk_window < T : ' static > (
100
102
event_loop_window_target : & EventLoopWindowTarget < T > ,
101
- window : gtk :: ApplicationWindow ,
103
+ window : ApplicationWindow ,
102
104
) -> Result < Window , OsError > {
103
105
let window = UnixWindow :: new_from_gtk_window ( & event_loop_window_target. p , window) ?;
104
106
Ok ( Window { window : window } )
@@ -114,7 +116,7 @@ pub trait WindowBuilderExtUnix {
114
116
fn with_skip_taskbar ( self , skip : bool ) -> WindowBuilder ;
115
117
/// Set this window as a transient dialog for `parent`
116
118
/// <https://gtk-rs.org/gtk3-rs/stable/latest/docs/gdk/struct.Window.html#method.set_transient_for>
117
- fn with_transient_for ( self , parent : & impl gtk:: glib :: IsA < gtk:: Window > ) -> WindowBuilder ;
119
+ fn with_transient_for ( self , parent : & impl gtk:: prelude :: IsA < gtk:: Window > ) -> WindowBuilder ;
118
120
119
121
/// Whether to enable or disable the internal draw for transparent window.
120
122
///
@@ -158,8 +160,8 @@ impl WindowBuilderExtUnix for WindowBuilder {
158
160
self
159
161
}
160
162
161
- fn with_transient_for ( mut self , parent : & impl gtk:: glib :: IsA < gtk:: Window > ) -> WindowBuilder {
162
- use gtk:: glib :: Cast ;
163
+ fn with_transient_for ( mut self , parent : & impl gtk:: prelude :: IsA < gtk:: Window > ) -> WindowBuilder {
164
+ use gtk:: prelude :: Cast ;
163
165
self . platform_specific . parent = Parent :: ChildOf ( parent. clone ( ) . upcast ( ) ) ;
164
166
self
165
167
}
0 commit comments