36 lines
19 KiB
HTML
36 lines
19 KiB
HTML
|
|
<!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="Methods automatically derived for all types implementing `Application`."><title>ApplicationExt in cosmic - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Italic-81dc35de.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-MediumItalic-ccf7e434.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-aa0817cf.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="cosmic" data-themes="" data-resource-suffix="" data-rustdoc-version="1.90.0-nightly (3048886e5 2025-07-30)" data-channel="nightly" data-search-js="search-fa3e91e5.js" data-settings-js="settings-5514c975.js" ><script src="../static.files/storage-68b7e25d.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-eebb9057.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-32bb7600.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="../cosmic/index.html">cosmic</a><span class="version">1.0.0</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Application<wbr>Ext</a></h2><h3><a href="#required-methods">Required Methods</a></h3><ul class="block"><li><a href="#tymethod.drag" title="drag">drag</a></li><li><a href="#tymethod.maximize" title="maximize">maximize</a></li><li><a href="#tymethod.minimize" title="minimize">minimize</a></li><li><a href="#tymethod.set_window_title" title="set_window_title">set_window_title</a></li><li><a href="#tymethod.title" title="title">title</a></li><li><a href="#tymethod.view_main" title="view_main">view_main</a></li></ul><h3><a href="#provided-methods">Provided Methods</a></h3><ul class="block"><li><a href="#method.set_header_title" title="set_header_title">set_header_title</a></li><li><a href="#method.set_show_context" title="set_show_context">set_show_context</a></li><li><a href="#method.watch_config" title="watch_config">watch_config</a></li><li><a href="#method.watch_state" title="watch_state">watch_state</a></li></ul><h3><a href="#dyn-compatibility">Dyn Compatibility</a></h3><h3><a href="#implementors">Implementors</a></h3></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate cosmic</a></h2></div></div></nav><div class="sidebar-resizer" title="Drag to resize sidebar"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><div class="rustdoc-breadcrumbs"><a href="index.html">cosmic</a></div><h1>Trait <span class="trait">ApplicationExt</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/cosmic/app/mod.rs.html#512-564">Source</a> </span></div><pre class="rust item-decl"><code>pub trait ApplicationExt: <a class="trait" href="trait.Application.html" title="trait cosmic::Application">Application</a> {
|
||
|
|
// Required methods
|
||
|
|
fn <a href="#tymethod.drag" class="fn">drag</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>;
|
||
|
|
<span class="item-spacer"></span> fn <a href="#tymethod.maximize" class="fn">maximize</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>;
|
||
|
|
<span class="item-spacer"></span> fn <a href="#tymethod.minimize" class="fn">minimize</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>;
|
||
|
|
<span class="item-spacer"></span> fn <a href="#tymethod.title" class="fn">title</a>(&self, id: <a class="struct" href="iced/window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>;
|
||
|
|
<span class="item-spacer"></span> fn <a href="#tymethod.set_window_title" class="fn">set_window_title</a>(&mut self, title: <a class="struct" href="cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>, id: <a class="struct" href="iced/window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>;
|
||
|
|
<span class="item-spacer"></span> fn <a href="#tymethod.view_main" class="fn">view_main</a>(&self) -> <a class="type" href="type.Element.html" title="type cosmic::Element">Element</a><'_, <a class="enum" href="action/enum.Action.html" title="enum cosmic::action::Action">Action</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>>;
|
||
|
|
|
||
|
|
// Provided methods
|
||
|
|
fn <a href="#method.set_show_context" class="fn">set_show_context</a>(&mut self, show: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>) { ... }
|
||
|
|
<span class="item-spacer"></span> fn <a href="#method.set_header_title" class="fn">set_header_title</a>(&mut self, title: <a class="struct" href="cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>) { ... }
|
||
|
|
<span class="item-spacer"></span> fn <a href="#method.watch_config" class="fn">watch_config</a><T: <a class="trait" href="cosmic_config/trait.CosmicConfigEntry.html" title="trait cosmic::cosmic_config::CosmicConfigEntry">CosmicConfigEntry</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>>(
|
||
|
|
&self,
|
||
|
|
id: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
|
|
) -> <a class="struct" href="iced/struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="struct" href="cosmic_config/struct.Update.html" title="struct cosmic::cosmic_config::Update">Update</a><T>> { ... }
|
||
|
|
<span class="item-spacer"></span> fn <a href="#method.watch_state" class="fn">watch_state</a><T: <a class="trait" href="cosmic_config/trait.CosmicConfigEntry.html" title="trait cosmic::cosmic_config::CosmicConfigEntry">CosmicConfigEntry</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>>(
|
||
|
|
&self,
|
||
|
|
id: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
|
|
) -> <a class="struct" href="iced/struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="struct" href="cosmic_config/struct.Update.html" title="struct cosmic::cosmic_config::Update">Update</a><T>> { ... }
|
||
|
|
}</code></pre><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>winit</code></strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Methods automatically derived for all types implementing <a href="trait.Application.html" title="trait cosmic::Application"><code>Application</code></a>.</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.drag" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#514">Source</a><h4 class="code-header">fn <a href="#tymethod.drag" class="fn">drag</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>></h4></section></summary><div class="docblock"><p>Initiates a window drag.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.maximize" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#517">Source</a><h4 class="code-header">fn <a href="#tymethod.maximize" class="fn">maximize</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>></h4></section></summary><div class="docblock"><p>Maximizes the window.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.minimize" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#520">Source</a><h4 class="code-header">fn <a href="#tymethod.minimize" class="fn">minimize</a>(&mut self) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>></h4></section></summary><div class="docblock"><p>Minimizes the window.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.title" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#528">Source</a><h4 class="code-header">fn <a href="#tymethod.title" class="fn">title</a>(&self, id: <a class="struct" href="iced/window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> &<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>multi-window</code></strong> only.</div></span></summary><div class="docblock"><p>Get the title of a window.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.set_window_title" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#546">Source</a><h4 class="code-header">fn <a href="#tymethod.set_window_title" class="fn">set_window_title</a>(&mut self, title: <a class="struct" href="cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>, id: <a class="struct" href="iced/window/struct.Id.html" title="struct cosmic::iced::window::Id">Id</a>) -> <a class="type" href="app/type.Task.html" title="type cosmic::app::Task">Task</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>></h4></section><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>multi-window</code></strong> only.</div></span></summary><div class="docblock"><p>Set the title of a window.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="tymethod.view_main" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#549">Source</a><h4 class="code-header">fn <a href="#tymethod.view_main" class="fn">view_main</a>(&self) -> <a class="type" href="type.Element.html" title="type cosmic::Element">Element</a><'_, <a class="enum" href="action/enum.Action.html" title="enum cosmic::action::Action">Action</a><Self::<a class="associatedtype" href="trait.Application.html#associatedtype.Message" title="type cosmic::Application::Message">Message</a>>></h4></section></summary><div class="docblock"><p>View template for the main 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.set_show_context" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#531-533">Source</a><h4 class="code-header">fn <a href="#method.set_show_context" class="fn">set_show_context</a>(&mut self, show: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a>)</h4></section></summary><div class="docblock"><p>Set the context drawer visibility.</p>
|
||
|
|
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_header_title" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#536-538">Source</a><h4 class="code-header">fn <a href="#method.set_header_title" class="fn">set_header_title</a>(&mut self, title: <a class="struct" href="cctk/sctk/reexports/client/backend/smallvec/alloc/string/struct.String.html" title="struct cosmic::cctk::sctk::reexports::client::backend::smallvec::alloc::string::String">String</a>)</h4></section></summary><div class="docblock"><p>Set the header bar title.</p>
|
||
|
|
</div></details><section id="method.watch_config" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#551-556">Source</a><h4 class="code-header">fn <a href="#method.watch_config" class="fn">watch_config</a><T: <a class="trait" href="cosmic_config/trait.CosmicConfigEntry.html" title="trait cosmic::cosmic_config::CosmicConfigEntry">CosmicConfigEntry</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>>(
|
||
|
|
&self,
|
||
|
|
id: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
|
|
) -> <a class="struct" href="iced/struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="struct" href="cosmic_config/struct.Update.html" title="struct cosmic::cosmic_config::Update">Update</a><T>></h4></section><section id="method.watch_state" class="method"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#558-563">Source</a><h4 class="code-header">fn <a href="#method.watch_state" class="fn">watch_state</a><T: <a class="trait" href="cosmic_config/trait.CosmicConfigEntry.html" title="trait cosmic::cosmic_config::CosmicConfigEntry">CosmicConfigEntry</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/default/trait.Default.html" title="trait core::default::Default">Default</a> + 'static + <a class="trait" href="https://doc.rust-lang.org/nightly/core/clone/trait.Clone.html" title="trait core::clone::Clone">Clone</a> + <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>>(
|
||
|
|
&self,
|
||
|
|
id: &'static <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a>,
|
||
|
|
) -> <a class="struct" href="iced/struct.Subscription.html" title="struct cosmic::iced::Subscription">Subscription</a><<a class="struct" href="cosmic_config/struct.Update.html" title="struct cosmic::cosmic_config::Update">Update</a><T>></h4></section></div><h2 id="dyn-compatibility" class="section-header">Dyn Compatibility<a href="#dyn-compatibility" class="anchor">§</a></h2><div class="dyn-compatibility-info"><p>This trait is <b>not</b> <a href="https://doc.rust-lang.org/nightly/reference/items/traits.html#dyn-compatibility">dyn compatible</a>.</p><p><i>In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.</i></p></div><h2 id="implementors" class="section-header">Implementors<a href="#implementors" class="anchor">§</a></h2><div id="implementors-list"><section id="impl-ApplicationExt-for-App" class="impl"><a class="src rightside" href="../src/cosmic/app/mod.rs.html#566-885">Source</a><a href="#impl-ApplicationExt-for-App" class="anchor">§</a><h3 class="code-header">impl<App: <a class="trait" href="trait.Application.html" title="trait cosmic::Application">Application</a>> <a class="trait" href="trait.ApplicationExt.html" title="trait cosmic::ApplicationExt">ApplicationExt</a> for App</h3></section></div><script src="../trait.impl/cosmic/app/trait.ApplicationExt.js" async></script></section></div></main></body></html>
|