123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659 |
- <!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> (65% 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/Color.html">Color</a>
- </li>
- <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/TerminalAccessory.html">TerminalAccessory</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/Font.html">– Font</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView.html">TerminalView</a>
- </li>
- <li class="nav-group-task">
- <a href="../Classes/TerminalView/Font.html">– Font</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>
- <li class="nav-group-name">
- <a href="../Typealiases.html">Type Aliases</a>
- <ul class="nav-group-tasks">
- <li class="nav-group-task">
- <a href="../Typealiases.html#/s:9SwiftTerm7TTImagea">TTImage</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#L181">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#L184">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC17applicationCursorSbvp"></a>
- <a name="//apple_ref/swift/Property/applicationCursor" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC17applicationCursorSbvp">applicationCursor</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">applicationCursor</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: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#L241">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC15foregroundColorAA0E0Cvp"></a>
- <a name="//apple_ref/swift/Property/foregroundColor" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC15foregroundColorAA0E0Cvp">foregroundColor</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>This tracks the current foreground color for the application.</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">foregroundColor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Color.html">Color</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#L281-L290">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC15backgroundColorAA0E0Cvp"></a>
- <a name="//apple_ref/swift/Property/backgroundColor" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC15backgroundColorAA0E0Cvp">backgroundColor</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>This tracks the current background color for the application.</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">backgroundColor</span><span class="p">:</span> <span class="kt"><a href="../Classes/Color.html">Color</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#L292-L301">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#L307-L355">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#L357-L361">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#L380-L383">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#L385-L394">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC11getCharData3col3rowAA0eF0VSgSi_SitF"></a>
- <a name="//apple_ref/swift/Method/getCharData(col:row:)" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC11getCharData3col3rowAA0eF0VSgSi_SitF">getCharData(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 CharData 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">getCharData</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"><a href="../Structs/CharData.html">CharData</a></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 CharData contained in that cell otherwise</p>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L410-L419">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#L426-L429">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#L2073-L2111">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#L2471-L2474">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#L3665-L3668">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#L3670-L3686">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#L3690-L3695">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#L3697-L3702">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#L3707-L3710">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#L3712-L3715">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#L3717-L3720">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#L3722-L3725">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#L3746-L3750">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#L3756-L3764">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#L3769-L3773">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC17getCursorLocationSi_SityF"></a>
- <a name="//apple_ref/swift/Method/getCursorLocation()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC17getCursorLocationSi_SityF">getCursorLocation()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Zero-based (row, column) of cursor location relative to visible part of display.</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">getCursorLocation</span><span class="p">()</span> <span class="o">-></span> <span class="p">(</span><span class="kt">Int</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#L3778-L3780">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC16getTopVisibleRowSiyF"></a>
- <a name="//apple_ref/swift/Method/getTopVisibleRow()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC16getTopVisibleRowSiyF">getTopVisibleRow()</a>
- </code>
- </div>
- <div class="height-container">
- <div class="pointer-container"></div>
- <section class="section">
- <div class="pointer"></div>
- <div class="abstract">
- <p>Uppermost visible row.</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">getTopVisibleRow</span><span class="p">()</span> <span class="o">-></span> <span class="kt">Int</span></code></pre>
- </div>
- </div>
- <div class="slightly-smaller">
- <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L3785-L3787">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#L3792-L3801">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#L3867-L3937">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#L3939-L3942">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#L4022-L4035">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#L4045-L4055">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#L4057-L4065">Show on GitHub</a>
- </div>
- </section>
- </div>
- </li>
- <li class="item">
- <div>
- <code>
- <a name="/s:9SwiftTerm8TerminalC10hideCursoryyF"></a>
- <a name="//apple_ref/swift/Method/hideCursor()" class="dashAnchor"></a>
- <a class="token" href="#/s:9SwiftTerm8TerminalC10hideCursoryyF">hideCursor()</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">hideCursor</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#L4067-L4074">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#L4101-L4135">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#L4143-L4162">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#L4170-L4173">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#L4187-L4191">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#L4193-L4197">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#L4221-L4236">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-05-30)</p>
- <p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.13.2</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
- </section>
- </article>
- </div>
- </body>
- </div>
- </html>
|