2424} ;
2525use CreationError :: OsError ;
2626use events:: { Touch , TouchPhase } ;
27- use window:: MonitorId as RootMonitorId ;
27+ use window:: MonitorHandle as RootMonitorHandle ;
2828
2929pub struct EventLoop {
3030 event_rx : Receiver < android_glue:: Event > ,
@@ -45,15 +45,15 @@ impl EventLoop {
4545 }
4646
4747 #[ inline]
48- pub fn get_available_monitors ( & self ) -> VecDeque < MonitorId > {
48+ pub fn get_available_monitors ( & self ) -> VecDeque < MonitorHandle > {
4949 let mut rb = VecDeque :: with_capacity ( 1 ) ;
50- rb. push_back ( MonitorId ) ;
50+ rb. push_back ( MonitorHandle ) ;
5151 rb
5252 }
5353
5454 #[ inline]
55- pub fn get_primary_monitor ( & self ) -> MonitorId {
56- MonitorId
55+ pub fn get_primary_monitor ( & self ) -> MonitorHandle {
56+ MonitorHandle
5757 }
5858
5959 pub fn poll_events < F > ( & mut self , mut callback : F )
@@ -62,7 +62,7 @@ impl EventLoop {
6262 while let Ok ( event) = self . event_rx . try_recv ( ) {
6363 let e = match event{
6464 android_glue:: Event :: EventMotion ( motion) => {
65- let dpi_factor = MonitorId . get_hidpi_factor ( ) ;
65+ let dpi_factor = MonitorHandle . get_hidpi_factor ( ) ;
6666 let location = LogicalPosition :: from_physical (
6767 ( motion. x as f64 , motion. y as f64 ) ,
6868 dpi_factor,
@@ -103,8 +103,8 @@ impl EventLoop {
103103 if native_window. is_null ( ) {
104104 None
105105 } else {
106- let dpi_factor = MonitorId . get_hidpi_factor ( ) ;
107- let physical_size = MonitorId . get_dimensions ( ) ;
106+ let dpi_factor = MonitorHandle . get_hidpi_factor ( ) ;
107+ let physical_size = MonitorHandle . get_dimensions ( ) ;
108108 let size = LogicalSize :: from_physical ( physical_size, dpi_factor) ;
109109 Some ( Event :: WindowEvent {
110110 window_id : RootWindowId ( WindowId ) ,
@@ -178,19 +178,19 @@ pub struct Window {
178178}
179179
180180#[ derive( Clone ) ]
181- pub struct MonitorId ;
181+ pub struct MonitorHandle ;
182182
183- impl fmt:: Debug for MonitorId {
183+ impl fmt:: Debug for MonitorHandle {
184184 fn fmt ( & self , f : & mut fmt:: Formatter ) -> fmt:: Result {
185185 #[ derive( Debug ) ]
186- struct MonitorId {
186+ struct MonitorHandle {
187187 name : Option < String > ,
188188 dimensions : PhysicalSize ,
189189 position : PhysicalPosition ,
190190 hidpi_factor : f64 ,
191191 }
192192
193- let monitor_id_proxy = MonitorId {
193+ let monitor_id_proxy = MonitorHandle {
194194 name : self . get_name ( ) ,
195195 dimensions : self . get_dimensions ( ) ,
196196 position : self . get_position ( ) ,
@@ -201,7 +201,7 @@ impl fmt::Debug for MonitorId {
201201 }
202202}
203203
204- impl MonitorId {
204+ impl MonitorHandle {
205205 #[ inline]
206206 pub fn get_name ( & self ) -> Option < String > {
207207 Some ( "Primary" . to_string ( ) )
@@ -357,7 +357,7 @@ impl Window {
357357 }
358358
359359 #[ inline]
360- pub fn set_fullscreen ( & self , _monitor : Option < RootMonitorId > ) {
360+ pub fn set_fullscreen ( & self , _monitor : Option < RootMonitorHandle > ) {
361361 // N/A
362362 // Android has single screen maximized apps so nothing to do
363363 }
@@ -383,20 +383,20 @@ impl Window {
383383 }
384384
385385 #[ inline]
386- pub fn get_current_monitor ( & self ) -> RootMonitorId {
387- RootMonitorId { inner : MonitorId }
386+ pub fn get_current_monitor ( & self ) -> RootMonitorHandle {
387+ RootMonitorHandle { inner : MonitorHandle }
388388 }
389389
390390 #[ inline]
391- pub fn get_available_monitors ( & self ) -> VecDeque < MonitorId > {
391+ pub fn get_available_monitors ( & self ) -> VecDeque < MonitorHandle > {
392392 let mut rb = VecDeque :: with_capacity ( 1 ) ;
393- rb. push_back ( MonitorId ) ;
393+ rb. push_back ( MonitorHandle ) ;
394394 rb
395395 }
396396
397397 #[ inline]
398- pub fn get_primary_monitor ( & self ) -> MonitorId {
399- MonitorId
398+ pub fn get_primary_monitor ( & self ) -> MonitorHandle {
399+ MonitorHandle
400400 }
401401
402402 #[ inline]
0 commit comments