Skip to content

Commit

Permalink
🚀 update docs from verso repository
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jul 4, 2024
1 parent f3a4112 commit f8952d2
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 43 deletions.
6 changes: 6 additions & 0 deletions docs/src/verso/webview.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ <h2>Files</h2></div></nav><div class="sidebar-resizer"></div>
<a href="#61" id="61">61</a>
<a href="#62" id="62">62</a>
<a href="#63" id="63">63</a>
<a href="#64" id="64">64</a>
<a href="#65" id="65">65</a>
<a href="#66" id="66">66</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::cell::Cell;

<span class="kw">use </span>servo::{base::id::WebViewId, url::ServoUrl};
Expand Down Expand Up @@ -104,6 +107,9 @@ <h2>Files</h2></div></nav><div class="sidebar-resizer"></div>
/// - Navigate to previous page: `window.prompt('PREV')`
/// - Navigate to next page: `window.prompt('FORWARD')`
/// - Refresh the page: `window.prompt('REFRESH')`
/// - Minimize the window: `window.prompt('MINIMIZE')`
/// - Maximize the window: `window.prompt('MAXIMIZE')`
/// - Navigate to a specific URL: `window.prompt('NAVIGATE_TO:${url}')`
</span><span class="kw">pub struct </span>Panel {
id: <span class="prelude-ty">Option</span>&lt;WebViewId&gt;,
}
Expand Down
58 changes: 35 additions & 23 deletions docs/src/verso/window.rs.html
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,12 @@ <h2>Files</h2></div></nav><div class="sidebar-resizer"></div>
<a href="#539" id="539">539</a>
<a href="#540" id="540">540</a>
<a href="#541" id="541">541</a>
<a href="#542" id="542">542</a>
<a href="#543" id="543">543</a>
<a href="#544" id="544">544</a>
<a href="#545" id="545">545</a>
<a href="#546" id="546">546</a>
<a href="#547" id="547">547</a>
</pre></div><pre class="rust"><code><span class="kw">use </span>std::{cell::Cell, ops::Deref, rc::Rc};

<span class="kw">use </span>raw_window_handle::{HasRawDisplayHandle, HasRawWindowHandle};
Expand Down Expand Up @@ -807,30 +813,36 @@ <h2>Files</h2></div></nav><div class="sidebar-resizer"></div>
) =&gt; {
<span class="kw">if let </span><span class="prelude-val">Some</span>(webview) = <span class="kw-2">&amp;</span><span class="self">self</span>.webview {
<span class="kw">let </span>id = webview.id();
<span class="kw">match </span>msg.as_str() {
<span class="string">"PREV" </span>=&gt; {
events.push(EmbedderEvent::Navigation(
id,
TraversalDirection::Back(<span class="number">1</span>),
));
}
<span class="string">"FORWARD" </span>=&gt; {
events.push(EmbedderEvent::Navigation(
id,
TraversalDirection::Forward(<span class="number">1</span>),
));
}
<span class="string">"REFRESH" </span>=&gt; {
events.push(EmbedderEvent::Reload(id));
}
<span class="string">"MINIMIZE" </span>=&gt; {
<span class="self">self</span>.window.set_minimized(<span class="bool-val">true</span>);
}
<span class="string">"MAXIMIZE" </span>=&gt; {
<span class="kw">let </span>is_maximized = <span class="self">self</span>.window.is_maximized();
<span class="self">self</span>.window.set_maximized(!is_maximized);

<span class="kw">if </span>msg.starts_with(<span class="string">"NAVIGATE_TO:"</span>) {
<span class="kw">let </span>url = ServoUrl::parse(msg.strip_prefix(<span class="string">"NAVIGATE_TO:"</span>).unwrap()).unwrap();
events.push(EmbedderEvent::LoadUrl(id, url));
} <span class="kw">else </span>{
<span class="kw">match </span>msg.as_str() {
<span class="string">"PREV" </span>=&gt; {
events.push(EmbedderEvent::Navigation(
id,
TraversalDirection::Back(<span class="number">1</span>),
));
}
<span class="string">"FORWARD" </span>=&gt; {
events.push(EmbedderEvent::Navigation(
id,
TraversalDirection::Forward(<span class="number">1</span>),
));
}
<span class="string">"REFRESH" </span>=&gt; {
events.push(EmbedderEvent::Reload(id));
}
<span class="string">"MINIMIZE" </span>=&gt; {
<span class="self">self</span>.window.set_minimized(<span class="bool-val">true</span>);
}
<span class="string">"MAXIMIZE" </span>=&gt; {
<span class="kw">let </span>is_maximized = <span class="self">self</span>.window.is_maximized();
<span class="self">self</span>.window.set_maximized(!is_maximized);
}
e =&gt; <span class="macro">log::warn!</span>(<span class="string">"Verso Panel isn't supporting this prompt message yet: {e}"</span>)
}
e =&gt; <span class="macro">log::warn!</span>(<span class="string">"Verso Panel isn't supporting this prompt message yet: {e}"</span>)
}
}
<span class="kw">let _ </span>= sender.send(<span class="prelude-val">None</span>);
Expand Down
2 changes: 1 addition & 1 deletion docs/verso/webview/index.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!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="Web view types to handle web browsing contexts."><title>verso::webview - Rust</title><script> if (window.location.protocol !== "file:") document.write(`<link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceSerif4-Regular-46f98efaafac5295.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Regular-018c141bf0843ffd.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/FiraSans-Medium-8f9a781e4970d388.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Regular-562dcc5011b6de7d.ttf.woff2"><link rel="preload" as="font" type="font/woff2" crossorigin href="../../static.files/SourceCodePro-Semibold-d899c5a5c4aeb14a.ttf.woff2">`)</script><link rel="stylesheet" href="../../static.files/normalize-76eba96aa4d2e634.css"><link rel="stylesheet" href="../../static.files/rustdoc-e935ef01ae1c1829.css"><meta name="rustdoc-vars" data-root-path="../../" data-static-root-path="../../static.files/" data-current-crate="verso" data-themes="" data-resource-suffix="" data-rustdoc-version="1.78.0 (9b00956e5 2024-04-29)" data-channel="1.78.0" data-search-js="search-42d8da7a6b9792c2.js" data-settings-js="settings-4313503d2e1961c2.js" ><script src="../../static.files/storage-4c98445ec4002617.js"></script><script defer src="../sidebar-items.js"></script><script defer src="../../static.files/main-12cf3b4f4f9dc36d.js"></script><noscript><link rel="stylesheet" href="../../static.files/noscript-04d5337699b92874.css"></noscript><link rel="alternate icon" type="image/png" href="../../static.files/favicon-16x16-8b506e7a72182f1c.png"><link rel="alternate icon" type="image/png" href="../../static.files/favicon-32x32-422f7d1d52889060.png"><link rel="icon" type="image/svg+xml" href="../../static.files/favicon-2c020d218678b618.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="../../verso/index.html">verso</a><span class="version">0.0.1</span></h2></div><h2 class="location"><a href="#">Module webview</a></h2><div class="sidebar-elems"><section><ul class="block"><li><a href="#structs">Structs</a></li></ul></section><h2><a href="../index.html">In crate verso</a></h2></div></nav><div class="sidebar-resizer"></div>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../verso/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">verso</a>::<wbr><a class="mod" href="#">webview</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/verso/webview.rs.html#1-63">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Web view types to handle web browsing contexts.</p>
<main><div class="width-limiter"><nav class="sub"><form class="search-form"><span></span><div id="sidebar-button" tabindex="-1"><a href="../../verso/all.html" title="show sidebar"></a></div><input class="search-input" name="search" aria-label="Run search in the documentation" autocomplete="off" spellcheck="false" placeholder="Click or press ‘S’ to search, ‘?’ for more options…" type="search"><div id="help-button" tabindex="-1"><a href="../../help.html" title="help">?</a></div><div id="settings-menu" tabindex="-1"><a href="../../settings.html" title="settings"><img width="22" height="22" alt="Change settings" src="../../static.files/wheel-7b819b6101059cd0.svg"></a></div></form></nav><section id="main-content" class="content"><div class="main-heading"><h1>Module <a href="../index.html">verso</a>::<wbr><a class="mod" href="#">webview</a><button id="copy-path" title="Copy item path to clipboard"><img src="../../static.files/clipboard-7571035ce49a181d.svg" width="19" height="18" alt="Copy item path"></button></h1><span class="out-of-band"><a class="src" href="../../src/verso/webview.rs.html#1-66">source</a> · <button id="toggle-all-docs" title="collapse all docs">[<span>&#x2212;</span>]</button></span></div><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Web view types to handle web browsing contexts.</p>
</div></details><h2 id="structs" class="section-header">Structs<a href="#structs" class="anchor">§</a></h2><ul class="item-table"><li><div class="item-name"><a class="struct" href="struct.Panel.html" title="struct verso::webview::Panel">Panel</a></div><div class="desc docblock-short">A panel is a special web view that focus on controlling states around window.
It could be treated as the control panel or navigation bar of the window depending on usages.</div></li><li><div class="item-name"><a class="struct" href="struct.WebView.html" title="struct verso::webview::WebView">WebView</a></div><div class="desc docblock-short">A web view is an area to display web browsing context. It’s what user will treat as a “web page”.</div></li></ul></section></div></main></body></html>
Loading

0 comments on commit f8952d2

Please sign in to comment.