mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
winit-core: cleanup event loop docs
This commit is contained in:
@@ -7,16 +7,6 @@ use crate::window::WindowId;
|
||||
pub mod macos;
|
||||
|
||||
/// The handler of application-level events.
|
||||
///
|
||||
/// See [the top-level docs] for example usage, and [`EventLoop::run_app`] for an overview of when
|
||||
/// events are delivered.
|
||||
///
|
||||
/// This is [dropped] when the event loop is shut down. Note that this only works if you're passing
|
||||
/// the entire state to [`EventLoop::run_app`] (passing `&mut app` won't work).
|
||||
///
|
||||
/// [the top-level docs]: crate
|
||||
/// [`EventLoop::run_app`]: crate::event_loop::EventLoop::run_app
|
||||
/// [dropped]: std::ops::Drop
|
||||
pub trait ApplicationHandler {
|
||||
/// Emitted when new events arrive from the OS to be processed.
|
||||
///
|
||||
@@ -211,9 +201,7 @@ pub trait ApplicationHandler {
|
||||
|
||||
/// Emitted when the OS sends an event to a device.
|
||||
///
|
||||
/// For this to be called, it must be enabled with [`EventLoop::listen_device_events`].
|
||||
///
|
||||
/// [`EventLoop::listen_device_events`]: crate::event_loop::EventLoop::listen_device_events
|
||||
/// Whether device events are delivered depends on the backend in use.
|
||||
fn device_event(
|
||||
&mut self,
|
||||
event_loop: &dyn ActiveEventLoop,
|
||||
|
||||
Reference in New Issue
Block a user