pub struct Manager { /* private fields */ }Expand description
Manager of the window subsystem.
This manager is accessible from (and only from) the foreground thread. It provides the interfaces to create the window, winit objects and access active event loop.
Implementations§
Source§impl Manager
impl Manager
Sourcepub fn set_draining_foreground_loopback(&self, value: bool)
pub fn set_draining_foreground_loopback(&self, value: bool)
Set whether the event loop will drain the foreground loopback tasks.
If set, the event loop will call
aeth::task::drain_foreground_loopback automatically
whenever the foreground tasks can run. Otherwise the
application must invoke the draining function manually.
Sourcepub async fn create_window(
&self,
attrs: WindowAttributes,
) -> Result<Window, RequestError>
pub async fn create_window( &self, attrs: WindowAttributes, ) -> Result<Window, RequestError>
Create a managed window instance.
Please notice you should always call this function
instead of grabbing the active event loop and invoke
active_event_loop.create_window manually, otherwise
there’s no way to deliver window event to your window.
See aeth::window::Window for more detail.
Sourcepub fn wakeup_event_sub(&self) -> Sub<WakeUpEvent>
pub fn wakeup_event_sub(&self) -> Sub<WakeUpEvent>
Obtain the wakeup event subscriber.
Sourcepub fn device_event_sub(&self) -> Sub<DeviceEvent>
pub fn device_event_sub(&self) -> Sub<DeviceEvent>
Obtain the device event subscriber.
Trait Implementations§
Source§impl AccessWinitActiveEventLoop for Manager
impl AccessWinitActiveEventLoop for Manager
Source§async fn run_with_active_event_loop<F, T>(&self, f: F) -> Twhere
F: FnOnce(&dyn ActiveEventLoop) -> T + 'static,
T: 'static,
async fn run_with_active_event_loop<F, T>(&self, f: F) -> Twhere
F: FnOnce(&dyn ActiveEventLoop) -> T + 'static,
T: 'static,
Auto Trait Implementations§
impl !RefUnwindSafe for Manager
impl !Send for Manager
impl !Sync for Manager
impl !UnwindSafe for Manager
impl Freeze for Manager
impl Unpin for Manager
impl UnsafeUnpin for Manager
Blanket Implementations§
Source§impl<T> AccessWinitActiveEventLoopExt for Twhere
T: AccessWinitActiveEventLoop,
impl<T> AccessWinitActiveEventLoopExt for Twhere
T: AccessWinitActiveEventLoop,
Source§async fn create_proxy(&self) -> EventLoopProxy
async fn create_proxy(&self) -> EventLoopProxy
Source§async fn create_custom_cursor(
&self,
custom_cursor: CustomCursorSource,
) -> Result<CustomCursor, RequestError>
async fn create_custom_cursor( &self, custom_cursor: CustomCursorSource, ) -> Result<CustomCursor, RequestError>
Source§async fn available_monitors(&self) -> Box<dyn Iterator<Item = MonitorHandle>>
async fn available_monitors(&self) -> Box<dyn Iterator<Item = MonitorHandle>>
Source§async fn primary_monitor(&self) -> Option<MonitorHandle>
async fn primary_monitor(&self) -> Option<MonitorHandle>
Source§async fn listen_device_events(&self, allowed: DeviceEvents)
async fn listen_device_events(&self, allowed: DeviceEvents)
Source§async fn system_theme(&self) -> Option<Theme>
async fn system_theme(&self) -> Option<Theme>
Source§async fn set_control_flow(&self, flow: ControlFlow)
async fn set_control_flow(&self, flow: ControlFlow)
Source§async fn control_flow(&self) -> ControlFlow
async fn control_flow(&self) -> ControlFlow
Source§async fn owned_display_handle(&self) -> OwnedDisplayHandle
async fn owned_display_handle(&self) -> OwnedDisplayHandle
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.