Move available_monitors and primary_monitor to EventLoopWindowTarget (#1616)
This commit is contained in:
parent
dd866a74a6
commit
3d5d05eac7
14 changed files with 121 additions and 110 deletions
|
|
@ -34,6 +34,18 @@ impl<T> Default for EventLoopWindowTarget<T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T: 'static> EventLoopWindowTarget<T> {
|
||||
#[inline]
|
||||
pub fn available_monitors(&self) -> VecDeque<MonitorHandle> {
|
||||
monitor::available_monitors()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn primary_monitor(&self) -> MonitorHandle {
|
||||
monitor::primary_monitor()
|
||||
}
|
||||
}
|
||||
|
||||
pub struct EventLoop<T: 'static> {
|
||||
window_target: Rc<RootWindowTarget<T>>,
|
||||
_delegate: IdRef,
|
||||
|
|
@ -68,16 +80,6 @@ impl<T> EventLoop<T> {
|
|||
}
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn available_monitors(&self) -> VecDeque<MonitorHandle> {
|
||||
monitor::available_monitors()
|
||||
}
|
||||
|
||||
#[inline]
|
||||
pub fn primary_monitor(&self) -> MonitorHandle {
|
||||
monitor::primary_monitor()
|
||||
}
|
||||
|
||||
pub fn window_target(&self) -> &RootWindowTarget<T> {
|
||||
&self.window_target
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue