亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
欧美电影免费观看高清完整版在线观看 | 日韩视频在线观看一区二区| 成人av综合一区| 国产精品亚洲午夜一区二区三区 | 国产精品久久久久久亚洲毛片 | 一区二区三区成人在线视频| 亚洲丝袜精品丝袜在线| 亚洲人成人一区二区在线观看| 中文字幕高清不卡| 自拍偷拍国产精品| 亚洲一卡二卡三卡四卡五卡| 亚洲成在人线免费| 免费人成在线不卡| 激情五月激情综合网| 黄页网站大全一区二区| 国产91精品一区二区麻豆网站| 成人福利电影精品一区二区在线观看| 国产成人午夜99999| av亚洲精华国产精华| 在线精品国精品国产尤物884a| 欧美高清精品3d| 久久视频一区二区| 亚洲黄色av一区| 午夜视频在线观看一区| 六月丁香婷婷久久| 94-欧美-setu| 日韩午夜在线观看视频| 国产精品三级久久久久三级| 亚洲午夜影视影院在线观看| 韩国三级中文字幕hd久久精品| 不卡电影一区二区三区| 欧美精品在线一区二区| 欧美国产一区视频在线观看| 亚洲妇女屁股眼交7| 国产91精品露脸国语对白| 欧美亚洲禁片免费| 国产亚洲一区二区三区| 亚洲www啪成人一区二区麻豆 | 9i看片成人免费高清| 欧美日韩中文国产| 日本一区二区综合亚洲| 日韩精品色哟哟| 99久久免费视频.com| 欧美不卡一区二区三区| 亚洲自拍偷拍图区| 成人免费视频播放| 欧美成人伊人久久综合网| 亚洲精品自拍动漫在线| 国产成人精品影视| 精品国产一区二区三区久久久蜜月| 亚洲欧美日韩精品久久久久| 国产精品一区二区久久精品爱涩 | 色婷婷狠狠综合| 国产欧美综合在线观看第十页 | 精品国产91乱码一区二区三区 | 风间由美一区二区三区在线观看 | 精品一区二区三区久久久| 欧美中文字幕一二三区视频| 国产欧美日产一区| 精品亚洲成a人| 国产成人免费9x9x人网站视频| 国产免费观看久久| 日韩无一区二区| 成人黄色小视频| 日本不卡在线视频| 日韩精品久久理论片| 久久99久久久久| 日本成人中文字幕| 中文字幕一区二区三区精华液| 欧美日韩中文字幕一区| 欧美日韩一区二区电影| 91精品国产综合久久福利软件 | 精品乱人伦一区二区三区| 717成人午夜免费福利电影| 欧美日韩综合一区| 久久午夜色播影院免费高清| 亚洲国产精品国自产拍av| 亚洲欧洲成人自拍| 麻豆精品精品国产自在97香蕉| 国产精品小仙女| 91在线播放网址| 日韩欧美亚洲一区二区| 久久久久久日产精品| 一区二区三区免费看视频| 国产乱子轮精品视频| 日韩欧美一级片| 成人激情免费视频| 欧美sm美女调教| 樱花草国产18久久久久| 精品综合免费视频观看| 91在线视频观看| 国产日产亚洲精品系列| 人人精品人人爱| 欧美唯美清纯偷拍| 国产精品成人免费精品自在线观看| 亚洲二区在线观看| 91污片在线观看| 中文字幕亚洲一区二区av在线| 国产精品资源网| 精品国产免费人成在线观看| 日韩在线卡一卡二| 精品国免费一区二区三区| 国产丝袜欧美中文另类| 国产午夜亚洲精品不卡| 久久精品国产一区二区| 欧美妇女性影城| 丝袜诱惑亚洲看片| 在线播放国产精品二区一二区四区| 国产欧美一区二区精品婷婷| 成人综合激情网| 国产精品久久一卡二卡| 99久久精品一区二区| 亚洲丝袜另类动漫二区| 欧美日韩精品一区视频| 久久精品国产**网站演员| 日韩欧美国产电影| 欧洲精品在线观看| 国产精品一区专区| 宅男在线国产精品| 精品一区二区三区在线播放视频 | 亚洲免费在线看| 欧美蜜桃一区二区三区| 久久99精品国产91久久来源| 久久久蜜臀国产一区二区| 91电影在线观看| 麻豆精品国产91久久久久久| 中文字幕在线不卡国产视频| 91麻豆123| 成人免费高清在线| 免费精品视频在线| 奇米综合一区二区三区精品视频| 国产精品久久影院| 青青草伊人久久| 国产精品77777| 亚洲一区二区三区中文字幕| 精品久久99ma| 欧美色男人天堂| 在线精品国精品国产尤物884a| 国产精品1区二区.| 蜜臀av性久久久久蜜臀aⅴ| 亚洲资源中文字幕| 午夜精品久久久久久久99水蜜桃 | 色综合色综合色综合| 日本一区二区成人在线| 韩国一区二区视频| 久久国产精品99精品国产| 蜜臀99久久精品久久久久久软件| 亚洲一区二区欧美日韩 | 国产一区三区三区| 蜜臀a∨国产成人精品| 美女在线一区二区| 国产一区二区免费在线| 色综合天天视频在线观看| 欧美性淫爽ww久久久久无| 不卡av在线网| 亚洲一二三区视频在线观看| 亚洲男同性视频| 日韩精品欧美成人高清一区二区| 极品美女销魂一区二区三区免费 | 国产精品免费丝袜| 亚洲曰韩产成在线| 国产一区二区三区电影在线观看 | 欧美在线看片a免费观看| 欧美va亚洲va国产综合| 国产精品亲子伦对白| 美女爽到高潮91| 欧美人与性动xxxx| 久久精品夜色噜噜亚洲a∨| 亚洲欧美激情一区二区| 国产精品99久久久| 精品国产91乱码一区二区三区| 日韩午夜电影av| 亚洲图片另类小说| 国产宾馆实践打屁股91| 久久精品一区二区三区av| 国产在线视频精品一区| 久久久青草青青国产亚洲免观| 免费不卡在线观看| 成人激情文学综合网| 欧美经典一区二区| 国产成人精品一区二| 国产精品毛片无遮挡高清| 99久久伊人久久99| 亚洲成人在线免费| 欧美日韩亚洲综合| 亚洲国产精品激情在线观看| 另类小说图片综合网| 91麻豆文化传媒在线观看| 欧美mv日韩mv国产网站| 精品乱码亚洲一区二区不卡| 国产精品丝袜一区| 99久久婷婷国产综合精品| 美女视频一区二区| 亚洲蜜桃精久久久久久久| 日韩欧美在线影院| 欧美最新大片在线看| jlzzjlzz国产精品久久| 韩国三级在线一区| 美国三级日本三级久久99| 亚洲精品国产第一综合99久久|