Terminal.Gui.MainLoop.html 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681
  1. <!DOCTYPE html>
  2. <!--[if IE]><![endif]-->
  3. <html>
  4. <head>
  5. <meta charset="utf-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>Class MainLoop
  8. </title>
  9. <meta name="viewport" content="width=device-width">
  10. <meta name="title" content="Class MainLoop
  11. ">
  12. <meta name="generator" content="docfx 2.59.4.0">
  13. <link rel="shortcut icon" href="../../favicon.ico">
  14. <link rel="stylesheet" href="../../styles/docfx.vendor.css">
  15. <link rel="stylesheet" href="../../styles/docfx.css">
  16. <link rel="stylesheet" href="../../styles/main.css">
  17. <link href="https://fonts.googleapis.com/css?family=Source Sans Pro" rel="stylesheet">
  18. <link href="https://fonts.googleapis.com/css?family=Source Code Pro" rel="stylesheet">
  19. <meta property="docfx:navrel" content="../../toc.html">
  20. <meta property="docfx:tocrel" content="toc.html">
  21. <meta property="docfx:rel" content="../../">
  22. </head> <body data-spy="scroll" data-target="#affix" data-offset="120">
  23. <div id="wrapper">
  24. <header>
  25. <nav id="autocollapse" class="navbar navbar-inverse ng-scope" role="navigation">
  26. <div class="container">
  27. <div class="navbar-header">
  28. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar">
  29. <span class="sr-only">Toggle navigation</span>
  30. <span class="icon-bar"></span>
  31. <span class="icon-bar"></span>
  32. <span class="icon-bar"></span>
  33. </button>
  34. <a class="navbar-brand" href="../../index.html">
  35. <img id="logo" class="svg" src="../../images/logo48.png" alt="">
  36. </a>
  37. </div>
  38. <div class="collapse navbar-collapse" id="navbar">
  39. <form class="navbar-form navbar-right" role="search" id="search">
  40. <div class="form-group">
  41. <input type="text" class="form-control" id="search-query" placeholder="Search" autocomplete="off">
  42. </div>
  43. </form>
  44. </div>
  45. </div>
  46. </nav>
  47. <div class="subnav navbar navbar-default">
  48. <div class="container hide-when-search" id="breadcrumb">
  49. <ul class="breadcrumb">
  50. <li></li>
  51. </ul>
  52. </div>
  53. </div>
  54. </header>
  55. <div class="container body-content">
  56. <div id="search-results">
  57. <div class="search-list">Search Results for <span></span></div>
  58. <div class="sr-items">
  59. <p><i class="glyphicon glyphicon-refresh index-loading"></i></p>
  60. </div>
  61. <ul id="pagination" data-first="First" data-prev="Previous" data-next="Next" data-last="Last"></ul>
  62. </div>
  63. </div>
  64. <div role="main" class="container body-content hide-when-search">
  65. <div class="sidenav hide-when-search">
  66. <a class="btn toc-toggle collapse" data-toggle="collapse" href="#sidetoggle" aria-expanded="false" aria-controls="sidetoggle">Show / Hide Table of Contents</a>
  67. <div class="sidetoggle collapse" id="sidetoggle">
  68. <div id="sidetoc"></div>
  69. </div>
  70. </div>
  71. <div class="article row grid-right">
  72. <div class="col-md-10">
  73. <article class="content wrap" id="_content" data-uid="Terminal.Gui.MainLoop">
  74. <h1 id="Terminal_Gui_MainLoop" data-uid="Terminal.Gui.MainLoop" class="text-break">Class MainLoop
  75. </h1>
  76. <div class="markdown level0 summary">
  77. Simple main loop implementation that can be used to monitor
  78. file descriptor, run timers and idle handlers.
  79. </div>
  80. <div class="markdown level0 conceptual"></div>
  81. <div class="inheritance">
  82. <h5>Inheritance</h5>
  83. <div class="level0"><span class="xref">System.Object</span></div>
  84. <div class="level1"><span class="xref">MainLoop</span></div>
  85. </div>
  86. <h5 id="Terminal_Gui_MainLoop_remarks"><strong>Remarks</strong></h5>
  87. <div class="markdown level0 remarks">
  88. Monitoring of file descriptors is only available on Unix, there
  89. does not seem to be a way of supporting this on Windows.
  90. </div>
  91. <div class="inheritedMembers">
  92. <h5>Inherited Members</h5>
  93. <div>
  94. <span class="xref">System.Object.Equals(System.Object)</span>
  95. </div>
  96. <div>
  97. <span class="xref">System.Object.Equals(System.Object, System.Object)</span>
  98. </div>
  99. <div>
  100. <span class="xref">System.Object.GetHashCode()</span>
  101. </div>
  102. <div>
  103. <span class="xref">System.Object.GetType()</span>
  104. </div>
  105. <div>
  106. <span class="xref">System.Object.MemberwiseClone()</span>
  107. </div>
  108. <div>
  109. <span class="xref">System.Object.ReferenceEquals(System.Object, System.Object)</span>
  110. </div>
  111. <div>
  112. <span class="xref">System.Object.ToString()</span>
  113. </div>
  114. </div>
  115. <h6><strong>Namespace</strong>: <a class="xref" href="Terminal.Gui.html">Terminal.Gui</a></h6>
  116. <h6><strong>Assembly</strong>: Terminal.Gui.dll</h6>
  117. <h5 id="Terminal_Gui_MainLoop_syntax">Syntax</h5>
  118. <div class="codewrapper">
  119. <pre><code class="lang-csharp hljs">public class MainLoop</code></pre>
  120. </div>
  121. <h3 id="constructors">Constructors
  122. </h3>
  123. <span class="small pull-right mobile-hide">
  124. <span class="divider">|</span>
  125. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop__ctor_Terminal_Gui_IMainLoopDriver_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.%23ctor(Terminal.Gui.IMainLoopDriver)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  126. </span>
  127. <span class="small pull-right mobile-hide">
  128. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L106">View Source</a>
  129. </span>
  130. <a id="Terminal_Gui_MainLoop__ctor_" data-uid="Terminal.Gui.MainLoop.#ctor*"></a>
  131. <h4 id="Terminal_Gui_MainLoop__ctor_Terminal_Gui_IMainLoopDriver_" data-uid="Terminal.Gui.MainLoop.#ctor(Terminal.Gui.IMainLoopDriver)">MainLoop(IMainLoopDriver)</h4>
  132. <div class="markdown level1 summary">
  133. Creates a new Mainloop.
  134. </div>
  135. <div class="markdown level1 conceptual"></div>
  136. <h5 class="decalaration">Declaration</h5>
  137. <div class="codewrapper">
  138. <pre><code class="lang-csharp hljs">public MainLoop(IMainLoopDriver driver)</code></pre>
  139. </div>
  140. <h5 class="parameters">Parameters</h5>
  141. <table class="table table-bordered table-striped table-condensed">
  142. <thead>
  143. <tr>
  144. <th>Type</th>
  145. <th>Name</th>
  146. <th>Description</th>
  147. </tr>
  148. </thead>
  149. <tbody>
  150. <tr>
  151. <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
  152. <td><span class="parametername">driver</span></td>
  153. <td>Should match the <a class="xref" href="Terminal.Gui.ConsoleDriver.html">ConsoleDriver</a> (one of the implementations UnixMainLoop, NetMainLoop or WindowsMainLoop).</td>
  154. </tr>
  155. </tbody>
  156. </table>
  157. <h3 id="properties">Properties
  158. </h3>
  159. <span class="small pull-right mobile-hide">
  160. <span class="divider">|</span>
  161. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_Driver.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.Driver%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  162. </span>
  163. <span class="small pull-right mobile-hide">
  164. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L94">View Source</a>
  165. </span>
  166. <a id="Terminal_Gui_MainLoop_Driver_" data-uid="Terminal.Gui.MainLoop.Driver*"></a>
  167. <h4 id="Terminal_Gui_MainLoop_Driver" data-uid="Terminal.Gui.MainLoop.Driver">Driver</h4>
  168. <div class="markdown level1 summary">
  169. The current IMainLoopDriver in use.
  170. </div>
  171. <div class="markdown level1 conceptual"></div>
  172. <h5 class="decalaration">Declaration</h5>
  173. <div class="codewrapper">
  174. <pre><code class="lang-csharp hljs">public IMainLoopDriver Driver { get; }</code></pre>
  175. </div>
  176. <h5 class="propertyValue">Property Value</h5>
  177. <table class="table table-bordered table-striped table-condensed">
  178. <thead>
  179. <tr>
  180. <th>Type</th>
  181. <th>Description</th>
  182. </tr>
  183. </thead>
  184. <tbody>
  185. <tr>
  186. <td><a class="xref" href="Terminal.Gui.IMainLoopDriver.html">IMainLoopDriver</a></td>
  187. <td>The driver.</td>
  188. </tr>
  189. </tbody>
  190. </table>
  191. <span class="small pull-right mobile-hide">
  192. <span class="divider">|</span>
  193. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_IdleHandlers.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.IdleHandlers%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  194. </span>
  195. <span class="small pull-right mobile-hide">
  196. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L82">View Source</a>
  197. </span>
  198. <a id="Terminal_Gui_MainLoop_IdleHandlers_" data-uid="Terminal.Gui.MainLoop.IdleHandlers*"></a>
  199. <h4 id="Terminal_Gui_MainLoop_IdleHandlers" data-uid="Terminal.Gui.MainLoop.IdleHandlers">IdleHandlers</h4>
  200. <div class="markdown level1 summary">
  201. Gets a copy of the list of all idle handlers.
  202. </div>
  203. <div class="markdown level1 conceptual"></div>
  204. <h5 class="decalaration">Declaration</h5>
  205. <div class="codewrapper">
  206. <pre><code class="lang-csharp hljs">public ReadOnlyCollection&lt;Func&lt;bool&gt;&gt; IdleHandlers { get; }</code></pre>
  207. </div>
  208. <h5 class="propertyValue">Property Value</h5>
  209. <table class="table table-bordered table-striped table-condensed">
  210. <thead>
  211. <tr>
  212. <th>Type</th>
  213. <th>Description</th>
  214. </tr>
  215. </thead>
  216. <tbody>
  217. <tr>
  218. <td><span class="xref">System.Collections.ObjectModel.ReadOnlyCollection</span>&lt;<span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;&gt;</td>
  219. <td></td>
  220. </tr>
  221. </tbody>
  222. </table>
  223. <span class="small pull-right mobile-hide">
  224. <span class="divider">|</span>
  225. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_Timeouts.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.Timeouts%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  226. </span>
  227. <span class="small pull-right mobile-hide">
  228. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L77">View Source</a>
  229. </span>
  230. <a id="Terminal_Gui_MainLoop_Timeouts_" data-uid="Terminal.Gui.MainLoop.Timeouts*"></a>
  231. <h4 id="Terminal_Gui_MainLoop_Timeouts" data-uid="Terminal.Gui.MainLoop.Timeouts">Timeouts</h4>
  232. <div class="markdown level1 summary">
  233. Gets the list of all timeouts sorted by the <span class="xref">System.TimeSpan</span> time ticks./>.
  234. A shorter limit time can be added at the end, but it will be called before an
  235. earlier addition that has a longer limit time.
  236. </div>
  237. <div class="markdown level1 conceptual"></div>
  238. <h5 class="decalaration">Declaration</h5>
  239. <div class="codewrapper">
  240. <pre><code class="lang-csharp hljs">public SortedList&lt;long, MainLoop.Timeout&gt; Timeouts { get; }</code></pre>
  241. </div>
  242. <h5 class="propertyValue">Property Value</h5>
  243. <table class="table table-bordered table-striped table-condensed">
  244. <thead>
  245. <tr>
  246. <th>Type</th>
  247. <th>Description</th>
  248. </tr>
  249. </thead>
  250. <tbody>
  251. <tr>
  252. <td><span class="xref">System.Collections.Generic.SortedList</span>&lt;<span class="xref">System.Int64</span>, <a class="xref" href="Terminal.Gui.MainLoop.Timeout.html">MainLoop.Timeout</a>&gt;</td>
  253. <td></td>
  254. </tr>
  255. </tbody>
  256. </table>
  257. <h3 id="methods">Methods
  258. </h3>
  259. <span class="small pull-right mobile-hide">
  260. <span class="divider">|</span>
  261. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_AddIdle_System_Func_System_Boolean__.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.AddIdle(System.Func%7BSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  262. </span>
  263. <span class="small pull-right mobile-hide">
  264. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L136">View Source</a>
  265. </span>
  266. <a id="Terminal_Gui_MainLoop_AddIdle_" data-uid="Terminal.Gui.MainLoop.AddIdle*"></a>
  267. <h4 id="Terminal_Gui_MainLoop_AddIdle_System_Func_System_Boolean__" data-uid="Terminal.Gui.MainLoop.AddIdle(System.Func{System.Boolean})">AddIdle(Func&lt;Boolean&gt;)</h4>
  268. <div class="markdown level1 summary">
  269. Adds specified idle handler function to mainloop processing. The handler function will be called once per iteration of the main loop after other events have been handled.
  270. </div>
  271. <div class="markdown level1 conceptual"></div>
  272. <h5 class="decalaration">Declaration</h5>
  273. <div class="codewrapper">
  274. <pre><code class="lang-csharp hljs">public Func&lt;bool&gt; AddIdle(Func&lt;bool&gt; idleHandler)</code></pre>
  275. </div>
  276. <h5 class="parameters">Parameters</h5>
  277. <table class="table table-bordered table-striped table-condensed">
  278. <thead>
  279. <tr>
  280. <th>Type</th>
  281. <th>Name</th>
  282. <th>Description</th>
  283. </tr>
  284. </thead>
  285. <tbody>
  286. <tr>
  287. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  288. <td><span class="parametername">idleHandler</span></td>
  289. <td>Token that can be used to remove the idle handler with <a class="xref" href="Terminal.Gui.MainLoop.html#Terminal_Gui_MainLoop_RemoveIdle_System_Func_System_Boolean__">RemoveIdle(Func&lt;Boolean&gt;)</a> .</td>
  290. </tr>
  291. </tbody>
  292. </table>
  293. <h5 class="returns">Returns</h5>
  294. <table class="table table-bordered table-striped table-condensed">
  295. <thead>
  296. <tr>
  297. <th>Type</th>
  298. <th>Description</th>
  299. </tr>
  300. </thead>
  301. <tbody>
  302. <tr>
  303. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  304. <td></td>
  305. </tr>
  306. </tbody>
  307. </table>
  308. <span class="small pull-right mobile-hide">
  309. <span class="divider">|</span>
  310. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_AddTimeout_System_TimeSpan_System_Func_Terminal_Gui_MainLoop_System_Boolean__.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.AddTimeout(System.TimeSpan%2CSystem.Func%7BTerminal.Gui.MainLoop%2CSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  311. </span>
  312. <span class="small pull-right mobile-hide">
  313. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L178">View Source</a>
  314. </span>
  315. <a id="Terminal_Gui_MainLoop_AddTimeout_" data-uid="Terminal.Gui.MainLoop.AddTimeout*"></a>
  316. <h4 id="Terminal_Gui_MainLoop_AddTimeout_System_TimeSpan_System_Func_Terminal_Gui_MainLoop_System_Boolean__" data-uid="Terminal.Gui.MainLoop.AddTimeout(System.TimeSpan,System.Func{Terminal.Gui.MainLoop,System.Boolean})">AddTimeout(TimeSpan, Func&lt;MainLoop, Boolean&gt;)</h4>
  317. <div class="markdown level1 summary">
  318. Adds a timeout to the mainloop.
  319. </div>
  320. <div class="markdown level1 conceptual"></div>
  321. <h5 class="decalaration">Declaration</h5>
  322. <div class="codewrapper">
  323. <pre><code class="lang-csharp hljs">public object AddTimeout(TimeSpan time, Func&lt;MainLoop, bool&gt; callback)</code></pre>
  324. </div>
  325. <h5 class="parameters">Parameters</h5>
  326. <table class="table table-bordered table-striped table-condensed">
  327. <thead>
  328. <tr>
  329. <th>Type</th>
  330. <th>Name</th>
  331. <th>Description</th>
  332. </tr>
  333. </thead>
  334. <tbody>
  335. <tr>
  336. <td><span class="xref">System.TimeSpan</span></td>
  337. <td><span class="parametername">time</span></td>
  338. <td></td>
  339. </tr>
  340. <tr>
  341. <td><span class="xref">System.Func</span>&lt;<a class="xref" href="Terminal.Gui.MainLoop.html">MainLoop</a>, <span class="xref">System.Boolean</span>&gt;</td>
  342. <td><span class="parametername">callback</span></td>
  343. <td></td>
  344. </tr>
  345. </tbody>
  346. </table>
  347. <h5 class="returns">Returns</h5>
  348. <table class="table table-bordered table-striped table-condensed">
  349. <thead>
  350. <tr>
  351. <th>Type</th>
  352. <th>Description</th>
  353. </tr>
  354. </thead>
  355. <tbody>
  356. <tr>
  357. <td><span class="xref">System.Object</span></td>
  358. <td></td>
  359. </tr>
  360. </tbody>
  361. </table>
  362. <span class="small pull-right mobile-hide">
  363. <span class="divider">|</span>
  364. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_EventsPending_System_Boolean_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.EventsPending(System.Boolean)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  365. </span>
  366. <span class="small pull-right mobile-hide">
  367. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L288">View Source</a>
  368. </span>
  369. <a id="Terminal_Gui_MainLoop_EventsPending_" data-uid="Terminal.Gui.MainLoop.EventsPending*"></a>
  370. <h4 id="Terminal_Gui_MainLoop_EventsPending_System_Boolean_" data-uid="Terminal.Gui.MainLoop.EventsPending(System.Boolean)">EventsPending(Boolean)</h4>
  371. <div class="markdown level1 summary">
  372. Determines whether there are pending events to be processed.
  373. </div>
  374. <div class="markdown level1 conceptual"></div>
  375. <h5 class="decalaration">Declaration</h5>
  376. <div class="codewrapper">
  377. <pre><code class="lang-csharp hljs">public bool EventsPending(bool wait = false)</code></pre>
  378. </div>
  379. <h5 class="parameters">Parameters</h5>
  380. <table class="table table-bordered table-striped table-condensed">
  381. <thead>
  382. <tr>
  383. <th>Type</th>
  384. <th>Name</th>
  385. <th>Description</th>
  386. </tr>
  387. </thead>
  388. <tbody>
  389. <tr>
  390. <td><span class="xref">System.Boolean</span></td>
  391. <td><span class="parametername">wait</span></td>
  392. <td></td>
  393. </tr>
  394. </tbody>
  395. </table>
  396. <h5 class="returns">Returns</h5>
  397. <table class="table table-bordered table-striped table-condensed">
  398. <thead>
  399. <tr>
  400. <th>Type</th>
  401. <th>Description</th>
  402. </tr>
  403. </thead>
  404. <tbody>
  405. <tr>
  406. <td><span class="xref">System.Boolean</span></td>
  407. <td></td>
  408. </tr>
  409. </tbody>
  410. </table>
  411. <span class="small pull-right mobile-hide">
  412. <span class="divider">|</span>
  413. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_Invoke_System_Action_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.Invoke(System.Action)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  414. </span>
  415. <span class="small pull-right mobile-hide">
  416. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L116">View Source</a>
  417. </span>
  418. <a id="Terminal_Gui_MainLoop_Invoke_" data-uid="Terminal.Gui.MainLoop.Invoke*"></a>
  419. <h4 id="Terminal_Gui_MainLoop_Invoke_System_Action_" data-uid="Terminal.Gui.MainLoop.Invoke(System.Action)">Invoke(Action)</h4>
  420. <div class="markdown level1 summary">
  421. Runs <code>action</code> on the thread that is processing events
  422. </div>
  423. <div class="markdown level1 conceptual"></div>
  424. <h5 class="decalaration">Declaration</h5>
  425. <div class="codewrapper">
  426. <pre><code class="lang-csharp hljs">public void Invoke(Action action)</code></pre>
  427. </div>
  428. <h5 class="parameters">Parameters</h5>
  429. <table class="table table-bordered table-striped table-condensed">
  430. <thead>
  431. <tr>
  432. <th>Type</th>
  433. <th>Name</th>
  434. <th>Description</th>
  435. </tr>
  436. </thead>
  437. <tbody>
  438. <tr>
  439. <td><span class="xref">System.Action</span></td>
  440. <td><span class="parametername">action</span></td>
  441. <td>the action to be invoked on the main processing thread.</td>
  442. </tr>
  443. </tbody>
  444. </table>
  445. <span class="small pull-right mobile-hide">
  446. <span class="divider">|</span>
  447. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_MainIteration.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.MainIteration%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  448. </span>
  449. <span class="small pull-right mobile-hide">
  450. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L302">View Source</a>
  451. </span>
  452. <a id="Terminal_Gui_MainLoop_MainIteration_" data-uid="Terminal.Gui.MainLoop.MainIteration*"></a>
  453. <h4 id="Terminal_Gui_MainLoop_MainIteration" data-uid="Terminal.Gui.MainLoop.MainIteration">MainIteration()</h4>
  454. <div class="markdown level1 summary">
  455. Runs one iteration of timers and file watches
  456. </div>
  457. <div class="markdown level1 conceptual"></div>
  458. <h5 class="decalaration">Declaration</h5>
  459. <div class="codewrapper">
  460. <pre><code class="lang-csharp hljs">public void MainIteration()</code></pre>
  461. </div>
  462. <span class="small pull-right mobile-hide">
  463. <span class="divider">|</span>
  464. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_RemoveIdle_System_Func_System_Boolean__.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.RemoveIdle(System.Func%7BSystem.Boolean%7D)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  465. </span>
  466. <span class="small pull-right mobile-hide">
  467. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L152">View Source</a>
  468. </span>
  469. <a id="Terminal_Gui_MainLoop_RemoveIdle_" data-uid="Terminal.Gui.MainLoop.RemoveIdle*"></a>
  470. <h4 id="Terminal_Gui_MainLoop_RemoveIdle_System_Func_System_Boolean__" data-uid="Terminal.Gui.MainLoop.RemoveIdle(System.Func{System.Boolean})">RemoveIdle(Func&lt;Boolean&gt;)</h4>
  471. <div class="markdown level1 summary">
  472. Removes an idle handler added with <a class="xref" href="Terminal.Gui.MainLoop.html#Terminal_Gui_MainLoop_AddIdle_System_Func_System_Boolean__">AddIdle(Func&lt;Boolean&gt;)</a> from processing.
  473. </div>
  474. <div class="markdown level1 conceptual"></div>
  475. <h5 class="decalaration">Declaration</h5>
  476. <div class="codewrapper">
  477. <pre><code class="lang-csharp hljs">public bool RemoveIdle(Func&lt;bool&gt; token)</code></pre>
  478. </div>
  479. <h5 class="parameters">Parameters</h5>
  480. <table class="table table-bordered table-striped table-condensed">
  481. <thead>
  482. <tr>
  483. <th>Type</th>
  484. <th>Name</th>
  485. <th>Description</th>
  486. </tr>
  487. </thead>
  488. <tbody>
  489. <tr>
  490. <td><span class="xref">System.Func</span>&lt;<span class="xref">System.Boolean</span>&gt;</td>
  491. <td><span class="parametername">token</span></td>
  492. <td>A token returned by <a class="xref" href="Terminal.Gui.MainLoop.html#Terminal_Gui_MainLoop_AddIdle_System_Func_System_Boolean__">AddIdle(Func&lt;Boolean&gt;)</a></td>
  493. </tr>
  494. </tbody>
  495. </table>
  496. <h5 class="returns">Returns</h5>
  497. <table class="table table-bordered table-striped table-condensed">
  498. <thead>
  499. <tr>
  500. <th>Type</th>
  501. <th>Description</th>
  502. </tr>
  503. </thead>
  504. <tbody>
  505. <tr>
  506. <td><span class="xref">System.Boolean</span></td>
  507. <td></td>
  508. </tr>
  509. </tbody>
  510. </table>
  511. <span class="small pull-right mobile-hide">
  512. <span class="divider">|</span>
  513. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_RemoveTimeout_System_Object_.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.RemoveTimeout(System.Object)%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  514. </span>
  515. <span class="small pull-right mobile-hide">
  516. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L198">View Source</a>
  517. </span>
  518. <a id="Terminal_Gui_MainLoop_RemoveTimeout_" data-uid="Terminal.Gui.MainLoop.RemoveTimeout*"></a>
  519. <h4 id="Terminal_Gui_MainLoop_RemoveTimeout_System_Object_" data-uid="Terminal.Gui.MainLoop.RemoveTimeout(System.Object)">RemoveTimeout(Object)</h4>
  520. <div class="markdown level1 summary">
  521. Removes a previously scheduled timeout
  522. </div>
  523. <div class="markdown level1 conceptual"></div>
  524. <h5 class="decalaration">Declaration</h5>
  525. <div class="codewrapper">
  526. <pre><code class="lang-csharp hljs">public bool RemoveTimeout(object token)</code></pre>
  527. </div>
  528. <h5 class="parameters">Parameters</h5>
  529. <table class="table table-bordered table-striped table-condensed">
  530. <thead>
  531. <tr>
  532. <th>Type</th>
  533. <th>Name</th>
  534. <th>Description</th>
  535. </tr>
  536. </thead>
  537. <tbody>
  538. <tr>
  539. <td><span class="xref">System.Object</span></td>
  540. <td><span class="parametername">token</span></td>
  541. <td></td>
  542. </tr>
  543. </tbody>
  544. </table>
  545. <h5 class="returns">Returns</h5>
  546. <table class="table table-bordered table-striped table-condensed">
  547. <thead>
  548. <tr>
  549. <th>Type</th>
  550. <th>Description</th>
  551. </tr>
  552. </thead>
  553. <tbody>
  554. <tr>
  555. <td><span class="xref">System.Boolean</span></td>
  556. <td></td>
  557. </tr>
  558. </tbody>
  559. </table>
  560. <span class="small pull-right mobile-hide">
  561. <span class="divider">|</span>
  562. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_Run.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.Run%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  563. </span>
  564. <span class="small pull-right mobile-hide">
  565. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L318">View Source</a>
  566. </span>
  567. <a id="Terminal_Gui_MainLoop_Run_" data-uid="Terminal.Gui.MainLoop.Run*"></a>
  568. <h4 id="Terminal_Gui_MainLoop_Run" data-uid="Terminal.Gui.MainLoop.Run">Run()</h4>
  569. <div class="markdown level1 summary">
  570. Runs the mainloop.
  571. </div>
  572. <div class="markdown level1 conceptual"></div>
  573. <h5 class="decalaration">Declaration</h5>
  574. <div class="codewrapper">
  575. <pre><code class="lang-csharp hljs">public void Run()</code></pre>
  576. </div>
  577. <span class="small pull-right mobile-hide">
  578. <span class="divider">|</span>
  579. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_Stop.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.Stop%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  580. </span>
  581. <span class="small pull-right mobile-hide">
  582. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L274">View Source</a>
  583. </span>
  584. <a id="Terminal_Gui_MainLoop_Stop_" data-uid="Terminal.Gui.MainLoop.Stop*"></a>
  585. <h4 id="Terminal_Gui_MainLoop_Stop" data-uid="Terminal.Gui.MainLoop.Stop">Stop()</h4>
  586. <div class="markdown level1 summary">
  587. Stops the mainloop.
  588. </div>
  589. <div class="markdown level1 conceptual"></div>
  590. <h5 class="decalaration">Declaration</h5>
  591. <div class="codewrapper">
  592. <pre><code class="lang-csharp hljs">public void Stop()</code></pre>
  593. </div>
  594. <h3 id="events">Events
  595. </h3>
  596. <span class="small pull-right mobile-hide">
  597. <span class="divider">|</span>
  598. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop_TimeoutAdded.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop.TimeoutAdded%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A">Improve this Doc</a>
  599. </span>
  600. <span class="small pull-right mobile-hide">
  601. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L100">View Source</a>
  602. </span>
  603. <h4 id="Terminal_Gui_MainLoop_TimeoutAdded" data-uid="Terminal.Gui.MainLoop.TimeoutAdded">TimeoutAdded</h4>
  604. <div class="markdown level1 summary">
  605. Invoked when a new timeout is added to be used on the case
  606. if <a class="xref" href="Terminal.Gui.Application.html#Terminal_Gui_Application_ExitRunLoopAfterFirstIteration">ExitRunLoopAfterFirstIteration</a> is true,
  607. </div>
  608. <div class="markdown level1 conceptual"></div>
  609. <h5 class="decalaration">Declaration</h5>
  610. <div class="codewrapper">
  611. <pre><code class="lang-csharp hljs">public event Action&lt;long&gt; TimeoutAdded</code></pre>
  612. </div>
  613. <h5 class="eventType">Event Type</h5>
  614. <table class="table table-bordered table-striped table-condensed">
  615. <thead>
  616. <tr>
  617. <th>Type</th>
  618. <th>Description</th>
  619. </tr>
  620. </thead>
  621. <tbody>
  622. <tr>
  623. <td><span class="xref">System.Action</span>&lt;<span class="xref">System.Int64</span>&gt;</td>
  624. <td></td>
  625. </tr>
  626. </tbody>
  627. </table>
  628. </article>
  629. </div>
  630. <div class="hidden-sm col-md-2" role="complementary">
  631. <div class="sideaffix">
  632. <div class="contribution">
  633. <ul class="nav">
  634. <li>
  635. <a href="https://github.com/gui-cs/Terminal.Gui/new/develop/apidoc/new?filename=Terminal_Gui_MainLoop.md&amp;value=---%0Auid%3A%20Terminal.Gui.MainLoop%0Asummary%3A%20'*You%20can%20override%20summary%20for%20the%20API%20here%20using%20*MARKDOWN*%20syntax'%0A---%0A%0A*Please%20type%20below%20more%20information%20about%20this%20API%3A*%0A%0A" class="contribution-link">Improve this Doc</a>
  636. </li>
  637. <li>
  638. <a href="tig:tig/gui.cs/blob/main/Terminal.Gui/Core/MainLoop.cs/#L48" class="contribution-link">View Source</a>
  639. </li>
  640. </ul>
  641. </div>
  642. <nav class="bs-docs-sidebar hidden-print hidden-xs hidden-sm affix" id="affix">
  643. <h5>In This Article</h5>
  644. <div></div>
  645. </nav>
  646. </div>
  647. </div>
  648. </div>
  649. </div>
  650. <footer>
  651. <div class="grad-bottom"></div>
  652. <div class="footer">
  653. <div class="container">
  654. <span class="pull-right">
  655. <a href="#top">Back to top</a>
  656. </span>
  657. <span>Generated by <strong>DocFX</strong></span>
  658. </div>
  659. </div>
  660. </footer>
  661. </div>
  662. <script type="text/javascript" src="../../styles/docfx.vendor.js"></script>
  663. <script type="text/javascript" src="../../styles/docfx.js"></script>
  664. <script type="text/javascript" src="../../styles/main.js"></script>
  665. </body>
  666. </html>