add: ActiveEventLoop::create_proxy()
Co-authored-by: Kirill Chibisov <contact@kchibisov.com>
This commit is contained in:
parent
2e93e48a3b
commit
a0d69c782a
14 changed files with 78 additions and 71 deletions
|
|
@ -58,10 +58,6 @@ impl EventLoop {
|
|||
self.elw.p.run(Box::new(move |event| handle_event(&mut app, &target, event)), true);
|
||||
}
|
||||
|
||||
pub fn create_proxy(&self) -> EventLoopProxy {
|
||||
EventLoopProxy::new(self.elw.p.waker())
|
||||
}
|
||||
|
||||
pub fn window_target(&self) -> &RootActiveEventLoop {
|
||||
&self.elw
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ use super::super::KeyEventExtra;
|
|||
use super::device::DeviceId;
|
||||
use super::runner::{EventWrapper, Execution};
|
||||
use super::window::WindowId;
|
||||
use super::{backend, runner};
|
||||
use super::{backend, runner, EventLoopProxy};
|
||||
use crate::event::{
|
||||
DeviceId as RootDeviceId, ElementState, Event, KeyEvent, Touch, TouchPhase, WindowEvent,
|
||||
};
|
||||
|
|
@ -68,6 +68,10 @@ impl ActiveEventLoop {
|
|||
WindowId(self.runner.generate_id())
|
||||
}
|
||||
|
||||
pub fn create_proxy(&self) -> EventLoopProxy {
|
||||
EventLoopProxy::new(self.waker())
|
||||
}
|
||||
|
||||
pub fn create_custom_cursor(&self, source: CustomCursorSource) -> RootCustomCursor {
|
||||
RootCustomCursor { inner: CustomCursor::new(self, source.inner) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue