2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = glib-Key-value-file-parser.html
52 private import glib
.glibtypes
;
54 private import lib
.glib
;
56 private import glib
.ErrorG
;
57 private import glib
.Str
;
61 * GKeyFile lets you parse, edit or create files containing groups of
62 * key-value pairs, which we call key files for
63 * lack of a better name. Several freedesktop.org specifications use
64 * key files now, e.g the
66 * Entry Specification and the
68 * Theme Specification.
69 * The syntax of key files is described in detail in the
71 * Entry Specification, here is a quick summary: Key files
72 * consists of groups of key-value pairs, interspersed with comments.
73 * # this is just an example
74 * # there can be comments before the first group
76 * Name=Key File Example\tthis value shows\nescaping
77 * # localized strings are stored in multiple key-value pairs
84 * Booleans=true;false;true;true
85 * Lines beginning with a '#' and blank lines are considered comments.
86 * Groups are started by a header line containing the group name enclosed
87 * in '[' and ']', and ended implicitly by the start of the next group or
88 * the end of the file. Each key-value pair must be contained in a group.
89 * Key-value pairs generally have the form key=value,
90 * with the exception of localized strings, which have the form
91 * key[locale]=value. Space before and after the
92 * '=' character are ignored. Newline, tab, carriage return and backslash
93 * characters are escaped as \n, \t, \r, and \\, respectively. To preserve
94 * initial and final spaces, these can also be escaped as \s.
95 * Key files can store strings (possibly with localized variants), integers,
96 * booleans and lists of these. Lists are separated by a separator character,
97 * typically ';' or ','. To use the list separator character in a value in
98 * a list, it has to be escaped by prefixing it with a backslash.
99 * This syntax is obviously inspired by the .ini
100 * files commonly met on Windows, but there are some important differences:
101 * .ini files use the ';' character to begin comments,
102 * key files use the '#' character.
103 * Key files allow only comments before the first group.
104 * Key files are always encoded in UTF-8.
105 * Key and Group names are case-sensitive, for example a group called
106 * [GROUP] is a different group from [group].
111 /** the main Gtk struct */
112 protected GKeyFile
* gKeyFile
;
115 public GKeyFile
* getKeyFileStruct()
121 /** the main Gtk struct as a void* */
122 protected void* getStruct()
124 return cast(void*)gKeyFile
;
128 * Sets our main struct and passes it to the parent class
130 public this (GKeyFile
* gKeyFile
)
132 this.gKeyFile
= gKeyFile
;
143 * Creates a new empty GKeyFile object. Use g_key_file_load_from_file(),
144 * g_key_file_load_from_data() or g_key_file_load_from_data_dirs() to
145 * read an existing key file.
152 // GKeyFile* g_key_file_new (void);
153 this(cast(GKeyFile
*)g_key_file_new() );
164 // void g_key_file_free (GKeyFile *key_file);
165 g_key_file_free(gKeyFile
);
169 * Sets the character which is used to separate
170 * values in lists. Typically ';' or ',' are used
171 * as separators. The default list separator is ';'.
178 public void setListSeparator(char separator
)
180 // void g_key_file_set_list_separator (GKeyFile *key_file, gchar separator);
181 g_key_file_set_list_separator(gKeyFile
, separator
);
185 * Loads a key file into an empty GKeyFile structure.
186 * If the file could not be loaded then error is set to
187 * either a GFileError or GKeyFileError.
189 * an empty GKeyFile struct
191 * the path of a filename to load, in the GLib file name encoding
193 * flags from GKeyFileFlags
195 * return location for a GError, or NULL
197 * TRUE if a key file could be loaded, FALSE othewise
200 public int loadFromFile(char[] file
, GKeyFileFlags flags
, GError
** error
)
202 // gboolean g_key_file_load_from_file (GKeyFile *key_file, const gchar *file, GKeyFileFlags flags, GError **error);
203 return g_key_file_load_from_file(gKeyFile
, Str
.toStringz(file
), flags
, error
);
207 * Loads a key file from memory into an empty GKeyFile structure. If
208 * the object cannot be created then error is set to a
211 * an empty GKeyFile struct
213 * key file loaded in memory.
215 * the length of data in bytes
217 * flags from GKeyFileFlags
219 * return location for a GError, or NULL
221 * TRUE if a key file could be loaded, FALSE othewise
224 public int loadFromData(char[] data
, uint length
, GKeyFileFlags flags
, GError
** error
)
226 // gboolean g_key_file_load_from_data (GKeyFile *key_file, const gchar *data, gsize length, GKeyFileFlags flags, GError **error);
227 return g_key_file_load_from_data(gKeyFile
, Str
.toStringz(data
), length
, flags
, error
);
231 * This function looks for a key file named file in the paths
232 * returned from g_get_user_data_dir() and g_get_system_data_dirs(),
233 * loads the file into key_file and returns the file's full path in
234 * full_path. If the file could not be loaded then an error is
235 * set to either a GFileError or GKeyFileError.
237 * an empty GKeyFile struct
239 * a relative path to a filename to open and parse
241 * return location for a string containing the full path
242 * of the file, or NULL
244 * flags from GKeyFileFlags
246 * return location for a GError, or NULL
248 * TRUE if a key file could be loaded, FALSE othewise
251 public int loadFromDataDirs(char[] file
, char** fullPath
, GKeyFileFlags flags
, GError
** error
)
253 // gboolean g_key_file_load_from_data_dirs (GKeyFile *key_file, const gchar *file, gchar **full_path, GKeyFileFlags flags, GError **error);
254 return g_key_file_load_from_data_dirs(gKeyFile
, Str
.toStringz(file
), fullPath
, flags
, error
);
258 * This function outputs key_file as a string.
262 * return location for the length of the
263 * returned string, or NULL
265 * return location for a GError, or NULL
267 * a newly allocated string holding
268 * the contents of the GKeyFile
271 public char[] toData(uint* length
, GError
** error
)
273 // gchar* g_key_file_to_data (GKeyFile *key_file, gsize *length, GError **error);
274 return Str
.toString(g_key_file_to_data(gKeyFile
, length
, error
) );
278 * Returns the name of the start group of the file.
282 * The start group of the key file.
285 public char[] getStartGroup()
287 // gchar* g_key_file_get_start_group (GKeyFile *key_file);
288 return Str
.toString(g_key_file_get_start_group(gKeyFile
) );
292 * Returns all groups in the key file loaded with key_file. The
293 * array of returned groups will be NULL-terminated, so length may
294 * optionally be NULL.
298 * return location for the number of returned groups, or NULL
300 * a newly-allocated NULL-terminated array of strings.
301 * Use g_strfreev() to free it.
304 public char** getGroups(uint* length
)
306 // gchar** g_key_file_get_groups (GKeyFile *key_file, gsize *length);
307 return g_key_file_get_groups(gKeyFile
, length
);
311 * Returns all keys for the group name group_name. The array of
312 * returned keys will be NULL-terminated, so length may
313 * optionally be NULL. In the event that the group_name cannot
314 * be found, NULL is returned and error is set to
315 * G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
321 * return location for the number of keys returned, or NULL
323 * return location for a GError, or NULL
325 * a newly-allocated NULL-terminated array of
326 * strings. Use g_strfreev() to free it.
329 public char** getKeys(char[] groupName
, uint* length
, GError
** error
)
331 // gchar** g_key_file_get_keys (GKeyFile *key_file, const gchar *group_name, gsize *length, GError **error);
332 return g_key_file_get_keys(gKeyFile
, Str
.toStringz(groupName
), length
, error
);
336 * Looks whether the key file has the group group_name.
342 * TRUE if group_name is a part of key_file, FALSE
346 public int hasGroup(char[] groupName
)
348 // gboolean g_key_file_has_group (GKeyFile *key_file, const gchar *group_name);
349 return g_key_file_has_group(gKeyFile
, Str
.toStringz(groupName
));
353 * Looks whether the key file has the key key in the group
362 * return location for a GError
364 * TRUE if key is a part of group_name, FALSE
368 public int hasKey(char[] groupName
, char[] key
, GError
** error
)
370 // gboolean g_key_file_has_key (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
371 return g_key_file_has_key(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);
375 * Returns the value associated with key under group_name.
376 * In the event the key cannot be found, NULL is returned and
377 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the
378 * event that the group_name cannot be found, NULL is returned
379 * and error is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
387 * return location for a GError, or NULL
389 * a newly allocated string or NULL if the specified
390 * key cannot be found.
393 public char[] getValue(char[] groupName
, char[] key
, GError
** error
)
395 // gchar* g_key_file_get_value (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
396 return Str
.toString(g_key_file_get_value(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
) );
400 * Returns the value associated with key under group_name.
401 * In the event the key cannot be found, NULL is returned and
402 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the
403 * event that the group_name cannot be found, NULL is returned
404 * and error is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
412 * return location for a GError, or NULL
414 * a newly allocated string or NULL if the specified
415 * key cannot be found.
418 public char[] getString(char[] groupName
, char[] key
, GError
** error
)
420 // gchar* g_key_file_get_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
421 return Str
.toString(g_key_file_get_string(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
) );
425 * Returns the value associated with key under group_name
426 * translated in the given locale if available. If locale is
427 * NULL then the current locale is assumed.
428 * If key cannot be found then NULL is returned and error is set to
429 * G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the value associated
430 * with key cannot be interpreted or no suitable translation can
431 * be found then the untranslated value is returned.
441 * return location for a GError, or NULL
443 * a newly allocated string or NULL if the specified
444 * key cannot be found.
447 public char[] getLocaleString(char[] groupName
, char[] key
, char[] locale
, GError
** error
)
449 // gchar* g_key_file_get_locale_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, GError **error);
450 return Str
.toString(g_key_file_get_locale_string(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(locale
), error
) );
454 * Returns the value associated with key under group_name as a
456 * If key cannot be found then the return value is undefined and
457 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
458 * the value associated with key cannot be interpreted as a boolean
459 * then the return value is also undefined and error is set to
460 * G_KEY_FILE_ERROR_INVALID_VALUE.
468 * return location for a GError
470 * the value associated with the key as a boolean
473 public int getBoolean(char[] groupName
, char[] key
, GError
** error
)
475 // gboolean g_key_file_get_boolean (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
476 return g_key_file_get_boolean(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);
480 * Returns the value associated with key under group_name as an
481 * integer. If group_name is NULL, the start_group is used.
482 * If key cannot be found then the return value is undefined and
483 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
484 * the value associated with key cannot be interpreted as an integer
485 * then the return value is also undefined and error is set to
486 * G_KEY_FILE_ERROR_INVALID_VALUE.
494 * return location for a GError
496 * the value associated with the key as an integer.
499 public int getInteger(char[] groupName
, char[] key
, GError
** error
)
501 // gint g_key_file_get_integer (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
502 return g_key_file_get_integer(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);
506 * Returns the value associated with key under group_name as an
507 * integer. If group_name is NULL, the start_group is used.
508 * If key cannot be found then the return value is undefined and
509 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
510 * the value associated with key cannot be interpreted as a double
511 * then the return value is also undefined and error is set to
512 * G_KEY_FILE_ERROR_INVALID_VALUE.
520 * return location for a GError
522 * the value associated with the key as a double.
525 public double getDouble(char[] groupName
, char[] key
, GError
** error
)
527 // gdouble g_key_file_get_double (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
528 return g_key_file_get_double(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);
532 * Returns the values associated with key under group_name.
533 * In the event the key cannot be found, NULL is returned and
534 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. In the
535 * event that the group_name cannot be found, NULL is returned
536 * and error is set to G_KEY_FILE_ERROR_GROUP_NOT_FOUND.
544 * return location for the number of returned strings, or NULL
546 * return location for a GError, or NULL
548 * a NULL-terminated string array or NULL if the specified
549 * key cannot be found. The array should be freed with g_strfreev().
552 public char** getStringList(char[] groupName
, char[] key
, uint* length
, GError
** error
)
554 // gchar** g_key_file_get_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error);
555 return g_key_file_get_string_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), length
, error
);
559 * Returns the values associated with key under group_name
560 * translated in the given locale if available. If locale is
561 * NULL then the current locale is assumed.
562 * If key cannot be found then NULL is returned and error is set to
563 * G_KEY_FILE_ERROR_KEY_NOT_FOUND. If the values associated
564 * with key cannot be interpreted or no suitable translations
565 * can be found then the untranslated values are returned.
566 * The returned array is NULL-terminated, so length may optionally be NULL.
576 * return location for the number of returned strings or NULL
578 * return location for a GError or NULL
580 * a newly allocated NULL-terminated string array
581 * or NULL if the key isn't found. The string array should be freed
585 public char** getLocaleStringList(char[] groupName
, char[] key
, char[] locale
, uint* length
, GError
** error
)
587 // gchar** g_key_file_get_locale_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, gsize *length, GError **error);
588 return g_key_file_get_locale_string_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(locale
), length
, error
);
592 * Returns the values associated with key under group_name as
593 * booleans. If group_name is NULL, the start_group is used.
594 * If key cannot be found then the return value is undefined and
595 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
596 * the values associated with key cannot be interpreted as booleans
597 * then the return value is also undefined and error is set to
598 * G_KEY_FILE_ERROR_INVALID_VALUE.
606 * the number of booleans returned
608 * return location for a GError
610 * the values associated with the key as a boolean
613 public int* getBooleanList(char[] groupName
, char[] key
, uint* length
, GError
** error
)
615 // gboolean* g_key_file_get_boolean_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error);
616 return g_key_file_get_boolean_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), length
, error
);
620 * Returns the values associated with key under group_name as
622 * If key cannot be found then the return value is undefined and
623 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
624 * the values associated with key cannot be interpreted as integers
625 * then the return value is also undefined and error is set to
626 * G_KEY_FILE_ERROR_INVALID_VALUE.
634 * the number of integers returned
636 * return location for a GError
638 * the values associated with the key as a integer
641 public int* getIntegerList(char[] groupName
, char[] key
, uint* length
, GError
** error
)
643 // gint* g_key_file_get_integer_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error);
644 return g_key_file_get_integer_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), length
, error
);
648 * Returns the values associated with key under group_name as
649 * doubles. If group_name is NULL, the start group is used.
650 * If key cannot be found then the return value is undefined and
651 * error is set to G_KEY_FILE_ERROR_KEY_NOT_FOUND. Likewise, if
652 * the values associated with key cannot be interpreted as doubles
653 * then the return value is also undefined and error is set to
654 * G_KEY_FILE_ERROR_INVALID_VALUE.
662 * the number of doubles returned
664 * return location for a GError
666 * the values associated with the key as a double
669 public double* getDoubleList(char[] groupName
, char[] key
, uint* length
, GError
** error
)
671 // gdouble* g_key_file_get_double_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gsize *length, GError **error);
672 return g_key_file_get_double_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), length
, error
);
676 * Retrieves a comment above key from group_name.
677 * group_name. If key is NULL then comment will
678 * be read from above group_name. If both key
679 * and group_name are NULL, then comment will
680 * be read from above the first group in the file.
684 * a group name, or NULL
688 * return location for a GError
690 * a comment that should be freed with g_free()
693 public char[] getComment(char[] groupName
, char[] key
, GError
** error
)
695 // gchar* g_key_file_get_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
696 return Str
.toString(g_key_file_get_comment(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
) );
700 * Associates a new value with key under group_name. If key
701 * cannot be found then it is created. If group_name cannot be
702 * found then it is created.
713 public void setValue(char[] groupName
, char[] key
, char[] value
)
715 // void g_key_file_set_value (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *value);
716 g_key_file_set_value(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(value
));
720 * Associates a new string value with key under group_name. If
721 * key cannot be found then it is created. If group_name
722 * cannot be found then it is created.
733 public void setString(char[] groupName
, char[] key
, char[] string
)
735 // void g_key_file_set_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *string);
736 g_key_file_set_string(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(string
));
740 * Associates a string value for key and locale under
741 * group_name. If the translation for key cannot be found
742 * then it is created.
755 public void setLocaleString(char[] groupName
, char[] key
, char[] locale
, char[] string
)
757 // void g_key_file_set_locale_string (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale, const gchar *string);
758 g_key_file_set_locale_string(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(locale
), Str
.toStringz(string
));
762 * Associates a new boolean value with key under group_name.
763 * If key cannot be found then it is created.
774 public void setBoolean(char[] groupName
, char[] key
, int value
)
776 // void g_key_file_set_boolean (GKeyFile *key_file, const gchar *group_name, const gchar *key, gboolean value);
777 g_key_file_set_boolean(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), value
);
781 * Associates a new integer value with key under group_name.
782 * If key cannot be found then it is created.
793 public void setInteger(char[] groupName
, char[] key
, int value
)
795 // void g_key_file_set_integer (GKeyFile *key_file, const gchar *group_name, const gchar *key, gint value);
796 g_key_file_set_integer(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), value
);
800 * Associates a new double value with key under group_name.
801 * If key cannot be found then it is created. If group_name
802 * is NULL, the start group is used.
813 public void setDouble(char[] groupName
, char[] key
, double value
)
815 // void g_key_file_set_double (GKeyFile *key_file, const gchar *group_name, const gchar *key, gdouble value);
816 g_key_file_set_double(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), value
);
820 * Associates a list of string values for key under group_name.
821 * If key cannot be found then it is created. If group_name
822 * cannot be found then it is created.
831 public void setStringList(char[] groupName
, char[] key
)
833 // void g_key_file_set_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key);
834 g_key_file_set_string_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
));
838 * Associates a list of string values for key and locale under
839 * group_name. If the translation for key cannot be found then
851 public void setLocaleStringList(char[] groupName
, char[] key
, char[] locale
)
853 // void g_key_file_set_locale_string_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *locale);
854 g_key_file_set_locale_string_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(locale
));
858 * Associates a list of boolean values with key under
859 * group_name. If key cannot be found then it is created.
860 * If group_name is NULL, the start_group is used.
868 * an array of boolean values
873 public void setBooleanList(char[] groupName
, char[] key
, int[] list
, uint length
)
875 // void g_key_file_set_boolean_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gboolean list[], gsize length);
876 g_key_file_set_boolean_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), list
, length
);
880 * Associates a list of integer values with key under
881 * group_name. If key cannot be found then it is created.
889 * an array of integer values
891 * number of integer values in list
894 public void setIntegerList(char[] groupName
, char[] key
, int[] list
, uint length
)
896 // void g_key_file_set_integer_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gint list[], gsize length);
897 g_key_file_set_integer_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), list
, length
);
901 * Associates a list of double values with key under
902 * group_name. If key cannot be found then it is created.
903 * If group_name is NULL the start group is used.
911 * an array of double values
913 * number of double values in list
916 public void setDoubleList(char[] groupName
, char[] key
, double[] list
, uint length
)
918 // void g_key_file_set_double_list (GKeyFile *key_file, const gchar *group_name, const gchar *key, gdouble list[], gsize length);
919 g_key_file_set_double_list(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), list
, length
);
923 * Places a comment above key from group_name.
924 * group_name. If key is NULL then comment will
925 * be written above group_name. If both key
926 * and group_name are NULL, then comment will
927 * be written above the first group in the file.
931 * a group name, or NULL
937 * return location for a GError
940 public void setComment(char[] groupName
, char[] key
, char[] comment
, GError
** error
)
942 // void g_key_file_set_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, const gchar *comment, GError **error);
943 g_key_file_set_comment(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), Str
.toStringz(comment
), error
);
947 * Removes the specified group, group_name,
954 * return location for a GError or NULL
957 public void removeGroup(char[] groupName
, GError
** error
)
959 // void g_key_file_remove_group (GKeyFile *key_file, const gchar *group_name, GError **error);
960 g_key_file_remove_group(gKeyFile
, Str
.toStringz(groupName
), error
);
964 * Removes key in group_name from the key file.
970 * a key name to remove
972 * return location for a GError or NULL
975 public void removeKey(char[] groupName
, char[] key
, GError
** error
)
977 // void g_key_file_remove_key (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
978 g_key_file_remove_key(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);
982 * Removes a comment above key from group_name.
983 * group_name. If key is NULL then comment will
984 * be written above group_name. If both key
985 * and group_name are NULL, then comment will
986 * be written above the first group in the file.
990 * a group name, or NULL
994 * return location for a GError
997 public void removeComment(char[] groupName
, char[] key
, GError
** error
)
999 // void g_key_file_remove_comment (GKeyFile *key_file, const gchar *group_name, const gchar *key, GError **error);
1000 g_key_file_remove_comment(gKeyFile
, Str
.toStringz(groupName
), Str
.toStringz(key
), error
);