You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Trac3r-rust/doc/smithay_client_toolkit/shell/trait.ShellSurface.html

39 lines
18 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!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="API documentation for the Rust `ShellSurface` trait in crate `smithay_client_toolkit`."><meta name="keywords" content="rust, rustlang, rust-lang, ShellSurface"><title>smithay_client_toolkit::shell::ShellSurface - Rust</title><link rel="stylesheet" type="text/css" href="../../normalize.css"><link rel="stylesheet" type="text/css" href="../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../dark.css"><link rel="stylesheet" type="text/css" href="../../light.css" id="themeStyle"><script src="../../storage.js"></script><noscript><link rel="stylesheet" href="../../noscript.css"></noscript><link rel="shortcut icon" href="../../favicon.ico"><style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc trait"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu">&#9776;</div><a href='../../smithay_client_toolkit/index.html'><div class='logo-container'><img src='../../rust-logo.png' alt='logo'></div></a><p class='location'>Trait ShellSurface</p><div class="sidebar-elems"><div class="block items"><a class="sidebar-title" href="#required-methods">Required Methods</a><div class="sidebar-links"><a href="#tymethod.get_xdg">get_xdg</a><a href="#tymethod.move_">move_</a><a href="#tymethod.resize">resize</a><a href="#tymethod.set_app_id">set_app_id</a><a href="#tymethod.set_fullscreen">set_fullscreen</a><a href="#tymethod.set_geometry">set_geometry</a><a href="#tymethod.set_max_size">set_max_size</a><a href="#tymethod.set_maximized">set_maximized</a><a href="#tymethod.set_min_size">set_min_size</a><a href="#tymethod.set_minimized">set_minimized</a><a href="#tymethod.set_title">set_title</a><a href="#tymethod.unset_fullscreen">unset_fullscreen</a><a href="#tymethod.unset_maximized">unset_maximized</a></div><a class="sidebar-title" href="#implementors">Implementors</a></div><p class='location'><a href='../index.html'>smithay_client_toolkit</a>::<wbr><a href='index.html'>shell</a></p><script>window.sidebarCurrent = {name: 'ShellSurface', ty: 'trait', relpath: ''};</script><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!"><img src="../../brush.svg" width="18" alt="Pick another theme!"></button><div id="theme-choices"></div></div><script src="../../theme.js"></script><nav class="sub"><form class="search-form js-only"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><a id="settings-menu" href="../../settings.html"><img src="../../wheel.svg" width="18" alt="Change settings"></a></div></form></nav><section id="main" class="content"><h1 class='fqn'><span class='out-of-band'><span id='render-detail'><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class='inner'>&#x2212;</span>]</a></span><a class='srclink' href='../../src/smithay_client_toolkit/shell/mod.rs.html#71-102' title='goto source code'>[src]</a></span><span class='in-band'>Trait <a href='../index.html'>smithay_client_toolkit</a>::<wbr><a href='index.html'>shell</a>::<wbr><a class="trait" href=''>ShellSurface</a></span></h1><div class="docblock type-decl hidden-by-usual-hider"><pre class='rust trait'>pub trait ShellSurface: <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> {
fn <a href='#tymethod.resize' class='fnname'>resize</a>(&amp;self, seat: &amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_seat/struct.WlSeat.html" title="struct wayland_client::generated::c_api::wl_seat::WlSeat">WlSeat</a>&gt;, serial: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, edges: <a class="enum" href="../../wayland_protocols/stable/xdg_shell/generated/client/xdg_toplevel/enum.ResizeEdge.html" title="enum wayland_protocols::stable::xdg_shell::generated::client::xdg_toplevel::ResizeEdge">ResizeEdge</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.move_' class='fnname'>move_</a>(&amp;self, seat: &amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_seat/struct.WlSeat.html" title="struct wayland_client::generated::c_api::wl_seat::WlSeat">WlSeat</a>&gt;, serial: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.set_title' class='fnname'>set_title</a>(&amp;self, title: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.set_app_id' class='fnname'>set_app_id</a>(&amp;self, app_id: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.set_fullscreen' class='fnname'>set_fullscreen</a>(&amp;self, output: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_output/struct.WlOutput.html" title="struct wayland_client::generated::c_api::wl_output::WlOutput">WlOutput</a>&gt;&gt;);
<div class='item-spacer'></div> fn <a href='#tymethod.unset_fullscreen' class='fnname'>unset_fullscreen</a>(&amp;self);
<div class='item-spacer'></div> fn <a href='#tymethod.set_maximized' class='fnname'>set_maximized</a>(&amp;self);
<div class='item-spacer'></div> fn <a href='#tymethod.unset_maximized' class='fnname'>unset_maximized</a>(&amp;self);
<div class='item-spacer'></div> fn <a href='#tymethod.set_minimized' class='fnname'>set_minimized</a>(&amp;self);
<div class='item-spacer'></div> fn <a href='#tymethod.set_geometry' class='fnname'>set_geometry</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>);
<div class='item-spacer'></div> fn <a href='#tymethod.set_min_size' class='fnname'>set_min_size</a>(&amp;self, size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;);
<div class='item-spacer'></div> fn <a href='#tymethod.set_max_size' class='fnname'>set_max_size</a>(&amp;self, size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;);
<div class='item-spacer'></div> fn <a href='#tymethod.get_xdg' class='fnname'>get_xdg</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_protocols/stable/xdg_shell/generated/client/xdg_toplevel/struct.XdgToplevel.html" title="struct wayland_protocols::stable::xdg_shell::generated::client::xdg_toplevel::XdgToplevel">XdgToplevel</a>&gt;&gt;;
}</pre></div><div class='docblock'><p>Trait abstracting over shell surface protocols</p>
<p>This trait's API is designed to reflect the behavior of the current standard
shell surface protocol: <code>xdg_shell</code>. Compatibility implementations are
provided for older protocols.</p>
</div>
<h2 id='required-methods' class='small-section-header'>Required methods<a href='#required-methods' class='anchor'></a></h2><div class='methods'><h3 id='tymethod.resize' class='method'><code id='resize.v'>fn <a href='#tymethod.resize' class='fnname'>resize</a>(&amp;self, seat: &amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_seat/struct.WlSeat.html" title="struct wayland_client::generated::c_api::wl_seat::WlSeat">WlSeat</a>&gt;, serial: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>, edges: <a class="enum" href="../../wayland_protocols/stable/xdg_shell/generated/client/xdg_toplevel/enum.ResizeEdge.html" title="enum wayland_protocols::stable::xdg_shell::generated::client::xdg_toplevel::ResizeEdge">ResizeEdge</a>)</code></h3><div class='docblock'><p>Resizes the shell surface</p>
</div><h3 id='tymethod.move_' class='method'><code id='move_.v'>fn <a href='#tymethod.move_' class='fnname'>move_</a>(&amp;self, seat: &amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_seat/struct.WlSeat.html" title="struct wayland_client::generated::c_api::wl_seat::WlSeat">WlSeat</a>&gt;, serial: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.u32.html">u32</a>)</code></h3><div class='docblock'><p>Moves the shell surface</p>
</div><h3 id='tymethod.set_title' class='method'><code id='set_title.v'>fn <a href='#tymethod.set_title' class='fnname'>set_title</a>(&amp;self, title: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></h3><div class='docblock'><p>Set the title of the shell surface</p>
</div><h3 id='tymethod.set_app_id' class='method'><code id='set_app_id.v'>fn <a href='#tymethod.set_app_id' class='fnname'>set_app_id</a>(&amp;self, app_id: <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a>)</code></h3><div class='docblock'><p>Set the app id of the shell surface</p>
</div><h3 id='tymethod.set_fullscreen' class='method'><code id='set_fullscreen.v'>fn <a href='#tymethod.set_fullscreen' class='fnname'>set_fullscreen</a>(&amp;self, output: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_client/generated/c_api/wl_output/struct.WlOutput.html" title="struct wayland_client::generated::c_api::wl_output::WlOutput">WlOutput</a>&gt;&gt;)</code></h3><div class='docblock'><p>Make fullscreen</p>
</div><h3 id='tymethod.unset_fullscreen' class='method'><code id='unset_fullscreen.v'>fn <a href='#tymethod.unset_fullscreen' class='fnname'>unset_fullscreen</a>(&amp;self)</code></h3><div class='docblock'><p>Unset fullscreen</p>
</div><h3 id='tymethod.set_maximized' class='method'><code id='set_maximized.v'>fn <a href='#tymethod.set_maximized' class='fnname'>set_maximized</a>(&amp;self)</code></h3><div class='docblock'><p>Maximize surface</p>
</div><h3 id='tymethod.unset_maximized' class='method'><code id='unset_maximized.v'>fn <a href='#tymethod.unset_maximized' class='fnname'>unset_maximized</a>(&amp;self)</code></h3><div class='docblock'><p>Unmaximize surface</p>
</div><h3 id='tymethod.set_minimized' class='method'><code id='set_minimized.v'>fn <a href='#tymethod.set_minimized' class='fnname'>set_minimized</a>(&amp;self)</code></h3><div class='docblock'><p>Minimize surface</p>
</div><h3 id='tymethod.set_geometry' class='method'><code id='set_geometry.v'>fn <a href='#tymethod.set_geometry' class='fnname'>set_geometry</a>(&amp;self, x: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, y: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, width: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, height: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>)</code></h3><div class='docblock'><p>Set geometry</p>
</div><h3 id='tymethod.set_min_size' class='method'><code id='set_min_size.v'>fn <a href='#tymethod.set_min_size' class='fnname'>set_min_size</a>(&amp;self, size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;)</code></h3><div class='docblock'><p>Set minimum surface size</p>
</div><h3 id='tymethod.set_max_size' class='method'><code id='set_max_size.v'>fn <a href='#tymethod.set_max_size' class='fnname'>set_max_size</a>(&amp;self, size: <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">(</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a>, <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.i32.html">i32</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.tuple.html">)</a>&gt;)</code></h3><div class='docblock'><p>Set maximum surface size</p>
</div><h3 id='tymethod.get_xdg' class='method'><code id='get_xdg.v'>fn <a href='#tymethod.get_xdg' class='fnname'>get_xdg</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="../../wayland_client/proxy/struct.Proxy.html" title="struct wayland_client::proxy::Proxy">Proxy</a>&lt;<a class="struct" href="../../wayland_protocols/stable/xdg_shell/generated/client/xdg_toplevel/struct.XdgToplevel.html" title="struct wayland_protocols::stable::xdg_shell::generated::client::xdg_toplevel::XdgToplevel">XdgToplevel</a>&gt;&gt;</code></h3><div class='docblock'><p>Retrive the <code>XdgToplevel</code> proxy if the underlying shell surface
uses the <code>xdg_shell</code> protocol.</p>
<p>This allows interactions with other protocol extensions, like
<code>xdg_decoratins</code> for example.</p>
</div></div><span class='loading-content'>Loading content...</span>
<h2 id='implementors' class='small-section-header'>Implementors<a href='#implementors' class='anchor'></a></h2><div class='item-list' id='implementors-list'></div><span class='loading-content'>Loading content...</span><script type="text/javascript">window.inlined_types=new Set([]);</script><script type="text/javascript" async
src="../../implementors/smithay_client_toolkit/shell/trait.ShellSurface.js">
</script></section><section id="search" class="content hidden"></section><section class="footer"></section><aside id="help" class="hidden"><div><h1 class="hidden">Help</h1><div class="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd></kbd></dt><dd>Move up in search results</dd><dt><kbd></kbd></dt><dd>Move down in search results</dd><dt><kbd></kbd></dt><dd>Switch tab</dd><dt><kbd>&#9166;</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><div class="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath = "../../";window.currentCrate = "smithay_client_toolkit";</script><script src="../../aliases.js"></script><script src="../../main.js"></script><script defer src="../../search-index.js"></script></body></html>