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

📄 glib-double-ended-queues.html

📁 glid编写实例
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td><td> the data for the new element</td></tr><tr><td><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></td><td> the position to insert the new element. If <em class="parameter"><code>n</code></em> is negative or    larger than the number of elements in the <em class="parameter"><code>queue</code></em>, the element is    added to the end of the queue.</td></tr></tbody></table></div><p>Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3126920"></a><h3><a name="g-queue-pop-head"></a>g_queue_pop_head ()</h3><a class="indexterm" name="id3126931"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_pop_head                (<a 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><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the data of the first element in the queue, or <code class="literal">NULL</code> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3127006"></a><h3><a name="g-queue-pop-tail"></a>g_queue_pop_tail ()</h3><a class="indexterm" name="id3127016"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_pop_tail                (<a 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><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the data of the last element in the queue, or <code class="literal">NULL</code> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3127091"></a><h3><a name="g-queue-pop-nth"></a>g_queue_pop_nth ()</h3><a class="indexterm" name="id3127101"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_pop_nth                 (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                             <a href="glib-Basic-Types.html#guint">guint</a> n);</pre><p>Removes the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></td><td> the position of the element.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the element's data, or <code class="literal">NULL</code> 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>Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3127224"></a><h3><a name="g-queue-peek-head"></a>g_queue_peek_head ()</h3><a class="indexterm" name="id3127235"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_peek_head               (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre><p>Returns the first element of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the data of the first element in the queue, or <code class="literal">NULL</code> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3127309"></a><h3><a name="g-queue-peek-tail"></a>g_queue_peek_tail ()</h3><a class="indexterm" name="id3127320"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_peek_tail               (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue);</pre><p>Returns the last element of the queue.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a>.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> the data of the last element in the queue, or <code class="literal">NULL</code> if the queue  is empty.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3127395"></a><h3><a name="g-queue-peek-nth"></a>g_queue_peek_nth ()</h3><a class="indexterm" name="id3127405"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gpointer">gpointer</a>    g_queue_peek_nth                (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                             <a href="glib-Basic-Types.html#guint">guint</a> n);</pre><p>Returns the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>n</code></em>&#160;:</span></td><td> the position of the element.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> The data for the <em class="parameter"><code>n</code></em>'th element of <em class="parameter"><code>queue</code></em>, or <code class="literal">NULL</code> 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>Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3127540"></a><h3><a name="g-queue-index"></a>g_queue_index ()</h3><a class="indexterm" name="id3127550"></a><pre class="programlisting"><a href="glib-Basic-Types.html#gint">gint</a>        g_queue_index                   (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                             <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre><p>Returns the position of the first element in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td><td> the data to find.</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></td><td> The position of the first element in <em class="parameter"><code>queue</code></em> which contains <em class="parameter"><code>data</code></em>, or -1 if no element in <em class="parameter"><code>queue</code></em> contains <em class="parameter"><code>data</code></em>.</td></tr></tbody></table></div><p>Since  2.4</p></div><hr><div class="refsect2" lang="en"><a name="id3127681"></a><h3><a name="g-queue-remove"></a>g_queue_remove ()</h3><a class="indexterm" name="id3127692"></a><pre class="programlisting">void        g_queue_remove                  (<a href="glib-Double-ended-Queues.html#GQueue">GQueue</a> *queue,                                             <a href="glib-Basic-Types.html#gconstpointer">gconstpointer</a> data);</pre><p>Removes the first element in <em class="parameter"><code>queue</code></em> that contains <em class="parameter"><code>data</code></em>.</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><em class="parameter"><code>queue</code></em>&#160;:</span></td><td> a <a href="glib-Double-ended-Queues.html#GQueue"><span class="type">GQueue</span></a></td></tr><tr><td><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></td><td> data to remove.</td></tr></tbody></table></div><p>Since  2.4</p></div>

⌨️ 快捷键说明

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