1// Package glib was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package glib
3
4import (
5 "structs"
6 "unsafe"
7
8 "github.com/ebitengine/purego"
9
10 "github.com/bnema/puregotk/pkg/core"
11 "github.com/bnema/puregotk/v4/gobject/types"
12)
13
14// `GKeyFile` parses .ini-like config files.
15//
16// `GKeyFile` lets you parse, edit or create files containing groups of
17// key-value pairs, which we call ‘key files’ for lack of a better name.
18// Several freedesktop.org specifications use key files. For example, the
19// [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/)
20// and the [Icon Theme Specification](https://specifications.freedesktop.org/icon-theme-spec/latest/).
21//
22// The syntax of key files is described in detail in the
23// [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/),
24// here is a quick summary: Key files consists of groups of key-value pairs, interspersed
25// with comments.
26//
27// ```txt
28// # this is just an example
29// # there can be comments before the first group
30//
31// [First Group]
32//
33// Name=Key File Example\tthis value shows\nescaping
34//
35// # localized strings are stored in multiple key-value pairs
36// Welcome=Hello
37// Welcome[de]=Hallo
38// Welcome[fr_FR]=Bonjour
39// Welcome[it]=Ciao
40//
41// [Another Group]
42//
43// Numbers=2;20;-200;0
44//
45// Booleans=true;false;true;true
46// ```
47//
48// Lines beginning with a `#` and blank lines are considered comments.
49//
50// Groups are started by a header line containing the group name enclosed
51// in `[` and `]`, and ended implicitly by the start of the next group or
52// the end of the file. Each key-value pair must be contained in a group.
53//
54// Key-value pairs generally have the form `key=value`, with the exception
55// of localized strings, which have the form `key[locale]=value`, with a
56// locale identifier of the form `lang_COUNTRY@MODIFIER` where `COUNTRY`
57// and `MODIFIER` are optional. As a special case, the locale `C` is associated
58// with the untranslated pair `key=value` (since GLib 2.84). Space before and
59// after the `=` character is ignored. Newline, tab, carriage return and
60// backslash characters in value are escaped as `\n`, `\t`, `\r`, and `\\\\`,
61// respectively. To preserve leading spaces in values, these can also be escaped
62// as `\s`.
63//
64// Key files can store strings (possibly with localized variants), integers,
65// booleans and lists of these. Lists are separated by a separator character,
66// typically `;` or `,`. To use the list separator character in a value in
67// a list, it has to be escaped by prefixing it with a backslash.
68//
69// This syntax is obviously inspired by the .ini files commonly met
70// on Windows, but there are some important differences:
71//
72// - .ini files use the `;` character to begin comments,
73// key files use the `#` character.
74//
75// - Key files do not allow for ungrouped keys meaning only
76// comments can precede the first group.
77//
78// - Key files are always encoded in UTF-8.
79//
80// - Key and Group names are case-sensitive. For example, a group called
81// `[GROUP]` is a different from `[group]`.
82//
83// - .ini files don’t have a strongly typed boolean entry type,
84// they only have `GetProfileInt()`. In key files, only
85// `true` and `false` (in lower case) are allowed.
86//
87// Note that in contrast to the
88// [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/),
89// groups in key files may contain the same key multiple times; the last entry wins.
90// Key files may also contain multiple groups with the same name; they are merged
91// together. Another difference is that keys and group names in key files are not
92// restricted to ASCII characters.
93//
94// Here is an example of loading a key file and reading a value:
95//
96// ```c
97// g_autoptr(GError) error = NULL;
98// g_autoptr(GKeyFile) key_file = g_key_file_new ();
99//
100// if (!g_key_file_load_from_file (key_file, "key-file.ini", flags, &error))
101//
102// {
103// if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT))
104// g_warning ("Error loading key file: %s", error->message);
105// return;
106// }
107//
108// g_autofree gchar *val = g_key_file_get_string (key_file, "Group Name", "SomeKey", &error);
109// if (val == NULL &&
110//
111// !g_error_matches (error, G_KEY_FILE_ERROR, G_KEY_FILE_ERROR_KEY_NOT_FOUND))
112// {
113// g_warning ("Error finding key in key file: %s", error->message);
114// return;
115// }
116//
117// else if (val == NULL)
118//
119// {
120// // Fall back to a default value.
121// val = g_strdup ("default-value");
122// }
123//
124// ```
125//
126// Here is an example of creating and saving a key file:
127//
128// ```c
129// g_autoptr(GKeyFile) key_file = g_key_file_new ();
130// const gchar *val = …;
131// g_autoptr(GError) error = NULL;
132//
133// g_key_file_set_string (key_file, "Group Name", "SomeKey", val);
134//
135// // Save as a file.
136// if (!g_key_file_save_to_file (key_file, "key-file.ini", &error))
137//
138// {
139// g_warning ("Error saving key file: %s", error->message);
140// return;
141// }
142//
143// // Or store to a GBytes for use elsewhere.
144// gsize data_len;
145// g_autofree guint8 *data = (guint8 *) g_key_file_to_data (key_file, &data_len, &error);
146// if (data == NULL)
147//
148// {
149// g_warning ("Error saving key file: %s", error->message);
150// return;
151// }
152//
153// g_autoptr(GBytes) bytes = g_bytes_new_take (g_steal_pointer (&data), data_len);
154// ```
155type KeyFile struct {
156 _ structs.HostLayout
157}
158
159var xKeyFileGLibType func() types.GType
160
161func KeyFileGLibType() types.GType {
162 return xKeyFileGLibType()
163}
164
165func (x *KeyFile) GoPointer() uintptr {
166 return uintptr(unsafe.Pointer(x))
167}
168
169var xNewKeyFile func() *KeyFile
170
171// Creates a new empty [struct@GLib.KeyFile] object.
172//
173// Use [method@GLib.KeyFile.load_from_file],
174// [method@GLib.KeyFile.load_from_data], [method@GLib.KeyFile.load_from_dirs] or
175// [method@GLib.KeyFile.load_from_data_dirs] to
176// read an existing key file.
177func NewKeyFile() *KeyFile {
178
179 cret := xNewKeyFile()
180 return cret
181}
182
183var xKeyFileFree func(uintptr)
184
185// Clears all keys and groups from @key_file, and decreases the
186// reference count by 1.
187//
188// If the reference count reaches zero, frees the key file and all its allocated
189// memory.
190func (x *KeyFile) Free() {
191
192 xKeyFileFree(x.GoPointer())
193
194}
195
196var xKeyFileGetBoolean func(uintptr, string, string, **Error) bool
197
198// Returns the value associated with @key under @group_name as a
199// boolean.
200//
201// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
202// returned. Likewise, if the value associated with @key cannot be interpreted
203// as a boolean then [error@GLib.KeyFileError.INVALID_VALUE] is returned.
204func (x *KeyFile) GetBoolean(GroupNameVar string, KeyVar string) (bool, error) {
205 var cerr *Error
206
207 cret := xKeyFileGetBoolean(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
208 if cerr == nil {
209 return cret, nil
210 }
211 return cret, cerr
212
213}
214
215var xKeyFileGetBooleanList func(uintptr, string, string, *uint, **Error) uintptr
216
217// Returns the values associated with @key under @group_name as
218// booleans.
219//
220// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
221// returned. Likewise, if the values associated with @key cannot be interpreted
222// as booleans then [error@GLib.KeyFileError.INVALID_VALUE] is returned.
223func (x *KeyFile) GetBooleanList(GroupNameVar string, KeyVar string, LengthVar *uint) (uintptr, error) {
224 var cerr *Error
225
226 cret := xKeyFileGetBooleanList(x.GoPointer(), GroupNameVar, KeyVar, LengthVar, &cerr)
227 if cerr == nil {
228 return cret, nil
229 }
230 return cret, cerr
231
232}
233
234var xKeyFileGetComment func(uintptr, uintptr, uintptr, **Error) string
235
236// Retrieves a comment above @key from @group_name.
237//
238// If @key is `NULL` then @comment will be read from above
239// @group_name. If both @key and @group_name are `NULL`, then
240// @comment will be read from above the first group in the file.
241//
242// Note that the returned string does not include the `#` comment markers,
243// but does include any whitespace after them (on each line). It includes
244// the line breaks between lines, but does not include the final line break.
245func (x *KeyFile) GetComment(GroupNameVar *string, KeyVar *string) (string, error) {
246 var cerr *Error
247
248 GroupNameVarPtr := core.GStrdupNullable(GroupNameVar)
249 defer core.GFreeNullable(GroupNameVarPtr)
250
251 KeyVarPtr := core.GStrdupNullable(KeyVar)
252 defer core.GFreeNullable(KeyVarPtr)
253
254 cret := xKeyFileGetComment(x.GoPointer(), GroupNameVarPtr, KeyVarPtr, &cerr)
255 if cerr == nil {
256 return cret, nil
257 }
258 return cret, cerr
259
260}
261
262var xKeyFileGetDouble func(uintptr, string, string, **Error) float64
263
264// Returns the value associated with @key under @group_name as a double.
265//
266// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
267// returned. Likewise, if the value associated with @key cannot be interpreted
268// as a double then [error@GLib.KeyFileError.INVALID_VALUE] is returned.
269func (x *KeyFile) GetDouble(GroupNameVar string, KeyVar string) (float64, error) {
270 var cerr *Error
271
272 cret := xKeyFileGetDouble(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
273 if cerr == nil {
274 return cret, nil
275 }
276 return cret, cerr
277
278}
279
280var xKeyFileGetDoubleList func(uintptr, string, string, *uint, **Error) uintptr
281
282// Returns the values associated with @key under @group_name as
283// doubles.
284//
285// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
286// returned. Likewise, if the values associated with @key cannot be interpreted
287// as doubles then [error@GLib.KeyFileError.INVALID_VALUE] is returned.
288func (x *KeyFile) GetDoubleList(GroupNameVar string, KeyVar string, LengthVar *uint) (uintptr, error) {
289 var cerr *Error
290
291 cret := xKeyFileGetDoubleList(x.GoPointer(), GroupNameVar, KeyVar, LengthVar, &cerr)
292 if cerr == nil {
293 return cret, nil
294 }
295 return cret, cerr
296
297}
298
299var xKeyFileGetGroups func(uintptr, *uint) []string
300
301// Returns all groups in the key file loaded with @key_file.
302//
303// The array of returned groups will be `NULL`-terminated, so
304// @length may optionally be `NULL`.
305func (x *KeyFile) GetGroups(LengthVar *uint) []string {
306
307 cret := xKeyFileGetGroups(x.GoPointer(), LengthVar)
308 return cret
309}
310
311var xKeyFileGetInt64 func(uintptr, string, string, **Error) int64
312
313// Returns the value associated with @key under @group_name as a signed
314// 64-bit integer.
315//
316// This is similar to [method@GLib.KeyFile.get_integer] but can return
317// 64-bit results without truncation.
318func (x *KeyFile) GetInt64(GroupNameVar string, KeyVar string) (int64, error) {
319 var cerr *Error
320
321 cret := xKeyFileGetInt64(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
322 if cerr == nil {
323 return cret, nil
324 }
325 return cret, cerr
326
327}
328
329var xKeyFileGetInteger func(uintptr, string, string, **Error) int
330
331// Returns the value associated with @key under @group_name as an
332// integer.
333//
334// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
335// returned. Likewise, if the value associated with @key cannot be interpreted
336// as an integer, or is out of range for a `gint`, then
337// [error@GLib.KeyFileError.INVALID_VALUE] is returned.
338func (x *KeyFile) GetInteger(GroupNameVar string, KeyVar string) (int, error) {
339 var cerr *Error
340
341 cret := xKeyFileGetInteger(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
342 if cerr == nil {
343 return cret, nil
344 }
345 return cret, cerr
346
347}
348
349var xKeyFileGetIntegerList func(uintptr, string, string, *uint, **Error) uintptr
350
351// Returns the values associated with @key under @group_name as
352// integers.
353//
354// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
355// returned. Likewise, if the values associated with @key cannot be interpreted
356// as integers, or are out of range for `gint`, then
357// [error@GLib.KeyFileError.INVALID_VALUE] is returned.
358func (x *KeyFile) GetIntegerList(GroupNameVar string, KeyVar string, LengthVar *uint) (uintptr, error) {
359 var cerr *Error
360
361 cret := xKeyFileGetIntegerList(x.GoPointer(), GroupNameVar, KeyVar, LengthVar, &cerr)
362 if cerr == nil {
363 return cret, nil
364 }
365 return cret, cerr
366
367}
368
369var xKeyFileGetKeys func(uintptr, string, *uint, **Error) []string
370
371// Returns all keys for the group name @group_name.
372//
373// The array of returned keys will be `NULL`-terminated, so @length may
374// optionally be `NULL`. If the @group_name cannot be found,
375// [error@GLib.KeyFileError.GROUP_NOT_FOUND] is returned.
376func (x *KeyFile) GetKeys(GroupNameVar string, LengthVar *uint) ([]string, error) {
377 var cerr *Error
378
379 cret := xKeyFileGetKeys(x.GoPointer(), GroupNameVar, LengthVar, &cerr)
380 if cerr == nil {
381 return cret, nil
382 }
383 return cret, cerr
384
385}
386
387var xKeyFileGetLocaleForKey func(uintptr, string, string, uintptr) string
388
389// Returns the actual locale which the result of
390// [method@GLib.KeyFile.get_locale_string] or
391// [method@GLib.KeyFile.get_locale_string_list] came from.
392//
393// If calling [method@GLib.KeyFile.get_locale_string] or
394// [method@GLib.KeyFile.get_locale_string_list] with exactly the same @key_file,
395// @group_name, @key and @locale, the result of those functions will
396// have originally been tagged with the locale that is the result of
397// this function.
398func (x *KeyFile) GetLocaleForKey(GroupNameVar string, KeyVar string, LocaleVar *string) string {
399
400 LocaleVarPtr := core.GStrdupNullable(LocaleVar)
401 defer core.GFreeNullable(LocaleVarPtr)
402
403 cret := xKeyFileGetLocaleForKey(x.GoPointer(), GroupNameVar, KeyVar, LocaleVarPtr)
404 return cret
405}
406
407var xKeyFileGetLocaleString func(uintptr, string, string, uintptr, **Error) string
408
409// Returns the value associated with @key under @group_name
410// translated in the given @locale if available.
411//
412// If @locale is `C` then the untranslated value is returned (since GLib 2.84).
413//
414// If @locale is `NULL` then the current locale is assumed.
415//
416// If @locale is to be non-`NULL`, or if the current locale will change over
417// the lifetime of the [struct@GLib.KeyFile], it must be loaded with
418// [flags@GLib.KeyFileFlags.KEEP_TRANSLATIONS] in order to load strings for all
419// locales.
420//
421// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
422// returned. If the value associated
423// with @key cannot be interpreted or no suitable translation can
424// be found then the untranslated value is returned.
425func (x *KeyFile) GetLocaleString(GroupNameVar string, KeyVar string, LocaleVar *string) (string, error) {
426 var cerr *Error
427
428 LocaleVarPtr := core.GStrdupNullable(LocaleVar)
429 defer core.GFreeNullable(LocaleVarPtr)
430
431 cret := xKeyFileGetLocaleString(x.GoPointer(), GroupNameVar, KeyVar, LocaleVarPtr, &cerr)
432 if cerr == nil {
433 return cret, nil
434 }
435 return cret, cerr
436
437}
438
439var xKeyFileGetLocaleStringList func(uintptr, string, string, uintptr, *uint, **Error) []string
440
441// Returns the values associated with @key under @group_name
442// translated in the given @locale if available.
443//
444// If @locale is `C` then the untranslated value is returned (since GLib 2.84).
445//
446// If @locale is `NULL` then the current locale is assumed.
447//
448// If @locale is to be non-`NULL`, or if the current locale will change over
449// the lifetime of the [struct@GLib.KeyFile], it must be loaded with
450// [flags@GLib.KeyFileFlags.KEEP_TRANSLATIONS] in order to load strings for all
451// locales.
452//
453// If @key cannot be found then [error@GLib.KeyFileError.KEY_NOT_FOUND] is
454// returned. If the values associated
455// with @key cannot be interpreted or no suitable translations
456// can be found then the untranslated values are returned. The
457// returned array is `NULL`-terminated, so @length may optionally
458// be `NULL`.
459func (x *KeyFile) GetLocaleStringList(GroupNameVar string, KeyVar string, LocaleVar *string, LengthVar *uint) ([]string, error) {
460 var cerr *Error
461
462 LocaleVarPtr := core.GStrdupNullable(LocaleVar)
463 defer core.GFreeNullable(LocaleVarPtr)
464
465 cret := xKeyFileGetLocaleStringList(x.GoPointer(), GroupNameVar, KeyVar, LocaleVarPtr, LengthVar, &cerr)
466 if cerr == nil {
467 return cret, nil
468 }
469 return cret, cerr
470
471}
472
473var xKeyFileGetStartGroup func(uintptr) string
474
475// Returns the name of the start group of the file.
476func (x *KeyFile) GetStartGroup() string {
477
478 cret := xKeyFileGetStartGroup(x.GoPointer())
479 return cret
480}
481
482var xKeyFileGetString func(uintptr, string, string, **Error) string
483
484// Returns the string value associated with @key under @group_name.
485//
486// Unlike [method@GLib.KeyFile.get_value], this function handles escape
487// sequences like `\s`.
488//
489// If the key cannot be found, [error@GLib.KeyFileError.KEY_NOT_FOUND] is
490// returned. If the @group_name cannot be found,
491// [error@GLib.KeyFileError.GROUP_NOT_FOUND] is returned.
492func (x *KeyFile) GetString(GroupNameVar string, KeyVar string) (string, error) {
493 var cerr *Error
494
495 cret := xKeyFileGetString(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
496 if cerr == nil {
497 return cret, nil
498 }
499 return cret, cerr
500
501}
502
503var xKeyFileGetStringList func(uintptr, string, string, *uint, **Error) []string
504
505// Returns the values associated with @key under @group_name.
506//
507// If the key cannot be found, [error@GLib.KeyFileError.KEY_NOT_FOUND] is
508// returned. If the @group_name cannot be found,
509// [error@GLib.KeyFileError.GROUP_NOT_FOUND] is returned.
510func (x *KeyFile) GetStringList(GroupNameVar string, KeyVar string, LengthVar *uint) ([]string, error) {
511 var cerr *Error
512
513 cret := xKeyFileGetStringList(x.GoPointer(), GroupNameVar, KeyVar, LengthVar, &cerr)
514 if cerr == nil {
515 return cret, nil
516 }
517 return cret, cerr
518
519}
520
521var xKeyFileGetUint64 func(uintptr, string, string, **Error) uint64
522
523// Returns the value associated with @key under @group_name as an unsigned
524// 64-bit integer.
525//
526// This is similar to [method@GLib.KeyFile.get_integer] but can return
527// large positive results without truncation.
528func (x *KeyFile) GetUint64(GroupNameVar string, KeyVar string) (uint64, error) {
529 var cerr *Error
530
531 cret := xKeyFileGetUint64(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
532 if cerr == nil {
533 return cret, nil
534 }
535 return cret, cerr
536
537}
538
539var xKeyFileGetValue func(uintptr, string, string, **Error) string
540
541// Returns the raw value associated with @key under @group_name.
542//
543// Use [method@GLib.KeyFile.get_string] to retrieve an unescaped UTF-8 string.
544//
545// If the key cannot be found, [error@GLib.KeyFileError.KEY_NOT_FOUND]
546// is returned. If the @group_name cannot be found,
547// [error@GLib.KeyFileError.GROUP_NOT_FOUND] is returned.
548func (x *KeyFile) GetValue(GroupNameVar string, KeyVar string) (string, error) {
549 var cerr *Error
550
551 cret := xKeyFileGetValue(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
552 if cerr == nil {
553 return cret, nil
554 }
555 return cret, cerr
556
557}
558
559var xKeyFileHasGroup func(uintptr, string) bool
560
561// Looks whether the key file has the group @group_name.
562func (x *KeyFile) HasGroup(GroupNameVar string) bool {
563
564 cret := xKeyFileHasGroup(x.GoPointer(), GroupNameVar)
565 return cret
566}
567
568var xKeyFileHasKey func(uintptr, string, string, **Error) bool
569
570// Looks whether the key file has the key @key in the group
571// @group_name.
572//
573// Note that this function does not follow the rules for [struct@GLib.Error]
574// strictly;
575// the return value both carries meaning and signals an error. To use
576// this function, you must pass a [struct@GLib.Error] pointer in @error, and
577// check whether it is not `NULL` to see if an error occurred.
578//
579// Language bindings should use [method@GLib.KeyFile.get_value] to test whether
580// a key exists.
581func (x *KeyFile) HasKey(GroupNameVar string, KeyVar string) (bool, error) {
582 var cerr *Error
583
584 cret := xKeyFileHasKey(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
585 if cerr == nil {
586 return cret, nil
587 }
588 return cret, cerr
589
590}
591
592var xKeyFileLoadFromBytes func(uintptr, *Bytes, KeyFileFlags, **Error) bool
593
594// Loads a key file from the data in @bytes into an empty [struct@GLib.KeyFile]
595// structure.
596//
597// If the object cannot be created then a [error@GLib.KeyFileError] is returned.
598func (x *KeyFile) LoadFromBytes(BytesVar *Bytes, FlagsVar KeyFileFlags) (bool, error) {
599 var cerr *Error
600
601 cret := xKeyFileLoadFromBytes(x.GoPointer(), BytesVar, FlagsVar, &cerr)
602 if cerr == nil {
603 return cret, nil
604 }
605 return cret, cerr
606
607}
608
609var xKeyFileLoadFromData func(uintptr, string, uint, KeyFileFlags, **Error) bool
610
611// Loads a key file from memory into an empty [struct@GLib.KeyFile] structure.
612//
613// If the object cannot be created then a [error@GLib.KeyFileError is returned.
614func (x *KeyFile) LoadFromData(DataVar string, LengthVar uint, FlagsVar KeyFileFlags) (bool, error) {
615 var cerr *Error
616
617 cret := xKeyFileLoadFromData(x.GoPointer(), DataVar, LengthVar, FlagsVar, &cerr)
618 if cerr == nil {
619 return cret, nil
620 }
621 return cret, cerr
622
623}
624
625var xKeyFileLoadFromDataDirs func(uintptr, string, *string, KeyFileFlags, **Error) bool
626
627// Looks for a key file named @file in the paths returned from
628// [func@GLib.get_user_data_dir] and [func@GLib.get_system_data_dirs].
629//
630// The search algorithm from [method@GLib.KeyFile.load_from_dirs] is used. If
631// @file is found, it’s loaded into @key_file and its full path is returned in
632// @full_path.
633//
634// If the file could not be loaded then either a [error@GLib.FileError] or
635// [error@GLib.KeyFileError] is returned.
636func (x *KeyFile) LoadFromDataDirs(FileVar string, FullPathVar *string, FlagsVar KeyFileFlags) (bool, error) {
637 var cerr *Error
638
639 cret := xKeyFileLoadFromDataDirs(x.GoPointer(), FileVar, FullPathVar, FlagsVar, &cerr)
640 if cerr == nil {
641 return cret, nil
642 }
643 return cret, cerr
644
645}
646
647var xKeyFileLoadFromDirs func(uintptr, string, []string, *string, KeyFileFlags, **Error) bool
648
649// Looks for a key file named @file in the paths specified in @search_dirs,
650// loads the file into @key_file and returns the file’s full path in @full_path.
651//
652// @search_dirs are checked in the order listed in the array, with the highest
653// priority directory listed first. Within each directory, @file is looked for.
654// If it’s not found, `-` characters in @file are progressively replaced with
655// directory separators to search subdirectories of the search directory. If the
656// file has not been found after all `-` characters have been replaced, the next
657// search directory in @search_dirs is checked.
658//
659// If the file could not be found in any of the @search_dirs,
660// [error@GLib.KeyFileError.NOT_FOUND] is returned. If
661// the file is found but the OS returns an error when opening or reading the
662// file, a [error@GLib.FileError] is returned. If there is a problem parsing the
663// file, a [error@GLib.KeyFileError] is returned.
664func (x *KeyFile) LoadFromDirs(FileVar string, SearchDirsVar []string, FullPathVar *string, FlagsVar KeyFileFlags) (bool, error) {
665 var cerr *Error
666
667 cret := xKeyFileLoadFromDirs(x.GoPointer(), FileVar, SearchDirsVar, FullPathVar, FlagsVar, &cerr)
668 if cerr == nil {
669 return cret, nil
670 }
671 return cret, cerr
672
673}
674
675var xKeyFileLoadFromFile func(uintptr, string, KeyFileFlags, **Error) bool
676
677// Loads a key file into an empty [struct@GLib.KeyFile] structure.
678//
679// If the OS returns an error when opening or reading the file, a
680// [error@GLib.FileError] is returned. If there is a problem parsing the file,
681// a [error@GLib.KeyFileError] is returned.
682//
683// This function will never return a [error@GLib.KeyFileError.NOT_FOUND]
684// error. If the @file is not found, [error@GLib.FileError.NOENT] is returned.
685func (x *KeyFile) LoadFromFile(FileVar string, FlagsVar KeyFileFlags) (bool, error) {
686 var cerr *Error
687
688 cret := xKeyFileLoadFromFile(x.GoPointer(), FileVar, FlagsVar, &cerr)
689 if cerr == nil {
690 return cret, nil
691 }
692 return cret, cerr
693
694}
695
696var xKeyFileRef func(uintptr) *KeyFile
697
698// Increases the reference count of @key_file.
699func (x *KeyFile) Ref() *KeyFile {
700
701 cret := xKeyFileRef(x.GoPointer())
702 return cret
703}
704
705var xKeyFileRemoveComment func(uintptr, uintptr, uintptr, **Error) bool
706
707// Removes a comment above @key from @group_name.
708//
709// If @key is `NULL` then @comment will be removed above @group_name.
710// If both @key and @group_name are `NULL`, then @comment will
711// be removed above the first group in the file.
712func (x *KeyFile) RemoveComment(GroupNameVar *string, KeyVar *string) (bool, error) {
713 var cerr *Error
714
715 GroupNameVarPtr := core.GStrdupNullable(GroupNameVar)
716 defer core.GFreeNullable(GroupNameVarPtr)
717
718 KeyVarPtr := core.GStrdupNullable(KeyVar)
719 defer core.GFreeNullable(KeyVarPtr)
720
721 cret := xKeyFileRemoveComment(x.GoPointer(), GroupNameVarPtr, KeyVarPtr, &cerr)
722 if cerr == nil {
723 return cret, nil
724 }
725 return cret, cerr
726
727}
728
729var xKeyFileRemoveGroup func(uintptr, string, **Error) bool
730
731// Removes the specified group, @group_name,
732// from the key file.
733func (x *KeyFile) RemoveGroup(GroupNameVar string) (bool, error) {
734 var cerr *Error
735
736 cret := xKeyFileRemoveGroup(x.GoPointer(), GroupNameVar, &cerr)
737 if cerr == nil {
738 return cret, nil
739 }
740 return cret, cerr
741
742}
743
744var xKeyFileRemoveKey func(uintptr, string, string, **Error) bool
745
746// Removes @key in @group_name from the key file.
747func (x *KeyFile) RemoveKey(GroupNameVar string, KeyVar string) (bool, error) {
748 var cerr *Error
749
750 cret := xKeyFileRemoveKey(x.GoPointer(), GroupNameVar, KeyVar, &cerr)
751 if cerr == nil {
752 return cret, nil
753 }
754 return cret, cerr
755
756}
757
758var xKeyFileSaveToFile func(uintptr, string, **Error) bool
759
760// Writes the contents of @key_file to @filename using
761// [func@GLib.file_set_contents].
762//
763// If you need stricter guarantees about durability of
764// the written file than are provided by [func@GLib.file_set_contents], use
765// [func@GLib.file_set_contents_full] with the return value of
766// [method@GLib.KeyFile.to_data].
767//
768// This function can fail for any of the reasons that
769// [func@GLib.file_set_contents] may fail.
770func (x *KeyFile) SaveToFile(FilenameVar string) (bool, error) {
771 var cerr *Error
772
773 cret := xKeyFileSaveToFile(x.GoPointer(), FilenameVar, &cerr)
774 if cerr == nil {
775 return cret, nil
776 }
777 return cret, cerr
778
779}
780
781var xKeyFileSetBoolean func(uintptr, string, string, bool)
782
783// Associates a new boolean value with @key under @group_name.
784//
785// If @key cannot be found then it is created.
786func (x *KeyFile) SetBoolean(GroupNameVar string, KeyVar string, ValueVar bool) {
787
788 xKeyFileSetBoolean(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
789
790}
791
792var xKeyFileSetBooleanList func(uintptr, string, string, []bool, uint)
793
794// Associates a list of boolean values with @key under @group_name.
795//
796// If @key cannot be found then it is created.
797func (x *KeyFile) SetBooleanList(GroupNameVar string, KeyVar string, ListVar []bool, LengthVar uint) {
798
799 xKeyFileSetBooleanList(x.GoPointer(), GroupNameVar, KeyVar, ListVar, LengthVar)
800
801}
802
803var xKeyFileSetComment func(uintptr, uintptr, uintptr, string, **Error) bool
804
805// Places a comment above @key from @group_name.
806//
807// If @key is `NULL` then @comment will be written above @group_name.
808// If both @key and @group_name are `NULL`, then @comment will be
809// written above the first group in the file.
810//
811// Passing a non-existent @group_name or @key to this function returns
812// false and populates @error. (In contrast, passing a non-existent
813// `group_name` or `key` to [method@GLib.KeyFile.set_string]
814// creates the associated group name and key.)
815//
816// Note that this function prepends a `#` comment marker to
817// each line of @comment.
818func (x *KeyFile) SetComment(GroupNameVar *string, KeyVar *string, CommentVar string) (bool, error) {
819 var cerr *Error
820
821 GroupNameVarPtr := core.GStrdupNullable(GroupNameVar)
822 defer core.GFreeNullable(GroupNameVarPtr)
823
824 KeyVarPtr := core.GStrdupNullable(KeyVar)
825 defer core.GFreeNullable(KeyVarPtr)
826
827 cret := xKeyFileSetComment(x.GoPointer(), GroupNameVarPtr, KeyVarPtr, CommentVar, &cerr)
828 if cerr == nil {
829 return cret, nil
830 }
831 return cret, cerr
832
833}
834
835var xKeyFileSetDouble func(uintptr, string, string, float64)
836
837// Associates a new double value with @key under @group_name.
838//
839// If @key cannot be found then it is created.
840func (x *KeyFile) SetDouble(GroupNameVar string, KeyVar string, ValueVar float64) {
841
842 xKeyFileSetDouble(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
843
844}
845
846var xKeyFileSetDoubleList func(uintptr, string, string, []float64, uint)
847
848// Associates a list of double values with @key under @group_name.
849//
850// If @key cannot be found then it is created.
851func (x *KeyFile) SetDoubleList(GroupNameVar string, KeyVar string, ListVar []float64, LengthVar uint) {
852
853 xKeyFileSetDoubleList(x.GoPointer(), GroupNameVar, KeyVar, ListVar, LengthVar)
854
855}
856
857var xKeyFileSetInt64 func(uintptr, string, string, int64)
858
859// Associates a new integer value with @key under @group_name.
860//
861// If @key cannot be found then it is created.
862func (x *KeyFile) SetInt64(GroupNameVar string, KeyVar string, ValueVar int64) {
863
864 xKeyFileSetInt64(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
865
866}
867
868var xKeyFileSetInteger func(uintptr, string, string, int)
869
870// Associates a new integer value with @key under @group_name.
871//
872// If @key cannot be found then it is created.
873func (x *KeyFile) SetInteger(GroupNameVar string, KeyVar string, ValueVar int) {
874
875 xKeyFileSetInteger(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
876
877}
878
879var xKeyFileSetIntegerList func(uintptr, string, string, []int, uint)
880
881// Associates a list of integer values with @key under @group_name.
882//
883// If @key cannot be found then it is created.
884func (x *KeyFile) SetIntegerList(GroupNameVar string, KeyVar string, ListVar []int, LengthVar uint) {
885
886 xKeyFileSetIntegerList(x.GoPointer(), GroupNameVar, KeyVar, ListVar, LengthVar)
887
888}
889
890var xKeyFileSetListSeparator func(uintptr, byte)
891
892// Sets the character which is used to separate values in lists.
893//
894// Typically `;` or `,` are used as separators. The default list separator
895// is `;`.
896func (x *KeyFile) SetListSeparator(SeparatorVar byte) {
897
898 xKeyFileSetListSeparator(x.GoPointer(), SeparatorVar)
899
900}
901
902var xKeyFileSetLocaleString func(uintptr, string, string, string, string)
903
904// Associates a string value for @key and @locale under @group_name.
905//
906// If the translation for @key cannot be found then it is created.
907//
908// If @locale is `C` then the untranslated value is set (since GLib 2.84).
909func (x *KeyFile) SetLocaleString(GroupNameVar string, KeyVar string, LocaleVar string, StringVar string) {
910
911 xKeyFileSetLocaleString(x.GoPointer(), GroupNameVar, KeyVar, LocaleVar, StringVar)
912
913}
914
915var xKeyFileSetLocaleStringList func(uintptr, string, string, string, []string, uint)
916
917// Associates a list of string values for @key and @locale under
918// @group_name.
919//
920// If @locale is `C` then the untranslated value is set (since GLib 2.84).
921//
922// If the translation for @key cannot be found then it is created.
923func (x *KeyFile) SetLocaleStringList(GroupNameVar string, KeyVar string, LocaleVar string, ListVar []string, LengthVar uint) {
924
925 xKeyFileSetLocaleStringList(x.GoPointer(), GroupNameVar, KeyVar, LocaleVar, ListVar, LengthVar)
926
927}
928
929var xKeyFileSetString func(uintptr, string, string, string)
930
931// Associates a new string value with @key under @group_name.
932//
933// If @key cannot be found then it is created.
934// If @group_name cannot be found then it is created.
935// Unlike [method@GLib.KeyFile.set_value], this function handles characters
936// that need escaping, such as newlines.
937func (x *KeyFile) SetString(GroupNameVar string, KeyVar string, StringVar string) {
938
939 xKeyFileSetString(x.GoPointer(), GroupNameVar, KeyVar, StringVar)
940
941}
942
943var xKeyFileSetStringList func(uintptr, string, string, []string, uint)
944
945// Associates a list of string values for @key under @group_name.
946//
947// If @key cannot be found then it is created.
948// If @group_name cannot be found then it is created.
949func (x *KeyFile) SetStringList(GroupNameVar string, KeyVar string, ListVar []string, LengthVar uint) {
950
951 xKeyFileSetStringList(x.GoPointer(), GroupNameVar, KeyVar, ListVar, LengthVar)
952
953}
954
955var xKeyFileSetUint64 func(uintptr, string, string, uint64)
956
957// Associates a new integer value with @key under @group_name.
958//
959// If @key cannot be found then it is created.
960func (x *KeyFile) SetUint64(GroupNameVar string, KeyVar string, ValueVar uint64) {
961
962 xKeyFileSetUint64(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
963
964}
965
966var xKeyFileSetValue func(uintptr, string, string, string)
967
968// Associates a new value with @key under @group_name.
969//
970// If @key cannot be found then it is created. If @group_name cannot
971// be found then it is created. To set an UTF-8 string which may contain
972// characters that need escaping (such as newlines or spaces), use
973// [method@GLib.KeyFile.set_string].
974func (x *KeyFile) SetValue(GroupNameVar string, KeyVar string, ValueVar string) {
975
976 xKeyFileSetValue(x.GoPointer(), GroupNameVar, KeyVar, ValueVar)
977
978}
979
980var xKeyFileToData func(uintptr, *uint, **Error) string
981
982// Outputs @key_file as a string.
983//
984// Note that this function never reports an error.
985func (x *KeyFile) ToData(LengthVar *uint) (string, error) {
986 var cerr *Error
987
988 cret := xKeyFileToData(x.GoPointer(), LengthVar, &cerr)
989 if cerr == nil {
990 return cret, nil
991 }
992 return cret, cerr
993
994}
995
996var xKeyFileUnref func(uintptr)
997
998// Decreases the reference count of @key_file by 1.
999//
1000// If the reference count reaches zero, frees the key file and all its allocated
1001// memory.
1002func (x *KeyFile) Unref() {
1003
1004 xKeyFileUnref(x.GoPointer())
1005
1006}
1007
1008const (
1009 // The name of the main group of a desktop entry file, as defined in the
1010 // [Desktop Entry Specification](https://specifications.freedesktop.org/desktop-entry-spec/latest/).
1011 //
1012 // Consult the specification for more
1013 // details about the meanings of the keys below.
1014 KEY_FILE_DESKTOP_GROUP string = "Desktop Entry"
1015 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string list
1016 // giving the available application actions.
1017 KEY_FILE_DESKTOP_KEY_ACTIONS string = "Actions"
1018 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a list
1019 // of strings giving the categories in which the desktop entry
1020 // should be shown in a menu.
1021 KEY_FILE_DESKTOP_KEY_CATEGORIES string = "Categories"
1022 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a localized
1023 // string giving the tooltip for the desktop entry.
1024 KEY_FILE_DESKTOP_KEY_COMMENT string = "Comment"
1025 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a boolean
1026 // set to true if the application is D-Bus activatable.
1027 KEY_FILE_DESKTOP_KEY_DBUS_ACTIVATABLE string = "DBusActivatable"
1028 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1029 // giving the command line to execute.
1030 //
1031 // It is only valid for desktop entries with the `Application` type.
1032 KEY_FILE_DESKTOP_KEY_EXEC string = "Exec"
1033 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a localized
1034 // string giving the generic name of the desktop entry.
1035 KEY_FILE_DESKTOP_KEY_GENERIC_NAME string = "GenericName"
1036 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a boolean
1037 // stating whether the desktop entry has been deleted by the user.
1038 KEY_FILE_DESKTOP_KEY_HIDDEN string = "Hidden"
1039 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a localized
1040 // string giving the name of the icon to be displayed for the desktop
1041 // entry.
1042 KEY_FILE_DESKTOP_KEY_ICON string = "Icon"
1043 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a list
1044 // of strings giving the MIME types supported by this desktop entry.
1045 KEY_FILE_DESKTOP_KEY_MIME_TYPE string = "MimeType"
1046 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a localized
1047 // string giving the specific name of the desktop entry.
1048 KEY_FILE_DESKTOP_KEY_NAME string = "Name"
1049 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a list of
1050 // strings identifying the environments that should not display the
1051 // desktop entry.
1052 KEY_FILE_DESKTOP_KEY_NOT_SHOW_IN string = "NotShowIn"
1053 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a boolean
1054 // stating whether the desktop entry should be shown in menus.
1055 KEY_FILE_DESKTOP_KEY_NO_DISPLAY string = "NoDisplay"
1056 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a list of
1057 // strings identifying the environments that should display the
1058 // desktop entry.
1059 KEY_FILE_DESKTOP_KEY_ONLY_SHOW_IN string = "OnlyShowIn"
1060 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1061 // containing the working directory to run the program in.
1062 //
1063 // It is only valid for desktop entries with the `Application` type.
1064 KEY_FILE_DESKTOP_KEY_PATH string = "Path"
1065 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a boolean
1066 // stating whether the application supports the
1067 // [Startup Notification Protocol Specification](https://specifications.freedesktop.org/startup-notification-spec/latest/).
1068 KEY_FILE_DESKTOP_KEY_STARTUP_NOTIFY string = "StartupNotify"
1069 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is string
1070 // identifying the WM class or name hint of a window that the application
1071 // will create, which can be used to emulate
1072 // [Startup Notification](https://specifications.freedesktop.org/startup-notification-spec/latest/)
1073 // with older applications.
1074 KEY_FILE_DESKTOP_KEY_STARTUP_WM_CLASS string = "StartupWMClass"
1075 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a boolean
1076 // stating whether the program should be run in a terminal window.
1077 //
1078 // It is only valid for desktop entries with the `Application` type.
1079 KEY_FILE_DESKTOP_KEY_TERMINAL string = "Terminal"
1080 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1081 // giving the file name of a binary on disk used to determine if the
1082 // program is actually installed.
1083 //
1084 // It is only valid for desktop entries with the `Application` type.
1085 KEY_FILE_DESKTOP_KEY_TRY_EXEC string = "TryExec"
1086 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1087 // giving the type of the desktop entry.
1088 //
1089 // Usually [const@GLib.KEY_FILE_DESKTOP_TYPE_APPLICATION],
1090 // [const@GLib.KEY_FILE_DESKTOP_TYPE_LINK], or
1091 // [const@GLib.KEY_FILE_DESKTOP_TYPE_DIRECTORY].
1092 KEY_FILE_DESKTOP_KEY_TYPE string = "Type"
1093 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1094 // giving the URL to access.
1095 //
1096 // It is only valid for desktop entries with the `Link` type.
1097 KEY_FILE_DESKTOP_KEY_URL string = "URL"
1098 // A key under [const@GLib.KEY_FILE_DESKTOP_GROUP], whose value is a string
1099 // giving the version of the Desktop Entry Specification used for
1100 // the desktop entry file.
1101 KEY_FILE_DESKTOP_KEY_VERSION string = "Version"
1102 // The value of the [const@GLib.KEY_FILE_DESKTOP_KEY_TYPE], key for desktop
1103 // entries representing applications.
1104 KEY_FILE_DESKTOP_TYPE_APPLICATION string = "Application"
1105 // The value of the [const@GLib.KEY_FILE_DESKTOP_KEY_TYPE], key for desktop
1106 // entries representing directories.
1107 KEY_FILE_DESKTOP_TYPE_DIRECTORY string = "Directory"
1108 // The value of the [const@GLib.KEY_FILE_DESKTOP_KEY_TYPE], key for desktop
1109 // entries representing links to documents.
1110 KEY_FILE_DESKTOP_TYPE_LINK string = "Link"
1111)
1112
1113// Flags which influence the parsing.
1114type KeyFileFlags int
1115
1116const (
1117
1118 // No flags, default behaviour
1119 GKeyFileNoneValue KeyFileFlags = 0
1120 // Use this flag if you plan to write the
1121 // (possibly modified) contents of the key file back to a file;
1122 // otherwise all comments will be lost when the key file is
1123 // written back.
1124 GKeyFileKeepCommentsValue KeyFileFlags = 1
1125 // Use this flag if you plan to write the
1126 // (possibly modified) contents of the key file back to a file;
1127 // otherwise only the translations for the current language will be
1128 // written back.
1129 GKeyFileKeepTranslationsValue KeyFileFlags = 2
1130)
1131
1132// Error codes returned by key file parsing.
1133type KeyFileError int
1134
1135const (
1136
1137 // the text being parsed was in
1138 // an unknown encoding
1139 GKeyFileErrorUnknownEncodingValue KeyFileError = 0
1140 // document was ill-formed
1141 GKeyFileErrorParseValue KeyFileError = 1
1142 // the file was not found
1143 GKeyFileErrorNotFoundValue KeyFileError = 2
1144 // a requested key was not found
1145 GKeyFileErrorKeyNotFoundValue KeyFileError = 3
1146 // a requested group was not found
1147 GKeyFileErrorGroupNotFoundValue KeyFileError = 4
1148 // a value could not be parsed
1149 GKeyFileErrorInvalidValueValue KeyFileError = 5
1150)
1151
1152func init() {
1153 core.SetPackageName("GLIB", "glib-2.0")
1154 core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0"})
1155 var libs []uintptr
1156 for _, libPath := range core.GetPaths("GLIB") {
1157 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
1158 if err != nil {
1159 panic(err)
1160 }
1161 libs = append(libs, lib)
1162 }
1163
1164 core.PuregoSafeRegister(&xKeyFileGLibType, libs, "g_key_file_get_type")
1165
1166 core.PuregoSafeRegister(&xNewKeyFile, libs, "g_key_file_new")
1167
1168 core.PuregoSafeRegister(&xKeyFileFree, libs, "g_key_file_free")
1169 core.PuregoSafeRegister(&xKeyFileGetBoolean, libs, "g_key_file_get_boolean")
1170 core.PuregoSafeRegister(&xKeyFileGetBooleanList, libs, "g_key_file_get_boolean_list")
1171 core.PuregoSafeRegister(&xKeyFileGetComment, libs, "g_key_file_get_comment")
1172 core.PuregoSafeRegister(&xKeyFileGetDouble, libs, "g_key_file_get_double")
1173 core.PuregoSafeRegister(&xKeyFileGetDoubleList, libs, "g_key_file_get_double_list")
1174 core.PuregoSafeRegister(&xKeyFileGetGroups, libs, "g_key_file_get_groups")
1175 core.PuregoSafeRegister(&xKeyFileGetInt64, libs, "g_key_file_get_int64")
1176 core.PuregoSafeRegister(&xKeyFileGetInteger, libs, "g_key_file_get_integer")
1177 core.PuregoSafeRegister(&xKeyFileGetIntegerList, libs, "g_key_file_get_integer_list")
1178 core.PuregoSafeRegister(&xKeyFileGetKeys, libs, "g_key_file_get_keys")
1179 core.PuregoSafeRegister(&xKeyFileGetLocaleForKey, libs, "g_key_file_get_locale_for_key")
1180 core.PuregoSafeRegister(&xKeyFileGetLocaleString, libs, "g_key_file_get_locale_string")
1181 core.PuregoSafeRegister(&xKeyFileGetLocaleStringList, libs, "g_key_file_get_locale_string_list")
1182 core.PuregoSafeRegister(&xKeyFileGetStartGroup, libs, "g_key_file_get_start_group")
1183 core.PuregoSafeRegister(&xKeyFileGetString, libs, "g_key_file_get_string")
1184 core.PuregoSafeRegister(&xKeyFileGetStringList, libs, "g_key_file_get_string_list")
1185 core.PuregoSafeRegister(&xKeyFileGetUint64, libs, "g_key_file_get_uint64")
1186 core.PuregoSafeRegister(&xKeyFileGetValue, libs, "g_key_file_get_value")
1187 core.PuregoSafeRegister(&xKeyFileHasGroup, libs, "g_key_file_has_group")
1188 core.PuregoSafeRegister(&xKeyFileHasKey, libs, "g_key_file_has_key")
1189 core.PuregoSafeRegister(&xKeyFileLoadFromBytes, libs, "g_key_file_load_from_bytes")
1190 core.PuregoSafeRegister(&xKeyFileLoadFromData, libs, "g_key_file_load_from_data")
1191 core.PuregoSafeRegister(&xKeyFileLoadFromDataDirs, libs, "g_key_file_load_from_data_dirs")
1192 core.PuregoSafeRegister(&xKeyFileLoadFromDirs, libs, "g_key_file_load_from_dirs")
1193 core.PuregoSafeRegister(&xKeyFileLoadFromFile, libs, "g_key_file_load_from_file")
1194 core.PuregoSafeRegister(&xKeyFileRef, libs, "g_key_file_ref")
1195 core.PuregoSafeRegister(&xKeyFileRemoveComment, libs, "g_key_file_remove_comment")
1196 core.PuregoSafeRegister(&xKeyFileRemoveGroup, libs, "g_key_file_remove_group")
1197 core.PuregoSafeRegister(&xKeyFileRemoveKey, libs, "g_key_file_remove_key")
1198 core.PuregoSafeRegister(&xKeyFileSaveToFile, libs, "g_key_file_save_to_file")
1199 core.PuregoSafeRegister(&xKeyFileSetBoolean, libs, "g_key_file_set_boolean")
1200 core.PuregoSafeRegister(&xKeyFileSetBooleanList, libs, "g_key_file_set_boolean_list")
1201 core.PuregoSafeRegister(&xKeyFileSetComment, libs, "g_key_file_set_comment")
1202 core.PuregoSafeRegister(&xKeyFileSetDouble, libs, "g_key_file_set_double")
1203 core.PuregoSafeRegister(&xKeyFileSetDoubleList, libs, "g_key_file_set_double_list")
1204 core.PuregoSafeRegister(&xKeyFileSetInt64, libs, "g_key_file_set_int64")
1205 core.PuregoSafeRegister(&xKeyFileSetInteger, libs, "g_key_file_set_integer")
1206 core.PuregoSafeRegister(&xKeyFileSetIntegerList, libs, "g_key_file_set_integer_list")
1207 core.PuregoSafeRegister(&xKeyFileSetListSeparator, libs, "g_key_file_set_list_separator")
1208 core.PuregoSafeRegister(&xKeyFileSetLocaleString, libs, "g_key_file_set_locale_string")
1209 core.PuregoSafeRegister(&xKeyFileSetLocaleStringList, libs, "g_key_file_set_locale_string_list")
1210 core.PuregoSafeRegister(&xKeyFileSetString, libs, "g_key_file_set_string")
1211 core.PuregoSafeRegister(&xKeyFileSetStringList, libs, "g_key_file_set_string_list")
1212 core.PuregoSafeRegister(&xKeyFileSetUint64, libs, "g_key_file_set_uint64")
1213 core.PuregoSafeRegister(&xKeyFileSetValue, libs, "g_key_file_set_value")
1214 core.PuregoSafeRegister(&xKeyFileToData, libs, "g_key_file_to_data")
1215 core.PuregoSafeRegister(&xKeyFileUnref, libs, "g_key_file_unref")
1216
1217}