aboutsummaryrefslogtreecommitdiffstats
path: root/ios.html
blob: 45f98ad8cea2c75549145a60952d10dc1a287edf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="Content-Style-Type" content="text/css" />
  <meta name="generator" content="pandoc" />
  <title>Module ios</title>
  <style type="text/css">code{white-space: pre;}</style>
  <link rel="stylesheet" href="rust.css" type="text/css" />
</head>
<body>
<div id="header">
<h1 class="title">Module ios</h1>
</div>
<div class='index'>

<ul>
<li><a href="#function-cbreak">Function <code>cbreak</code></a> - Put the terminal into cbreak mode.</li>
<li><a href="#function-cooked">Function <code>cooked</code></a> - Put the terminal into cooked mode.</li>
<li><a href="#function-echo">Function <code>echo</code></a> - Change the echo mode of the terminal.</li>
<li><a href="#function-preserve">Function <code>preserve</code></a> - Run a block of code, restoring the terminal state when the block ends.</li>
<li><a href="#function-raw">Function <code>raw</code></a> - Put the terminal into raw mode.</li>
<li><a href="#function-size">Function <code>size</code></a> - Returns the size of the terminal, as <code>(columns, rows)</code>.</li>
</ul>
</div>

<div class="section level2" id="function-cbreak">
<h2>Function <code>cbreak</code></h2>
<pre><code>fn cbreak() -&gt; int</code></pre>
<p>Put the terminal into cbreak mode.</p>
<p>This is the normal unbuffered mode.</p>
</div>
<div class="section level2" id="function-cooked">
<h2>Function <code>cooked</code></h2>
<pre><code>fn cooked() -&gt; int</code></pre>
<p>Put the terminal into cooked mode.</p>
<p>This is the normal line-buffered mode.</p>
</div>
<div class="section level2" id="function-echo">
<h2>Function <code>echo</code></h2>
<pre><code>fn echo(enable: bool) -&gt; int</code></pre>
<p>Change the echo mode of the terminal.</p>
<p><code>true</code> turns echo on, and <code>false</code> turns echo off.</p>
</div>
<div class="section level2" id="function-preserve">
<h2>Function <code>preserve</code></h2>
<pre><code>fn preserve&lt;T&gt;(body: &amp;fn() -&gt; T) -&gt; T</code></pre>
<p>Run a block of code, restoring the terminal state when the block ends.</p>
<p>This will ensure you don't leave the terminal in a broken state, even if the current task fails.</p>
</div>
<div class="section level2" id="function-raw">
<h2>Function <code>raw</code></h2>
<pre><code>fn raw() -&gt; int</code></pre>
<p>Put the terminal into raw mode.</p>
<p>This is like cbreak mode, except that control characters (like ^C) are not translated into signals.</p>
</div>
<div class="section level2" id="function-size">
<h2>Function <code>size</code></h2>
<pre><code>fn size() -&gt; (uint, uint)</code></pre>
<p>Returns the size of the terminal, as <code>(columns, rows)</code>.</p>
</div>
</body>
</html>