亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sec-mainloop.html

?? GTK+_ Gnome Application Development
?? HTML
?? 第 1 頁 / 共 2 頁
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>  <head>    <title>      The Main Loop    </title>    <meta name="GENERATOR" content=    "Modular DocBook HTML Stylesheet Version 1.45">    <link rel="HOME" title="GTK+ / Gnome Application Development"    href="ggad.html">    <link rel="UP" title="GTK+ Basics" href="cha-gtk.html">    <link rel="PREVIOUS" title="Widget Concepts" href="z57.html">    <link rel="NEXT" title="Building a Gnome Application" href=     "build-app.html">  </head>  <body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink=   "#840084" alink="#0000FF">    <div class="NAVHEADER">      <table width="100%" border="0" bgcolor="#ffffff" cellpadding=       "1" cellspacing="0">        <tr>          <th colspan="4" align="center">            <font color="#000000" size="2">GTK+ / Gnome Application            Development</font>          </th>        </tr>        <tr>          <td width="25%" bgcolor="#ffffff" align="left">            <a href="z57.html"><font color="#0000ff" size="2"><b>            &lt;&lt;&lt; Previous</b></font></a>          </td>          <td width="25%" colspan="2" bgcolor="#ffffff" align=           "center">            <font color="#0000ff" size="2"><b><a href="ggad.html">            <font color="#0000ff" size="2"><b>            Home</b></font></a></b></font>          </td>          <td width="25%" bgcolor="#ffffff" align="right">            <a href="build-app.html"><font color="#0000ff" size=            "2"><b>Next &gt;&gt;&gt;</b></font></a>          </td>        </tr>      </table>    </div>    <div class="SECT1">      <h1 class="SECT1">        <a name="SEC-MAINLOOP">The Main Loop</a>      </h1>      <p>        The GTK+ main loop's primary role is to listen for events        on a file descriptor connected to the X server, and forward        them to widgets. <a href="sec-gdkevent.html#SEC-GTKEVENTS">        the section called <i>Receiving GDK Events in GTK+</i> in        the chapter called <i>GDK Basics</i></a> describes the main        loop's event handling in more detail. This section explains        the main loop in general terms, and describes how to add        new functionality to the main loop: callbacks to be invoked        when the loop is idle, at a specified interval, when a file        descriptor is ready for reading or writing, and when the        main loop exits.      </p>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z60">Main Loop Basics</a>        </h2>        <p>          The main loop is primarily implemented by glib, which has          a generic main loop abstraction. GTK+ attaches the glib          main loop to GDK's X server connection, and presents a          convenient interface (the glib loop is slightly          lower-level than the GTK+ loop). The core GTK+ main loop          interface is shown in <a href=           "sec-mainloop.html#FL-MAINLOOP">Figure 28</a>.        </p>        <p>          <tt class="FUNCTION">gtk_main()</tt> runs the main loop.          <tt class="FUNCTION">gtk_main()</tt> will not return          until <tt class="FUNCTION">gtk_main_quit()</tt> is          called. <tt class="FUNCTION">gtk_main()</tt> can be          called recursively; each call to <tt class="FUNCTION">          gtk_main_quit()</tt> exits one instance of <tt class=           "FUNCTION">gtk_main()</tt>. <tt class="FUNCTION">          gtk_main_level()</tt> returns the level of recursion;          that is, it returns 0 if no <tt class="FUNCTION">          gtk_main()</tt> is on the stack, 1 if one <tt class=           "FUNCTION">gtk_main()</tt> is running, etc.        </p>        <p>          All instances of <tt class="FUNCTION">gtk_main()</tt> are          functionally identical; they are all watching the same          connection to the X server and working from the same          event queue. <tt class="FUNCTION">gtk_main()</tt>          instances are used to block, halting a function's flow of          control until some conditions are met. All GTK+ programs          use this technique to keep <tt class="FUNCTION">          main()</tt> from exiting while the application is          running. The <tt class="FUNCTION">gnome_dialog_run()</tt>          function (see <a href="sec-modaldialogs.html">the section          called <i>Modal Dialogs</i> in the chapter called <i>User          Communication: Dialogs</i></a>) uses a recursive main          loop, so it doesn't return until the user clicks a dialog          button.        </p>        <p>          Sometimes you want to process a few events, without          handing the flow of control to <tt class="FUNCTION">          gtk_main()</tt>. You can perform a single iteration of          the main loop by calling <tt class="FUNCTION">          gtk_main_iteration()</tt>. This might process a single          event, for example; it depends on what tasks are pending.          You can check whether any events need to be processed by          calling the <tt class="FUNCTION">          gtk_events_pending()</tt> predicate. Together, these two          functions allow you to temporarily return control to          GTK+, so the GUI can "catch up." For example, during a          long computation, you will want to display a progress          bar; you must allow the GTK+ main loop to run          periodically, so GTK+ can redraw the progress bar. Use          this code:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;  while (gtk_events_pending())    gtk_main_iteration();&#13;</pre>            </td>          </tr>        </table>        <div class="FIGURE">          <a name="FL-MAINLOOP"></a>          <div class="FUNCSYNOPSIS">            <a name="FL-MAINLOOP.SYNOPSIS"></a>            <table border="0" bgcolor="#E0E0E0" width="100%">              <tr>                <td><pre class="FUNCSYNOPSISINFO">#include &lt;gtk/gtkmain.h&gt;</pre>                </td>              </tr>            </table>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">gtk_main</tt></code>(void);</code>            </p>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">gtk_main_quit</tt></code>(void);</code>            </p>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">              gtk_main_iteration</tt></code>(void);</code>            </p>            <p>              <code><code class="FUNCDEF">gint <tt class=              "FUNCTION">              gtk_events_pending</tt></code>(void);</code>            </p>            <p>              <code><code class="FUNCDEF">guint <tt class=              "FUNCTION">gtk_main_level</tt></code>(void);</code>            </p>          </div>          <p>            <b>Figure 28. Main Loop</b>          </p>        </div>      </div>      <div class="SECT2">        <h2 class="SECT2">          <a name="Z61">Quit Functions</a>        </h2>        <p>          A <i class="FIRSTTERM">quit function</i> is a callback to          be invoked when <tt class="FUNCTION">gtk_main_quit()</tt>          is called. In other words, the callback runs just before          <tt class="FUNCTION">gtk_main()</tt> returns. The          callback should be a <span class="STRUCTNAME">          GtkFunction</span>, defined as follows:        </p>        <table border="0" bgcolor="#E0E0E0" width="100%">          <tr>            <td><pre class="PROGRAMLISTING">&#13;typedef gint (*GtkFunction) (gpointer data);&#13;</pre>            </td>          </tr>        </table>        <p>          Quit functions are added with <tt class="FUNCTION">          gtk_quit_add()</tt> (<a href=           "sec-mainloop.html#FL-QUITFUNCS">Figure 29</a>). When          adding a quit function, you must specify a main loop          level, as returned by <tt class="FUNCTION">          gtk_main_level()</tt>. The second and third arguments          specify a callback and callback data.        </p>        <p>          The callback's return value indicates whether the          callback should be invoked again. As long as the callback          returns <span class="STRUCTNAME">TRUE</span>, it will be          repeatedly invoked. As soon as it returns <span class=           "STRUCTNAME">FALSE</span>, it is disconnected. When all          quit functions have returned <span class="STRUCTNAME">          FALSE</span>, <tt class="FUNCTION">gtk_main()</tt> can          return.        </p>        <p>          <tt class="FUNCTION">gtk_quit_add()</tt> returns an ID          number that can be used to remove the quit function with          <tt class="FUNCTION">gtk_quit_remove()</tt>. You can also          remove a quit function by passing its callback data to          <tt class="FUNCTION">gtk_quit_remove_by_data()</tt>.        </p>        <div class="FIGURE">          <a name="FL-QUITFUNCS"></a>          <div class="FUNCSYNOPSIS">            <a name="FL-QUITFUNCS.SYNOPSIS"></a>            <table border="0" bgcolor="#E0E0E0" width="100%">              <tr>                <td><pre class="FUNCSYNOPSISINFO">#include &lt;gtk/gtkmain.h&gt;</pre>                </td>              </tr>            </table>            <p>              <code><code class="FUNCDEF">guint <tt class=              "FUNCTION">gtk_quit_add</tt></code>(guint <tt class=               "PARAMETER"><i>main_level</i></tt>, GtkFunction <tt              class="PARAMETER"><i>function</i></tt>, gpointer <tt              class="PARAMETER"><i>data</i></tt>);</code>            </p>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">gtk_quit_remove</tt></code>(guint <tt              class="PARAMETER"><i>              quit_handler_id</i></tt>);</code>            </p>            <p>              <code><code class="FUNCDEF">void <tt class=              "FUNCTION">              gtk_quit_remove_by_data</tt></code>(gpointer <tt              class="PARAMETER"><i>data</i></tt>);</code>            </p>          </div>          <p>            <b>Figure 29. Quit Functions</b>          </p>        </div>      </div>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲一区二区在线视频| 黄网站免费久久| 日韩理论片网站| 中文字幕+乱码+中文字幕一区| 日韩欧美的一区二区| 日韩一区二区三区在线视频| 日韩三级高清在线| 精品国产伦一区二区三区观看体验| 91精品蜜臀在线一区尤物| 欧美日韩成人综合天天影院| 欧美日韩国产不卡| 91超碰这里只有精品国产| 91精品国产91久久久久久最新毛片| 欧美人狂配大交3d怪物一区 | 中文字幕第一页久久| 亚洲国产精品精华液2区45| 国产精品视频观看| 中文字幕五月欧美| 亚洲精品日日夜夜| 婷婷综合在线观看| 麻豆成人在线观看| 国产精品亚洲一区二区三区在线 | 91麻豆国产在线观看| 99精品视频在线免费观看| 欧洲精品在线观看| 欧美喷潮久久久xxxxx| 日韩精品一区二区三区中文不卡| www国产精品av| 国产清纯美女被跳蛋高潮一区二区久久w | 一区二区三区蜜桃| 日韩高清在线电影| 国产一区二区精品久久| 成人黄页在线观看| 欧美亚洲精品一区| 欧美www视频| 综合网在线视频| 视频一区欧美精品| 久久精品久久久精品美女| 国产精品18久久久久久久网站| 99精品国产视频| 91麻豆精品国产91| 中文字幕巨乱亚洲| 天堂成人国产精品一区| 国产精品一区二区在线看| 一本到一区二区三区| 欧美电影免费观看完整版| 国产精品久久久久久户外露出| 亚洲综合在线电影| 韩国三级电影一区二区| 91麻豆蜜桃一区二区三区| 日韩精品一区二区三区视频在线观看| 中文字幕国产一区| 麻豆精品视频在线观看| 高清日韩电视剧大全免费| 欧美在线播放高清精品| 久久先锋影音av鲁色资源网| 一区二区在线观看视频在线观看| 久久99精品久久久久婷婷| 一本一本久久a久久精品综合麻豆| 欧美日韩国产电影| 亚洲国产成人私人影院tom| 午夜电影网一区| 国产精品一区二区免费不卡| 欧美视频精品在线观看| 国产亚洲欧洲997久久综合| 亚洲一区二区三区爽爽爽爽爽| 国产一区二区三区四区五区美女| 成人av电影在线观看| 91精品国产综合久久久久久| 日韩理论片网站| 国产成人免费高清| 欧美色图激情小说| 欧美国产日产图区| 美女网站一区二区| 黄网站免费久久| 欧美一区二区私人影院日本| 怡红院av一区二区三区| 国产精品亚洲综合一区在线观看| 欧美一卡二卡在线| 亚洲午夜电影在线观看| 成人精品国产免费网站| 欧美成人激情免费网| 日韩黄色片在线观看| 91麻豆swag| 国产精品乱码一区二区三区软件| 日韩av电影一区| 欧美丝袜自拍制服另类| 中文字幕一区二区三区在线不卡| 激情综合色播激情啊| 日韩亚洲欧美一区| 丝袜美腿亚洲色图| 欧美三级乱人伦电影| 一区二区三区欧美| 99re这里只有精品6| 欧美国产精品中文字幕| 激情欧美一区二区三区在线观看| 日韩一区二区三区免费看| 天天色图综合网| 欧美色图片你懂的| 亚洲一区二区中文在线| 日本丰满少妇一区二区三区| 综合网在线视频| 色婷婷国产精品| 亚洲欧美日韩成人高清在线一区| 成人精品视频一区二区三区尤物| 久久久久国产精品厨房| 国产精品一二三四五| 国产日韩精品久久久| 国产69精品久久777的优势| 久久精品人人爽人人爽| 国产成人在线视频免费播放| 久久精品亚洲乱码伦伦中文| 国产成人三级在线观看| 国产欧美精品国产国产专区| 国产v综合v亚洲欧| 中文字幕一区免费在线观看| 成人av网在线| 亚洲精品国产精华液| 色噜噜狠狠色综合中国| 亚洲18影院在线观看| 欧美一区二区三区在| 免费高清在线一区| 久久久久国产精品麻豆| 丁香婷婷综合五月| 亚洲色欲色欲www| 欧美另类久久久品| 免费在线一区观看| 日本一区二区三区在线观看| 99re成人在线| 亚洲成av人片www| 日韩欧美国产电影| 国产在线不卡一卡二卡三卡四卡| 欧美激情一区二区三区四区| 91一区二区三区在线观看| 夜夜嗨av一区二区三区| 欧美福利一区二区| 国产精品性做久久久久久| 国产精品理论在线观看| 欧美午夜免费电影| 六月丁香婷婷色狠狠久久| 国产亚洲美州欧州综合国| 一本到高清视频免费精品| 三级成人在线视频| 久久久久亚洲综合| 在线观看网站黄不卡| 麻豆一区二区三区| 中文字幕日韩欧美一区二区三区| 欧美一a一片一级一片| 久久国产综合精品| 亚洲精品国久久99热| 91精品国产高清一区二区三区 | youjizz国产精品| 亚洲一区二区三区四区在线免费观看 | 国内精品嫩模私拍在线| 中文字幕欧美区| 欧美精品v国产精品v日韩精品| 久草在线在线精品观看| 成人免费在线视频| 3atv一区二区三区| 99精品热视频| 日本亚洲最大的色成网站www| 欧美国产日韩一二三区| 777精品伊人久久久久大香线蕉| 国产成人精品www牛牛影视| 亚洲电影视频在线| 中文字幕成人av| 91精品欧美综合在线观看最新 | 91精品国产综合久久久蜜臀粉嫩| 国产精品69久久久久水密桃 | 欧美揉bbbbb揉bbbbb| 国产成人精品综合在线观看| 亚洲国产成人高清精品| 中文字幕在线播放不卡一区| 日韩三级高清在线| 欧美日韩一级黄| 一本一本大道香蕉久在线精品| 久久av资源网| 亚洲成人午夜电影| 日韩久久一区二区| 久久午夜电影网| 欧美一级黄色录像| 欧美在线免费播放| 99久久er热在这里只有精品66| 国产在线精品一区在线观看麻豆| 亚洲第一综合色| 亚洲精品免费视频| 国产精品久久久久7777按摩| 精品国产一区二区三区久久影院| 欧美体内she精高潮| 91免费看片在线观看| 国产伦精品一区二区三区在线观看| 天堂精品中文字幕在线| 亚洲精品视频免费观看| 亚洲桃色在线一区| 国产精品久久99| 国产性做久久久久久| 精品国产免费人成在线观看| 日韩欧美一区中文| 69p69国产精品| 欧美日本国产视频|