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
|
|
@ -27,14 +27,6 @@ impl<T> EventLoop<T> {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn available_monitors(&self) -> VecDequeIter<monitor::Handle> {
|
||||
VecDeque::new().into_iter()
|
||||
}
|
||||
|
||||
pub fn primary_monitor(&self) -> monitor::Handle {
|
||||
monitor::Handle
|
||||
}
|
||||
|
||||
pub fn run<F>(self, mut event_handler: F) -> !
|
||||
where
|
||||
F: 'static
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
use super::{backend, device, proxy::Proxy, runner, window};
|
||||
use super::{super::monitor, backend, device, proxy::Proxy, runner, window};
|
||||
use crate::dpi::{PhysicalSize, Size};
|
||||
use crate::event::{DeviceId, ElementState, Event, KeyboardInput, TouchPhase, WindowEvent};
|
||||
use crate::event_loop::ControlFlow;
|
||||
use crate::window::{Theme, WindowId};
|
||||
use std::clone::Clone;
|
||||
use std::collections::{vec_deque::IntoIter as VecDequeIter, VecDeque};
|
||||
|
||||
pub struct WindowTarget<T: 'static> {
|
||||
pub(crate) runner: runner::Shared<T>,
|
||||
|
|
@ -213,4 +214,12 @@ impl<T> WindowTarget<T> {
|
|||
});
|
||||
});
|
||||
}
|
||||
|
||||
pub fn available_monitors(&self) -> VecDequeIter<monitor::Handle> {
|
||||
VecDeque::new().into_iter()
|
||||
}
|
||||
|
||||
pub fn primary_monitor(&self) -> monitor::Handle {
|
||||
monitor::Handle
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue