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/types"
13)
14
15// Information about an annotation.
16type DBusAnnotationInfo struct {
17 _ structs.HostLayout
18
19 RefCount int32
20
21 Key uintptr
22
23 Value uintptr
24
25 Annotations uintptr
26}
27
28var xDBusAnnotationInfoGLibType func() types.GType
29
30func DBusAnnotationInfoGLibType() types.GType {
31 return xDBusAnnotationInfoGLibType()
32}
33
34func (x *DBusAnnotationInfo) GoPointer() uintptr {
35 return uintptr(unsafe.Pointer(x))
36}
37
38var xDBusAnnotationInfoRef func(uintptr) *DBusAnnotationInfo
39
40// If @info is statically allocated does nothing. Otherwise increases
41// the reference count.
42func (x *DBusAnnotationInfo) Ref() *DBusAnnotationInfo {
43
44 cret := xDBusAnnotationInfoRef(x.GoPointer())
45 return cret
46}
47
48var xDBusAnnotationInfoUnref func(uintptr)
49
50// If @info is statically allocated, does nothing. Otherwise decreases
51// the reference count of @info. When its reference count drops to 0,
52// the memory used is freed.
53func (x *DBusAnnotationInfo) Unref() {
54
55 xDBusAnnotationInfoUnref(x.GoPointer())
56
57}
58
59// Information about an argument for a method or a signal.
60type DBusArgInfo struct {
61 _ structs.HostLayout
62
63 RefCount int32
64
65 Name uintptr
66
67 Signature uintptr
68
69 Annotations uintptr
70}
71
72var xDBusArgInfoGLibType func() types.GType
73
74func DBusArgInfoGLibType() types.GType {
75 return xDBusArgInfoGLibType()
76}
77
78func (x *DBusArgInfo) GoPointer() uintptr {
79 return uintptr(unsafe.Pointer(x))
80}
81
82var xDBusArgInfoRef func(uintptr) *DBusArgInfo
83
84// If @info is statically allocated does nothing. Otherwise increases
85// the reference count.
86func (x *DBusArgInfo) Ref() *DBusArgInfo {
87
88 cret := xDBusArgInfoRef(x.GoPointer())
89 return cret
90}
91
92var xDBusArgInfoUnref func(uintptr)
93
94// If @info is statically allocated, does nothing. Otherwise decreases
95// the reference count of @info. When its reference count drops to 0,
96// the memory used is freed.
97func (x *DBusArgInfo) Unref() {
98
99 xDBusArgInfoUnref(x.GoPointer())
100
101}
102
103// Information about a D-Bus interface.
104type DBusInterfaceInfo struct {
105 _ structs.HostLayout
106
107 RefCount int32
108
109 Name uintptr
110
111 Methods uintptr
112
113 Signals uintptr
114
115 Properties uintptr
116
117 Annotations uintptr
118}
119
120var xDBusInterfaceInfoGLibType func() types.GType
121
122func DBusInterfaceInfoGLibType() types.GType {
123 return xDBusInterfaceInfoGLibType()
124}
125
126func (x *DBusInterfaceInfo) GoPointer() uintptr {
127 return uintptr(unsafe.Pointer(x))
128}
129
130var xDBusInterfaceInfoCacheBuild func(uintptr)
131
132// Builds a lookup-cache to speed up
133// g_dbus_interface_info_lookup_method(),
134// g_dbus_interface_info_lookup_signal() and
135// g_dbus_interface_info_lookup_property().
136//
137// If this has already been called with @info, the existing cache is
138// used and its use count is increased.
139//
140// Note that @info cannot be modified until
141// g_dbus_interface_info_cache_release() is called.
142func (x *DBusInterfaceInfo) CacheBuild() {
143
144 xDBusInterfaceInfoCacheBuild(x.GoPointer())
145
146}
147
148var xDBusInterfaceInfoCacheRelease func(uintptr)
149
150// Decrements the usage count for the cache for @info built by
151// g_dbus_interface_info_cache_build() (if any) and frees the
152// resources used by the cache if the usage count drops to zero.
153func (x *DBusInterfaceInfo) CacheRelease() {
154
155 xDBusInterfaceInfoCacheRelease(x.GoPointer())
156
157}
158
159var xDBusInterfaceInfoGenerateXml func(uintptr, uint, *glib.String)
160
161// Appends an XML representation of @info (and its children) to @string_builder.
162//
163// This function is typically used for generating introspection XML
164// documents at run-time for handling the
165// `org.freedesktop.DBus.Introspectable.Introspect`
166// method.
167func (x *DBusInterfaceInfo) GenerateXml(IndentVar uint, StringBuilderVar *glib.String) {
168
169 xDBusInterfaceInfoGenerateXml(x.GoPointer(), IndentVar, StringBuilderVar)
170
171}
172
173var xDBusInterfaceInfoLookupMethod func(uintptr, string) *DBusMethodInfo
174
175// Looks up information about a method.
176//
177// The cost of this function is O(n) in number of methods unless
178// g_dbus_interface_info_cache_build() has been used on @info.
179func (x *DBusInterfaceInfo) LookupMethod(NameVar string) *DBusMethodInfo {
180
181 cret := xDBusInterfaceInfoLookupMethod(x.GoPointer(), NameVar)
182 return cret
183}
184
185var xDBusInterfaceInfoLookupProperty func(uintptr, string) *DBusPropertyInfo
186
187// Looks up information about a property.
188//
189// The cost of this function is O(n) in number of properties unless
190// g_dbus_interface_info_cache_build() has been used on @info.
191func (x *DBusInterfaceInfo) LookupProperty(NameVar string) *DBusPropertyInfo {
192
193 cret := xDBusInterfaceInfoLookupProperty(x.GoPointer(), NameVar)
194 return cret
195}
196
197var xDBusInterfaceInfoLookupSignal func(uintptr, string) *DBusSignalInfo
198
199// Looks up information about a signal.
200//
201// The cost of this function is O(n) in number of signals unless
202// g_dbus_interface_info_cache_build() has been used on @info.
203func (x *DBusInterfaceInfo) LookupSignal(NameVar string) *DBusSignalInfo {
204
205 cret := xDBusInterfaceInfoLookupSignal(x.GoPointer(), NameVar)
206 return cret
207}
208
209var xDBusInterfaceInfoRef func(uintptr) *DBusInterfaceInfo
210
211// If @info is statically allocated does nothing. Otherwise increases
212// the reference count.
213func (x *DBusInterfaceInfo) Ref() *DBusInterfaceInfo {
214
215 cret := xDBusInterfaceInfoRef(x.GoPointer())
216 return cret
217}
218
219var xDBusInterfaceInfoUnref func(uintptr)
220
221// If @info is statically allocated, does nothing. Otherwise decreases
222// the reference count of @info. When its reference count drops to 0,
223// the memory used is freed.
224func (x *DBusInterfaceInfo) Unref() {
225
226 xDBusInterfaceInfoUnref(x.GoPointer())
227
228}
229
230// Information about a method on a D-Bus interface.
231type DBusMethodInfo struct {
232 _ structs.HostLayout
233
234 RefCount int32
235
236 Name uintptr
237
238 InArgs uintptr
239
240 OutArgs uintptr
241
242 Annotations uintptr
243}
244
245var xDBusMethodInfoGLibType func() types.GType
246
247func DBusMethodInfoGLibType() types.GType {
248 return xDBusMethodInfoGLibType()
249}
250
251func (x *DBusMethodInfo) GoPointer() uintptr {
252 return uintptr(unsafe.Pointer(x))
253}
254
255var xDBusMethodInfoRef func(uintptr) *DBusMethodInfo
256
257// If @info is statically allocated does nothing. Otherwise increases
258// the reference count.
259func (x *DBusMethodInfo) Ref() *DBusMethodInfo {
260
261 cret := xDBusMethodInfoRef(x.GoPointer())
262 return cret
263}
264
265var xDBusMethodInfoUnref func(uintptr)
266
267// If @info is statically allocated, does nothing. Otherwise decreases
268// the reference count of @info. When its reference count drops to 0,
269// the memory used is freed.
270func (x *DBusMethodInfo) Unref() {
271
272 xDBusMethodInfoUnref(x.GoPointer())
273
274}
275
276// Information about nodes in a remote object hierarchy.
277type DBusNodeInfo struct {
278 _ structs.HostLayout
279
280 RefCount int32
281
282 Path uintptr
283
284 Interfaces uintptr
285
286 Nodes uintptr
287
288 Annotations uintptr
289}
290
291var xDBusNodeInfoGLibType func() types.GType
292
293func DBusNodeInfoGLibType() types.GType {
294 return xDBusNodeInfoGLibType()
295}
296
297func (x *DBusNodeInfo) GoPointer() uintptr {
298 return uintptr(unsafe.Pointer(x))
299}
300
301var xNewDBusNodeInfoForXml func(string, **glib.Error) *DBusNodeInfo
302
303// Parses @xml_data and returns a #GDBusNodeInfo representing the data.
304//
305// The introspection XML must contain exactly one top-level
306// `<node>` element.
307//
308// Note that this routine is using a
309// [GMarkup](../glib/markup.html)-based
310// parser that only accepts a subset of valid XML documents.
311func NewDBusNodeInfoForXml(XmlDataVar string) (*DBusNodeInfo, error) {
312 var cerr *glib.Error
313
314 cret := xNewDBusNodeInfoForXml(XmlDataVar, &cerr)
315 if cerr == nil {
316 return cret, nil
317 }
318 return cret, cerr
319
320}
321
322var xDBusNodeInfoGenerateXml func(uintptr, uint, *glib.String)
323
324// Appends an XML representation of @info (and its children) to @string_builder.
325//
326// This function is typically used for generating introspection XML documents at run-time for
327// handling the `org.freedesktop.DBus.Introspectable.Introspect` method.
328func (x *DBusNodeInfo) GenerateXml(IndentVar uint, StringBuilderVar *glib.String) {
329
330 xDBusNodeInfoGenerateXml(x.GoPointer(), IndentVar, StringBuilderVar)
331
332}
333
334var xDBusNodeInfoLookupInterface func(uintptr, string) *DBusInterfaceInfo
335
336// Looks up information about an interface.
337//
338// The cost of this function is O(n) in number of interfaces.
339func (x *DBusNodeInfo) LookupInterface(NameVar string) *DBusInterfaceInfo {
340
341 cret := xDBusNodeInfoLookupInterface(x.GoPointer(), NameVar)
342 return cret
343}
344
345var xDBusNodeInfoRef func(uintptr) *DBusNodeInfo
346
347// If @info is statically allocated does nothing. Otherwise increases
348// the reference count.
349func (x *DBusNodeInfo) Ref() *DBusNodeInfo {
350
351 cret := xDBusNodeInfoRef(x.GoPointer())
352 return cret
353}
354
355var xDBusNodeInfoUnref func(uintptr)
356
357// If @info is statically allocated, does nothing. Otherwise decreases
358// the reference count of @info. When its reference count drops to 0,
359// the memory used is freed.
360func (x *DBusNodeInfo) Unref() {
361
362 xDBusNodeInfoUnref(x.GoPointer())
363
364}
365
366// Information about a D-Bus property on a D-Bus interface.
367type DBusPropertyInfo struct {
368 _ structs.HostLayout
369
370 RefCount int32
371
372 Name uintptr
373
374 Signature uintptr
375
376 Flags DBusPropertyInfoFlags
377
378 Annotations uintptr
379}
380
381var xDBusPropertyInfoGLibType func() types.GType
382
383func DBusPropertyInfoGLibType() types.GType {
384 return xDBusPropertyInfoGLibType()
385}
386
387func (x *DBusPropertyInfo) GoPointer() uintptr {
388 return uintptr(unsafe.Pointer(x))
389}
390
391var xDBusPropertyInfoRef func(uintptr) *DBusPropertyInfo
392
393// If @info is statically allocated does nothing. Otherwise increases
394// the reference count.
395func (x *DBusPropertyInfo) Ref() *DBusPropertyInfo {
396
397 cret := xDBusPropertyInfoRef(x.GoPointer())
398 return cret
399}
400
401var xDBusPropertyInfoUnref func(uintptr)
402
403// If @info is statically allocated, does nothing. Otherwise decreases
404// the reference count of @info. When its reference count drops to 0,
405// the memory used is freed.
406func (x *DBusPropertyInfo) Unref() {
407
408 xDBusPropertyInfoUnref(x.GoPointer())
409
410}
411
412// Information about a signal on a D-Bus interface.
413type DBusSignalInfo struct {
414 _ structs.HostLayout
415
416 RefCount int32
417
418 Name uintptr
419
420 Args uintptr
421
422 Annotations uintptr
423}
424
425var xDBusSignalInfoGLibType func() types.GType
426
427func DBusSignalInfoGLibType() types.GType {
428 return xDBusSignalInfoGLibType()
429}
430
431func (x *DBusSignalInfo) GoPointer() uintptr {
432 return uintptr(unsafe.Pointer(x))
433}
434
435var xDBusSignalInfoRef func(uintptr) *DBusSignalInfo
436
437// If @info is statically allocated does nothing. Otherwise increases
438// the reference count.
439func (x *DBusSignalInfo) Ref() *DBusSignalInfo {
440
441 cret := xDBusSignalInfoRef(x.GoPointer())
442 return cret
443}
444
445var xDBusSignalInfoUnref func(uintptr)
446
447// If @info is statically allocated, does nothing. Otherwise decreases
448// the reference count of @info. When its reference count drops to 0,
449// the memory used is freed.
450func (x *DBusSignalInfo) Unref() {
451
452 xDBusSignalInfoUnref(x.GoPointer())
453
454}
455
456var xDbusAnnotationInfoLookup func(uintptr, string) string
457
458// Looks up the value of an annotation.
459//
460// The cost of this function is O(n) in number of annotations.
461func DbusAnnotationInfoLookup(AnnotationsVar uintptr, NameVar string) string {
462
463 cret := xDbusAnnotationInfoLookup(AnnotationsVar, NameVar)
464 return cret
465}
466
467func init() {
468 core.SetPackageName("GIO", "gio-2.0")
469 core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
470 var libs []uintptr
471 for _, libPath := range core.GetPaths("GIO") {
472 lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
473 if err != nil {
474 panic(err)
475 }
476 libs = append(libs, lib)
477 }
478
479 core.PuregoSafeRegister(&xDbusAnnotationInfoLookup, libs, "g_dbus_annotation_info_lookup")
480
481 core.PuregoSafeRegister(&xDBusAnnotationInfoGLibType, libs, "g_dbus_annotation_info_get_type")
482
483 core.PuregoSafeRegister(&xDBusAnnotationInfoRef, libs, "g_dbus_annotation_info_ref")
484 core.PuregoSafeRegister(&xDBusAnnotationInfoUnref, libs, "g_dbus_annotation_info_unref")
485
486 core.PuregoSafeRegister(&xDBusArgInfoGLibType, libs, "g_dbus_arg_info_get_type")
487
488 core.PuregoSafeRegister(&xDBusArgInfoRef, libs, "g_dbus_arg_info_ref")
489 core.PuregoSafeRegister(&xDBusArgInfoUnref, libs, "g_dbus_arg_info_unref")
490
491 core.PuregoSafeRegister(&xDBusInterfaceInfoGLibType, libs, "g_dbus_interface_info_get_type")
492
493 core.PuregoSafeRegister(&xDBusInterfaceInfoCacheBuild, libs, "g_dbus_interface_info_cache_build")
494 core.PuregoSafeRegister(&xDBusInterfaceInfoCacheRelease, libs, "g_dbus_interface_info_cache_release")
495 core.PuregoSafeRegister(&xDBusInterfaceInfoGenerateXml, libs, "g_dbus_interface_info_generate_xml")
496 core.PuregoSafeRegister(&xDBusInterfaceInfoLookupMethod, libs, "g_dbus_interface_info_lookup_method")
497 core.PuregoSafeRegister(&xDBusInterfaceInfoLookupProperty, libs, "g_dbus_interface_info_lookup_property")
498 core.PuregoSafeRegister(&xDBusInterfaceInfoLookupSignal, libs, "g_dbus_interface_info_lookup_signal")
499 core.PuregoSafeRegister(&xDBusInterfaceInfoRef, libs, "g_dbus_interface_info_ref")
500 core.PuregoSafeRegister(&xDBusInterfaceInfoUnref, libs, "g_dbus_interface_info_unref")
501
502 core.PuregoSafeRegister(&xDBusMethodInfoGLibType, libs, "g_dbus_method_info_get_type")
503
504 core.PuregoSafeRegister(&xDBusMethodInfoRef, libs, "g_dbus_method_info_ref")
505 core.PuregoSafeRegister(&xDBusMethodInfoUnref, libs, "g_dbus_method_info_unref")
506
507 core.PuregoSafeRegister(&xDBusNodeInfoGLibType, libs, "g_dbus_node_info_get_type")
508
509 core.PuregoSafeRegister(&xNewDBusNodeInfoForXml, libs, "g_dbus_node_info_new_for_xml")
510
511 core.PuregoSafeRegister(&xDBusNodeInfoGenerateXml, libs, "g_dbus_node_info_generate_xml")
512 core.PuregoSafeRegister(&xDBusNodeInfoLookupInterface, libs, "g_dbus_node_info_lookup_interface")
513 core.PuregoSafeRegister(&xDBusNodeInfoRef, libs, "g_dbus_node_info_ref")
514 core.PuregoSafeRegister(&xDBusNodeInfoUnref, libs, "g_dbus_node_info_unref")
515
516 core.PuregoSafeRegister(&xDBusPropertyInfoGLibType, libs, "g_dbus_property_info_get_type")
517
518 core.PuregoSafeRegister(&xDBusPropertyInfoRef, libs, "g_dbus_property_info_ref")
519 core.PuregoSafeRegister(&xDBusPropertyInfoUnref, libs, "g_dbus_property_info_unref")
520
521 core.PuregoSafeRegister(&xDBusSignalInfoGLibType, libs, "g_dbus_signal_info_get_type")
522
523 core.PuregoSafeRegister(&xDBusSignalInfoRef, libs, "g_dbus_signal_info_ref")
524 core.PuregoSafeRegister(&xDBusSignalInfoUnref, libs, "g_dbus_signal_info_unref")
525
526}