blob: 15275d1fc0c731f7c8a684c94880673177896ab4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Key-value file parser</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="index.html" title="GLib Reference Manual">
<link rel="up" href="glib-utilities.html" title="GLib Utilities">
<link rel="prev" href="glib-Simple-XML-Subset-Parser.html" title="Simple XML Subset Parser">
<link rel="next" href="glib-Bookmark-file-parser.html" title="Bookmark file parser">
<meta name="generator" content="GTK-Doc V1.14 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="glib-Simple-XML-Subset-Parser.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="glib-utilities.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GLib Reference Manual</th>
<td><a accesskey="n" href="glib-Bookmark-file-parser.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#glib-Key-value-file-parser.synopsis" class="shortcut">Top</a>
 | 
<a href="#glib-Key-value-file-parser.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry" title="Key-value file parser">
<a name="glib-Key-value-file-parser"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="glib-Key-value-file-parser.top_of_page"></a>Key-value file parser</span></h2>
<p>Key-value file parser — parses <code class="filename">.ini</code>-like config files</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv" title="Synopsis">
<a name="glib-Key-value-file-parser.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include &lt;glib.h&gt;
<a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile">GKeyFile</a>;
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR:CAPS" title="G_KEY_FILE_ERROR">G_KEY_FILE_ERROR</a>
enum <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError" title="enum GKeyFileError">GKeyFileError</a>;
enum <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags">GKeyFileFlags</a>;
<a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="returnvalue">GKeyFile</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-new" title="g_key_file_new ()">g_key_file_new</a> (<em class="parameter"><code><span class="type">void</span></code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-free" title="g_key_file_free ()">g_key_file_free</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-list-separator" title="g_key_file_set_list_separator ()">g_key_file_set_list_separator</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> separator</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-file" title="g_key_file_load_from_file ()">g_key_file_load_from_file</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-data" title="g_key_file_load_from_data ()">g_key_file_load_from_data</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-data-dirs" title="g_key_file_load_from_data_dirs ()">g_key_file_load_from_data_dirs</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **full_path</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-dirs" title="g_key_file_load_from_dirs ()">g_key_file_load_from_dirs</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **search_dirs</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **full_path</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-to-data" title="g_key_file_to_data ()">g_key_file_to_data</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-start-group" title="g_key_file_get_start_group ()">g_key_file_get_start_group</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-groups" title="g_key_file_get_groups ()">g_key_file_get_groups</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-keys" title="g_key_file_get_keys ()">g_key_file_get_keys</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-has-group" title="g_key_file_has_group ()">g_key_file_has_group</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-has-key" title="g_key_file_has_key ()">g_key_file_has_key</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-value" title="g_key_file_get_value ()">g_key_file_get_value</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-string" title="g_key_file_get_string ()">g_key_file_get_string</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-locale-string" title="g_key_file_get_locale_string ()">g_key_file_get_locale_string</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-boolean" title="g_key_file_get_boolean ()">g_key_file_get_boolean</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-integer" title="g_key_file_get_integer ()">g_key_file_get_integer</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-double" title="g_key_file_get_double ()">g_key_file_get_double</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-string-list" title="g_key_file_get_string_list ()">g_key_file_get_string_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-locale-string-list" title="g_key_file_get_locale_string_list ()">g_key_file_get_locale_string_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-boolean-list" title="g_key_file_get_boolean_list ()">g_key_file_get_boolean_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-integer-list" title="g_key_file_get_integer_list ()">g_key_file_get_integer_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-double-list" title="g_key_file_get_double_list ()">g_key_file_get_double_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-comment" title="g_key_file_get_comment ()">g_key_file_get_comment</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-value" title="g_key_file_set_value ()">g_key_file_set_value</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-string" title="g_key_file_set_string ()">g_key_file_set_string</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-locale-string" title="g_key_file_set_locale_string ()">g_key_file_set_locale_string</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-boolean" title="g_key_file_set_boolean ()">g_key_file_set_boolean</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-integer" title="g_key_file_set_integer ()">g_key_file_set_integer</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-double" title="g_key_file_set_double ()">g_key_file_set_double</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-string-list" title="g_key_file_set_string_list ()">g_key_file_set_string_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> * const list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-locale-string-list" title="g_key_file_set_locale_string_list ()">g_key_file_set_locale_string_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> * const list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-boolean-list" title="g_key_file_set_boolean_list ()">g_key_file_set_boolean_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-integer-list" title="g_key_file_set_integer_list ()">g_key_file_set_integer_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);
<span class="returnvalue">void</span> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-double-list" title="g_key_file_set_double_list ()">g_key_file_set_double_list</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-comment" title="g_key_file_set_comment ()">g_key_file_set_comment</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *comment</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-remove-group" title="g_key_file_remove_group ()">g_key_file_remove_group</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-remove-key" title="g_key_file_remove_key ()">g_key_file_remove_key</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
<a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="glib-Key-value-file-parser.html#g-key-file-remove-comment" title="g_key_file_remove_comment ()">g_key_file_remove_comment</a> (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP">G_KEY_FILE_DESKTOP_GROUP</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TYPE:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TYPE">G_KEY_FILE_DESKTOP_KEY_TYPE</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-VERSION:CAPS" title="G_KEY_FILE_DESKTOP_KEY_VERSION">G_KEY_FILE_DESKTOP_KEY_VERSION</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-NAME:CAPS" title="G_KEY_FILE_DESKTOP_KEY_NAME">G_KEY_FILE_DESKTOP_KEY_NAME</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-GENERIC-NAME:CAPS" title="G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME">G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-NO-DISPLAY:CAPS" title="G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY">G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-COMMENT:CAPS" title="G_KEY_FILE_DESKTOP_KEY_COMMENT">G_KEY_FILE_DESKTOP_KEY_COMMENT</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-ICON:CAPS" title="G_KEY_FILE_DESKTOP_KEY_ICON">G_KEY_FILE_DESKTOP_KEY_ICON</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-HIDDEN:CAPS" title="G_KEY_FILE_DESKTOP_KEY_HIDDEN">G_KEY_FILE_DESKTOP_KEY_HIDDEN</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-ONLY-SHOW-IN:CAPS" title="G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN">G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-NOT-SHOW-IN:CAPS" title="G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN">G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TRY-EXEC:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TRY_EXEC">G_KEY_FILE_DESKTOP_KEY_TRY_EXEC</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-EXEC:CAPS" title="G_KEY_FILE_DESKTOP_KEY_EXEC">G_KEY_FILE_DESKTOP_KEY_EXEC</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-PATH:CAPS" title="G_KEY_FILE_DESKTOP_KEY_PATH">G_KEY_FILE_DESKTOP_KEY_PATH</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TERMINAL:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TERMINAL">G_KEY_FILE_DESKTOP_KEY_TERMINAL</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-MIME-TYPE:CAPS" title="G_KEY_FILE_DESKTOP_KEY_MIME_TYPE">G_KEY_FILE_DESKTOP_KEY_MIME_TYPE</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-CATEGORIES:CAPS" title="G_KEY_FILE_DESKTOP_KEY_CATEGORIES">G_KEY_FILE_DESKTOP_KEY_CATEGORIES</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-STARTUP-NOTIFY:CAPS" title="G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY">G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-STARTUP-WM-CLASS:CAPS" title="G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS">G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-URL:CAPS" title="G_KEY_FILE_DESKTOP_KEY_URL">G_KEY_FILE_DESKTOP_KEY_URL</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-APPLICATION:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_APPLICATION">G_KEY_FILE_DESKTOP_TYPE_APPLICATION</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-LINK:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_LINK">G_KEY_FILE_DESKTOP_TYPE_LINK</a>
#define <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-DIRECTORY:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_DIRECTORY">G_KEY_FILE_DESKTOP_TYPE_DIRECTORY</a>
</pre>
</div>
<div class="refsect1" title="Description">
<a name="glib-Key-value-file-parser.description"></a><h2>Description</h2>
<p>
<a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> lets you parse, edit or create files containing groups of
key-value pairs, which we call <em class="firstterm">key files</em> for
lack of a better name. Several freedesktop.org specifications use
key files now, e.g the
<a class="ulink" href="http://freedesktop.org/Standards/desktop-entry-spec" target="_top">Desktop
Entry Specification</a> and the
<a class="ulink" href="http://freedesktop.org/Standards/icon-theme-spec" target="_top">Icon
Theme Specification</a>.
</p>
<p>
The syntax of key files is described in detail in the
<a class="ulink" href="http://freedesktop.org/Standards/desktop-entry-spec" target="_top">Desktop
Entry Specification</a>, here is a quick summary: Key files
consists of groups of key-value pairs, interspersed with comments.
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="preproc"># this</span><span class="normal"> is just an example</span>
<span class="preproc"># there</span><span class="normal"> can be comments before the first group</span>
<span class="symbol">[</span><span class="normal">First Group</span><span class="symbol">]</span>
<span class="normal">Name</span><span class="symbol">=</span><span class="normal">Key File Example</span><span class="symbol">\</span><span class="normal">tthis value shows</span><span class="symbol">\</span><span class="normal">nescaping</span>
<span class="preproc"># localized</span><span class="normal"> strings are stored in multiple key</span><span class="symbol">-</span><span class="normal">value pairs</span>
<span class="normal">Welcome</span><span class="symbol">=</span><span class="normal">Hello</span>
<span class="normal">Welcome</span><span class="symbol">[</span><span class="normal">de</span><span class="symbol">]=</span><span class="normal">Hallo</span>
<span class="normal">Welcome</span><span class="symbol">[</span><span class="normal">fr_FR</span><span class="symbol">]=</span><span class="normal">Bonjour</span>
<span class="normal">Welcome</span><span class="symbol">[</span><span class="normal">it</span><span class="symbol">]=</span><span class="normal">Ciao</span>
<span class="normal">Welcome</span><span class="symbol">[</span><span class="normal">be@latin</span><span class="symbol">]=</span><span class="normal">Hello</span>
<span class="symbol">[</span><span class="normal">Another Group</span><span class="symbol">]</span>
<span class="normal">Numbers</span><span class="symbol">=</span><span class="number">2</span><span class="symbol">;</span><span class="number">20</span><span class="symbol">;-</span><span class="number">200</span><span class="symbol">;</span><span class="number">0</span>
<span class="normal">Booleans</span><span class="symbol">=</span><span class="normal">true</span><span class="symbol">;</span><span class="normal">false</span><span class="symbol">;</span><span class="normal">true</span><span class="symbol">;</span><span class="normal">true</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
Lines beginning with a '#' and blank lines are considered comments.
</p>
<p>
Groups are started by a header line containing the group name enclosed
in '[' and ']', and ended implicitly by the start of the next group or
the end of the file. Each key-value pair must be contained in a group.
</p>
<p>
Key-value pairs generally have the form <code class="literal">key=value</code>,
with the exception of localized strings, which have the form
<code class="literal">key[locale]=value</code>, with a locale identifier of the form
<code class="literal">lang_COUNTRY<em class="parameter"><code>MODIFIER</code></em></code> where <code class="literal">COUNTRY</code> and
<code class="literal">MODIFIER</code> are optional. Space before and after the
'=' character are ignored. Newline, tab, carriage return and backslash
characters in value are escaped as \n, \t, \r, and \\, respectively.
To preserve leading spaces in values, these can also be escaped as \s.
</p>
<p>
Key files can store strings (possibly with localized variants), integers,
booleans and lists of these. Lists are separated by a separator character,
typically ';' or ','. To use the list separator character in a value in
a list, it has to be escaped by prefixing it with a backslash.
</p>
<p>
This syntax is obviously inspired by the <code class="filename">.ini</code>
files commonly met on Windows, but there are some important differences:
</p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem"><p>
<code class="filename">.ini</code> files use the ';' character to begin comments,
key files use the '#' character.
</p></li>
<li class="listitem"><p>
Key files do not allow for ungrouped keys meaning only comments can precede the first group.
</p></li>
<li class="listitem"><p>
Key files are always encoded in UTF-8.
</p></li>
<li class="listitem"><p>
Key and Group names are case-sensitive, for example a group called
<code class="literal">[GROUP]</code> is a different group from <code class="literal">[group]</code>.
</p></li>
<li class="listitem"><p>
<code class="filename">.ini</code> files don't have a strongly typed boolean entry type, they only
have <code class="literal">GetProfileInt</code>. In <span class="structname">GKeyFile</span> only
<code class="literal">true</code> and <code class="literal">false</code> (in lower case) are allowed.
</p></li>
</ul></div>
<p>
</p>
<p>
Note that in contrast to the
<a class="ulink" href="http://freedesktop.org/Standards/desktop-entry-spec" target="_top">Desktop
Entry Specification</a>, groups in key files may contain the same
key multiple times; the last entry wins. Key files may also contain
multiple groups with the same name; they are merged together.
Another difference is that keys and group names in key files are not
restricted to ASCII characters.
</p>
</div>
<div class="refsect1" title="Details">
<a name="glib-Key-value-file-parser.details"></a><h2>Details</h2>
<div class="refsect2" title="GKeyFile">
<a name="GKeyFile"></a><h3>GKeyFile</h3>
<pre class="programlisting">typedef struct _GKeyFile GKeyFile;</pre>
<p>
The <span class="structname">GKeyFile</span> struct contains only private fields
and should not be used directly.
</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_ERROR">
<a name="G-KEY-FILE-ERROR:CAPS"></a><h3>G_KEY_FILE_ERROR</h3>
<pre class="programlisting">#define G_KEY_FILE_ERROR g_key_file_error_quark()
</pre>
<p>
Error domain for key file parsing. Errors in this domain will
be from the <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError" title="enum GKeyFileError"><span class="type">GKeyFileError</span></a> enumeration. See <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> for information on
error domains.
</p>
</div>
<hr>
<div class="refsect2" title="enum GKeyFileError">
<a name="GKeyFileError"></a><h3>enum GKeyFileError</h3>
<pre class="programlisting">typedef enum
{
G_KEY_FILE_ERROR_UNKNOWN_ENCODING,
G_KEY_FILE_ERROR_PARSE,
G_KEY_FILE_ERROR_NOT_FOUND,
G_KEY_FILE_ERROR_KEY_NOT_FOUND,
G_KEY_FILE_ERROR_GROUP_NOT_FOUND,
G_KEY_FILE_ERROR_INVALID_VALUE
} GKeyFileError;
</pre>
<p>
Error codes returned by key file parsing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-UNKNOWN-ENCODING:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_UNKNOWN_ENCODING</code></span></p></td>
<td>the text being parsed was in an unknown encoding
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-PARSE:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_PARSE</code></span></p></td>
<td>document was ill-formed
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_NOT_FOUND</code></span></p></td>
<td>the file was not found
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_KEY_NOT_FOUND</code></span></p></td>
<td>a requested key was not found
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-GROUP-NOT-FOUND:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</code></span></p></td>
<td>a requested group was not found
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_ERROR_INVALID_VALUE</code></span></p></td>
<td>a value could not be parsed
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="enum GKeyFileFlags">
<a name="GKeyFileFlags"></a><h3>enum GKeyFileFlags</h3>
<pre class="programlisting">typedef enum
{
G_KEY_FILE_NONE = 0,
G_KEY_FILE_KEEP_COMMENTS = 1 &lt;&lt; 0,
G_KEY_FILE_KEEP_TRANSLATIONS = 1 &lt;&lt; 1
} GKeyFileFlags;
</pre>
<p>
Flags which influence the parsing.
</p>
<div class="variablelist"><table border="0">
<col align="left" valign="top">
<tbody>
<tr>
<td><p><a name="G-KEY-FILE-NONE:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_NONE</code></span></p></td>
<td>No flags, default behaviour
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-KEEP-COMMENTS:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_KEEP_COMMENTS</code></span></p></td>
<td>Use this flag if you plan to write the (possibly modified)
contents of the key file back to a file; otherwise all comments will be lost when
the key file is written back.
</td>
</tr>
<tr>
<td><p><a name="G-KEY-FILE-KEEP-TRANSLATIONS:CAPS"></a><span class="term"><code class="literal">G_KEY_FILE_KEEP_TRANSLATIONS</code></span></p></td>
<td>Use this flag if you plan to write the (possibly modified)
contents of the key file back to a file; otherwise only the translations for the current
language will be written back.
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2" title="g_key_file_new ()">
<a name="g-key-file-new"></a><h3>g_key_file_new ()</h3>
<pre class="programlisting"><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="returnvalue">GKeyFile</span></a> * g_key_file_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>
Creates a new empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> object. Use
<a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-file" title="g_key_file_load_from_file ()"><code class="function">g_key_file_load_from_file()</code></a>, <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-data" title="g_key_file_load_from_data ()"><code class="function">g_key_file_load_from_data()</code></a>,
<a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-dirs" title="g_key_file_load_from_dirs ()"><code class="function">g_key_file_load_from_dirs()</code></a> or <a class="link" href="glib-Key-value-file-parser.html#g-key-file-load-from-data-dirs" title="g_key_file_load_from_data_dirs ()"><code class="function">g_key_file_load_from_data_dirs()</code></a> to
read an existing key file.
</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> an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>.
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_free ()">
<a name="g-key-file-free"></a><h3>g_key_file_free ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_free (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>);</pre>
<p>
Frees a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr></tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_list_separator ()">
<a name="g-key-file-set-list-separator"></a><h3>g_key_file_set_list_separator ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_list_separator (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> separator</code></em>);</pre>
<p>
Sets the character which is used to separate
values in lists. Typically ';' or ',' are used
as separators. The default list separator is ';'.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>separator</code></em> :</span></p></td>
<td>the separator
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_load_from_file ()">
<a name="g-key-file-load-from-file"></a><h3>g_key_file_load_from_file ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_load_from_file (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Loads a key file into an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="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" title="enum GFileError"><span class="type">GFileError</span></a> or <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError" title="enum GKeyFileError"><span class="type">GKeyFileError</span></a>.
</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> :</span></p></td>
<td>an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> struct
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</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> :</span></p></td>
<td>flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_load_from_data ()">
<a name="g-key-file-load-from-data"></a><h3>g_key_file_load_from_data ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_load_from_data (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *data</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Loads a key file from memory into an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="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" title="enum GKeyFileError"><span class="type">GKeyFileError</span></a>.
</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> :</span></p></td>
<td>an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> struct
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>data</code></em> :</span></p></td>
<td>key file loaded in memory
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</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> :</span></p></td>
<td>flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_load_from_data_dirs ()">
<a name="g-key-file-load-from-data-dirs"></a><h3>g_key_file_load_from_data_dirs ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_load_from_data_dirs (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **full_path</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</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" title="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" title="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> is
set to either a <a class="link" href="glib-File-Utilities.html#GFileError" title="enum GFileError"><span class="type">GFileError</span></a> or <a class="link" href="glib-Key-value-file-parser.html#GKeyFileError" title="enum GKeyFileError"><span class="type">GKeyFileError</span></a>.
</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> :</span></p></td>
<td>an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> struct
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</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> :</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" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> othewise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_load_from_dirs ()">
<a name="g-key-file-load-from-dirs"></a><h3>g_key_file_load_from_dirs ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_load_from_dirs (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **search_dirs</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> **full_path</code></em>,
<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a> flags</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
This function looks for a key file named <em class="parameter"><code>file</code></em> in the paths
specified in <em class="parameter"><code>search_dirs</code></em>, 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> is set to either a <a class="link" href="glib-File-Utilities.html#GFileError" title="enum GFileError"><span class="type">GFileError</span></a> or
<a class="link" href="glib-Key-value-file-parser.html#GKeyFileError" title="enum GKeyFileError"><span class="type">GKeyFileError</span></a>.
</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> :</span></p></td>
<td>an empty <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> struct
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>file</code></em> :</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>search_dirs</code></em> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of directories to search
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>full_path</code></em> :</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" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>flags</code></em> :</span></p></td>
<td>flags from <a class="link" href="glib-Key-value-file-parser.html#GKeyFileFlags" title="enum GKeyFileFlags"><span class="type">GKeyFileFlags</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if a key file could be loaded, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_to_data ()">
<a name="g-key-file-to-data"></a><h3>g_key_file_to_data ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_to_data (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
This function outputs <em class="parameter"><code>key_file</code></em> as a string.
</p>
<p>
Note that this function never reports an error,
so it is safe to pass <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> as <em class="parameter"><code>error</code></em>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>return location for the length of the
returned string, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string holding
the contents of the <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_start_group ()">
<a name="g-key-file-get-start-group"></a><h3>g_key_file_get_start_group ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_get_start_group (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>);</pre>
<p>
Returns the name of the start group of the file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> The start group of the key file.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_groups ()">
<a name="g-key-file-get-groups"></a><h3>g_key_file_get_groups ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_key_file_get_groups (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>);</pre>
<p>
Returns all groups in the key file loaded with <em class="parameter"><code>key_file</code></em>.
The array of returned groups will be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated, so
<em class="parameter"><code>length</code></em> may optionally be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>return location for the number of returned groups, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly-allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings.
Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a> to free it.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_keys ()">
<a name="g-key-file-get-keys"></a><h3>g_key_file_get_keys ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_key_file_get_keys (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns all keys for the group name <em class="parameter"><code>group_name</code></em>. The array of
returned keys will be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated, so <em class="parameter"><code>length</code></em> may
optionally be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>. In the event that the <em class="parameter"><code>group_name</code></em> cannot
be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-GROUP-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>return location for the number of keys returned, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly-allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of strings.
Use <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a> to free it.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_has_group ()">
<a name="g-key-file-has-group"></a><h3>g_key_file_has_group ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_has_group (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>);</pre>
<p>
Looks whether the key file has the group <em class="parameter"><code>group_name</code></em>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>group_name</code></em> is a part of <em class="parameter"><code>key_file</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
otherwise.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_has_key ()">
<a name="g-key-file-has-key"></a><h3>g_key_file_has_key ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_has_key (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Looks whether the key file has the key <em class="parameter"><code>key</code></em> in the group
<em class="parameter"><code>group_name</code></em>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if <em class="parameter"><code>key</code></em> is a part of <em class="parameter"><code>group_name</code></em>, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
otherwise.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_value ()">
<a name="g-key-file-get-value"></a><h3>g_key_file_get_value ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_get_value (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the raw value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
Use <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-string" title="g_key_file_get_string ()"><code class="function">g_key_file_get_string()</code></a> to retrieve an unescaped UTF-8 string.
</p>
<p>
In the event the key cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-GROUP-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
key cannot be found.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_string ()">
<a name="g-key-file-get-string"></a><h3>g_key_file_get_string ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_get_string (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the string value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
Unlike <a class="link" href="glib-Key-value-file-parser.html#g-key-file-get-value" title="g_key_file_get_value ()"><code class="function">g_key_file_get_value()</code></a>, this function handles escape sequences
like \s.
</p>
<p>
In the event the key cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-GROUP-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
key cannot be found.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_locale_string ()">
<a name="g-key-file-get-locale-string"></a><h3>g_key_file_get_locale_string ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_get_locale_string (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
translated in the given <em class="parameter"><code>locale</code></em> if available. If <em class="parameter"><code>locale</code></em> is
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then the current locale is assumed.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set
to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. If the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translation can
be found then the untranslated value is returned.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>locale</code></em> :</span></p></td>
<td>a locale identifier or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated string or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
key cannot be found.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_boolean ()">
<a name="g-key-file-get-boolean"></a><h3>g_key_file_get_boolean ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_get_boolean (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
boolean.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> is returned and <em class="parameter"><code>error</code></em> is set
to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the value
associated with <em class="parameter"><code>key</code></em> cannot be interpreted as a boolean then <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
is returned and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the value associated with the key as a boolean,
or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_integer ()">
<a name="g-key-file-get-integer"></a><h3>g_key_file_get_integer ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> g_key_file_get_integer (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as an
integer.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then 0 is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as an integer then 0 is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the value associated with the key as an integer, or
0 if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_double ()">
<a name="g-key-file-get-double"></a><h3>g_key_file_get_double ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> g_key_file_get_double (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the value associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as a
double. If <em class="parameter"><code>group_name</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the start_group is used.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then 0.0 is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the value associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as a double then 0.0 is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the value associated with the key as a double, or
0.0 if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_string_list ()">
<a name="g-key-file-get-string-list"></a><h3>g_key_file_get_string_list ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_key_file_get_string_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
</p>
<p>
In the event the key cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and
<em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. In the
event that the <em class="parameter"><code>group_name</code></em> cannot be found, <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-GROUP-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_GROUP_NOT_FOUND</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>return location for the number of returned strings, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated string array or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the specified
key cannot be found. The array should be freed with <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_locale_string_list ()">
<a name="g-key-file-get-locale-string-list"></a><h3>g_key_file_get_locale_string_list ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> ** g_key_file_get_locale_string_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>
translated in the given <em class="parameter"><code>locale</code></em> if available. If <em class="parameter"><code>locale</code></em> is
<a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then the current locale is assumed.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set
to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. If the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted or no suitable translations
can be found then the untranslated values are returned. The
returned array is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated, so <em class="parameter"><code>length</code></em> may optionally
be <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>locale</code></em> :</span></p></td>
<td>a locale identifier or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>return location for the number of returned strings or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a newly allocated <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated string array
or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the key isn't found. The string array should be freed
with <a class="link" href="glib-String-Utility-Functions.html#g-strfreev" title="g_strfreev ()"><code class="function">g_strfreev()</code></a>.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_boolean_list ()">
<a name="g-key-file-get-boolean-list"></a><h3>g_key_file_get_boolean_list ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> * g_key_file_get_boolean_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
booleans.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as booleans then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the number of booleans returned
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the values associated with the key as a list of
booleans, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_integer_list ()">
<a name="g-key-file-get-integer-list"></a><h3>g_key_file_get_integer_list ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="returnvalue">gint</span></a> * g_key_file_get_integer_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
integers.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as integers then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the number of integers returned
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the values associated with the key as a list of
integers, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_double_list ()">
<a name="g-key-file-get-double-list"></a><h3>g_key_file_get_double_list ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="returnvalue">gdouble</span></a> * g_key_file_get_double_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> *length</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Returns the values associated with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em> as
doubles.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned and <em class="parameter"><code>error</code></em> is set to
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-KEY-NOT-FOUND:CAPS"><span class="type">G_KEY_FILE_ERROR_KEY_NOT_FOUND</span></a>. Likewise, if the values associated
with <em class="parameter"><code>key</code></em> cannot be interpreted as doubles then <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> is returned
and <em class="parameter"><code>error</code></em> is set to <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-ERROR-INVALID-VALUE:CAPS"><span class="type">G_KEY_FILE_ERROR_INVALID_VALUE</span></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the number of doubles returned
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> the values associated with the key as a list of
doubles, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> if the key was not found or could not be parsed.
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_get_comment ()">
<a name="g-key-file-get-comment"></a><h3>g_key_file_get_comment ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="returnvalue">gchar</span></a> * g_key_file_get_comment (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Retrieves a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then <em class="parameter"><code>comment</code></em> will be read from above
<em class="parameter"><code>group_name</code></em>. If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then
<em class="parameter"><code>comment</code></em> will be read from above the first group in the file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> a comment that should be freed with <a class="link" href="glib-Memory-Allocation.html#g-free" title="g_free ()"><code class="function">g_free()</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_value ()">
<a name="g-key-file-set-value"></a><h3>g_key_file_set_value ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_value (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *value</code></em>);</pre>
<p>
Associates a new value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
</p>
<p>
If <em class="parameter"><code>key</code></em> cannot be found then it is created. If <em class="parameter"><code>group_name</code></em> cannot
be found then it is created. To set an UTF-8 string which may contain
characters that need escaping (such as newlines or spaces), use
<a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-string" title="g_key_file_set_string ()"><code class="function">g_key_file_set_string()</code></a>.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>a string
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_string ()">
<a name="g-key-file-set-string"></a><h3>g_key_file_set_string ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_string (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<p>
Associates a new string value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.
Unlike <a class="link" href="glib-Key-value-file-parser.html#g-key-file-set-value" title="g_key_file_set_value ()"><code class="function">g_key_file_set_value()</code></a>, this function handles characters
that need escaping, such as newlines.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_locale_string ()">
<a name="g-key-file-set-locale-string"></a><h3>g_key_file_set_locale_string ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_locale_string (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *string</code></em>);</pre>
<p>
Associates a string value for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under <em class="parameter"><code>group_name</code></em>.
If the translation for <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>locale</code></em> :</span></p></td>
<td>a locale identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>string</code></em> :</span></p></td>
<td>a string
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_boolean ()">
<a name="g-key-file-set-boolean"></a><h3>g_key_file_set_boolean ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_boolean (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> value</code></em>);</pre>
<p>
Associates a new boolean value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>
<a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> or <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_integer ()">
<a name="g-key-file-set-integer"></a><h3>g_key_file_set_integer ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_integer (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> value</code></em>);</pre>
<p>
Associates a new integer value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>an integer value
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_double ()">
<a name="g-key-file-set-double"></a><h3>g_key_file_set_double ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_double (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> value</code></em>);</pre>
<p>
Associates a new double value with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>an double value
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_string_list ()">
<a name="g-key-file-set-string-list"></a><h3>g_key_file_set_string_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_string_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> * const list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>
Associates a list of string values for <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>an array of string values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>number of string values in <em class="parameter"><code>list</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_locale_string_list ()">
<a name="g-key-file-set-locale-string-list"></a><h3>g_key_file_set_locale_string_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_locale_string_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *locale</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> * const list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>
Associates a list of string values for <em class="parameter"><code>key</code></em> and <em class="parameter"><code>locale</code></em> under
<em class="parameter"><code>group_name</code></em>. If the translation for <em class="parameter"><code>key</code></em> cannot be found then
it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>locale</code></em> :</span></p></td>
<td>a locale identifier
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>a <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>-terminated array of locale string values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>the length of <em class="parameter"><code>list</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_boolean_list ()">
<a name="g-key-file-set-boolean-list"></a><h3>g_key_file_set_boolean_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_boolean_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="type">gboolean</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>
Associates a list of boolean values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
If <em class="parameter"><code>group_name</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, the start_group is used.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>an array of boolean values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>length of <em class="parameter"><code>list</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_integer_list ()">
<a name="g-key-file-set-integer-list"></a><h3>g_key_file_set_integer_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_integer_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gint" title="gint"><span class="type">gint</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>
Associates a list of integer values with <em class="parameter"><code>key</code></em> under <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>an array of integer values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>number of integer values in <em class="parameter"><code>list</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_double_list ()">
<a name="g-key-file-set-double-list"></a><h3>g_key_file_set_double_list ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_key_file_set_double_list (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gdouble" title="gdouble"><span class="type">gdouble</span></a> list[]</code></em>,
<em class="parameter"><code><a class="link" href="glib-Basic-Types.html#gsize" title="gsize"><span class="type">gsize</span></a> length</code></em>);</pre>
<p>
Associates a list of double values with <em class="parameter"><code>key</code></em> under
<em class="parameter"><code>group_name</code></em>. If <em class="parameter"><code>key</code></em> cannot be found then it is created.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>list</code></em> :</span></p></td>
<td>an array of double values
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>length</code></em> :</span></p></td>
<td>number of double values in <em class="parameter"><code>list</code></em>
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.12</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_set_comment ()">
<a name="g-key-file-set-comment"></a><h3>g_key_file_set_comment ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_set_comment (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *comment</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Places a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then <em class="parameter"><code>comment</code></em> will be written above <em class="parameter"><code>group_name</code></em>.
If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <em class="parameter"><code>comment</code></em> will be
written above the first group in the file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>comment</code></em> :</span></p></td>
<td>a comment
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the comment was written, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_remove_group ()">
<a name="g-key-file-remove-group"></a><h3>g_key_file_remove_group ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_remove_group (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Removes the specified group, <em class="parameter"><code>group_name</code></em>,
from the key file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the group was removed, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_remove_key ()">
<a name="g-key-file-remove-key"></a><h3>g_key_file_remove_key ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_remove_key (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Removes <em class="parameter"><code>key</code></em> in <em class="parameter"><code>group_name</code></em> from the key file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key name to remove
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the key was removed, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="g_key_file_remove_comment ()">
<a name="g-key-file-remove-comment"></a><h3>g_key_file_remove_comment ()</h3>
<pre class="programlisting"><a class="link" href="glib-Basic-Types.html#gboolean" title="gboolean"><span class="returnvalue">gboolean</span></a> g_key_file_remove_comment (<em class="parameter"><code><a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a> *key_file</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *group_name</code></em>,
<em class="parameter"><code>const <a class="link" href="glib-Basic-Types.html#gchar" title="gchar"><span class="type">gchar</span></a> *key</code></em>,
<em class="parameter"><code><a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a> **error</code></em>);</pre>
<p>
Removes a comment above <em class="parameter"><code>key</code></em> from <em class="parameter"><code>group_name</code></em>.
If <em class="parameter"><code>key</code></em> is <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a> then <em class="parameter"><code>comment</code></em> will be removed above <em class="parameter"><code>group_name</code></em>.
If both <em class="parameter"><code>key</code></em> and <em class="parameter"><code>group_name</code></em> are <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>, then <em class="parameter"><code>comment</code></em> will
be removed above the first group in the file.
</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> :</span></p></td>
<td>a <a class="link" href="glib-Key-value-file-parser.html#GKeyFile" title="GKeyFile"><span class="type">GKeyFile</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>group_name</code></em> :</span></p></td>
<td>a group name, or <a class="link" href="glib-Standard-Macros.html#NULL:CAPS" title="NULL"><code class="literal">NULL</code></a>
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>key</code></em> :</span></p></td>
<td>a key
</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>error</code></em> :</span></p></td>
<td>return location for a <a class="link" href="glib-Error-Reporting.html#GError" title="GError"><span class="type">GError</span></a>
</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td> <a class="link" href="glib-Standard-Macros.html#TRUE:CAPS" title="TRUE"><code class="literal">TRUE</code></a> if the comment was removed, <a class="link" href="glib-Standard-Macros.html#FALSE:CAPS" title="FALSE"><code class="literal">FALSE</code></a> otherwise
</td>
</tr>
</tbody>
</table></div>
<p class="since">Since 2.6</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_GROUP">
<a name="G-KEY-FILE-DESKTOP-GROUP:CAPS"></a><h3>G_KEY_FILE_DESKTOP_GROUP</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_GROUP "Desktop Entry"
</pre>
<p>
The name of the main group of a desktop entry file, as defined in the
<a class="ulink" href="http://freedesktop.org/Standards/desktop-entry-spec" target="_top">Desktop
Entry Specification</a>. Consult the specification for more
details about the meanings of the keys below.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_TYPE">
<a name="G-KEY-FILE-DESKTOP-KEY-TYPE:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_TYPE</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_TYPE "Type"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string giving the type of the desktop entry. Usually
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-APPLICATION:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_APPLICATION"><code class="literal">G_KEY_FILE_DESKTOP_TYPE_APPLICATION</code></a>,
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-LINK:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_LINK"><code class="literal">G_KEY_FILE_DESKTOP_TYPE_LINK</code></a>, or
<a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-TYPE-DIRECTORY:CAPS" title="G_KEY_FILE_DESKTOP_TYPE_DIRECTORY"><code class="literal">G_KEY_FILE_DESKTOP_TYPE_DIRECTORY</code></a>.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_VERSION">
<a name="G-KEY-FILE-DESKTOP-KEY-VERSION:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_VERSION</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_VERSION "Version"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string giving the version of the Desktop
Entry Specification used for the desktop entry file.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_NAME">
<a name="G-KEY-FILE-DESKTOP-KEY-NAME:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_NAME</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_NAME "Name"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a localized string giving the specific name of the
desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME">
<a name="G-KEY-FILE-DESKTOP-KEY-GENERIC-NAME:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_GENERIC_NAME "GenericName"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a localized string giving the generic name of the
desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY">
<a name="G-KEY-FILE-DESKTOP-KEY-NO-DISPLAY:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY "NoDisplay"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a boolean stating whether the desktop entry should be
shown in menus.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_COMMENT">
<a name="G-KEY-FILE-DESKTOP-KEY-COMMENT:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_COMMENT</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_COMMENT "Comment"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a localized string giving the tooltip for the desktop
entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_ICON">
<a name="G-KEY-FILE-DESKTOP-KEY-ICON:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_ICON</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_ICON "Icon"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a localized string giving the name of the icon to be
displayed for the desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_HIDDEN">
<a name="G-KEY-FILE-DESKTOP-KEY-HIDDEN:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_HIDDEN</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_HIDDEN "Hidden"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a boolean stating whether the desktop entry has been
deleted by the user.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN">
<a name="G-KEY-FILE-DESKTOP-KEY-ONLY-SHOW-IN:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN "OnlyShowIn"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a list of strings identifying the environments that
should display the desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN">
<a name="G-KEY-FILE-DESKTOP-KEY-NOT-SHOW-IN:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN "NotShowIn"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a list of strings identifying the environments that
should not display the desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_TRY_EXEC">
<a name="G-KEY-FILE-DESKTOP-KEY-TRY-EXEC:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_TRY_EXEC</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_TRY_EXEC "TryExec"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string giving the file name of a binary on disk
used to determine if the program is actually installed. It is only
valid for desktop entries with the <code class="literal">Application</code>
type.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_EXEC">
<a name="G-KEY-FILE-DESKTOP-KEY-EXEC:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_EXEC</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_EXEC "Exec"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string giving the command line to execute. It is only
valid for desktop entries with the <code class="literal">Application</code>
type.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_PATH">
<a name="G-KEY-FILE-DESKTOP-KEY-PATH:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_PATH</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_PATH "Path"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string containing the working directory to run the
program in. It is only valid for desktop entries with the
<code class="literal">Application</code> type.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_TERMINAL">
<a name="G-KEY-FILE-DESKTOP-KEY-TERMINAL:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_TERMINAL</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_TERMINAL "Terminal"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a boolean stating whether the program should be
run in a terminal window. It is only valid for desktop entries with
the <code class="literal">Application</code> type.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_MIME_TYPE">
<a name="G-KEY-FILE-DESKTOP-KEY-MIME-TYPE:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_MIME_TYPE</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_MIME_TYPE "MimeType"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a list of strings giving the MIME types supported
by this desktop entry.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_CATEGORIES">
<a name="G-KEY-FILE-DESKTOP-KEY-CATEGORIES:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_CATEGORIES</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_CATEGORIES "Categories"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a list of strings giving the categories in which the
desktop entry should be shown in a menu.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY">
<a name="G-KEY-FILE-DESKTOP-KEY-STARTUP-NOTIFY:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY "StartupNotify"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a boolean stating whether the application supports
the <a class="ulink" href="http://www.freedesktop.org/Standards/startup-notification-spec" target="_top">Startup
Notification Protocol Specification</a>.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS">
<a name="G-KEY-FILE-DESKTOP-KEY-STARTUP-WM-CLASS:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS "StartupWMClass"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is string identifying the WM class or name hint of a
window that the application will create, which can be used to emulate
Startup Notification with older applications.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_KEY_URL">
<a name="G-KEY-FILE-DESKTOP-KEY-URL:CAPS"></a><h3>G_KEY_FILE_DESKTOP_KEY_URL</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_KEY_URL "URL"
</pre>
<p>
A key under <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-GROUP:CAPS" title="G_KEY_FILE_DESKTOP_GROUP"><code class="literal">G_KEY_FILE_DESKTOP_GROUP</code></a>
whose value is a string giving the URL to access. It is only valid
for desktop entries with the <code class="literal">Link</code> type.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_TYPE_APPLICATION">
<a name="G-KEY-FILE-DESKTOP-TYPE-APPLICATION:CAPS"></a><h3>G_KEY_FILE_DESKTOP_TYPE_APPLICATION</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_TYPE_APPLICATION "Application"
</pre>
<p>
The value of the <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TYPE:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TYPE"><code class="literal">G_KEY_FILE_DESKTOP_KEY_TYPE</code></a>
key for desktop entries representing applications.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_TYPE_LINK">
<a name="G-KEY-FILE-DESKTOP-TYPE-LINK:CAPS"></a><h3>G_KEY_FILE_DESKTOP_TYPE_LINK</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_TYPE_LINK "Link"
</pre>
<p>
The value of the <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TYPE:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TYPE"><code class="literal">G_KEY_FILE_DESKTOP_KEY_TYPE</code></a>
key for desktop entries representing links to documents.
</p>
<p class="since">Since 2.14</p>
</div>
<hr>
<div class="refsect2" title="G_KEY_FILE_DESKTOP_TYPE_DIRECTORY">
<a name="G-KEY-FILE-DESKTOP-TYPE-DIRECTORY:CAPS"></a><h3>G_KEY_FILE_DESKTOP_TYPE_DIRECTORY</h3>
<pre class="programlisting">#define G_KEY_FILE_DESKTOP_TYPE_DIRECTORY "Directory"
</pre>
<p>
The value of the <a class="link" href="glib-Key-value-file-parser.html#G-KEY-FILE-DESKTOP-KEY-TYPE:CAPS" title="G_KEY_FILE_DESKTOP_KEY_TYPE"><code class="literal">G_KEY_FILE_DESKTOP_KEY_TYPE</code></a>
key for desktop entries representing directories.
</p>
<p class="since">Since 2.14</p>
</div>
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.14</div>
</body>
</html>