12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <title>Terminal Class Reference</title>
- <link rel="stylesheet" type="text/css" href="../css/jazzy.css" />
- <link rel="stylesheet" type="text/css" href="../css/highlight.css" />
- <meta charset='utf-8'>
- <script src="../js/jquery.min.js" defer></script>
- <script src="../js/jazzy.js" defer></script>
-
- </head>
- <body>
- <a name="//apple_ref/swift/Class/Terminal" class="dashAnchor"></a>
- <a title="Terminal Class Reference"></a>
- <header>
- <div class="content-wrapper">
- <p><a href="../index.html">SwiftTerm 1.0 Docs</a> (61% documented)</p>
- <p class="header-right"><a href="https://github.com/migueldeicaza/SwiftTerm"><img src="../img/gh.png"/>View on GitHub</a></p>
- <p class="header-right"><a href="dash-feed://https%3A%2F%2Fmigueldeicaza%2Egithub%2Eio%2FSwiftTerm%2Fdocsets%2FSwiftTerm%2Exml"><img src="../img/dash.png"/>Install in Dash</a></p>
- </div>
- </header>
- <div class="content-wrapper">
- <p id="breadcrumbs">
- <a href="../index.html">SwiftTerm Reference</a>
- <img id="carat" src="../img/carat.png" />
- Terminal Class Reference
- </p>
- </div>
- <div class="content-wrapper">
- <nav class="sidebar">
- <ul class="nav-groups">
- <li class="nav-group-name">
- <a href="../Classes.html">Classes</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Classes/HeadlessTerminal.html">HeadlessTerminal</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/LocalProcess.html">LocalProcess</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/LocalProcessTerminalView.html">LocalProcessTerminalView</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/PseudoTerminalHelpers.html">PseudoTerminalHelpers</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/Terminal.html">Terminal</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/Terminal/MouseMode.html">– MouseMode</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/Terminal/WindowManipulationCommand.html">– WindowManipulationCommand</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalDebugView.html">TerminalDebugView</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView.html">TerminalView</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView/Options.html">– Options</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView.html">TerminalView</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView/Options.html">– Options</a>
- </li>
- </ul>
- </li>
- <li class="nav-group-name">
- <a href="../Enums.html">Enumerations</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Enums/CursorStyle.html">CursorStyle</a>
- </li>
- </ul>
- </li>
- <li class="nav-group-name">
- <a href="../Extensions.html">Extensions</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Extensions/TerminalViewDelegate.html">TerminalViewDelegate</a>
- </li>
- </ul>
- </li>
- <li class="nav-group-name">
- <a href="../Protocols.html">Protocols</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a>
- </li>
- <li class="nav-group-task">
- <a href="../Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a>
- </li>
- <li class="nav-group-task">
- <a href="../Protocols/TerminalDelegate.html">TerminalDelegate</a>
- </li>
- <li class="nav-group-task">
- <a href="../Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a>
- </li>
- </ul>
- </li>
- <li class="nav-group-name">
- <a href="../Structs.html">Structures</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Structs/Attribute.html">Attribute</a>
- </li>
- <li class="nav-group-task">
- <a href="../Structs/Attribute/Color.html">– Color</a>
- </li>
- <li class="nav-group-task">
- <a href="../Structs/CharData.html">CharData</a>
- </li>
- <li class="nav-group-task">
- <a href="../Structs/CharacterStyle.html">CharacterStyle</a>
- </li>
- <li class="nav-group-task">
- <a href="../Structs/TerminalOptions.html">TerminalOptions</a>
- </li>
- <li class="nav-group-task">
- <a href="../Structs/TinyAtom.html">TinyAtom</a>
- </li>
- </ul>
- </li>
- </ul>
- </nav>
- <article class="main-content">
- <section>
- <section class="section">
- <h1>Terminal</h1>
- <div class="declaration">
- <div class="language">
- <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Terminal</span></code></pre>
- </div>
- </div>
- <p>The <code>Terminal</code> class provides the terminal emulation engine, and can be used to feed data to the
- terminal emulator. Typically users will intereact with a higher-level implementation that provides a
- UI toolkit-specific rendering and connects the input to the UI toolkit.</p>
- <p>A front-end would draw the contents of the terminal, and take input from the user, which is in turn
- either mapped to one of the public APIs here, or if it is user input is passed to the <code>feed</code> methods here.</p>
- <p>The terminal is also connected to a backend that is conneted to the client, and data from this
- client is fed into the emulator by calling the <code>sendResponse method</code></p>
- <p>The behavior of the terminal is configured by implementing the <code><a href="../Protocols/TerminalDelegate.html">TerminalDelegate</a></code> protocol
- that is provided in the constructor call.</p>
- </section>
- <section class="section task-group-section">
- <div class="task-group">
- <ul>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC4colsSivp"></a>
- <a name="//apple_ref/swift/Property/cols" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC4colsSivp">cols</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>The current terminal columns (counting from 1)</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">cols</span><span class="p">:</span> <span class="kt">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L150">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC4rowsSivp"></a>
- <a name="//apple_ref/swift/Property/rows" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC4rowsSivp">rows</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>The current terminal rows (counting from 1)</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">rows</span><span class="p">:</span> <span class="kt">Int</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L153">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC20hostCurrentDirectorySSSgvp"></a>
- <a name="//apple_ref/swift/Property/hostCurrentDirectory" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC20hostCurrentDirectorySSSgvp">hostCurrentDirectory</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>This variable if set, contains an URI representing the host and directory of the process running in the terminal
- it is often used by applciations to track the working directory. It might be nil, or might not be correct, the
- contents are entirely under the control of the remote application, and require the terminal to be trusted
- (see the <code>isProcessTrusted</code> method in the <code><a href="../Protocols/TerminalDelegate.html">TerminalDelegate</a></code>). When this is set the
- <code>hostCurrentDirectoryUpdated</code> method on the delegate is invoked.</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">hostCurrentDirectory</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="p">{</span> <span class="k">get</span> <span class="p">}</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L210">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC9MouseModeO"></a>
- <a name="//apple_ref/swift/Enum/MouseMode" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC9MouseModeO">MouseMode</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Represents the mouse operation mode that the terminal is currently using and higher level
- implementations should use the functions in this enumeration to determine what events to
- send</p>
- <a href="../Classes/Terminal/MouseMode.html" class="slightly-smaller">See more</a>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">MouseMode</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L249-L297">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC9mouseModeAC05MouseE0Ovp"></a>
- <a name="//apple_ref/swift/Property/mouseMode" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC9mouseModeAC05MouseE0Ovp">mouseMode</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">private(set)</span> <span class="k">var</span> <span class="nv">mouseMode</span><span class="p">:</span> <span class="kt"><a href="../Classes/Terminal/MouseMode.html">MouseMode</a></span> <span class="p">{</span> <span class="k">get</span> <span class="k">set</span> <span class="p">}</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L299-L303">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC7getDimsSi4cols_Si4rowstyF"></a>
- <a name="//apple_ref/swift/Method/getDims()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC7getDimsSi4cols_Si4rowstyF">getDims()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">getDims</span><span class="p">()</span> <span class="o">-></span> <span class="p">(</span><span class="nv">cols</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">rows</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L322-L325">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC8delegate7optionsAcA0C8Delegate_p_AA0C7OptionsVtcfc"></a>
- <a name="//apple_ref/swift/Method/init(delegate:options:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC8delegate7optionsAcA0C8Delegate_p_AA0C7OptionsVtcfc">init(delegate:<wbr>options:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="nf">init</span><span class="p">(</span><span class="nv">delegate</span><span class="p">:</span> <span class="kt"><a href="../Protocols/TerminalDelegate.html">TerminalDelegate</a></span><span class="p">,</span> <span class="nv">options</span><span class="p">:</span> <span class="kt"><a href="../Structs/TerminalOptions.html">TerminalOptions</a></span> <span class="o">=</span> <span class="kt"><a href="../Structs/TerminalOptions.html">TerminalOptions</a></span><span class="o">.</span><span class="k">default</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L327-L336">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12getCharacter3col3rowSJSgSi_SitF"></a>
- <a name="//apple_ref/swift/Method/getCharacter(col:row:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12getCharacter3col3rowSJSgSi_SitF">getCharacter(col:<wbr>row:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Returns the character at the specified column and row, these are zero-based</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">getCharacter</span><span class="p">(</span><span class="nv">col</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">row</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Character</span><span class="p">?</span></code></pre>
- </div>
- </div>
- <div>
- <h4>Parameters</h4>
- <table class="graybox">
- <tbody>
- <tr>
- <td>
- <code>
- <em>col</em>
- </code>
- </td>
- <td>
- <div>
- <p>column to retrieve, starts at 0</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>row</em>
- </code>
- </td>
- <td>
- <div>
- <p>row to retrieve, starts at 0</p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div>
- <h4>Return Value</h4>
- <p>nil if the col or row are out of bounds, or the Character contained in that cell otherwise</p>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L352-L361">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC25WindowManipulationCommandO"></a>
- <a name="//apple_ref/swift/Enum/WindowManipulationCommand" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC25WindowManipulationCommandO">WindowManipulationCommand</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Commands send to the <code>windowCommand</code> delegate for the front-end to implement capabilities
- on behalf of the client. The expected return strings in some of these enumeration values is documented
- below. Returns are only expected for the enum values that start with the prefix <code>report</code></p>
- <a href="../Classes/Terminal/WindowManipulationCommand.html" class="slightly-smaller">See more</a>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">enum</span> <span class="kt">WindowManipulationCommand</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L1937-L1975">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC9softResetyyF"></a>
- <a name="//apple_ref/swift/Method/softReset()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC9softResetyyF">softReset()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Performs a terminal soft-reset, the equivalent of the DECSTR sequence
- For a full reset see <code>resetToInitialState</code></p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">softReset</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L2331-L2334">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12sendResponse4textySS_tF"></a>
- <a name="//apple_ref/swift/Method/sendResponse(text:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12sendResponse4textySS_tF">sendResponse(text:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Sends the provided text to the connected backend</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">sendResponse</span><span class="p">(</span><span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3504-L3507">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12sendResponseyyypd_tF"></a>
- <a name="//apple_ref/swift/Method/sendResponse(_:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12sendResponseyyypd_tF">sendResponse(_:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">sendResponse</span><span class="p">(</span><span class="n">_</span> <span class="nv">items</span><span class="p">:</span> <span class="kt">Any</span><span class="o">...</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3509-L3523">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC9silentLogSbvp"></a>
- <a name="//apple_ref/swift/Property/silentLog" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC9silentLogSbvp">silentLog</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="k">var</span> <span class="nv">silentLog</span><span class="p">:</span> <span class="kt">Bool</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC5erroryySSF"></a>
- <a name="//apple_ref/swift/Method/error(_:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC5erroryySSF">error(_:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">error</span><span class="p">(</span><span class="n">_</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3527-L3532">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC3logyySSF"></a>
- <a name="//apple_ref/swift/Method/log(_:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC3logyySSF">log(_:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">log</span><span class="p">(</span><span class="n">_</span> <span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3534-L3539">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC4feed9byteArrayySays5UInt8VG_tF"></a>
- <a name="//apple_ref/swift/Method/feed(byteArray:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC4feed9byteArrayySays5UInt8VG_tF">feed(byteArray:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Processes the provided byte-array coming from the backend</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">feed</span><span class="p">(</span><span class="nv">byteArray</span><span class="p">:</span> <span class="p">[</span><span class="kt">UInt8</span><span class="p">])</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3544-L3547">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC4feed4textySS_tF"></a>
- <a name="//apple_ref/swift/Method/feed(text:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC4feed4textySS_tF">feed(text:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">feed</span><span class="p">(</span><span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3549-L3552">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC4feed6bufferys10ArraySliceVys5UInt8VG_tF"></a>
- <a name="//apple_ref/swift/Method/feed(buffer:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC4feed6bufferys10ArraySliceVys5UInt8VG_tF">feed(buffer:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">feed</span><span class="p">(</span><span class="nv">buffer</span><span class="p">:</span> <span class="kt">ArraySlice</span><span class="o"><</span><span class="kt">UInt8</span><span class="o">></span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3554-L3557">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC5parse6bufferys10ArraySliceVys5UInt8VG_tF"></a>
- <a name="//apple_ref/swift/Method/parse(buffer:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC5parse6bufferys10ArraySliceVys5UInt8VG_tF">parse(buffer:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">parse</span><span class="p">(</span><span class="nv">buffer</span><span class="p">:</span> <span class="kt">ArraySlice</span><span class="o"><</span><span class="kt">UInt8</span><span class="o">></span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3559-L3562">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC16updateFullScreenyyF"></a>
- <a name="//apple_ref/swift/Method/updateFullScreen()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC16updateFullScreenyyF">updateFullScreen()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">updateFullScreen</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3583-L3587">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC14getUpdateRangeSi6startY_Si4endYtSgyF"></a>
- <a name="//apple_ref/swift/Method/getUpdateRange()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC14getUpdateRangeSi6startY_Si4endYtSgyF">getUpdateRange()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Returns the starting and ending lines that need to be redrawn, or nil
- if no part of the screen needs to be updated.</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">getUpdateRange</span><span class="p">()</span> <span class="o">-></span> <span class="p">(</span><span class="nv">startY</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">endY</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)?</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3593-L3601">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC16clearUpdateRangeyyF"></a>
- <a name="//apple_ref/swift/Method/clearUpdateRange()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC16clearUpdateRangeyyF">clearUpdateRange()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Clears the state of the pending display redraw region.</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">clearUpdateRange</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3606-L3610">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC19resetToInitialStateyyF"></a>
- <a name="//apple_ref/swift/Method/resetToInitialState()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC19resetToInitialStateyyF">resetToInitialState()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>This performs a full reset of the terminal, like a soft reset, but additionally resets the buffer conents and scroll area.
- for a soft reset see <code>softReset</code></p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">resetToInitialState</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3616-L3625">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC6scroll9isWrappedySb_tF"></a>
- <a name="//apple_ref/swift/Method/scroll(isWrapped:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC6scroll9isWrappedySb_tF">scroll(isWrapped:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">scroll</span><span class="p">(</span><span class="nv">isWrapped</span><span class="p">:</span> <span class="kt">Bool</span> <span class="o">=</span> <span class="kc">false</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3647-L3717">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12emitLineFeedyyF"></a>
- <a name="//apple_ref/swift/Method/emitLineFeed()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12emitLineFeedyyF">emitLineFeed()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">emitLineFeed</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3719-L3722">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC6resize4cols4rowsySi_SitF"></a>
- <a name="//apple_ref/swift/Method/resize(cols:rows:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC6resize4cols4rowsySi_SitF">resize(cols:<wbr>rows:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">resize</span><span class="p">(</span><span class="nv">cols</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">rows</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3802-L3815">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC7refresh8startRow03endF0ySi_SitF"></a>
- <a name="//apple_ref/swift/Method/refresh(startRow:endRow:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC7refresh8startRow03endF0ySi_SitF">refresh(startRow:<wbr>endRow:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Registers that the region between startRow and endRow was modified and needs to be updated by the</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">refresh</span><span class="p">(</span><span class="nv">startRow</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">endRow</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3825-L3835">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC10showCursoryyF"></a>
- <a name="//apple_ref/swift/Method/showCursor()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC10showCursoryyF">showCursor()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">showCursor</span><span class="p">()</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3837-L3845">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12encodeButton6button7release5shift4meta7controlS2i_S4btF"></a>
- <a name="//apple_ref/swift/Method/encodeButton(button:release:shift:meta:control:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12encodeButton6button7release5shift4meta7controlS2i_S4btF">encodeButton(button:<wbr>release:<wbr>shift:<wbr>meta:<wbr>control:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Encodes the button action in the format expected by the client</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">encodeButton</span><span class="p">(</span><span class="nv">button</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">release</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">shift</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">meta</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">,</span> <span class="nv">control</span><span class="p">:</span> <span class="kt">Bool</span><span class="p">)</span> <span class="o">-></span> <span class="kt">Int</span></code></pre>
- </div>
- </div>
- <div>
- <h4>Parameters</h4>
- <table class="graybox">
- <tbody>
- <tr>
- <td>
- <code>
- <em>button</em>
- </code>
- </td>
- <td>
- <div>
- <p>The button to encode</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>release</em>
- </code>
- </td>
- <td>
- <div>
- <p><code>true</code> if this is a mouse release event</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>shift</em>
- </code>
- </td>
- <td>
- <div>
- <p><code>true</code> if the shift key is pressed</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>meta</em>
- </code>
- </td>
- <td>
- <div>
- <p><code>true</code> if the meta/alt key is pressed</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>control</em>
- </code>
- </td>
- <td>
- <div>
- <p><code>true</code> if the control key is pressed</p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div>
- <h4>Return Value</h4>
- <p>the encoded value</p>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3872-L3906">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC9sendEvent11buttonFlags1x1yySi_S2itF"></a>
- <a name="//apple_ref/swift/Method/sendEvent(buttonFlags:x:y:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC9sendEvent11buttonFlags1x1yySi_S2itF">sendEvent(buttonFlags:<wbr>x:<wbr>y:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Sends a mouse event for a specific button at the specific location</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">sendEvent</span><span class="p">(</span><span class="nv">buttonFlags</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">x</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div>
- <h4>Parameters</h4>
- <table class="graybox">
- <tbody>
- <tr>
- <td>
- <code>
- <em>buttonFlags</em>
- </code>
- </td>
- <td>
- <div>
- <p>Button flags encoded in Cb mode.</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>x</em>
- </code>
- </td>
- <td>
- <div>
- <p>X coordinate for the event</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>y</em>
- </code>
- </td>
- <td>
- <div>
- <p>Y coordinate for the event</p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3914-L3933">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC10sendMotion11buttonFlags1x1yySi_S2itF"></a>
- <a name="//apple_ref/swift/Method/sendMotion(buttonFlags:x:y:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC10sendMotion11buttonFlags1x1yySi_S2itF">sendMotion(buttonFlags:<wbr>x:<wbr>y:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Sends a mouse motion event for a specific button at the specific location</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">sendMotion</span><span class="p">(</span><span class="nv">buttonFlags</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">x</span><span class="p">:</span> <span class="kt">Int</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="kt">Int</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div>
- <h4>Parameters</h4>
- <table class="graybox">
- <tbody>
- <tr>
- <td>
- <code>
- <em>buttonFlags</em>
- </code>
- </td>
- <td>
- <div>
- <p>Button flags encoded in Cb mode.</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>x</em>
- </code>
- </td>
- <td>
- <div>
- <p>X coordinate for the event</p>
- </div>
- </td>
- </tr>
- <tr>
- <td>
- <code>
- <em>y</em>
- </code>
- </td>
- <td>
- <div>
- <p>Y coordinate for the event</p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3941-L3944">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC8setTitle4textySS_tF"></a>
- <a name="//apple_ref/swift/Method/setTitle(text:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC8setTitle4textySS_tF">setTitle(text:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setTitle</span><span class="p">(</span><span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3958-L3962">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC12setIconTitle4textySS_tF"></a>
- <a name="//apple_ref/swift/Method/setIconTitle(text:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC12setIconTitle4textySS_tF">setIconTitle(text:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Undocumented</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">func</span> <span class="nf">setIconTitle</span><span class="p">(</span><span class="nv">text</span><span class="p">:</span> <span class="kt">String</span><span class="p">)</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3964-L3968">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC23getEnvironmentVariables8termNameSaySSGSSSg_tFZ"></a>
- <a name="//apple_ref/swift/Method/getEnvironmentVariables(termName:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC23getEnvironmentVariables8termNameSaySSGSSSg_tFZ">getEnvironmentVariables(termName:<wbr>)</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Provides a baseline set of environment variables that would be useful to run the terminal,
- you can customzie these accordingly.</p>
- </div>
- <div class="declaration">
- <h4>Declaration</h4>
- <div class="language">
- <p class="aside-title">Swift</p>
- <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">static</span> <span class="kd">func</span> <span class="nf">getEnvironmentVariables</span><span class="p">(</span><span class="nv">termName</span><span class="p">:</span> <span class="kt">String</span><span class="p">?</span> <span class="o">=</span> <span class="kc">nil</span><span class="p">)</span> <span class="o">-></span> <span class="p">[</span><span class="kt">String</span><span class="p">]</span></code></pre>
- </div>
- </div>
- <div>
- <h4>Return Value</h4>
- <p></p>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3992-L4007">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- </ul>
- </div>
- </section>
- </section>
- <section id="footer">
- <p>© 2020 <a class="link" href="https://tirania.org/" target="_blank" rel="external">Miguel de Icaza</a>. All rights reserved. (Last updated: 2020-04-28)</p>
- <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.3</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
- </section>
- </article>
- </div>
- </body>
- </div>
- </html>
|