📄 gio-gcontenttype.html
字号:
<td> <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the type is the unknown type.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3206398"></a><h3><a name="g-content-type-get-description"></a>g_content_type_get_description ()</h3><a class="indexterm" name="id3206409"></a><pre class="programlisting">char* g_content_type_get_description (const char *type);</pre><p>Gets the human readable description of the content type.</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>type</code></em> :</span></p></td><td> a content type string. </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a short description of the content type <em class="parameter"><code>type</code></em>. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3206476"></a><h3><a name="g-content-type-get-mime-type"></a>g_content_type_get_mime_type ()</h3><a class="indexterm" name="id3201381"></a><pre class="programlisting">char* g_content_type_get_mime_type (const char *type);</pre><p>Gets the mime-type for the content type. If one is registered</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>type</code></em> :</span></p></td><td> a content type string. </td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> the registered mime-type for the given <em class="parameter"><code>type</code></em>, or NULL if unknown.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3201447"></a><h3><a name="g-content-type-get-icon"></a>g_content_type_get_icon ()</h3><a class="indexterm" name="id3201458"></a><pre class="programlisting"><a class="link" href="GIcon.html" title="GIcon">GIcon</a>* g_content_type_get_icon (const char *type);</pre><p>Gets the icon for a content type.</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>type</code></em> :</span></p></td><td> a content type string.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> <a class="link" href="GIcon.html" title="GIcon"><span class="type">GIcon</span></a> corresponding to the content type.</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3201525"></a><h3><a name="g-content-type-can-be-executable"></a>g_content_type_can_be_executable ()</h3><a class="indexterm" name="id3201536"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> g_content_type_can_be_executable (const char *type);</pre><p>Checks if a content type can be executable. Note that for instancethings like text files can be executables (i.e. scripts and batch files).</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>type</code></em> :</span></p></td><td> a content type string.</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 file type corresponds to a type thatcan be executable, <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="id3201619"></a><h3><a name="g-content-type-guess"></a>g_content_type_guess ()</h3><a class="indexterm" name="id3201630"></a><pre class="programlisting">char* g_content_type_guess (const char *filename, const <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#guchar">guchar</a> *data, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gsize">gsize</a> data_size, <ahref="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean">gboolean</a> *result_uncertain);</pre><p>Guesses the content type based on example data. If the function is uncertain, <em class="parameter"><code>result_uncertain</code></em> will be set to <ahref="/usr/share/gtk-doc/html/glib/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></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>filename</code></em> :</span></p></td><td> a string.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td><td> a stream of data.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data_size</code></em> :</span></p></td><td> the size of <em class="parameter"><code>data</code></em>.</td></tr><tr><td><p><span class="term"><em class="parameter"><code>result_uncertain</code></em> :</span></p></td><td> a flag indicating the certainty of the result.</td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td><td> a string indicating a guessed content type for the given data. </td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id3201778"></a><h3><a name="g-content-types-get-registered"></a>g_content_types_get_registered ()</h3><a class="indexterm" name="id3201792"></a><pre class="programlisting"><ahref="/usr/share/gtk-doc/html/glib/glib-Doubly-Linked-Lists.html#GList">GList</a>* g_content_types_get_registered (void);</pre><p>Gets a list of strings containing all the registered content typesknown to the system. The list and its data should be freed using <em class="parameter"><code>g_list_foreach</code></em>(list, g_free, NULL) and <em class="parameter"><code>g_list_free</code></em>(list)</p><p></p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><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-Doubly-Linked-Lists.html#GList"><span class="type">GList</span></a> of the registered content types.</td></tr></tbody></table></div></div></div><div class="refsect1" lang="en"><a name="id3201855"></a><div class="refsect2" lang="en"><a name="id3201856"></a></div><hr><div class="refsect2" lang="en"><a name="id3201857"></a></div></div></div></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -