Classes.html 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <title>Classes Reference</title>
  5. <link rel="stylesheet" type="text/css" href="css/jazzy.css" />
  6. <link rel="stylesheet" type="text/css" href="css/highlight.css" />
  7. <meta charset='utf-8'>
  8. <script src="js/jquery.min.js" defer></script>
  9. <script src="js/jazzy.js" defer></script>
  10. </head>
  11. <body>
  12. <a name="//apple_ref/swift/Section/Classes" class="dashAnchor"></a>
  13. <a title="Classes Reference"></a>
  14. <header>
  15. <div class="content-wrapper">
  16. <p><a href="index.html">SwiftTerm 1.0 Docs</a> (65% documented)</p>
  17. <p class="header-right"><a href="https://github.com/migueldeicaza/SwiftTerm"><img src="img/gh.png"/>View on GitHub</a></p>
  18. <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>
  19. </div>
  20. </header>
  21. <div class="content-wrapper">
  22. <p id="breadcrumbs">
  23. <a href="index.html">SwiftTerm Reference</a>
  24. <img id="carat" src="img/carat.png" />
  25. Classes Reference
  26. </p>
  27. </div>
  28. <div class="content-wrapper">
  29. <nav class="sidebar">
  30. <ul class="nav-groups">
  31. <li class="nav-group-name">
  32. <a href="Classes.html">Classes</a>
  33. <ul class="nav-group-tasks">
  34. <li class="nav-group-task">
  35. <a href="Classes/Color.html">Color</a>
  36. </li>
  37. <li class="nav-group-task">
  38. <a href="Classes/HeadlessTerminal.html">HeadlessTerminal</a>
  39. </li>
  40. <li class="nav-group-task">
  41. <a href="Classes/LocalProcess.html">LocalProcess</a>
  42. </li>
  43. <li class="nav-group-task">
  44. <a href="Classes/LocalProcessTerminalView.html">LocalProcessTerminalView</a>
  45. </li>
  46. <li class="nav-group-task">
  47. <a href="Classes/PseudoTerminalHelpers.html">PseudoTerminalHelpers</a>
  48. </li>
  49. <li class="nav-group-task">
  50. <a href="Classes/Terminal.html">Terminal</a>
  51. </li>
  52. <li class="nav-group-task">
  53. <a href="Classes/Terminal/MouseMode.html">– MouseMode</a>
  54. </li>
  55. <li class="nav-group-task">
  56. <a href="Classes/Terminal/WindowManipulationCommand.html">– WindowManipulationCommand</a>
  57. </li>
  58. <li class="nav-group-task">
  59. <a href="Classes/TerminalAccessory.html">TerminalAccessory</a>
  60. </li>
  61. <li class="nav-group-task">
  62. <a href="Classes/TerminalDebugView.html">TerminalDebugView</a>
  63. </li>
  64. <li class="nav-group-task">
  65. <a href="Classes/TerminalView.html">TerminalView</a>
  66. </li>
  67. <li class="nav-group-task">
  68. <a href="Classes/TerminalView/Font.html">– Font</a>
  69. </li>
  70. <li class="nav-group-task">
  71. <a href="Classes/TerminalView.html">TerminalView</a>
  72. </li>
  73. <li class="nav-group-task">
  74. <a href="Classes/TerminalView/Font.html">– Font</a>
  75. </li>
  76. </ul>
  77. </li>
  78. <li class="nav-group-name">
  79. <a href="Enums.html">Enumerations</a>
  80. <ul class="nav-group-tasks">
  81. <li class="nav-group-task">
  82. <a href="Enums/CursorStyle.html">CursorStyle</a>
  83. </li>
  84. </ul>
  85. </li>
  86. <li class="nav-group-name">
  87. <a href="Extensions.html">Extensions</a>
  88. <ul class="nav-group-tasks">
  89. <li class="nav-group-task">
  90. <a href="Extensions/TerminalViewDelegate.html">TerminalViewDelegate</a>
  91. </li>
  92. </ul>
  93. </li>
  94. <li class="nav-group-name">
  95. <a href="Protocols.html">Protocols</a>
  96. <ul class="nav-group-tasks">
  97. <li class="nav-group-task">
  98. <a href="Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a>
  99. </li>
  100. <li class="nav-group-task">
  101. <a href="Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a>
  102. </li>
  103. <li class="nav-group-task">
  104. <a href="Protocols/TerminalDelegate.html">TerminalDelegate</a>
  105. </li>
  106. <li class="nav-group-task">
  107. <a href="Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a>
  108. </li>
  109. </ul>
  110. </li>
  111. <li class="nav-group-name">
  112. <a href="Structs.html">Structures</a>
  113. <ul class="nav-group-tasks">
  114. <li class="nav-group-task">
  115. <a href="Structs/Attribute.html">Attribute</a>
  116. </li>
  117. <li class="nav-group-task">
  118. <a href="Structs/Attribute/Color.html">– Color</a>
  119. </li>
  120. <li class="nav-group-task">
  121. <a href="Structs/CharData.html">CharData</a>
  122. </li>
  123. <li class="nav-group-task">
  124. <a href="Structs/CharacterStyle.html">CharacterStyle</a>
  125. </li>
  126. <li class="nav-group-task">
  127. <a href="Structs/TerminalOptions.html">TerminalOptions</a>
  128. </li>
  129. <li class="nav-group-task">
  130. <a href="Structs/TinyAtom.html">TinyAtom</a>
  131. </li>
  132. </ul>
  133. </li>
  134. <li class="nav-group-name">
  135. <a href="Typealiases.html">Type Aliases</a>
  136. <ul class="nav-group-tasks">
  137. <li class="nav-group-task">
  138. <a href="Typealiases.html#/s:9SwiftTerm7TTImagea">TTImage</a>
  139. </li>
  140. </ul>
  141. </li>
  142. </ul>
  143. </nav>
  144. <article class="main-content">
  145. <section>
  146. <section class="section">
  147. <h1>Classes</h1>
  148. <p>The following classes are available globally.</p>
  149. </section>
  150. <section class="section task-group-section">
  151. <div class="task-group">
  152. <ul>
  153. <li class="item">
  154. <div>
  155. <code>
  156. <a name="/c:@M@SwiftTerm@objc(cs)TerminalView"></a>
  157. <a name="//apple_ref/swift/Class/TerminalView" class="dashAnchor"></a>
  158. <a class="token" href="#/c:@M@SwiftTerm@objc(cs)TerminalView">TerminalView</a>
  159. </code>
  160. </div>
  161. <div class="height-container">
  162. <div class="pointer-container"></div>
  163. <section class="section">
  164. <div class="pointer"></div>
  165. <div class="abstract">
  166. <p>TerminalView provides an AppKit front-end to the <code><a href="Classes/Terminal.html">Terminal</a></code> termininal emulator.
  167. It is up to a subclass to either wire the terminal emulator to a remote terminal
  168. via some socket, to an application that wants to run with terminal emulation, or
  169. wiring this up to a pseudo-terminal.</p>
  170. <p>Users are notified of interesting events in their implementation of the <code><a href="Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a></code>
  171. methods - an instance must be provided to the constructor of <code>TerminalView</code>.</p>
  172. <p>Developers might want to surface UIs for <code>optionAsMetaKey</code> and <code>allowMouseReporting</code> in
  173. their application. They both default to true, but this means that Option-Letter is hijacked for
  174. terminal purposes to send the sequence ESC-Letter, instead of the macOS specific character` and
  175. means that when mouse-aware applications are running, they hijack the normal selection process.</p>
  176. <p>Call the <code>getTerminal</code> method to get a reference to the underlying <code><a href="Classes/Terminal.html">Terminal</a></code> that backs this
  177. view.</p>
  178. <p>Use the <code>configureNativeColors()</code> to set the defaults colors for the view to match the OS
  179. defaults, otherwise, this uses its own set of defaults colors.</p>
  180. <a href="Classes/TerminalView.html" class="slightly-smaller">See more</a>
  181. </div>
  182. <div class="declaration">
  183. <h4>Declaration</h4>
  184. <div class="language">
  185. <p class="aside-title">Swift</p>
  186. <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">TerminalView</span> <span class="p">:</span> <span class="kt">NSView</span><span class="p">,</span> <span class="kt">NSTextInputClient</span><span class="p">,</span> <span class="kt">NSUserInterfaceValidations</span></code></pre>
  187. <pre class="highlight swift"><code><span class="kd">extension</span> <span class="kt">TerminalView</span><span class="p">:</span> <span class="kt"><a href="Protocols/TerminalDelegate.html">TerminalDelegate</a></span></code></pre>
  188. </div>
  189. </div>
  190. <div class="slightly-smaller">
  191. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Mac/MacTerminalView.swift#L38-L982">Show on GitHub</a>
  192. </div>
  193. </section>
  194. </div>
  195. </li>
  196. <li class="item">
  197. <div>
  198. <code>
  199. <a name="/s:9SwiftTerm5ColorC"></a>
  200. <a name="//apple_ref/swift/Class/Color" class="dashAnchor"></a>
  201. <a class="token" href="#/s:9SwiftTerm5ColorC">Color</a>
  202. </code>
  203. </div>
  204. <div class="height-container">
  205. <div class="pointer-container"></div>
  206. <section class="section">
  207. <div class="pointer"></div>
  208. <div class="abstract">
  209. <p>This represents the colors used in SwiftTerm, in particular for cells and backgrounds
  210. in 16-bit RGB mode</p>
  211. <a href="Classes/Color.html" class="slightly-smaller">See more</a>
  212. </div>
  213. <div class="declaration">
  214. <h4>Declaration</h4>
  215. <div class="language">
  216. <p class="aside-title">Swift</p>
  217. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">Color</span> <span class="p">:</span> <span class="kt">Hashable</span></code></pre>
  218. </div>
  219. </div>
  220. <div class="slightly-smaller">
  221. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Colors.swift#L15-L320">Show on GitHub</a>
  222. </div>
  223. </section>
  224. </div>
  225. </li>
  226. <li class="item">
  227. <div>
  228. <code>
  229. <a name="/s:9SwiftTerm16HeadlessTerminalC"></a>
  230. <a name="//apple_ref/swift/Class/HeadlessTerminal" class="dashAnchor"></a>
  231. <a class="token" href="#/s:9SwiftTerm16HeadlessTerminalC">HeadlessTerminal</a>
  232. </code>
  233. </div>
  234. <div class="height-container">
  235. <div class="pointer-container"></div>
  236. <section class="section">
  237. <div class="pointer"></div>
  238. <div class="abstract">
  239. <p>A <code>HeadlessTerminal</code> provides a terminal emulator that runs a local process, but the output does not go
  240. anywhere. You can use this to script applications and screen scrape the output for example, by accessing the
  241. <code>terminal</code> from this class.</p>
  242. <a href="Classes/HeadlessTerminal.html" class="slightly-smaller">See more</a>
  243. </div>
  244. <div class="declaration">
  245. <h4>Declaration</h4>
  246. <div class="language">
  247. <p class="aside-title">Swift</p>
  248. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">HeadlessTerminal</span> <span class="p">:</span> <span class="kt"><a href="Protocols/TerminalDelegate.html">TerminalDelegate</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a></span></code></pre>
  249. </div>
  250. </div>
  251. <div class="slightly-smaller">
  252. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/HeadlessTerminal.swift#L15-L63">Show on GitHub</a>
  253. </div>
  254. </section>
  255. </div>
  256. </li>
  257. <li class="item">
  258. <div>
  259. <code>
  260. <a name="/s:9SwiftTerm12LocalProcessC"></a>
  261. <a name="//apple_ref/swift/Class/LocalProcess" class="dashAnchor"></a>
  262. <a class="token" href="#/s:9SwiftTerm12LocalProcessC">LocalProcess</a>
  263. </code>
  264. </div>
  265. <div class="height-container">
  266. <div class="pointer-container"></div>
  267. <section class="section">
  268. <div class="pointer"></div>
  269. <div class="abstract">
  270. <p>This class provides the capabilities to launch a local Unix process, and connect it to a <code><a href="Classes/Terminal.html">Terminal</a></code>
  271. class or subclass.</p>
  272. <p>The <code>MacLocalTerminalView</code> is an example of this, it is a subclass of the
  273. <code>MacTerminalView</code> NSView, and it connects that view to the local system, providing a complete
  274. terminal emulator connected to running local commands.</p>
  275. <p>When you create an instance of <code>LocalProcess</code>, you provide a delegate that is used to notify
  276. your application when data is received from the lcoal process, to request the desired window size
  277. that you would like to give to the child process, and when the process terminates.</p>
  278. <p>Once you create this instance, you can start a child process by calling the <code>startProcess</code> method
  279. which will start the process. You can then send data to this underlying process using the
  280. <code>send(data:)</code> method, and you will receive the output on the provided delegate with the
  281. <code>dataReceived(slice:)</code> method.</p>
  282. <p>Received data is dispatched via the queue that you provide in the LocalProcess constructor, if none
  283. is provided, this will default to <code>DispatchQueue.main</code>. Generally, this is a good default, but if you
  284. have your own main loop or a different dispatching system, you will need to pass your own (for example,
  285. the <code><a href="Classes/HeadlessTerminal.html">HeadlessTerminal</a></code> implementation in the test suite does this.</p>
  286. <a href="Classes/LocalProcess.html" class="slightly-smaller">See more</a>
  287. </div>
  288. <div class="declaration">
  289. <h4>Declaration</h4>
  290. <div class="language">
  291. <p class="aside-title">Swift</p>
  292. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">LocalProcess</span></code></pre>
  293. </div>
  294. </div>
  295. <div class="slightly-smaller">
  296. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/LocalProcess.swift#L48-L215">Show on GitHub</a>
  297. </div>
  298. </section>
  299. </div>
  300. </li>
  301. <li class="item">
  302. <div>
  303. <code>
  304. <a name="/c:@M@SwiftTerm@objc(cs)TerminalDebugView"></a>
  305. <a name="//apple_ref/swift/Class/TerminalDebugView" class="dashAnchor"></a>
  306. <a class="token" href="#/c:@M@SwiftTerm@objc(cs)TerminalDebugView">TerminalDebugView</a>
  307. </code>
  308. </div>
  309. <div class="height-container">
  310. <div class="pointer-container"></div>
  311. <section class="section">
  312. <div class="pointer"></div>
  313. <div class="abstract">
  314. <p>Undocumented</p>
  315. <a href="Classes/TerminalDebugView.html" class="slightly-smaller">See more</a>
  316. </div>
  317. <div class="declaration">
  318. <h4>Declaration</h4>
  319. <div class="language">
  320. <p class="aside-title">Swift</p>
  321. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">TerminalDebugView</span> <span class="p">:</span> <span class="kt">NSView</span></code></pre>
  322. </div>
  323. </div>
  324. <div class="slightly-smaller">
  325. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Mac/MacDebugView.swift#L11-L126">Show on GitHub</a>
  326. </div>
  327. </section>
  328. </div>
  329. </li>
  330. <li class="item">
  331. <div>
  332. <code>
  333. <a name="/c:@M@SwiftTerm@objc(cs)LocalProcessTerminalView"></a>
  334. <a name="//apple_ref/swift/Class/LocalProcessTerminalView" class="dashAnchor"></a>
  335. <a class="token" href="#/c:@M@SwiftTerm@objc(cs)LocalProcessTerminalView">LocalProcessTerminalView</a>
  336. </code>
  337. </div>
  338. <div class="height-container">
  339. <div class="pointer-container"></div>
  340. <section class="section">
  341. <div class="pointer"></div>
  342. <div class="abstract">
  343. <p><code>LocalProcessTerminalView</code> is an AppKit NSView that can be used to host a local process
  344. the process is launched inside a pseudo-terminal.</p>
  345. <p>Call the <code>startProcess</code> to launch the underlying process inside a pseudo terminal.</p>
  346. <p>Generally, for the <code>LocalProcessTerminalView</code> to be useful, you will want to disable the sandbox
  347. for your application, otherwise the underlying shell will not have access to much - not the majority of
  348. commands, not assorted places on the file systems and so on. For this, you need to disable for your
  349. target in &ldquo;Signing and Capabilities&rdquo; the sandbox entirely.</p>
  350. <p>Note: instances of <code>LocalProcessTerminalView</code> will set the <code><a href="Classes/TerminalView.html">TerminalView</a></code>&lsquo;s <code>delegate</code>
  351. property and capture and consume the messages. The messages that are most likely needed for
  352. consumer applications are reposted to the <code><a href="Protocols/LocalProcessTerminalViewDelegate.html">LocalProcessTerminalViewDelegate</a></code> in
  353. <code>processDelegate</code>. If you override the <code>delegate</code> directly, you might inadvertently break
  354. the internal working of <code>LocalProcessTerminalView</code>. If you must change the <code>delegate</code>
  355. make sure that you proxy the values in your implementation to the values set after initializing this instance</p>
  356. <a href="Classes/LocalProcessTerminalView.html" class="slightly-smaller">See more</a>
  357. </div>
  358. <div class="declaration">
  359. <h4>Declaration</h4>
  360. <div class="language">
  361. <p class="aside-title">Swift</p>
  362. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">LocalProcessTerminalView</span> <span class="p">:</span> <span class="kt"><a href="Classes/TerminalView.html">TerminalView</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a></span><span class="p">,</span> <span class="kt"><a href="Protocols/LocalProcessDelegate.html">LocalProcessDelegate</a></span></code></pre>
  363. </div>
  364. </div>
  365. <div class="slightly-smaller">
  366. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Mac/MacLocalTerminalView.swift#L54-L154">Show on GitHub</a>
  367. </div>
  368. </section>
  369. </div>
  370. </li>
  371. <li class="item">
  372. <div>
  373. <code>
  374. <a name="/s:9SwiftTerm21PseudoTerminalHelpersC"></a>
  375. <a name="//apple_ref/swift/Class/PseudoTerminalHelpers" class="dashAnchor"></a>
  376. <a class="token" href="#/s:9SwiftTerm21PseudoTerminalHelpersC">PseudoTerminalHelpers</a>
  377. </code>
  378. </div>
  379. <div class="height-container">
  380. <div class="pointer-container"></div>
  381. <section class="section">
  382. <div class="pointer"></div>
  383. <div class="abstract">
  384. <p>APIs to assist in controlling a Unix pseudo-terminal from Swift, it provides a wrapper for
  385. the libc <code>forkpty</code>API in the form of <code>fork(andExec:args:env:desiredWindowSize:</code> method,
  386. <code>setWinSize</code> and <code>availableBytes</code></p>
  387. <a href="Classes/PseudoTerminalHelpers.html" class="slightly-smaller">See more</a>
  388. </div>
  389. <div class="declaration">
  390. <h4>Declaration</h4>
  391. <div class="language">
  392. <p class="aside-title">Swift</p>
  393. <pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PseudoTerminalHelpers</span></code></pre>
  394. </div>
  395. </div>
  396. <div class="slightly-smaller">
  397. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Pty.swift#L16-L101">Show on GitHub</a>
  398. </div>
  399. </section>
  400. </div>
  401. </li>
  402. <li class="item">
  403. <div>
  404. <code>
  405. <a name="/s:9SwiftTerm8TerminalC"></a>
  406. <a name="//apple_ref/swift/Class/Terminal" class="dashAnchor"></a>
  407. <a class="token" href="#/s:9SwiftTerm8TerminalC">Terminal</a>
  408. </code>
  409. </div>
  410. <div class="height-container">
  411. <div class="pointer-container"></div>
  412. <section class="section">
  413. <div class="pointer"></div>
  414. <div class="abstract">
  415. <p>The <code>Terminal</code> class provides the terminal emulation engine, and can be used to feed data to the
  416. terminal emulator. Typically users will intereact with a higher-level implementation that provides a
  417. UI toolkit-specific rendering and connects the input to the UI toolkit.</p>
  418. <p>A front-end would draw the contents of the terminal, and take input from the user, which is in turn
  419. 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>
  420. <p>The terminal is also connected to a backend that is conneted to the client, and data from this
  421. client is fed into the emulator by calling the <code>sendResponse method</code></p>
  422. <p>The behavior of the terminal is configured by implementing the <code><a href="Protocols/TerminalDelegate.html">TerminalDelegate</a></code> protocol
  423. that is provided in the constructor call.</p>
  424. <a href="Classes/Terminal.html" class="slightly-smaller">See more</a>
  425. </div>
  426. <div class="declaration">
  427. <h4>Declaration</h4>
  428. <div class="language">
  429. <p class="aside-title">Swift</p>
  430. <pre class="highlight swift"><code><span class="kd">open</span> <span class="kd">class</span> <span class="kt">Terminal</span></code></pre>
  431. </div>
  432. </div>
  433. <div class="slightly-smaller">
  434. <a href="https://github.com/migueldeicaza/SwiftTerm/tree/master/Sources/SwiftTerm/Terminal.swift#L176-L4237">Show on GitHub</a>
  435. </div>
  436. </section>
  437. </div>
  438. </li>
  439. <li class="item">
  440. <div>
  441. <code>
  442. <a name="/"></a>
  443. <a name="//apple_ref/swift/Class/TerminalAccessory" class="dashAnchor"></a>
  444. <a class="token" href="#/">TerminalAccessory</a>
  445. </code>
  446. </div>
  447. <div class="height-container">
  448. <div class="pointer-container"></div>
  449. <section class="section">
  450. <div class="pointer"></div>
  451. <div class="abstract">
  452. <p>This class provides an input accessory for the terminal on iOS, you can access this via the <code>inputAccessoryView</code>
  453. property in the <code><a href="Classes/TerminalView.html">TerminalView</a></code> and casting the result to <code>TerminalAccessory</code>.</p>
  454. <p>This class surfaces some state that the terminal might want to poke at, you should at least support the following
  455. properties;
  456. <code>controlModifer</code> should be set if the control key is pressed</p>
  457. <a href="Classes/TerminalAccessory.html" class="slightly-smaller">See more</a>
  458. </div>
  459. </section>
  460. </div>
  461. </li>
  462. <li class="item">
  463. <div>
  464. <code>
  465. <a name="/"></a>
  466. <a name="//apple_ref/swift/Class/TerminalView" class="dashAnchor"></a>
  467. <a class="token" href="#/">TerminalView</a>
  468. </code>
  469. </div>
  470. <div class="height-container">
  471. <div class="pointer-container"></div>
  472. <section class="section">
  473. <div class="pointer"></div>
  474. <div class="abstract">
  475. <p>TerminalView provides an UIKit front-end to the <code><a href="Classes/Terminal.html">Terminal</a></code> termininal emulator.
  476. It is up to a subclass to either wire the terminal emulator to a remote terminal
  477. via some socket, to an application that wants to run with terminal emulation, or
  478. wiring this up to a pseudo-terminal.</p>
  479. <p>Users are notified of interesting events in their implementation of the <code><a href="Protocols/TerminalViewDelegate.html">TerminalViewDelegate</a></code>
  480. methods - an instance must be provided to the constructor of <code>TerminalView</code>.</p>
  481. <p>Call the <code>getTerminal</code> method to get a reference to the underlying <code><a href="Classes/Terminal.html">Terminal</a></code> that backs this
  482. view.</p>
  483. <p>Use the <code>configureNativeColors()</code> to set the defaults colors for the view to match the OS
  484. defaults, otherwise, this uses its own set of defaults colors.</p>
  485. <a href="Classes/TerminalView.html" class="slightly-smaller">See more</a>
  486. </div>
  487. <div class="declaration">
  488. <h4>Declaration</h4>
  489. <div class="language">
  490. <p class="aside-title">Swift</p>
  491. </div>
  492. </div>
  493. </section>
  494. </div>
  495. </li>
  496. </ul>
  497. </div>
  498. </section>
  499. </section>
  500. <section id="footer">
  501. <p>&copy; 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>
  502. <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>
  503. </section>
  504. </article>
  505. </div>
  506. </body>
  507. </div>
  508. </html>