⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 glib-the-main-event-loop.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</div><p>Creates a new <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a> for the default main loop. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>is_running</code></em>&#160;:</span></p></td><td>set to <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> to indicate that the loop is running. This is notvery important since calling <a class="link" href="glib-The-Main-Event-Loop.html#g-main-run"><code class="function">g_main_run()</code></a> will set this to <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> anyway.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td>a new <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2857897"></a><h3><a name="g-main-destroy"></a>g_main_destroy()</h3><a class="indexterm" name="id2857913"></a><pre class="programlisting">#define             g_main_destroy(loop)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">g_main_destroy</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-The-Main-Event-Loop.html#g-main-loop-unref"><code class="function">g_main_loop_unref()</code></a> instead.</p></div><p>Frees the memory allocated for the <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>loop</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2857986"></a><h3><a name="g-main-run"></a>g_main_run()</h3><a class="indexterm" name="id2858002"></a><pre class="programlisting">#define             g_main_run(loop)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">g_main_run</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-The-Main-Event-Loop.html#g-main-loop-run"><code class="function">g_main_loop_run()</code></a> instead.</p></div><p>Runs a main loop until it stops running. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>loop</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2858067"></a><h3><a name="g-main-quit"></a>g_main_quit()</h3><a class="indexterm" name="id2858082"></a><pre class="programlisting">#define             g_main_quit(loop)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">g_main_quit</code> has been deprecated since version 2.2 and should not be used in newly-written code. Use <a class="link" href="glib-The-Main-Event-Loop.html#g-main-loop-quit"><code class="function">g_main_loop_quit()</code></a> instead.</p></div><p>Stops the <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>. If <a class="link" href="glib-The-Main-Event-Loop.html#g-main-run"><code class="function">g_main_run()</code></a> was called to run the <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>,it will now return. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>loop</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2858174"></a><h3><a name="g-main-is-running"></a>g_main_is_running()</h3><a class="indexterm" name="id2858190"></a><pre class="programlisting">#define             g_main_is_running(loop)</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><code class="literal">g_main_is_running</code> has been deprecated since version 2.2 and should not be used in newly-written code. USe <a class="link" href="glib-The-Main-Event-Loop.html#g-main-loop-is-running"><code class="function">g_main_loop_is_running()</code></a> instead.</p></div><p>Checks if the main loop is running. </p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>loop</code></em>&#160;:</span></p></td><td>a <a class="link" href="glib-The-Main-Event-Loop.html#GMainLoop"><span class="type">GMainLoop</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td><a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the main loop is running.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2858276"></a><h3><a name="G-PRIORITY-HIGH:CAPS"></a>G_PRIORITY_HIGH</h3><a class="indexterm" name="id2858289"></a><pre class="programlisting">#define G_PRIORITY_HIGH            -100</pre><p>Use this for high priority event sources.It is not used within GLib or GTK+.</p></div><hr><div class="refsect2" lang="en"><a name="id2858306"></a><h3><a name="G-PRIORITY-DEFAULT:CAPS"></a>G_PRIORITY_DEFAULT</h3><a class="indexterm" name="id2858319"></a><pre class="programlisting">#define G_PRIORITY_DEFAULT          0</pre><p>Use this for default priority event sources.In GLib this priority is used when adding timeout functions with<a class="link" href="glib-The-Main-Event-Loop.html#g-timeout-add"><code class="function">g_timeout_add()</code></a>.In GDK this priority is used for events from the X server.</p></div><hr><div class="refsect2" lang="en"><a name="id2858348"></a><h3><a name="G-PRIORITY-HIGH-IDLE:CAPS"></a>G_PRIORITY_HIGH_IDLE</h3><a class="indexterm" name="id2858361"></a><pre class="programlisting">#define G_PRIORITY_HIGH_IDLE        100</pre><p>Use this for high priority idle functions.GTK+ uses <a class="link" href="glib-The-Main-Event-Loop.html#G-PRIORITY-HIGH-IDLE:CAPS"><span class="type">G_PRIORITY_HIGH_IDLE</span></a> + 10 for resizing operations, and<a class="link" href="glib-The-Main-Event-Loop.html#G-PRIORITY-HIGH-IDLE:CAPS"><span class="type">G_PRIORITY_HIGH_IDLE</span></a> + 20 for redrawing operations. (This is done toensure that any pending resizes are processed before any pending redraws,so that widgets are not redrawn twice unnecessarily.)</p></div><hr><div class="refsect2" lang="en"><a name="id2858398"></a><h3><a name="G-PRIORITY-DEFAULT-IDLE:CAPS"></a>G_PRIORITY_DEFAULT_IDLE</h3><a class="indexterm" name="id2858412"></a><pre class="programlisting">#define G_PRIORITY_DEFAULT_IDLE     200</pre><p>Use this for default priority idle functions.In GLib this priority is used when adding idle functions with <a class="link" href="glib-The-Main-Event-Loop.html#g-idle-add"><code class="function">g_idle_add()</code></a>.</p></div><hr><div class="refsect2" lang="en"><a name="id2858440"></a><h3><a name="G-PRIORITY-LOW:CAPS"></a>G_PRIORITY_LOW</h3><a class="indexterm" name="id2858452"></a><pre class="programlisting">#define G_PRIORITY_LOW	            300</pre><p>Use this for very low priority background tasks.It is not used within GLib or GTK+.</p>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -