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

📄 glib-key-value-file-parser.html

📁 最新gtk中文资料集
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<td> the separator</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3174262"></a><h3><a name="g-key-file-load-from-file"></a>g_key_file_load_from_file ()</h3><a class="indexterm" name="id3174277"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_key_file_load_from_file           (<a class="link" href="glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *file,                                                         <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags">GKeyFileFlags</a> flags,                                                         <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Loads a key file into an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> structure.If the file could not be loaded then <code class="literal">error</code> is set to either a <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> or <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError"><span class="type">GKeyFileError</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>key_file</code></em>&#160;:</span></p></td><td> an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> struct</td></tr><tr><td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td><td> the path of a filename to load, in the GLib filename encoding</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags"><span class="type">GKeyFileFlags</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3174502"></a><h3><a name="g-key-file-load-from-data"></a>g_key_file_load_from_data ()</h3><a class="indexterm" name="id3174518"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_key_file_load_from_data           (<a class="link" href="glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *data,                                                         <a class="link" href="glib-Basic-Types.html#gsize">gsize</a> length,                                                         <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags">GKeyFileFlags</a> flags,                                                         <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>Loads a key file from memory into an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> structure.  If the object cannot be created then <code class="literal">error</code> is set to a <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError"><span class="type">GKeyFileError</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>key_file</code></em>&#160;:</span></p></td><td> an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> struct</td></tr><tr><td><p><span class="term"><em class="parameter"><code>data</code></em>&#160;:</span></p></td><td> key file loaded in memory</td></tr><tr><td><p><span class="term"><em class="parameter"><code>length</code></em>&#160;:</span></p></td><td> the length of <em class="parameter"><code>data</code></em> in bytes</td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags"><span class="type">GKeyFileFlags</span></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3174761"></a><h3><a name="g-key-file-load-from-data-dirs"></a>g_key_file_load_from_data_dirs ()</h3><a class="indexterm" name="id3174777"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_key_file_load_from_data_dirs      (<a class="link" href="glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *file,                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **full_path,                                                         <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags">GKeyFileFlags</a> flags,                                                         <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths returned from <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-user-data-dir"><code class="function">g_get_user_data_dir()</code></a> and <a class="link" href="glib-Miscellaneous-Utility-Functions.html#g-get-system-data-dirs"><code class="function">g_get_system_data_dirs()</code></a>, loads the file into <em class="parameter"><code>key_file</code></em> and returns the file's full path in <em class="parameter"><code>full_path</code></em>.  If the file could not be loaded then an <code class="literal">error</code> isset to either a <a class="link" href="glib-File-Utilities.html#GFileError"><span class="type">GFileError</span></a> or <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError"><span class="type">GKeyFileError</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>key_file</code></em>&#160;:</span></p></td><td> an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile"><span class="type">GKeyFile</span></a> struct</td></tr><tr><td><p><span class="term"><em class="parameter"><code>file</code></em>&#160;:</span></p></td><td> a relative path to a filename to open and parse</td></tr><tr><td><p><span class="term"><em class="parameter"><code>full_path</code></em>&#160;:</span></p></td><td> return location for a string containing the full path  of the file, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><em class="parameter"><code>flags</code></em>&#160;:</span></p></td><td> flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> </td></tr><tr><td><p><span class="term"><em class="parameter"><code>error</code></em>&#160;:</span></p></td><td> return location for a <a class="link" href="glib-Error-Reporting.html#GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS"><code class="literal">NULL</code></a></td></tr><tr><td><p><span class="term"><span class="emphasis"><em>Returns</em></span>&#160;:</span></p></td><td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> othewise</td></tr></tbody></table></div><p class="since">Since  2.6</p></div><hr><div class="refsect2" lang="en"><a name="id3175067"></a><h3><a name="g-key-file-load-from-dirs"></a>g_key_file_load_from_dirs ()</h3><a class="indexterm" name="id3175083"></a><pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean">gboolean</a>            g_key_file_load_from_dirs           (<a class="link" href="glib-Key-value-file-parser.html#GKeyFile">GKeyFile</a> *key_file,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> *file,                                                         const <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **search_dirs,                                                         <a class="link" href="glib-Basic-Types.html#gchar">gchar</a> **full_path,                                                         <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags">GKeyFileFlags</a> flags,                                                         <a class="link" href="glib-Error-Reporting.html#GError">GError</a> **error);</pre><p>This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths

⌨️ 快捷键说明

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