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

📄 glib-double-ended-queues.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td><td> the data to insert</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3264576"></a><h3><a name="g-queue-insert-sorted"></a>g_queue_insert_sorted ()</h3><a class="indexterm" name="id3264591"></a><pre class="programlisting">void                g_queue_insert_sorted               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> data,                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc">GCompareDataFunc</a> func,                                                         <a class="link" href="glib-Basic-Types.html#gpointer">gpointer</a> user_data);</pre><p>Inserts <em class="parameter"><code>data</code></em> into <em class="parameter"><code>queue</code></em> using <em class="parameter"><code>func</code></em> to determine the new position.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td><td> the data to insert</td></tr><tr><td><p><span class="term"><em class="parameter"><code>func</code></em>&#160;:</span></p></td><td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GCompareDataFunc"><span class="type">GCompareDataFunc</span></a> used to compare elements in the queue. It is    called with two elements of the <em class="parameter"><code>queue</code></em> and <em class="parameter"><code>user_data</code></em>. It should    return 0 if the elements are equal, a negative value if the first    element comes before the second, and a positive value if the second    element comes before the first.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>user_data</code></em>&#160;:</span></p></td><td> user data passed to <em class="parameter"><code>func</code></em>.</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3264770"></a><h3><a name="g-queue-push-head-link"></a>g_queue_push_head_link ()</h3><a class="indexterm" name="id3264783"></a><pre class="programlisting">void                g_queue_push_head_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre><p>Adds a new element at the head of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td><td> a single <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element, <span class="emphasis"><em>not</em></span> a list with    more than one element.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3264875"></a><h3><a name="g-queue-push-tail-link"></a>g_queue_push_tail_link ()</h3><a class="indexterm" name="id3264888"></a><pre class="programlisting">void                g_queue_push_tail_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre><p>Adds a new element at the tail of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td><td> a single <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element, <span class="emphasis"><em>not</em></span> a list with  more than one element.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3264980"></a><h3><a name="g-queue-push-nth-link"></a>g_queue_push_nth_link ()</h3><a class="indexterm" name="id3264995"></a><pre class="programlisting">void                g_queue_push_nth_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                                         <a class="link" href="glib-Basic-Types.html#gint">gint</a> n,                                                         <a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a> *link_);</pre><p>Inserts <em class="parameter"><code>link</code></em> into <em class="parameter"><code>queue</code></em> at the given position.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td><td> the position to insert the link. If this is negative or larger than    the number of elements in <em class="parameter"><code>queue</code></em>, the link is added to the end of    <em class="parameter"><code>queue</code></em>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>link_</code></em>&#160;:</span></p></td><td> the link to add to <em class="parameter"><code>queue</code></em></td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3265134"></a><h3><a name="g-queue-pop-head-link"></a>g_queue_pop_head_link ()</h3><a class="indexterm" name="id3265147"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_head_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre><p>Removes the first element of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element at the head of the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3265235"></a><h3><a name="g-queue-pop-tail-link"></a>g_queue_pop_tail_link ()</h3><a class="indexterm" name="id3265247"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_tail_link               (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre><p>Removes the last element of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> the <a class="link" href="glib-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> element at the tail of the queue, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3265335"></a><h3><a name="g-queue-pop-nth-link"></a>g_queue_pop_nth_link ()</h3><a class="indexterm" name="id3265350"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_pop_nth_link                (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                                         <a class="link" href="glib-Basic-Types.html#guint">guint</a> n);</pre><p>Removes and returns the link at the given position.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><p><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></p></td><td> a <a class="link" href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></p></td><td> the link's position</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> The <em class="parameter"><code>n</code></em>'th link, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a> if <em class="parameter"><code>n</code></em> is off the end of <em class="parameter"><code>queue</code></em>.</td></tr></tbody></table></div><p class="since">Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3265475"></a><h3><a name="g-queue-peek-head-link"></a>g_queue_peek_head_link ()</h3><a class="indexterm" name="id3265490"></a><pre class="programlisting"><a class="link" href="glib-Doubly-Linked-Lists.html#GList">GList</a>*              g_queue_peek_head_link              (<a class="link" href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre><p>Returns the first link in <em class="parameter"><code>queue</code></em></p>

⌨️ 快捷键说明

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