libcosmic/cosmic/cctk/sctk/shell/index.html
2026-04-18 20:11:25 +00:00

25 lines
No EOL
7.4 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="Shell abstractions"><title>cosmic::cctk::sctk::shell - 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 shell</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#shell-abstractions" title="Shell abstractions">Shell abstractions</a><ul><li><a href="#cross-desktop-group-xdg-shell" title="Cross desktop group (XDG) shell">Cross desktop group (XDG) shell</a></li><li><a href="#layer-shell" title="Layer shell">Layer shell</a></li></ul></li></ul><h3><a href="#modules">Module Items</a></h3><ul class="block"><li><a href="#modules" title="Modules">Modules</a></li><li><a href="#structs" title="Structs">Structs</a></li><li><a href="#traits" title="Traits">Traits</a></li></ul></section><div id="rustdoc-modnav"><h2><a href="../index.html">In cosmic::<wbr>cctk::<wbr>sctk</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">cctk</a>::<wbr><a href="../index.html">sctk</a></div><h1>Module <span>shell</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><span class="item-info"><div class="stab portability">Available on <strong>crate feature <code>wayland</code> and Linux</strong> only.</div></span><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><h2 id="shell-abstractions"><a class="doc-anchor" href="#shell-abstractions">§</a>Shell abstractions</h2>
<p>A shell describes a set of wayland protocol extensions which define the capabilities of a surface and how
the surface is displayed.</p>
<h3 id="cross-desktop-group-xdg-shell"><a class="doc-anchor" href="#cross-desktop-group-xdg-shell">§</a>Cross desktop group (XDG) shell</h3>
<p>The XDG shell describes the semantics of desktop application windows.</p>
<p>The XDG shell defines two types of surfaces:</p>
<ul>
<li><a href="xdg/window/struct.Window.html" title="struct cosmic::cctk::sctk::shell::xdg::window::Window"><code>Window</code></a> - An application window<sup id="fnref1"><a href="#fn1">1</a></sup>.</li>
<li><a href="xdg/popup/struct.Popup.html" title="struct cosmic::cctk::sctk::shell::xdg::popup::Popup"><code>Popup</code></a> - A child surface positioned relative to a window.</li>
</ul>
<h4 id="why-use-the-xdg-shell"><a class="doc-anchor" href="#why-use-the-xdg-shell">§</a>Why use the XDG shell</h4>
<p>The XDG shell is the primary protocol through which application windows are created. You can be near
certain every desktop compositor will implement this shell so that applications may create windows.</p>
<p>See the <a href="xdg/index.html" title="mod cosmic::cctk::sctk::shell::xdg">XDG shell module documentation</a> for more information about creating application windows.</p>
<h3 id="layer-shell"><a class="doc-anchor" href="#layer-shell">§</a>Layer shell</h3>
<p>The layer shell is a protocol which allows the creation of “layers”. A layer refers to a surface rendered
at some specific z-depth relative to other layers. A layer may also be anchored to some edge and corner of
the screen.</p>
<p>The layer shell defines one type of surface: the <a href="wlr_layer/struct.LayerSurface.html" title="struct cosmic::cctk::sctk::shell::wlr_layer::LayerSurface"><code>wlr_layer::LayerSurface</code></a>.</p>
<p>There is no guarantee that the layer shell will be available in every compositor.</p>
<h4 id="why-use-the-layer-shell"><a class="doc-anchor" href="#why-use-the-layer-shell">§</a>Why use the layer shell</h4>
<p>The layer shell may be used to implement many desktop shell components, such as backgrounds, docks and
launchers.</p>
<div class="footnotes"><hr><ol><li id="fn1"><p>The XDG shell protocol actually refers to a window as a toplevel surface, but we use the more
familiar term “window” for the sake of clarity.&nbsp;<a href="#fnref1"></a></p></li></ol></div></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="wlr_layer/index.html" title="mod cosmic::cctk::sctk::shell::wlr_layer">wlr_<wbr>layer</a></dt><dt><a class="mod" href="xdg/index.html" title="mod cosmic::cctk::sctk::shell::xdg">xdg</a></dt><dd>Cross desktop group (XDG) shell</dd></dl><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><dl class="item-table"><dt><a class="struct" href="struct.Unsupported.html" title="struct cosmic::cctk::sctk::shell::Unsupported">Unsupported</a></dt><dd>An unsupported operation, often due to the version of the protocol.</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.WaylandSurface.html" title="trait cosmic::cctk::sctk::shell::WaylandSurface">Wayland<wbr>Surface</a></dt><dd>Functionality shared by all <a href="../reexports/client/protocol/wl_surface/struct.WlSurface.html" title="struct cosmic::cctk::sctk::reexports::client::protocol::wl_surface::WlSurface"><code>wl_surface::WlSurface</code></a> backed shell role objects.</dd></dl></section></div></main></body></html>