libcosmic/cosmic/iced/daemon/program/runtime/window/index.html
2026-04-18 20:11:25 +00:00

8 lines
No EOL
16 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="Build window-based GUI applications."><title>cosmic::iced::daemon::program::runtime::window - 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 mod"><!--[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="#">Module window</a></h2><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#enums" title="Enums">Enums</a></li><li><a href="#traits" title="Traits">Traits</a></li><li><a href="#functions" title="Functions">Functions</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>iced::<wbr>daemon::<wbr>program::<wbr>runtime</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>::<wbr><a href="../../../../index.html">iced</a>::<wbr><a href="../../../index.html">daemon</a>::<wbr><a href="../../index.html">program</a>::<wbr><a href="../index.html">runtime</a></div><h1>Module <span>window</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Build window-based GUI applications.</p>
</div></details><h2 id="modules" class="section-header">Modules<a href="#modules" class="anchor">§</a></h2><dl class="item-table"><dt><a class="mod" href="raw_window_handle/index.html" title="mod cosmic::iced::daemon::program::runtime::window::raw_window_handle">raw_<wbr>window_<wbr>handle</a></dt><dd>Interoperability library for Rust Windowing applications.</dd></dl><h2 id="enums" class="section-header">Enums<a href="#enums" class="anchor">§</a></h2><dl class="item-table"><dt><a class="enum" href="enum.Action.html" title="enum cosmic::iced::daemon::program::runtime::window::Action">Action</a></dt><dd>An operation to be performed on some window.</dd></dl><h2 id="traits" class="section-header">Traits<a href="#traits" class="anchor">§</a></h2><dl class="item-table"><dt><a class="trait" href="trait.Window.html" title="trait cosmic::iced::daemon::program::runtime::window::Window">Window</a></dt><dd>A window managed by iced.</dd></dl><h2 id="functions" class="section-header">Functions<a href="#functions" class="anchor">§</a></h2><dl class="item-table"><dt><a class="fn" href="fn.allow_automatic_tabbing.html" title="fn cosmic::iced::daemon::program::runtime::window::allow_automatic_tabbing">allow_<wbr>automatic_<wbr>tabbing</a></dt><dd>Sets whether the system can automatically organize windows into tabs.</dd><dt><a class="fn" href="fn.close.html" title="fn cosmic::iced::daemon::program::runtime::window::close">close</a></dt><dd>Closes the window with <code>id</code>.</dd><dt><a class="fn" href="fn.close_events.html" title="fn cosmic::iced::daemon::program::runtime::window::close_events">close_<wbr>events</a></dt><dd>Subscribes to all <a href="../../../../window/enum.Event.html#variant.Closed" title="variant cosmic::iced::window::Event::Closed"><code>Event::Closed</code></a> occurrences in the running application.</dd><dt><a class="fn" href="fn.close_requests.html" title="fn cosmic::iced::daemon::program::runtime::window::close_requests">close_<wbr>requests</a></dt><dd>Subscribes to all <a href="../../../../window/enum.Event.html#variant.CloseRequested" title="variant cosmic::iced::window::Event::CloseRequested"><code>Event::CloseRequested</code></a> occurrences in the running application.</dd><dt><a class="fn" href="fn.disable_blur.html" title="fn cosmic::iced::daemon::program::runtime::window::disable_blur">disable_<wbr>blur</a></dt><dd>Disable the blur effect for a window.</dd><dt><a class="fn" href="fn.disable_mouse_passthrough.html" title="fn cosmic::iced::daemon::program::runtime::window::disable_mouse_passthrough">disable_<wbr>mouse_<wbr>passthrough</a></dt><dd>Disables mouse passthrough for the given window.</dd><dt><a class="fn" href="fn.drag.html" title="fn cosmic::iced::daemon::program::runtime::window::drag">drag</a></dt><dd>Begins dragging the window while the left mouse button is held.</dd><dt><a class="fn" href="fn.drag_resize.html" title="fn cosmic::iced::daemon::program::runtime::window::drag_resize">drag_<wbr>resize</a></dt><dd>Begins resizing the window while the left mouse button is held.</dd><dt><a class="fn" href="fn.enable_blur.html" title="fn cosmic::iced::daemon::program::runtime::window::enable_blur">enable_<wbr>blur</a></dt><dd>Sets the blur effect for the window.
Enable the blur effect for a window.</dd><dt><a class="fn" href="fn.enable_mouse_passthrough.html" title="fn cosmic::iced::daemon::program::runtime::window::enable_mouse_passthrough">enable_<wbr>mouse_<wbr>passthrough</a></dt><dd>Enables mouse passthrough for the given window.</dd><dt><a class="fn" href="fn.events.html" title="fn cosmic::iced::daemon::program::runtime::window::events">events</a></dt><dd>Subscribes to all window events of the running application.</dd><dt><a class="fn" href="fn.frames.html" title="fn cosmic::iced::daemon::program::runtime::window::frames">frames</a></dt><dd>Subscribes to the frames of the window of the running application.</dd><dt><a class="fn" href="fn.gain_focus.html" title="fn cosmic::iced::daemon::program::runtime::window::gain_focus">gain_<wbr>focus</a></dt><dd>Brings the window to the front and sets input focus. Has no effect if the window is
already in focus, minimized, or not visible.</dd><dt><a class="fn" href="fn.is_maximized.html" title="fn cosmic::iced::daemon::program::runtime::window::is_maximized">is_<wbr>maximized</a></dt><dd>Gets the maximized state of the window with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.is_minimized.html" title="fn cosmic::iced::daemon::program::runtime::window::is_minimized">is_<wbr>minimized</a></dt><dd>Gets the minimized state of the window with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.latest.html" title="fn cosmic::iced::daemon::program::runtime::window::latest">latest</a></dt><dd>Gets the window <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a> of the latest window.</dd><dt><a class="fn" href="fn.maximize.html" title="fn cosmic::iced::daemon::program::runtime::window::maximize">maximize</a></dt><dd>Maximizes the window.</dd><dt><a class="fn" href="fn.minimize.html" title="fn cosmic::iced::daemon::program::runtime::window::minimize">minimize</a></dt><dd>Minimizes the window.</dd><dt><a class="fn" href="fn.mode.html" title="fn cosmic::iced::daemon::program::runtime::window::mode">mode</a></dt><dd>Gets the current <a href="../../../../window/enum.Mode.html" title="enum cosmic::iced::window::Mode"><code>Mode</code></a> of the window.</dd><dt><a class="fn" href="fn.monitor_size.html" title="fn cosmic::iced::daemon::program::runtime::window::monitor_size">monitor_<wbr>size</a></dt><dd>Gets the logical dimensions of the monitor containing the window with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.move_to.html" title="fn cosmic::iced::daemon::program::runtime::window::move_to">move_to</a></dt><dd>Moves the window to the given logical coordinates.</dd><dt><a class="fn" href="fn.oldest.html" title="fn cosmic::iced::daemon::program::runtime::window::oldest">oldest</a></dt><dd>Gets the window <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a> of the oldest window.</dd><dt><a class="fn" href="fn.open.html" title="fn cosmic::iced::daemon::program::runtime::window::open">open</a></dt><dd>Opens a new window with the given <a href="../../../../window/struct.Settings.html" title="struct cosmic::iced::window::Settings"><code>Settings</code></a>; producing the <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>
of the new window on completion.</dd><dt><a class="fn" href="fn.open_events.html" title="fn cosmic::iced::daemon::program::runtime::window::open_events">open_<wbr>events</a></dt><dd>Subscribes to all <a href="../../../../window/enum.Event.html#variant.Opened" title="variant cosmic::iced::window::Event::Opened"><code>Event::Opened</code></a> occurrences in the running application.</dd><dt><a class="fn" href="fn.position.html" title="fn cosmic::iced::daemon::program::runtime::window::position">position</a></dt><dd>Gets the position in logical coordinates of the window with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.raw_id.html" title="fn cosmic::iced::daemon::program::runtime::window::raw_id">raw_id</a></dt><dd>Gets an identifier unique to the window, provided by the underlying windowing system. This is
not to be confused with <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.request_user_attention.html" title="fn cosmic::iced::daemon::program::runtime::window::request_user_attention">request_<wbr>user_<wbr>attention</a></dt><dd>Requests user attention to the window. This has no effect if the application
is already focused. How requesting for user attention manifests is platform dependent,
see <a href="../../../../window/enum.UserAttention.html" title="enum cosmic::iced::window::UserAttention"><code>UserAttention</code></a> for details.</dd><dt><a class="fn" href="fn.resize.html" title="fn cosmic::iced::daemon::program::runtime::window::resize">resize</a></dt><dd>Resizes the window to the given logical dimensions.</dd><dt><a class="fn" href="fn.resize_events.html" title="fn cosmic::iced::daemon::program::runtime::window::resize_events">resize_<wbr>events</a></dt><dd>Subscribes to all <a href="../../../../window/enum.Event.html#variant.Resized" title="variant cosmic::iced::window::Event::Resized"><code>Event::Resized</code></a> occurrences in the running application.</dd><dt><a class="fn" href="fn.run.html" title="fn cosmic::iced::daemon::program::runtime::window::run">run</a></dt><dd>Runs the given callback with a reference to the <a href="../../../../trait.Window.html" title="trait cosmic::iced::Window"><code>Window</code></a> with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.run_with_handle.html" title="fn cosmic::iced::daemon::program::runtime::window::run_with_handle">run_<wbr>with_<wbr>handle</a></dt><dd>Runs the given callback with the native window handle for the window with the given id.</dd><dt><a class="fn" href="fn.scale_factor.html" title="fn cosmic::iced::daemon::program::runtime::window::scale_factor">scale_<wbr>factor</a></dt><dd>Gets the scale factor of the window with the given <a href="../../../../window/struct.Id.html" title="struct cosmic::iced::window::Id"><code>Id</code></a>.</dd><dt><a class="fn" href="fn.screenshot.html" title="fn cosmic::iced::daemon::program::runtime::window::screenshot">screenshot</a></dt><dd>Captures a <a href="../../../../window/struct.Screenshot.html" title="struct cosmic::iced::window::Screenshot"><code>Screenshot</code></a> from the window.</dd><dt><a class="fn" href="fn.set_icon.html" title="fn cosmic::iced::daemon::program::runtime::window::set_icon">set_<wbr>icon</a></dt><dd>Changes the <a href="../../../../window/struct.Icon.html" title="struct cosmic::iced::window::Icon"><code>Icon</code></a> of the window.</dd><dt><a class="fn" href="fn.set_level.html" title="fn cosmic::iced::daemon::program::runtime::window::set_level">set_<wbr>level</a></dt><dd>Changes the window <a href="../../../../window/enum.Level.html" title="enum cosmic::iced::window::Level"><code>Level</code></a>.</dd><dt><a class="fn" href="fn.set_max_size.html" title="fn cosmic::iced::daemon::program::runtime::window::set_max_size">set_<wbr>max_<wbr>size</a></dt><dd>Set the inner maximum size of the window.</dd><dt><a class="fn" href="fn.set_min_size.html" title="fn cosmic::iced::daemon::program::runtime::window::set_min_size">set_<wbr>min_<wbr>size</a></dt><dd>Set the inner minimum size of the window.</dd><dt><a class="fn" href="fn.set_mode.html" title="fn cosmic::iced::daemon::program::runtime::window::set_mode">set_<wbr>mode</a></dt><dd>Changes the <a href="../../../../window/enum.Mode.html" title="enum cosmic::iced::window::Mode"><code>Mode</code></a> of the window.</dd><dt><a class="fn" href="fn.set_resizable.html" title="fn cosmic::iced::daemon::program::runtime::window::set_resizable">set_<wbr>resizable</a></dt><dd>Set the window to be resizable or not.</dd><dt><a class="fn" href="fn.set_resize_increments.html" title="fn cosmic::iced::daemon::program::runtime::window::set_resize_increments">set_<wbr>resize_<wbr>increments</a></dt><dd>Set the window size increment.</dd><dt><a class="fn" href="fn.show_system_menu.html" title="fn cosmic::iced::daemon::program::runtime::window::show_system_menu">show_<wbr>system_<wbr>menu</a></dt><dd>Shows the <a href="https://en.wikipedia.org/wiki/Common_menus_in_Microsoft_Windows#System_menu">system menu</a> at cursor position.</dd><dt><a class="fn" href="fn.size.html" title="fn cosmic::iced::daemon::program::runtime::window::size">size</a></dt><dd>Gets the window size in logical dimensions.</dd><dt><a class="fn" href="fn.toggle_decorations.html" title="fn cosmic::iced::daemon::program::runtime::window::toggle_decorations">toggle_<wbr>decorations</a></dt><dd>Toggles the window decorations.</dd><dt><a class="fn" href="fn.toggle_maximize.html" title="fn cosmic::iced::daemon::program::runtime::window::toggle_maximize">toggle_<wbr>maximize</a></dt><dd>Toggles the window to maximized or back.</dd><dt><a class="fn" href="fn.wayland_frames.html" title="fn cosmic::iced::daemon::program::runtime::window::wayland_frames">wayland_<wbr>frames</a></dt><dd>Subscribes to the frames of the window of the running application.</dd></dl></section></div></main></body></html>