pub struct EventLoop<T: 'static> {
loop_running: bool,
event_loop: EventLoop<'static, EventLoopState>,
waker: Ping,
event_processor: EventProcessor,
redraw_receiver: PeekableReceiver<WindowId>,
user_receiver: PeekableReceiver<T>,
activation_receiver: PeekableReceiver<(WindowId, AsyncRequestSerial)>,
user_sender: Sender<T>,
state: EventLoopState,
}Fields§
§loop_running: bool§event_loop: EventLoop<'static, EventLoopState>§waker: Ping§event_processor: EventProcessor§redraw_receiver: PeekableReceiver<WindowId>§user_receiver: PeekableReceiver<T>§activation_receiver: PeekableReceiver<(WindowId, AsyncRequestSerial)>§user_sender: Sender<T>§state: EventLoopStateThe current state of the event loop.
Implementations§
Source§impl<T: 'static> EventLoop<T>
impl<T: 'static> EventLoop<T>
pub(crate) fn new(xconn: Arc<XConnection>) -> EventLoop<T>
pub fn create_proxy(&self) -> EventLoopProxy<T>
pub(crate) fn window_target(&self) -> &RootAEL
pub fn run_on_demand<F>( &mut self, event_handler: F, ) -> Result<(), EventLoopError>
pub fn pump_events<F>( &mut self, timeout: Option<Duration>, callback: F, ) -> PumpStatus
fn has_pending(&mut self) -> bool
pub fn poll_events_with_timeout<F>( &mut self, timeout: Option<Duration>, callback: F, )
fn single_iteration<F>(&mut self, callback: &mut F, cause: StartCause)
fn drain_events<F>(&mut self, callback: &mut F)
fn control_flow(&self) -> ControlFlow
fn exiting(&self) -> bool
fn set_exit_code(&self, code: i32)
fn exit_code(&self) -> Option<i32>
Trait Implementations§
Auto Trait Implementations§
impl<T> !Freeze for EventLoop<T>
impl<T> !RefUnwindSafe for EventLoop<T>
impl<T> !Send for EventLoop<T>
impl<T> !Sync for EventLoop<T>
impl<T> Unpin for EventLoop<T>where
T: Unpin,
impl<T> !UnwindSafe for EventLoop<T>
Blanket Implementations§
Source§impl<T> AsSource for Twhere
T: AsFd,
impl<T> AsSource for Twhere
T: AsFd,
Source§fn source(&self) -> BorrowedFd<'_>
fn source(&self) -> BorrowedFd<'_>
Returns the borrowed file descriptor.
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
Mutably borrows from an owned value. Read more
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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.