Files
phy/winit/application/trait.ApplicationHandler.html
Orion Kindel 0ce894e6b0 doc
2025-03-18 10:30:23 -05:00

156 lines
35 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="The handler of the application events."><title>ApplicationHandler in winit::application - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="winit" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-044be391.svg"></head><body class="rustdoc trait"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../../winit/index.html">winit</a><span class="version">0.30.8</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Application<wbr>Handler</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.resumed" title="resumed">resumed</a></li><li><a href="#tymethod.window_event" title="window_event">window_event</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.about_to_wait" title="about_to_wait">about_to_wait</a></li><li><a href="#method.device_event" title="device_event">device_event</a></li><li><a href="#method.exiting" title="exiting">exiting</a></li><li><a href="#method.memory_warning" title="memory_warning">memory_warning</a></li><li><a href="#method.new_events" title="new_events">new_events</a></li><li><a href="#method.suspended" title="suspended">suspended</a></li><li><a href="#method.user_event" title="user_event">user_event</a></li></ul><h3><a href="#foreign-impls">Implementations on Foreign Types</a></h3><ul class="block"><li><a href="#impl-ApplicationHandler%3CT%3E-for-%26mut+A" title="&#38;mut A">&#38;mut A</a></li><li><a href="#impl-ApplicationHandler%3CT%3E-for-Box%3CA%3E" title="Box&#60;A&#62;">Box&#60;A&#62;</a></li></ul><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2><a href="index.html">In winit::<wbr>application</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="../index.html">winit</a>::<wbr><a href="index.html">application</a></span><h1>Trait <span class="trait">ApplicationHandler</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../../src/winit/application.rs.html#8-225">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ApplicationHandler&lt;T: 'static = <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>&gt; {
// Required methods
fn <a href="#tymethod.resumed" class="fn">resumed</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>);
<span class="item-spacer"></span> fn <a href="#tymethod.window_event" class="fn">window_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
window_id: <a class="struct" href="../window/struct.WindowId.html" title="struct winit::window::WindowId">WindowId</a>,
event: <a class="enum" href="../event/enum.WindowEvent.html" title="enum winit::event::WindowEvent">WindowEvent</a>,
);
// Provided methods
fn <a href="#method.new_events" class="fn">new_events</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, cause: <a class="enum" href="../event/enum.StartCause.html" title="enum winit::event::StartCause">StartCause</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.user_event" class="fn">user_event</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, event: T) { ... }
<span class="item-spacer"></span> fn <a href="#method.device_event" class="fn">device_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
device_id: <a class="struct" href="../event/struct.DeviceId.html" title="struct winit::event::DeviceId">DeviceId</a>,
event: <a class="enum" href="../event/enum.DeviceEvent.html" title="enum winit::event::DeviceEvent">DeviceEvent</a>,
) { ... }
<span class="item-spacer"></span> fn <a href="#method.about_to_wait" class="fn">about_to_wait</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.suspended" class="fn">suspended</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.exiting" class="fn">exiting</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>) { ... }
<span class="item-spacer"></span> fn <a href="#method.memory_warning" class="fn">memory_warning</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>) { ... }
}</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>The handler of the application events.</p>
</div></details><h2 id="required-methods" class="section-header">Required Methods<a href="#required-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="tymethod.resumed" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#83">Source</a><h4 class="code-header">fn <a href="#tymethod.resumed" class="fn">resumed</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></summary><div class="docblock"><p>Emitted when the application has been resumed.</p>
<p>For consistency, all platforms emit a <code>Resumed</code> event even if they dont themselves have a
formal suspend/resume lifecycle. For systems without a formal suspend/resume lifecycle
the <code>Resumed</code> event is always emitted after the
<a href="../event/enum.StartCause.html#variant.Init" title="variant winit::event::StartCause::Init"><code>NewEvents(StartCause::Init)</code></a> event.</p>
<h5 id="portability"><a class="doc-anchor" href="#portability">§</a>Portability</h5>
<p>Its recommended that applications should only initialize their graphics context and create
a window after they have received their first <code>Resumed</code> event. Some systems
(specifically Android) wont allow applications to create a render surface until they are
resumed.</p>
<p>Considering that the implementation of <a href="trait.ApplicationHandler.html#method.suspended"><code>Suspended</code></a> and <code>Resumed</code> events may be internally
driven by multiple platform-specific events, and that there may be subtle differences across
platforms with how these internal events are delivered, its recommended that applications
be able to gracefully handle redundant (i.e. back-to-back) <a href="trait.ApplicationHandler.html#method.suspended"><code>Suspended</code></a> or <code>Resumed</code>
events.</p>
<p>Also see <a href="trait.ApplicationHandler.html#method.suspended"><code>Suspended</code></a> notes.</p>
<h6 id="android"><a class="doc-anchor" href="#android">§</a>Android</h6>
<p>On Android, the <code>Resumed</code> event is sent when a new <a href="https://developer.android.com/reference/android/view/SurfaceView"><code>SurfaceView</code></a> has been created. This is
expected to closely correlate with the <a href="https://developer.android.com/reference/android/app/Activity#onResume()"><code>onResume</code></a> lifecycle event but there may
technically be a discrepancy.</p>
<p>Applications that need to run on Android must wait until they have been <code>Resumed</code>
before they will be able to create a render surface (such as an <code>EGLSurface</code>,
<a href="https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkSurfaceKHR.html"><code>VkSurfaceKHR</code></a> or <a href="https://docs.rs/wgpu/latest/wgpu/struct.Surface.html"><code>wgpu::Surface</code></a>) which depend on having a
<a href="https://developer.android.com/reference/android/view/SurfaceView"><code>SurfaceView</code></a>. Applications must also assume that if they are <a href="trait.ApplicationHandler.html#method.suspended"><code>Suspended</code></a>, then their
render surfaces are invalid and should be dropped.</p>
<p>Also see <a href="trait.ApplicationHandler.html#method.suspended"><code>Suspended</code></a> notes.</p>
<h6 id="ios"><a class="doc-anchor" href="#ios">§</a>iOS</h6>
<p>On iOS, the <code>Resumed</code> event is emitted in response to an <a href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622956-applicationdidbecomeactive"><code>applicationDidBecomeActive</code></a>
callback which means the application is “active” (according to the
<a href="https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle">iOS application lifecycle</a>).</p>
<h6 id="web"><a class="doc-anchor" href="#web">§</a>Web</h6>
<p>On Web, the <code>Resumed</code> event is emitted in response to a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/pageshow_event"><code>pageshow</code></a> event
with the property <a href="https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent/persisted"><code>persisted</code></a> being true, which means that the page is being
restored from the <a href="https://web.dev/bfcache/"><code>bfcache</code></a> (back/forward cache) - an in-memory cache that
stores a complete snapshot of a page (including the JavaScript heap) as the
user is navigating away.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.window_event" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#93-98">Source</a><h4 class="code-header">fn <a href="#tymethod.window_event" class="fn">window_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
window_id: <a class="struct" href="../window/struct.WindowId.html" title="struct winit::window::WindowId">WindowId</a>,
event: <a class="enum" href="../event/enum.WindowEvent.html" title="enum winit::event::WindowEvent">WindowEvent</a>,
)</h4></section></summary><div class="docblock"><p>Emitted when the OS sends an event to a winit window.</p>
</div></details></div><h2 id="provided-methods" class="section-header">Provided Methods<a href="#provided-methods" class="anchor">§</a></h2><div class="methods"><details class="toggle method-toggle" open><summary><section id="method.new_events" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#15-17">Source</a><h4 class="code-header">fn <a href="#method.new_events" class="fn">new_events</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, cause: <a class="enum" href="../event/enum.StartCause.html" title="enum winit::event::StartCause">StartCause</a>)</h4></section></summary><div class="docblock"><p>Emitted when new events arrive from the OS to be processed.</p>
<p>This is a useful place to put code that should be done before you start processing
events, such as updating frame timing information for benchmarking or checking the
<a href="../event/enum.StartCause.html" title="enum winit::event::StartCause"><code>StartCause</code></a> to see if a timer set by
<a href="../event_loop/enum.ControlFlow.html#variant.WaitUntil" title="variant winit::event_loop::ControlFlow::WaitUntil"><code>ControlFlow::WaitUntil</code></a> has elapsed.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.user_event" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#88-90">Source</a><h4 class="code-header">fn <a href="#method.user_event" class="fn">user_event</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, event: T)</h4></section></summary><div class="docblock"><p>Emitted when an event is sent from <a href="../event_loop/struct.EventLoopProxy.html#method.send_event" title="method winit::event_loop::EventLoopProxy::send_event"><code>EventLoopProxy::send_event</code></a>.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.device_event" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#101-108">Source</a><h4 class="code-header">fn <a href="#method.device_event" class="fn">device_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
device_id: <a class="struct" href="../event/struct.DeviceId.html" title="struct winit::event::DeviceId">DeviceId</a>,
event: <a class="enum" href="../event/enum.DeviceEvent.html" title="enum winit::event::DeviceEvent">DeviceEvent</a>,
)</h4></section></summary><div class="docblock"><p>Emitted when the OS sends an event to a device.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.about_to_wait" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#121-123">Source</a><h4 class="code-header">fn <a href="#method.about_to_wait" class="fn">about_to_wait</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></summary><div class="docblock"><p>Emitted when the event loop is about to block and wait for new events.</p>
<p>Most applications shouldnt need to hook into this event since there is no real relationship
between how often the event loop needs to wake up and the dispatching of any specific
events.</p>
<p>High frequency event sources, such as input devices could potentially lead to lots of wake
ups and also lots of corresponding <code>AboutToWait</code> events.</p>
<p>This is not an ideal event to drive application rendering from and instead applications
should render in response to <a href="../event/enum.WindowEvent.html#variant.RedrawRequested" title="variant winit::event::WindowEvent::RedrawRequested"><code>WindowEvent::RedrawRequested</code></a> events.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.suspended" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#186-188">Source</a><h4 class="code-header">fn <a href="#method.suspended" class="fn">suspended</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></summary><div class="docblock"><p>Emitted when the application has been suspended.</p>
<h5 id="portability-1"><a class="doc-anchor" href="#portability-1">§</a>Portability</h5>
<p>Not all platforms support the notion of suspending applications, and there may be no
technical way to guarantee being able to emit a <code>Suspended</code> event if the OS has
no formal application lifecycle (currently only Android, iOS, and Web do). For this reason,
Winit does not currently try to emit pseudo <code>Suspended</code> events before the application
quits on platforms without an application lifecycle.</p>
<p>Considering that the implementation of <code>Suspended</code> and <a href="trait.ApplicationHandler.html#tymethod.resumed"><code>Resumed</code></a> events may be internally
driven by multiple platform-specific events, and that there may be subtle differences across
platforms with how these internal events are delivered, its recommended that applications
be able to gracefully handle redundant (i.e. back-to-back) <code>Suspended</code> or <a href="trait.ApplicationHandler.html#tymethod.resumed"><code>Resumed</code></a>
events.</p>
<p>Also see <a href="trait.ApplicationHandler.html#tymethod.resumed"><code>Resumed</code></a> notes.</p>
<h6 id="android-1"><a class="doc-anchor" href="#android-1">§</a>Android</h6>
<p>On Android, the <code>Suspended</code> event is only sent when the applications associated
<a href="https://developer.android.com/reference/android/view/SurfaceView"><code>SurfaceView</code></a> is destroyed. This is expected to closely correlate with the <a href="https://developer.android.com/reference/android/app/Activity#onPause()"><code>onPause</code></a>
lifecycle event but there may technically be a discrepancy.</p>
<p>Applications that need to run on Android should assume their <a href="https://developer.android.com/reference/android/view/SurfaceView"><code>SurfaceView</code></a> has been
destroyed, which indirectly invalidates any existing render surfaces that may have been
created outside of Winit (such as an <code>EGLSurface</code>, <a href="https://www.khronos.org/registry/vulkan/specs/1.3-extensions/man/html/VkSurfaceKHR.html"><code>VkSurfaceKHR</code></a> or <a href="https://docs.rs/wgpu/latest/wgpu/struct.Surface.html"><code>wgpu::Surface</code></a>).</p>
<p>After being <code>Suspended</code> on Android applications must drop all render surfaces before
the event callback completes, which may be re-created when the application is next
<a href="trait.ApplicationHandler.html#tymethod.resumed"><code>Resumed</code></a>.</p>
<h6 id="ios-1"><a class="doc-anchor" href="#ios-1">§</a>iOS</h6>
<p>On iOS, the <code>Suspended</code> event is currently emitted in response to an
<a href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1622950-applicationwillresignactive"><code>applicationWillResignActive</code></a> callback which means that the application is
about to transition from the active to inactive state (according to the
<a href="https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle">iOS application lifecycle</a>).</p>
<h6 id="web-1"><a class="doc-anchor" href="#web-1">§</a>Web</h6>
<p>On Web, the <code>Suspended</code> event is emitted in response to a <a href="https://developer.mozilla.org/en-US/docs/Web/API/Window/pagehide_event"><code>pagehide</code></a> event
with the property <a href="https://developer.mozilla.org/en-US/docs/Web/API/PageTransitionEvent/persisted"><code>persisted</code></a> being true, which means that the page is being
put in the <a href="https://web.dev/bfcache/"><code>bfcache</code></a> (back/forward cache) - an in-memory cache that stores a
complete snapshot of a page (including the JavaScript heap) as the user is
navigating away.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.exiting" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#194-196">Source</a><h4 class="code-header">fn <a href="#method.exiting" class="fn">exiting</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></summary><div class="docblock"><p>Emitted when the event loop is being shut down.</p>
<p>This is irreversible - if this method is called, it is guaranteed that the event loop
will exit right after.</p>
</div></details><details class="toggle method-toggle" open><summary><section id="method.memory_warning" class="method"><a class="src rightside" href="../../src/winit/application.rs.html#222-224">Source</a><h4 class="code-header">fn <a href="#method.memory_warning" class="fn">memory_warning</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></summary><div class="docblock"><p>Emitted when the application has received a memory warning.</p>
<h6 id="platform-specific"><a class="doc-anchor" href="#platform-specific">§</a>Platform-specific</h6><h6 id="android-2"><a class="doc-anchor" href="#android-2">§</a>Android</h6>
<p>On Android, the <code>MemoryWarning</code> event is sent when <a href="https://developer.android.com/reference/android/app/Application.html#onLowMemory()"><code>onLowMemory</code></a> was called. The
application must <a href="https://developer.android.com/topic/performance/memory#release">release memory</a> or risk being killed.</p>
<h6 id="ios-2"><a class="doc-anchor" href="#ios-2">§</a>iOS</h6>
<p>On iOS, the <code>MemoryWarning</code> event is emitted in response to an
<a href="https://developer.apple.com/documentation/uikit/uiapplicationdelegate/1623063-applicationdidreceivememorywarni"><code>applicationDidReceiveMemoryWarning</code></a> callback. The application must free as much
memory as possible or risk being terminated, see <a href="https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle/responding_to_memory_warnings">how to respond to memory warnings</a>.</p>
<h6 id="others"><a class="doc-anchor" href="#others">§</a>Others</h6>
<ul>
<li><strong>macOS / Orbital / Wayland / Web / Windows:</strong> Unsupported.</li>
</ul>
</div></details></div><h2 id="foreign-impls" class="section-header">Implementations on Foreign Types<a href="#foreign-impls" class="anchor">§</a></h2><details class="toggle implementors-toggle"><summary><section id="impl-ApplicationHandler%3CT%3E-for-%26mut+A" class="impl"><a class="src rightside" href="../../src/winit/application.rs.html#227-282">Source</a><a href="#impl-ApplicationHandler%3CT%3E-for-%26mut+A" class="anchor">§</a><h3 class="code-header">impl&lt;A: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ApplicationHandler.html" title="trait winit::application::ApplicationHandler">ApplicationHandler</a>&lt;T&gt;, T: 'static&gt; <a class="trait" href="trait.ApplicationHandler.html" title="trait winit::application::ApplicationHandler">ApplicationHandler</a>&lt;T&gt; for <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&amp;mut A</a></h3></section></summary><div class="impl-items"><section id="method.new_events-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#229-231">Source</a><a href="#method.new_events-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.new_events" class="fn">new_events</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, cause: <a class="enum" href="../event/enum.StartCause.html" title="enum winit::event::StartCause">StartCause</a>)</h4></section><section id="method.resumed" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#234-236">Source</a><a href="#method.resumed" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.resumed" class="fn">resumed</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.user_event-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#239-241">Source</a><a href="#method.user_event-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.user_event" class="fn">user_event</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, event: T)</h4></section><section id="method.window_event" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#244-251">Source</a><a href="#method.window_event" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.window_event" class="fn">window_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
window_id: <a class="struct" href="../window/struct.WindowId.html" title="struct winit::window::WindowId">WindowId</a>,
event: <a class="enum" href="../event/enum.WindowEvent.html" title="enum winit::event::WindowEvent">WindowEvent</a>,
)</h4></section><section id="method.device_event-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#254-261">Source</a><a href="#method.device_event-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.device_event" class="fn">device_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
device_id: <a class="struct" href="../event/struct.DeviceId.html" title="struct winit::event::DeviceId">DeviceId</a>,
event: <a class="enum" href="../event/enum.DeviceEvent.html" title="enum winit::event::DeviceEvent">DeviceEvent</a>,
)</h4></section><section id="method.about_to_wait-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#264-266">Source</a><a href="#method.about_to_wait-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.about_to_wait" class="fn">about_to_wait</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.suspended-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#269-271">Source</a><a href="#method.suspended-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.suspended" class="fn">suspended</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.exiting-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#274-276">Source</a><a href="#method.exiting-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.exiting" class="fn">exiting</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.memory_warning-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#279-281">Source</a><a href="#method.memory_warning-1" class="anchor">§</a><h4 class="code-header">fn <a href="#method.memory_warning" class="fn">memory_warning</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></div></details><details class="toggle implementors-toggle"><summary><section id="impl-ApplicationHandler%3CT%3E-for-Box%3CA%3E" class="impl"><a class="src rightside" href="../../src/winit/application.rs.html#284-339">Source</a><a href="#impl-ApplicationHandler%3CT%3E-for-Box%3CA%3E" class="anchor">§</a><h3 class="code-header">impl&lt;A: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a> + <a class="trait" href="trait.ApplicationHandler.html" title="trait winit::application::ApplicationHandler">ApplicationHandler</a>&lt;T&gt;, T: 'static&gt; <a class="trait" href="trait.ApplicationHandler.html" title="trait winit::application::ApplicationHandler">ApplicationHandler</a>&lt;T&gt; for <a class="struct" href="https://doc.rust-lang.org/1.84.0/alloc/boxed/struct.Box.html" title="struct alloc::boxed::Box">Box</a>&lt;A&gt;</h3></section></summary><div class="impl-items"><section id="method.new_events-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#286-288">Source</a><a href="#method.new_events-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.new_events" class="fn">new_events</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, cause: <a class="enum" href="../event/enum.StartCause.html" title="enum winit::event::StartCause">StartCause</a>)</h4></section><section id="method.resumed-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#291-293">Source</a><a href="#method.resumed-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.resumed" class="fn">resumed</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.user_event-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#296-298">Source</a><a href="#method.user_event-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.user_event" class="fn">user_event</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>, event: T)</h4></section><section id="method.window_event-1" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#301-308">Source</a><a href="#method.window_event-1" class="anchor">§</a><h4 class="code-header">fn <a href="#tymethod.window_event" class="fn">window_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
window_id: <a class="struct" href="../window/struct.WindowId.html" title="struct winit::window::WindowId">WindowId</a>,
event: <a class="enum" href="../event/enum.WindowEvent.html" title="enum winit::event::WindowEvent">WindowEvent</a>,
)</h4></section><section id="method.device_event-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#311-318">Source</a><a href="#method.device_event-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.device_event" class="fn">device_event</a>(
&amp;mut self,
event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>,
device_id: <a class="struct" href="../event/struct.DeviceId.html" title="struct winit::event::DeviceId">DeviceId</a>,
event: <a class="enum" href="../event/enum.DeviceEvent.html" title="enum winit::event::DeviceEvent">DeviceEvent</a>,
)</h4></section><section id="method.about_to_wait-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#321-323">Source</a><a href="#method.about_to_wait-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.about_to_wait" class="fn">about_to_wait</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.suspended-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#326-328">Source</a><a href="#method.suspended-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.suspended" class="fn">suspended</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.exiting-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#331-333">Source</a><a href="#method.exiting-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.exiting" class="fn">exiting</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section><section id="method.memory_warning-2" class="method trait-impl"><a class="src rightside" href="../../src/winit/application.rs.html#336-338">Source</a><a href="#method.memory_warning-2" class="anchor">§</a><h4 class="code-header">fn <a href="#method.memory_warning" class="fn">memory_warning</a>(&amp;mut self, event_loop: &amp;<a class="struct" href="../event_loop/struct.ActiveEventLoop.html" title="struct winit::event_loop::ActiveEventLoop">ActiveEventLoop</a>)</h4></section></div></details><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"></div><script src="../../trait.impl/winit/application/trait.ApplicationHandler.js" data-ignore-extern-crates="alloc" async></script></section></div></main></body></html>