@@ -30,7 +30,7 @@ use monitor::{AvailableMonitorsIter, MonitorId};
30
30
/// `Window` created from this `EventLoop` _can_ be sent to an other thread, and the
31
31
/// `EventLoopProxy` allows you to wakeup an `EventLoop` from an other thread.
32
32
pub struct EventLoop < T > {
33
- pub ( crate ) events_loop : platform_impl:: EventLoop < T > ,
33
+ pub ( crate ) event_loop : platform_impl:: EventLoop < T > ,
34
34
pub ( crate ) _marker : :: std:: marker:: PhantomData < * mut ( ) > // Not Send nor Sync
35
35
}
36
36
@@ -85,7 +85,7 @@ impl<T> EventLoop<T> {
85
85
/// fallback on x11. If this variable is set with any other value, winit will panic.
86
86
pub fn new_user_event ( ) -> EventLoop < T > {
87
87
EventLoop {
88
- events_loop : platform_impl:: EventLoop :: new ( ) ,
88
+ event_loop : platform_impl:: EventLoop :: new ( ) ,
89
89
_marker : :: std:: marker:: PhantomData ,
90
90
}
91
91
}
@@ -95,14 +95,14 @@ impl<T> EventLoop<T> {
95
95
// Note: should be replaced with `-> impl Iterator` once stable.
96
96
#[ inline]
97
97
pub fn get_available_monitors ( & self ) -> AvailableMonitorsIter {
98
- let data = self . events_loop . get_available_monitors ( ) ;
98
+ let data = self . event_loop . get_available_monitors ( ) ;
99
99
AvailableMonitorsIter { data : data. into_iter ( ) }
100
100
}
101
101
102
102
/// Returns the primary monitor of the system.
103
103
#[ inline]
104
104
pub fn get_primary_monitor ( & self ) -> MonitorId {
105
- MonitorId { inner : self . events_loop . get_primary_monitor ( ) }
105
+ MonitorId { inner : self . event_loop . get_primary_monitor ( ) }
106
106
}
107
107
108
108
/// Hijacks the calling thread and initializes the `winit` event loop with the provided
@@ -114,22 +114,22 @@ impl<T> EventLoop<T> {
114
114
pub fn run < F > ( self , event_handler : F ) -> !
115
115
where F : ' static + FnMut ( Event < T > , & EventLoop < T > , & mut ControlFlow )
116
116
{
117
- self . events_loop . run ( event_handler)
117
+ self . event_loop . run ( event_handler)
118
118
}
119
119
120
120
/// Creates an `EventLoopProxy` that can be used to wake up the `EventLoop` from another
121
121
/// thread.
122
122
pub fn create_proxy ( & self ) -> EventLoopProxy < T > {
123
123
EventLoopProxy {
124
- events_loop_proxy : self . events_loop . create_proxy ( ) ,
124
+ event_loop_proxy : self . event_loop . create_proxy ( ) ,
125
125
}
126
126
}
127
127
}
128
128
129
129
/// Used to send custom events to `EventLoop`.
130
130
#[ derive( Clone ) ]
131
131
pub struct EventLoopProxy < T > {
132
- events_loop_proxy : platform_impl:: EventLoopProxy < T > ,
132
+ event_loop_proxy : platform_impl:: EventLoopProxy < T > ,
133
133
}
134
134
135
135
impl < T > EventLoopProxy < T > {
@@ -139,7 +139,7 @@ impl<T> EventLoopProxy<T> {
139
139
///
140
140
/// Returns an `Err` if the associated `EventLoop` no longer exists.
141
141
pub fn send_event ( & self , event : T ) -> Result < ( ) , EventLoopClosed > {
142
- self . events_loop_proxy . send_event ( event)
142
+ self . event_loop_proxy . send_event ( event)
143
143
}
144
144
}
145
145
0 commit comments