📄 gseekable.html
字号:
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the offset from the beginning of the buffer.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3180244"></a><h3><a name="g-seekable-can-seek"></a>g_seekable_can_seek ()</h3><a class="indexterm" name="id3180256"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_seekable_can_seek (<a class="link" href="GSeekable.html" title="GSeekable">GSeekable</a> *seekable);</pre><p>Tests if the stream supports the <a class="link" href="GSeekable.html#GSeekableIface"><span class="type">GSeekableIface</span></a>.</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>seekable</code></em> :</span></p></td><td> a <a class="link" href="GSeekable.html" title="GSeekable"><span class="type">GSeekable</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>seekable</code></em> can be seeked. <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3180355"></a><h3><a name="g-seekable-seek"></a>g_seekable_seek ()</h3><a class="indexterm" name="id3180368"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_seekable_seek (<a class="link" href="GSeekable.html" title="GSeekable">GSeekable</a> *seekable, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#goffset">goffset</a> offset, <ahref="/usr/share/gtk-doc/html/glib/glib-IO-Channels.html#GSeekType">GSeekType</a> type, <a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Seeks in the stream by the given <em class="parameter"><code>offset</code></em>, modified by <em class="parameter"><code>type</code></em>.</p><p>If <em class="parameter"><code>cancellable</code></em> is not <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled bytriggering the cancellable object from another thread. If the operationwas cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned.</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>seekable</code></em> :</span></p></td><td> a <a class="link" href="GSeekable.html" title="GSeekable"><span class="type">GSeekable</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-IO-Channels.html#GSeekType"><span class="type">GSeekType</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred, this function will return <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em> appropriately if present.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3180635"></a><h3><a name="g-seekable-can-truncate"></a>g_seekable_can_truncate ()</h3><a class="indexterm" name="id3183765"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_seekable_can_truncate (<a class="link" href="GSeekable.html" title="GSeekable">GSeekable</a> *seekable);</pre><p>Tests if the stream can be truncated.</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>seekable</code></em> :</span></p></td><td> a <a class="link" href="GSeekable.html" title="GSeekable"><span class="type">GSeekable</span></a>.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the stream can be truncated, <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3183851"></a><h3><a name="g-seekable-truncate"></a>g_seekable_truncate ()</h3><a class="indexterm" name="id3183863"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_seekable_truncate (<a class="link" href="GSeekable.html" title="GSeekable">GSeekable</a> *seekable, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#goffset">goffset</a> offset, <a class="link" href="GCancellable.html" title="GCancellable">GCancellable</a> *cancellable, <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Truncates a stream with a given <span class="type">offset</span>. </p><p>If <em class="parameter"><code>cancellable</code></em> is not <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a>, then the operation can be cancelled bytriggering the cancellable object from another thread. If the operationwas cancelled, the error <a class="link" href="gio-GIOError.html#G-IO-ERROR-CANCELLED:CAPS"><code class="literal">G_IO_ERROR_CANCELLED</code></a> will be returned. If anoperation was partially finished when the operation was cancelled thepartial result will be returned, without an error.</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>seekable</code></em> :</span></p></td><td> a <a class="link" href="GSeekable.html" title="GSeekable"><span class="type">GSeekable</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>offset</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#goffset"><span class="type">goffset</span></a>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>cancellable</code></em> :</span></p></td><td> optional <a class="link" href="GCancellable.html" title="GCancellable"><span class="type">GCancellable</span></a> object, <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore. </td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td><td> a <ahref="/usr/share/gtk-doc/html/glib/glib-Error-Reporting.html#GError"><span class="type">GError</span></a> location to store the error occuring, or <ahref="/usr/share/gtk-doc/html/liboil/liboil-liboiljunk.html#NULL:CAPS"><code class="literal">NULL</code></a> to ignore.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if successful. If an error has occurred, this function will return <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> and set <em class="parameter"><code>error</code></em> appropriately if present. </td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3184100"></a><h2>See Also</h2><a class="link" href="GInputStream.html" title="GInputStream"><span class="type">GInputStream</span></a>, <a class="link" href="GOutputStream.html" title="GOutputStream"><span class="type">GOutputStream</span></a></div><div class="refsect1" lang="en"><a name="id3184122"></a><div class="refsect2" lang="en"><a name="id3184123"></a></div><hr><div class="refsect2" lang="en"><a name="id3184124"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -