1// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gio
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/glib"
12 "github.com/bnema/puregotk/v4/gobject"
13 "github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// Class structure for #GSettingsBackend.
17type SettingsBackendClass struct {
18 _ structs.HostLayout
19
20 ParentClass gobject.ObjectClass
21
22 xRead uintptr
23
24 xGetWritable uintptr
25
26 xWrite uintptr
27
28 xWriteTree uintptr
29
30 xReset uintptr
31
32 xSubscribe uintptr
33
34 xUnsubscribe uintptr
35
36 xSync uintptr
37
38 xGetPermission uintptr
39
40 xReadUserValue uintptr
41
42 Padding [23]uintptr
43}
44
45func (x *SettingsBackendClass) GoPointer() uintptr {
46 return uintptr(unsafe.Pointer(x))
47}
48
49// OverrideRead sets the "read" callback function.
50// virtual method to read a key's value
51func (x *SettingsBackendClass) OverrideRead(cb func(*SettingsBackend, string, *glib.VariantType, bool) *glib.Variant) {
52 if cb == nil {
53 x.xRead = 0
54 } else {
55 x.xRead = purego.NewCallback(func(BackendVarp uintptr, KeyVarp string, ExpectedTypeVarp *glib.VariantType, DefaultValueVarp bool) *glib.Variant {
56 return cb(SettingsBackendNewFromInternalPtr(BackendVarp), KeyVarp, ExpectedTypeVarp, DefaultValueVarp)
57 })
58 }
59}
60
61// GetRead gets the "read" callback function.
62// virtual method to read a key's value
63func (x *SettingsBackendClass) GetRead() func(*SettingsBackend, string, *glib.VariantType, bool) *glib.Variant {
64 if x.xRead == 0 {
65 return nil
66 }
67 var rawCallback func(BackendVarp uintptr, KeyVarp string, ExpectedTypeVarp *glib.VariantType, DefaultValueVarp bool) *glib.Variant
68 purego.RegisterFunc(&rawCallback, x.xRead)
69 return func(BackendVar *SettingsBackend, KeyVar string, ExpectedTypeVar *glib.VariantType, DefaultValueVar bool) *glib.Variant {
70 return rawCallback(BackendVar.GoPointer(), KeyVar, ExpectedTypeVar, DefaultValueVar)
71 }
72}
73
74// OverrideGetWritable sets the "get_writable" callback function.
75// virtual method to get if a key is writable
76func (x *SettingsBackendClass) OverrideGetWritable(cb func(*SettingsBackend, string) bool) {
77 if cb == nil {
78 x.xGetWritable = 0
79 } else {
80 x.xGetWritable = purego.NewCallback(func(BackendVarp uintptr, KeyVarp string) bool {
81 return cb(SettingsBackendNewFromInternalPtr(BackendVarp), KeyVarp)
82 })
83 }
84}
85
86// GetGetWritable gets the "get_writable" callback function.
87// virtual method to get if a key is writable
88func (x *SettingsBackendClass) GetGetWritable() func(*SettingsBackend, string) bool {
89 if x.xGetWritable == 0 {
90 return nil
91 }
92 var rawCallback func(BackendVarp uintptr, KeyVarp string) bool
93 purego.RegisterFunc(&rawCallback, x.xGetWritable)
94 return func(BackendVar *SettingsBackend, KeyVar string) bool {
95 return rawCallback(BackendVar.GoPointer(), KeyVar)
96 }
97}
98
99// OverrideWrite sets the "write" callback function.
100// virtual method to change key's value
101func (x *SettingsBackendClass) OverrideWrite(cb func(*SettingsBackend, string, *glib.Variant, uintptr) bool) {
102 if cb == nil {
103 x.xWrite = 0
104 } else {
105 x.xWrite = purego.NewCallback(func(BackendVarp uintptr, KeyVarp string, ValueVarp *glib.Variant, OriginTagVarp uintptr) bool {
106 return cb(SettingsBackendNewFromInternalPtr(BackendVarp), KeyVarp, ValueVarp, OriginTagVarp)
107 })
108 }
109}
110
111// GetWrite gets the "write" callback function.
112// virtual method to change key's value
113func (x *SettingsBackendClass) GetWrite() func(*SettingsBackend, string, *glib.Variant, uintptr) bool {
114 if x.xWrite == 0 {
115 return nil
116 }
117 var rawCallback func(BackendVarp uintptr, KeyVarp string, ValueVarp *glib.Variant, OriginTagVarp uintptr) bool
118 purego.RegisterFunc(&rawCallback, x.xWrite)
119 return func(BackendVar *SettingsBackend, KeyVar string, ValueVar *glib.Variant, OriginTagVar uintptr) bool {
120 return rawCallback(BackendVar.GoPointer(), KeyVar, ValueVar, OriginTagVar)
121 }
122}
123
124// OverrideWriteTree sets the "write_tree" callback function.
125// virtual method to change a tree of keys
126func (x *SettingsBackendClass) OverrideWriteTree(cb func(*SettingsBackend, *glib.Tree, uintptr) bool) {
127 if cb == nil {
128 x.xWriteTree = 0
129 } else {
130 x.xWriteTree = purego.NewCallback(func(BackendVarp uintptr, TreeVarp *glib.Tree, OriginTagVarp uintptr) bool {
131 return cb(SettingsBackendNewFromInternalPtr(BackendVarp), TreeVarp, OriginTagVarp)
132 })
133 }
134}
135
136// GetWriteTree gets the "write_tree" callback function.
137// virtual method to change a tree of keys
138func (x *SettingsBackendClass) GetWriteTree() func(*SettingsBackend, *glib.Tree, uintptr) bool {
139 if x.xWriteTree == 0 {
140 return nil
141 }
142 var rawCallback func(BackendVarp uintptr, TreeVarp *glib.Tree, OriginTagVarp uintptr) bool
143 purego.RegisterFunc(&rawCallback, x.xWriteTree)
144 return func(BackendVar *SettingsBackend, TreeVar *glib.Tree, OriginTagVar uintptr) bool {
145 return rawCallback(BackendVar.GoPointer(), TreeVar, OriginTagVar)
146 }
147}
148
149// OverrideReset sets the "reset" callback function.
150// virtual method to reset state
151func (x *SettingsBackendClass) OverrideReset(cb func(*SettingsBackend, string, uintptr)) {
152 if cb == nil {
153 x.xReset = 0
154 } else {
155 x.xReset = purego.NewCallback(func(BackendVarp uintptr, KeyVarp string, OriginTagVarp uintptr) {
156 cb(SettingsBackendNewFromInternalPtr(BackendVarp), KeyVarp, OriginTagVarp)
157 })
158 }
159}
160
161// GetReset gets the "reset" callback function.
162// virtual method to reset state
163func (x *SettingsBackendClass) GetReset() func(*SettingsBackend, string, uintptr) {
164 if x.xReset == 0 {
165 return nil
166 }
167 var rawCallback func(BackendVarp uintptr, KeyVarp string, OriginTagVarp uintptr)
168 purego.RegisterFunc(&rawCallback, x.xReset)
169 return func(BackendVar *SettingsBackend, KeyVar string, OriginTagVar uintptr) {
170 rawCallback(BackendVar.GoPointer(), KeyVar, OriginTagVar)
171 }
172}
173
174// OverrideSubscribe sets the "subscribe" callback function.
175// virtual method to subscribe to key changes
176func (x *SettingsBackendClass) OverrideSubscribe(cb func(*SettingsBackend, string)) {
177 if cb == nil {
178 x.xSubscribe = 0
179 } else {
180 x.xSubscribe = purego.NewCallback(func(BackendVarp uintptr, NameVarp string) {
181 cb(SettingsBackendNewFromInternalPtr(BackendVarp), NameVarp)
182 })
183 }
184}
185
186// GetSubscribe gets the "subscribe" callback function.
187// virtual method to subscribe to key changes
188func (x *SettingsBackendClass) GetSubscribe() func(*SettingsBackend, string) {
189 if x.xSubscribe == 0 {
190 return nil
191 }
192 var rawCallback func(BackendVarp uintptr, NameVarp string)
193 purego.RegisterFunc(&rawCallback, x.xSubscribe)
194 return func(BackendVar *SettingsBackend, NameVar string) {
195 rawCallback(BackendVar.GoPointer(), NameVar)
196 }
197}
198
199// OverrideUnsubscribe sets the "unsubscribe" callback function.
200// virtual method to unsubscribe to key changes
201func (x *SettingsBackendClass) OverrideUnsubscribe(cb func(*SettingsBackend, string)) {
202 if cb == nil {
203 x.xUnsubscribe = 0
204 } else {
205 x.xUnsubscribe = purego.NewCallback(func(BackendVarp uintptr, NameVarp string) {
206 cb(SettingsBackendNewFromInternalPtr(BackendVarp), NameVarp)
207 })
208 }
209}
210
211// GetUnsubscribe gets the "unsubscribe" callback function.
212// virtual method to unsubscribe to key changes
213func (x *SettingsBackendClass) GetUnsubscribe() func(*SettingsBackend, string) {
214 if x.xUnsubscribe == 0 {
215 return nil
216 }
217 var rawCallback func(BackendVarp uintptr, NameVarp string)
218 purego.RegisterFunc(&rawCallback, x.xUnsubscribe)
219 return func(BackendVar *SettingsBackend, NameVar string) {
220 rawCallback(BackendVar.GoPointer(), NameVar)
221 }
222}
223
224// OverrideSync sets the "sync" callback function.
225// virtual method to sync state
226func (x *SettingsBackendClass) OverrideSync(cb func(*SettingsBackend)) {
227 if cb == nil {
228 x.xSync = 0
229 } else {
230 x.xSync = purego.NewCallback(func(BackendVarp uintptr) {
231 cb(SettingsBackendNewFromInternalPtr(BackendVarp))
232 })
233 }
234}
235
236// GetSync gets the "sync" callback function.
237// virtual method to sync state
238func (x *SettingsBackendClass) GetSync() func(*SettingsBackend) {
239 if x.xSync == 0 {
240 return nil
241 }
242 var rawCallback func(BackendVarp uintptr)
243 purego.RegisterFunc(&rawCallback, x.xSync)
244 return func(BackendVar *SettingsBackend) {
245 rawCallback(BackendVar.GoPointer())
246 }
247}
248
249// OverrideGetPermission sets the "get_permission" callback function.
250// virtual method to get permission of a key
251func (x *SettingsBackendClass) OverrideGetPermission(cb func(*SettingsBackend, string) *Permission) {
252 if cb == nil {
253 x.xGetPermission = 0
254 } else {
255 x.xGetPermission = purego.NewCallback(func(BackendVarp uintptr, PathVarp string) uintptr {
256 ret := cb(SettingsBackendNewFromInternalPtr(BackendVarp), PathVarp)
257 if ret == nil {
258 return 0
259 }
260 return ret.GoPointer()
261 })
262 }
263}
264
265// GetGetPermission gets the "get_permission" callback function.
266// virtual method to get permission of a key
267func (x *SettingsBackendClass) GetGetPermission() func(*SettingsBackend, string) *Permission {
268 if x.xGetPermission == 0 {
269 return nil
270 }
271 var rawCallback func(BackendVarp uintptr, PathVarp string) uintptr
272 purego.RegisterFunc(&rawCallback, x.xGetPermission)
273 return func(BackendVar *SettingsBackend, PathVar string) *Permission {
274 rawRet := rawCallback(BackendVar.GoPointer(), PathVar)
275 if rawRet == 0 {
276 return nil
277 }
278 ret := &Permission{}
279 ret.Ptr = rawRet
280 return ret
281 }
282}
283
284// OverrideReadUserValue sets the "read_user_value" callback function.
285// virtual method to read user's key value
286func (x *SettingsBackendClass) OverrideReadUserValue(cb func(*SettingsBackend, string, *glib.VariantType) *glib.Variant) {
287 if cb == nil {
288 x.xReadUserValue = 0
289 } else {
290 x.xReadUserValue = purego.NewCallback(func(BackendVarp uintptr, KeyVarp string, ExpectedTypeVarp *glib.VariantType) *glib.Variant {
291 return cb(SettingsBackendNewFromInternalPtr(BackendVarp), KeyVarp, ExpectedTypeVarp)
292 })
293 }
294}
295
296// GetReadUserValue gets the "read_user_value" callback function.
297// virtual method to read user's key value
298func (x *SettingsBackendClass) GetReadUserValue() func(*SettingsBackend, string, *glib.VariantType) *glib.Variant {
299 if x.xReadUserValue == 0 {
300 return nil
301 }
302 var rawCallback func(BackendVarp uintptr, KeyVarp string, ExpectedTypeVarp *glib.VariantType) *glib.Variant
303 purego.RegisterFunc(&rawCallback, x.xReadUserValue)
304 return func(BackendVar *SettingsBackend, KeyVar string, ExpectedTypeVar *glib.VariantType) *glib.Variant {
305 return rawCallback(BackendVar.GoPointer(), KeyVar, ExpectedTypeVar)
306 }
307}
308
309type SettingsBackendPrivate struct {
310 _ structs.HostLayout
311}
312
313func (x *SettingsBackendPrivate) GoPointer() uintptr {
314 return uintptr(unsafe.Pointer(x))
315}
316
317const (
318 // Extension point for #GSettingsBackend functionality.
319 SETTINGS_BACKEND_EXTENSION_POINT_NAME string = "gsettings-backend"
320)
321
322var xKeyfileSettingsBackendNew func(string, string, uintptr) uintptr
323
324// Creates a keyfile-backed [class@Gio.SettingsBackend].
325//
326// The filename of the keyfile to use is given by @filename.
327//
328// All settings read to or written from the backend must fall under the
329// path given in @root_path (which must start and end with a slash and
330// not contain two consecutive slashes). @root_path may be `"/"`.
331//
332// If @root_group is non-`NULL` then it specifies the name of the keyfile
333// group used for keys that are written directly below @root_path. For
334// example, if @root_path is `"/apps/example/"` and @root_group is
335// `"toplevel"`, then setting the key `"/apps/example/enabled"` to true will
336// cause the following to appear in the keyfile:
337//
338// ```
339// [toplevel]
340// enabled=true
341// ```
342//
343// If @root_group is `NULL` then it is not permitted to store keys
344// directly below the @root_path.
345//
346// For keys not stored directly below @root_path (ie: in a sub-path),
347// the name of the subpath (with the final slash stripped) is used as
348// the name of the keyfile group. To continue the example, if
349// `"/apps/example/profiles/default/font-size"` were set to
350// `12` then the following would appear in the keyfile:
351//
352// ```
353// [profiles/default]
354// font-size=12
355// ```
356//
357// The backend will refuse writes (and return writability as being
358// false) for keys outside of @root_path and, in the event that
359// @root_group is `NULL`, also for keys directly under @root_path.
360// Writes will also be refused if the backend detects that it has the
361// inability to rewrite the keyfile (ie: the containing directory is not
362// writable).
363//
364// There is no checking done for your key namespace clashing with the
365// syntax of the key file format. For example, if you have `[` or `]`
366// characters in your path names or `=` in your key names you may be in
367// trouble.
368//
369// The backend reads default values from a keyfile called `defaults` in
370// the directory specified by the `GKeyfileSettingsBackend:defaults-dir`
371// property, and a list of locked keys from a text file with the name `locks` in
372// the same location.
373func KeyfileSettingsBackendNew(FilenameVar string, RootPathVar string, RootGroupVar *string) *SettingsBackend {
374 var cls *SettingsBackend
375
376 RootGroupVarPtr := core.GStrdupNullable(RootGroupVar)
377 defer core.GFreeNullable(RootGroupVarPtr)
378
379 cret := xKeyfileSettingsBackendNew(FilenameVar, RootPathVar, RootGroupVarPtr)
380
381 if cret == 0 {
382 return nil
383 }
384 cls = &SettingsBackend{}
385 cls.Ptr = cret
386 return cls
387}
388
389var xMemorySettingsBackendNew func() uintptr
390
391// Creates a memory-backed #GSettingsBackend.
392//
393// This backend allows changes to settings, but does not write them
394// to any backing storage, so the next time you run your application,
395// the memory backend will start out with the default values again.
396func MemorySettingsBackendNew() *SettingsBackend {
397 var cls *SettingsBackend
398
399 cret := xMemorySettingsBackendNew()
400
401 if cret == 0 {
402 return nil
403 }
404 cls = &SettingsBackend{}
405 cls.Ptr = cret
406 return cls
407}
408
409var xNullSettingsBackendNew func() uintptr
410
411// Creates a readonly #GSettingsBackend.
412//
413// This backend does not allow changes to settings, so all settings
414// will always have their default values.
415func NullSettingsBackendNew() *SettingsBackend {
416 var cls *SettingsBackend
417
418 cret := xNullSettingsBackendNew()
419
420 if cret == 0 {
421 return nil
422 }
423 cls = &SettingsBackend{}
424 cls.Ptr = cret
425 return cls
426}
427
428// The `GSettingsBackend` interface defines a generic interface for
429// non-strictly-typed data that is stored in a hierarchy. To implement
430// an alternative storage backend for [class@Gio.Settings], you need to
431// implement the `GSettingsBackend` interface and then make it implement the
432// extension point `G_SETTINGS_BACKEND_EXTENSION_POINT_NAME`.
433//
434// The interface defines methods for reading and writing values, a
435// method for determining if writing of certain values will fail
436// (lockdown) and a change notification mechanism.
437//
438// The semantics of the interface are very precisely defined and
439// implementations must carefully adhere to the expectations of
440// callers that are documented on each of the interface methods.
441//
442// Some of the `GSettingsBackend` functions accept or return a
443// [struct@GLib.Tree]. These trees always have strings as keys and
444// [struct@GLib.Variant] as values.
445//
446// The `GSettingsBackend` API is exported to allow third-party
447// implementations, but does not carry the same stability guarantees
448// as the public GIO API. For this reason, you have to define the
449// C preprocessor symbol `G_SETTINGS_ENABLE_BACKEND` before including
450// `gio/gsettingsbackend.h`.
451type SettingsBackend struct {
452 gobject.Object
453}
454
455var xSettingsBackendGLibType func() types.GType
456
457func SettingsBackendGLibType() types.GType {
458 return xSettingsBackendGLibType()
459}
460
461func SettingsBackendNewFromInternalPtr(ptr uintptr) *SettingsBackend {
462 cls := &SettingsBackend{}
463 cls.Ptr = ptr
464 return cls
465}
466
467var xSettingsBackendChanged func(uintptr, string, uintptr)
468
469// Signals that a single key has possibly changed. Backend
470// implementations should call this if a key has possibly changed its
471// value.
472//
473// @key must be a valid key (ie starting with a slash, not containing
474// '//', and not ending with a slash).
475//
476// The implementation must call this function during any call to
477// g_settings_backend_write(), before the call returns (except in the
478// case that no keys are actually changed and it cares to detect this
479// fact). It may not rely on the existence of a mainloop for
480// dispatching the signal later.
481//
482// The implementation may call this function at any other time it likes
483// in response to other events (such as changes occurring outside of the
484// program). These calls may originate from a mainloop or may originate
485// in response to any other action (including from calls to
486// g_settings_backend_write()).
487//
488// In the case that this call is in response to a call to
489// g_settings_backend_write() then @origin_tag must be set to the same
490// value that was passed to that call.
491func (x *SettingsBackend) Changed(KeyVar string, OriginTagVar uintptr) {
492
493 xSettingsBackendChanged(x.GoPointer(), KeyVar, OriginTagVar)
494
495}
496
497var xSettingsBackendChangedTree func(uintptr, *glib.Tree, uintptr)
498
499// This call is a convenience wrapper. It gets the list of changes from
500// @tree, computes the longest common prefix and calls
501// g_settings_backend_changed().
502func (x *SettingsBackend) ChangedTree(TreeVar *glib.Tree, OriginTagVar uintptr) {
503
504 xSettingsBackendChangedTree(x.GoPointer(), TreeVar, OriginTagVar)
505
506}
507
508var xSettingsBackendKeysChanged func(uintptr, string, []string, uintptr)
509
510// Signals that a list of keys have possibly changed. Backend
511// implementations should call this if keys have possibly changed their
512// values.
513//
514// @path must be a valid path (ie starting and ending with a slash and
515// not containing '//'). Each string in @items must form a valid key
516// name when @path is prefixed to it (ie: each item must not start or
517// end with '/' and must not contain '//').
518//
519// The meaning of this signal is that any of the key names resulting
520// from the concatenation of @path with each item in @items may have
521// changed.
522//
523// The same rules for when notifications must occur apply as per
524// g_settings_backend_changed(). These two calls can be used
525// interchangeably if exactly one item has changed (although in that
526// case g_settings_backend_changed() is definitely preferred).
527//
528// For efficiency reasons, the implementation should strive for @path to
529// be as long as possible (ie: the longest common prefix of all of the
530// keys that were changed) but this is not strictly required.
531func (x *SettingsBackend) KeysChanged(PathVar string, ItemsVar []string, OriginTagVar uintptr) {
532
533 xSettingsBackendKeysChanged(x.GoPointer(), PathVar, ItemsVar, OriginTagVar)
534
535}
536
537var xSettingsBackendPathChanged func(uintptr, string, uintptr)
538
539// Signals that all keys below a given path may have possibly changed.
540// Backend implementations should call this if an entire path of keys
541// have possibly changed their values.
542//
543// @path must be a valid path (ie starting and ending with a slash and
544// not containing '//').
545//
546// The meaning of this signal is that any of the key which has a name
547// starting with @path may have changed.
548//
549// The same rules for when notifications must occur apply as per
550// g_settings_backend_changed(). This call might be an appropriate
551// reasponse to a 'reset' call but implementations are also free to
552// explicitly list the keys that were affected by that call if they can
553// easily do so.
554//
555// For efficiency reasons, the implementation should strive for @path to
556// be as long as possible (ie: the longest common prefix of all of the
557// keys that were changed) but this is not strictly required. As an
558// example, if this function is called with the path of "/" then every
559// single key in the application will be notified of a possible change.
560func (x *SettingsBackend) PathChanged(PathVar string, OriginTagVar uintptr) {
561
562 xSettingsBackendPathChanged(x.GoPointer(), PathVar, OriginTagVar)
563
564}
565
566var xSettingsBackendPathWritableChanged func(uintptr, string)
567
568// Signals that the writability of all keys below a given path may have
569// changed.
570//
571// Since GSettings performs no locking operations for itself, this call
572// will always be made in response to external events.
573func (x *SettingsBackend) PathWritableChanged(PathVar string) {
574
575 xSettingsBackendPathWritableChanged(x.GoPointer(), PathVar)
576
577}
578
579var xSettingsBackendWritableChanged func(uintptr, string)
580
581// Signals that the writability of a single key has possibly changed.
582//
583// Since GSettings performs no locking operations for itself, this call
584// will always be made in response to external events.
585func (x *SettingsBackend) WritableChanged(KeyVar string) {
586
587 xSettingsBackendWritableChanged(x.GoPointer(), KeyVar)
588
589}
590
591func (c *SettingsBackend) GoPointer() uintptr {
592 if c == nil {
593 return 0
594 }
595 return c.Ptr
596}
597
598func (c *SettingsBackend) SetGoPointer(ptr uintptr) {
599 c.Ptr = ptr
600}
601
602var xSettingsBackendFlattenTree func(*glib.Tree, *string, *[]string, *uintptr)
603
604// Calculate the longest common prefix of all keys in a tree and write
605// out an array of the key names relative to that prefix and,
606// optionally, the value to store at each of those keys.
607//
608// You must free the value returned in @path, @keys and @values using
609// g_free(). You should not attempt to free or unref the contents of
610// @keys or @values.
611func SettingsBackendFlattenTree(TreeVar *glib.Tree, PathVar *string, KeysVar *[]string, ValuesVar *uintptr) {
612
613 xSettingsBackendFlattenTree(TreeVar, PathVar, KeysVar, ValuesVar)
614
615}
616
617var xSettingsBackendGetDefault func() uintptr
618
619// Returns the default #GSettingsBackend. It is possible to override
620// the default by setting the `GSETTINGS_BACKEND` environment variable
621// to the name of a settings backend.
622//
623// The user gets a reference to the backend.
624func SettingsBackendGetDefault() *SettingsBackend {
625 var cls *SettingsBackend
626
627 cret := xSettingsBackendGetDefault()
628
629 if cret == 0 {
630 return nil
631 }
632 cls = &SettingsBackend{}
633 cls.Ptr = cret
634 return cls
635}
636
637func init() {
638 core.SetPackageName("GIO", "gio-2.0")
639 core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
640 var libs []uintptr
641 for _, libPath := range core.GetPaths("GIO") {
642 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
643 if err != nil {
644 panic(err)
645 }
646 libs = append(libs, lib)
647 }
648
649 core.PuregoSafeRegister(&xKeyfileSettingsBackendNew, libs, "g_keyfile_settings_backend_new")
650 core.PuregoSafeRegister(&xMemorySettingsBackendNew, libs, "g_memory_settings_backend_new")
651 core.PuregoSafeRegister(&xNullSettingsBackendNew, libs, "g_null_settings_backend_new")
652
653 core.PuregoSafeRegister(&xSettingsBackendGLibType, libs, "g_settings_backend_get_type")
654
655 core.PuregoSafeRegister(&xSettingsBackendChanged, libs, "g_settings_backend_changed")
656 core.PuregoSafeRegister(&xSettingsBackendChangedTree, libs, "g_settings_backend_changed_tree")
657 core.PuregoSafeRegister(&xSettingsBackendKeysChanged, libs, "g_settings_backend_keys_changed")
658 core.PuregoSafeRegister(&xSettingsBackendPathChanged, libs, "g_settings_backend_path_changed")
659 core.PuregoSafeRegister(&xSettingsBackendPathWritableChanged, libs, "g_settings_backend_path_writable_changed")
660 core.PuregoSafeRegister(&xSettingsBackendWritableChanged, libs, "g_settings_backend_writable_changed")
661
662 core.PuregoSafeRegister(&xSettingsBackendFlattenTree, libs, "g_settings_backend_flatten_tree")
663 core.PuregoSafeRegister(&xSettingsBackendGetDefault, libs, "g_settings_backend_get_default")
664
665}