v0.2.1 c0399be

gdbusobjectmanagerclient.go RawHistoryFolder

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 #GDBusObjectManagerClient.
17type DBusObjectManagerClientClass struct {
18	_ structs.HostLayout
19
20	ParentClass gobject.ObjectClass
21
22	xInterfaceProxySignal uintptr
23
24	xInterfaceProxyPropertiesChanged uintptr
25
26	Padding [8]uintptr
27}
28
29func (x *DBusObjectManagerClientClass) GoPointer() uintptr {
30	return uintptr(unsafe.Pointer(x))
31}
32
33// OverrideInterfaceProxySignal sets the "interface_proxy_signal" callback function.
34// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
35func (x *DBusObjectManagerClientClass) OverrideInterfaceProxySignal(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant)) {
36	if cb == nil {
37		x.xInterfaceProxySignal = 0
38	} else {
39		x.xInterfaceProxySignal = purego.NewCallback(func(ManagerVarp uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp *glib.Variant) {
40			cb(DBusObjectManagerClientNewFromInternalPtr(ManagerVarp), DBusObjectProxyNewFromInternalPtr(ObjectProxyVarp), DBusProxyNewFromInternalPtr(InterfaceProxyVarp), SenderNameVarp, SignalNameVarp, ParametersVarp)
41		})
42	}
43}
44
45// GetInterfaceProxySignal gets the "interface_proxy_signal" callback function.
46// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-signal signal.
47func (x *DBusObjectManagerClientClass) GetInterfaceProxySignal() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, string, string, *glib.Variant) {
48	if x.xInterfaceProxySignal == 0 {
49		return nil
50	}
51	var rawCallback func(ManagerVarp uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp *glib.Variant)
52	purego.RegisterFunc(&rawCallback, x.xInterfaceProxySignal)
53	return func(ManagerVar *DBusObjectManagerClient, ObjectProxyVar *DBusObjectProxy, InterfaceProxyVar *DBusProxy, SenderNameVar string, SignalNameVar string, ParametersVar *glib.Variant) {
54		rawCallback(ManagerVar.GoPointer(), ObjectProxyVar.GoPointer(), InterfaceProxyVar.GoPointer(), SenderNameVar, SignalNameVar, ParametersVar)
55	}
56}
57
58// OverrideInterfaceProxyPropertiesChanged sets the "interface_proxy_properties_changed" callback function.
59// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
60func (x *DBusObjectManagerClientClass) OverrideInterfaceProxyPropertiesChanged(cb func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string)) {
61	if cb == nil {
62		x.xInterfaceProxyPropertiesChanged = 0
63	} else {
64		x.xInterfaceProxyPropertiesChanged = purego.NewCallback(func(ManagerVarp uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, ChangedPropertiesVarp *glib.Variant, InvalidatedPropertiesVarp string) {
65			cb(DBusObjectManagerClientNewFromInternalPtr(ManagerVarp), DBusObjectProxyNewFromInternalPtr(ObjectProxyVarp), DBusProxyNewFromInternalPtr(InterfaceProxyVarp), ChangedPropertiesVarp, InvalidatedPropertiesVarp)
66		})
67	}
68}
69
70// GetInterfaceProxyPropertiesChanged gets the "interface_proxy_properties_changed" callback function.
71// Signal class handler for the #GDBusObjectManagerClient::interface-proxy-properties-changed signal.
72func (x *DBusObjectManagerClientClass) GetInterfaceProxyPropertiesChanged() func(*DBusObjectManagerClient, *DBusObjectProxy, *DBusProxy, *glib.Variant, string) {
73	if x.xInterfaceProxyPropertiesChanged == 0 {
74		return nil
75	}
76	var rawCallback func(ManagerVarp uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, ChangedPropertiesVarp *glib.Variant, InvalidatedPropertiesVarp string)
77	purego.RegisterFunc(&rawCallback, x.xInterfaceProxyPropertiesChanged)
78	return func(ManagerVar *DBusObjectManagerClient, ObjectProxyVar *DBusObjectProxy, InterfaceProxyVar *DBusProxy, ChangedPropertiesVar *glib.Variant, InvalidatedPropertiesVar string) {
79		rawCallback(ManagerVar.GoPointer(), ObjectProxyVar.GoPointer(), InterfaceProxyVar.GoPointer(), ChangedPropertiesVar, InvalidatedPropertiesVar)
80	}
81}
82
83type DBusObjectManagerClientPrivate struct {
84	_ structs.HostLayout
85}
86
87func (x *DBusObjectManagerClientPrivate) GoPointer() uintptr {
88	return uintptr(unsafe.Pointer(x))
89}
90
91// `GDBusObjectManagerClient` is used to create, monitor and delete object
92// proxies for remote objects exported by a [class@Gio.DBusObjectManagerServer]
93// (or any code implementing the
94// [org.freedesktop.DBus.ObjectManager](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
95// interface).
96//
97// Once an instance of this type has been created, you can connect to
98// the [signal@Gio.DBusObjectManager::object-added] and
99// [signal@Gio.DBusObjectManager::object-removed signals] and inspect the
100// [class@Gio.DBusObjectProxy] objects returned by
101// [method@Gio.DBusObjectManager.get_objects].
102//
103// If the name for a `GDBusObjectManagerClient` is not owned by anyone at
104// object construction time, the default behavior is to request the
105// message bus to launch an owner for the name. This behavior can be
106// disabled using the `G_DBUS_OBJECT_MANAGER_CLIENT_FLAGS_DO_NOT_AUTO_START`
107// flag. It’s also worth noting that this only works if the name of
108// interest is activatable in the first place. E.g. in some cases it
109// is not possible to launch an owner for the requested name. In this
110// case, `GDBusObjectManagerClient` object construction still succeeds but
111// there will be no object proxies
112// (e.g. [method@Gio.DBusObjectManager.get_objects] returns the empty list) and
113// the [property@Gio.DBusObjectManagerClient:name-owner] property is `NULL`.
114//
115// The owner of the requested name can come and go (for example
116// consider a system service being restarted) – `GDBusObjectManagerClient`
117// handles this case too; simply connect to the [signal@GObject.Object::notify]
118// signal to watch for changes on the
119// [property@Gio.DBusObjectManagerClient:name-owner] property. When the name
120// owner vanishes, the behavior is that
121// [property@Gio.DBusObjectManagerClient:name-owner] is set to `NULL` (this
122// includes emission of the [signal@GObject.Object::notify] signal) and then
123// [signal@Gio.DBusObjectManager::object-removed] signals are synthesized
124// for all currently existing object proxies. Since
125// [property@Gio.DBusObjectManagerClient:name-owner] is `NULL` when this
126// happens, you can use this information to disambiguate a synthesized signal
127// from a genuine signal caused by object removal on the remote
128// [iface@Gio.DBusObjectManager]. Similarly, when a new name owner appears,
129// [signal@Gio.DBusObjectManager::object-added] signals are synthesized
130// while [property@Gio.DBusObjectManagerClient:name-owner] is still `NULL`. Only
131// when all object proxies have been added, the
132// [property@Gio.DBusObjectManagerClient:name-owner] is set to the new name
133// owner (this includes emission of the [signal@GObject.Object::notify] signal).
134// Furthermore, you are guaranteed that
135// [property@Gio.DBusObjectManagerClient:name-owner] will alternate between a
136// name owner (e.g. `:1.42`) and `NULL` even in the case where
137// the name of interest is atomically replaced
138//
139// Ultimately, `GDBusObjectManagerClient` is used to obtain
140// [class@Gio.DBusProxy] instances. All signals (including the
141// `org.freedesktop.DBus.Properties::PropertiesChanged` signal)
142// delivered to [class@Gio.DBusProxy] instances are guaranteed to originate
143// from the name owner. This guarantee along with the behavior
144// described above, means that certain race conditions including the
145// “half the proxy is from the old owner and the other half is from
146// the new owner” problem cannot happen.
147//
148// To avoid having the application connect to signals on the returned
149// [class@Gio.DBusObjectProxy] and [class@Gio.DBusProxy] objects, the
150// [signal@Gio.DBusObject::interface-added],
151// [signal@Gio.DBusObject::interface-removed],
152// [signal@Gio.DBusProxy::g-properties-changed] and
153// [signal@Gio.DBusProxy::g-signal] signals
154// are also emitted on the `GDBusObjectManagerClient` instance managing these
155// objects. The signals emitted are
156// [signal@Gio.DBusObjectManager::interface-added],
157// [signal@Gio.DBusObjectManager::interface-removed],
158// [signal@Gio.DBusObjectManagerClient::interface-proxy-properties-changed] and
159// [signal@Gio.DBusObjectManagerClient::interface-proxy-signal].
160//
161// Note that all callbacks and signals are emitted in the
162// thread-default main context (see
163// [method@GLib.MainContext.push_thread_default]) that the
164// `GDBusObjectManagerClient` object was constructed in. Additionally, the
165// [class@Gio.DBusObjectProxy] and [class@Gio.DBusProxy] objects
166// originating from the `GDBusObjectManagerClient` object will be created in
167// the same context and, consequently, will deliver signals in the
168// same main loop.
169type DBusObjectManagerClient struct {
170	gobject.Object
171}
172
173var xDBusObjectManagerClientGLibType func() types.GType
174
175func DBusObjectManagerClientGLibType() types.GType {
176	return xDBusObjectManagerClientGLibType()
177}
178
179func DBusObjectManagerClientNewFromInternalPtr(ptr uintptr) *DBusObjectManagerClient {
180	cls := &DBusObjectManagerClient{}
181	cls.Ptr = ptr
182	return cls
183}
184
185var xNewDBusObjectManagerClientFinish func(uintptr, **glib.Error) uintptr
186
187// Finishes an operation started with g_dbus_object_manager_client_new().
188func NewDBusObjectManagerClientFinish(ResVar AsyncResult) (*DBusObjectManagerClient, error) {
189	var cls *DBusObjectManagerClient
190	var cerr *glib.Error
191
192	cret := xNewDBusObjectManagerClientFinish(ResVar.GoPointer(), &cerr)
193
194	if cret == 0 {
195		return nil, cerr
196	}
197	cls = &DBusObjectManagerClient{}
198	cls.Ptr = cret
199	if cerr == nil {
200		return cls, nil
201	}
202	return cls, cerr
203
204}
205
206var xNewDBusObjectManagerClientForBusFinish func(uintptr, **glib.Error) uintptr
207
208// Finishes an operation started with g_dbus_object_manager_client_new_for_bus().
209func NewDBusObjectManagerClientForBusFinish(ResVar AsyncResult) (*DBusObjectManagerClient, error) {
210	var cls *DBusObjectManagerClient
211	var cerr *glib.Error
212
213	cret := xNewDBusObjectManagerClientForBusFinish(ResVar.GoPointer(), &cerr)
214
215	if cret == 0 {
216		return nil, cerr
217	}
218	cls = &DBusObjectManagerClient{}
219	cls.Ptr = cret
220	if cerr == nil {
221		return cls, nil
222	}
223	return cls, cerr
224
225}
226
227var xNewDBusObjectManagerClientForBusSync func(BusType, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
228
229// Like g_dbus_object_manager_client_new_sync() but takes a #GBusType instead
230// of a #GDBusConnection.
231//
232// This is a synchronous failable constructor - the calling thread is
233// blocked until a reply is received. See g_dbus_object_manager_client_new_for_bus()
234// for the asynchronous version.
235func NewDBusObjectManagerClientForBusSync(BusTypeVar BusType, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable) (*DBusObjectManagerClient, error) {
236	var cls *DBusObjectManagerClient
237	var cerr *glib.Error
238
239	var GetProxyTypeFuncVarRef uintptr
240	if GetProxyTypeFuncVar != nil {
241		GetProxyTypeFuncVarPtr := uintptr(unsafe.Pointer(GetProxyTypeFuncVar))
242		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeFuncVarPtr); ok {
243			GetProxyTypeFuncVarRef = cbRefPtr
244		} else {
245			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr) types.GType {
246				cbFn := *GetProxyTypeFuncVar
247				return cbFn(arg0, core.GoString(arg1), core.GoString(arg2), arg3)
248			}
249			GetProxyTypeFuncVarRef = purego.NewCallback(fcb)
250			glib.SaveCallbackWithClosure(GetProxyTypeFuncVarPtr, GetProxyTypeFuncVarRef, GetProxyTypeFuncVar)
251		}
252	}
253
254	var GetProxyTypeDestroyNotifyVarRef uintptr
255	if GetProxyTypeDestroyNotifyVar != nil {
256		GetProxyTypeDestroyNotifyVarPtr := uintptr(unsafe.Pointer(GetProxyTypeDestroyNotifyVar))
257		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeDestroyNotifyVarPtr); ok {
258			GetProxyTypeDestroyNotifyVarRef = cbRefPtr
259		} else {
260			fcb := func(arg0 uintptr) {
261				cbFn := *GetProxyTypeDestroyNotifyVar
262				cbFn(arg0)
263			}
264			GetProxyTypeDestroyNotifyVarRef = purego.NewCallback(fcb)
265			glib.SaveCallbackWithClosure(GetProxyTypeDestroyNotifyVarPtr, GetProxyTypeDestroyNotifyVarRef, GetProxyTypeDestroyNotifyVar)
266		}
267	}
268
269	cret := xNewDBusObjectManagerClientForBusSync(BusTypeVar, FlagsVar, NameVar, ObjectPathVar, GetProxyTypeFuncVarRef, GetProxyTypeUserDataVar, GetProxyTypeDestroyNotifyVarRef, CancellableVar.GoPointer(), &cerr)
270
271	if cret == 0 {
272		return nil, cerr
273	}
274	cls = &DBusObjectManagerClient{}
275	cls.Ptr = cret
276	if cerr == nil {
277		return cls, nil
278	}
279	return cls, cerr
280
281}
282
283var xNewDBusObjectManagerClientSync func(uintptr, DBusObjectManagerClientFlags, uintptr, string, uintptr, uintptr, uintptr, uintptr, **glib.Error) uintptr
284
285// Creates a new #GDBusObjectManagerClient object.
286//
287// This is a synchronous failable constructor - the calling thread is
288// blocked until a reply is received. See g_dbus_object_manager_client_new()
289// for the asynchronous version.
290func NewDBusObjectManagerClientSync(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar *string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable) (*DBusObjectManagerClient, error) {
291	var cls *DBusObjectManagerClient
292	var cerr *glib.Error
293
294	var GetProxyTypeFuncVarRef uintptr
295	if GetProxyTypeFuncVar != nil {
296		GetProxyTypeFuncVarPtr := uintptr(unsafe.Pointer(GetProxyTypeFuncVar))
297		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeFuncVarPtr); ok {
298			GetProxyTypeFuncVarRef = cbRefPtr
299		} else {
300			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr) types.GType {
301				cbFn := *GetProxyTypeFuncVar
302				return cbFn(arg0, core.GoString(arg1), core.GoString(arg2), arg3)
303			}
304			GetProxyTypeFuncVarRef = purego.NewCallback(fcb)
305			glib.SaveCallbackWithClosure(GetProxyTypeFuncVarPtr, GetProxyTypeFuncVarRef, GetProxyTypeFuncVar)
306		}
307	}
308
309	var GetProxyTypeDestroyNotifyVarRef uintptr
310	if GetProxyTypeDestroyNotifyVar != nil {
311		GetProxyTypeDestroyNotifyVarPtr := uintptr(unsafe.Pointer(GetProxyTypeDestroyNotifyVar))
312		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeDestroyNotifyVarPtr); ok {
313			GetProxyTypeDestroyNotifyVarRef = cbRefPtr
314		} else {
315			fcb := func(arg0 uintptr) {
316				cbFn := *GetProxyTypeDestroyNotifyVar
317				cbFn(arg0)
318			}
319			GetProxyTypeDestroyNotifyVarRef = purego.NewCallback(fcb)
320			glib.SaveCallbackWithClosure(GetProxyTypeDestroyNotifyVarPtr, GetProxyTypeDestroyNotifyVarRef, GetProxyTypeDestroyNotifyVar)
321		}
322	}
323
324	NameVarPtr := core.GStrdupNullable(NameVar)
325	defer core.GFreeNullable(NameVarPtr)
326
327	cret := xNewDBusObjectManagerClientSync(ConnectionVar.GoPointer(), FlagsVar, NameVarPtr, ObjectPathVar, GetProxyTypeFuncVarRef, GetProxyTypeUserDataVar, GetProxyTypeDestroyNotifyVarRef, CancellableVar.GoPointer(), &cerr)
328
329	if cret == 0 {
330		return nil, cerr
331	}
332	cls = &DBusObjectManagerClient{}
333	cls.Ptr = cret
334	if cerr == nil {
335		return cls, nil
336	}
337	return cls, cerr
338
339}
340
341var xDBusObjectManagerClientGetConnection func(uintptr) uintptr
342
343// Gets the #GDBusConnection used by @manager.
344func (x *DBusObjectManagerClient) GetConnection() *DBusConnection {
345	var cls *DBusConnection
346
347	cret := xDBusObjectManagerClientGetConnection(x.GoPointer())
348
349	if cret == 0 {
350		return nil
351	}
352	gobject.IncreaseRef(cret)
353	cls = &DBusConnection{}
354	cls.Ptr = cret
355	return cls
356}
357
358var xDBusObjectManagerClientGetFlags func(uintptr) DBusObjectManagerClientFlags
359
360// Gets the flags that @manager was constructed with.
361func (x *DBusObjectManagerClient) GetFlags() DBusObjectManagerClientFlags {
362
363	cret := xDBusObjectManagerClientGetFlags(x.GoPointer())
364	return cret
365}
366
367var xDBusObjectManagerClientGetName func(uintptr) string
368
369// Gets the name that @manager is for, or %NULL if not a message bus
370// connection.
371func (x *DBusObjectManagerClient) GetName() string {
372
373	cret := xDBusObjectManagerClientGetName(x.GoPointer())
374	return cret
375}
376
377var xDBusObjectManagerClientGetNameOwner func(uintptr) string
378
379// The unique name that owns the name that @manager is for or %NULL if
380// no-one currently owns that name. You can connect to the
381// #GObject::notify signal to track changes to the
382// #GDBusObjectManagerClient:name-owner property.
383func (x *DBusObjectManagerClient) GetNameOwner() string {
384
385	cret := xDBusObjectManagerClientGetNameOwner(x.GoPointer())
386	return cret
387}
388
389func (c *DBusObjectManagerClient) GoPointer() uintptr {
390	if c == nil {
391		return 0
392	}
393	return c.Ptr
394}
395
396func (c *DBusObjectManagerClient) SetGoPointer(ptr uintptr) {
397	c.Ptr = ptr
398}
399
400// SetPropertyGetProxyTypeDestroyNotify sets the "get-proxy-type-destroy-notify" property.
401// A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
402func (x *DBusObjectManagerClient) SetPropertyGetProxyTypeDestroyNotify(value uintptr) {
403	var v gobject.Value
404	v.Init(gobject.TypePointerVal)
405	v.SetPointer(value)
406	x.SetProperty("get-proxy-type-destroy-notify", &v)
407}
408
409// GetPropertyGetProxyTypeDestroyNotify gets the "get-proxy-type-destroy-notify" property.
410// A #GDestroyNotify for the #gpointer user_data in #GDBusObjectManagerClient:get-proxy-type-user-data.
411func (x *DBusObjectManagerClient) GetPropertyGetProxyTypeDestroyNotify() uintptr {
412	var v gobject.Value
413	x.GetProperty("get-proxy-type-destroy-notify", &v)
414	return v.GetPointer()
415}
416
417// SetPropertyGetProxyTypeFunc sets the "get-proxy-type-func" property.
418// The #GDBusProxyTypeFunc to use when determining what #GType to
419// use for interface proxies or %NULL.
420func (x *DBusObjectManagerClient) SetPropertyGetProxyTypeFunc(value uintptr) {
421	var v gobject.Value
422	v.Init(gobject.TypePointerVal)
423	v.SetPointer(value)
424	x.SetProperty("get-proxy-type-func", &v)
425}
426
427// GetPropertyGetProxyTypeFunc gets the "get-proxy-type-func" property.
428// The #GDBusProxyTypeFunc to use when determining what #GType to
429// use for interface proxies or %NULL.
430func (x *DBusObjectManagerClient) GetPropertyGetProxyTypeFunc() uintptr {
431	var v gobject.Value
432	x.GetProperty("get-proxy-type-func", &v)
433	return v.GetPointer()
434}
435
436// SetPropertyGetProxyTypeUserData sets the "get-proxy-type-user-data" property.
437// The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
438func (x *DBusObjectManagerClient) SetPropertyGetProxyTypeUserData(value uintptr) {
439	var v gobject.Value
440	v.Init(gobject.TypePointerVal)
441	v.SetPointer(value)
442	x.SetProperty("get-proxy-type-user-data", &v)
443}
444
445// GetPropertyGetProxyTypeUserData gets the "get-proxy-type-user-data" property.
446// The #gpointer user_data to pass to #GDBusObjectManagerClient:get-proxy-type-func.
447func (x *DBusObjectManagerClient) GetPropertyGetProxyTypeUserData() uintptr {
448	var v gobject.Value
449	x.GetProperty("get-proxy-type-user-data", &v)
450	return v.GetPointer()
451}
452
453// SetPropertyName sets the "name" property.
454// The well-known name or unique name that the manager is for.
455func (x *DBusObjectManagerClient) SetPropertyName(value string) {
456	var v gobject.Value
457	v.Init(gobject.TypeStringVal)
458	v.SetString(&value)
459	x.SetProperty("name", &v)
460}
461
462// GetPropertyName gets the "name" property.
463// The well-known name or unique name that the manager is for.
464func (x *DBusObjectManagerClient) GetPropertyName() string {
465	var v gobject.Value
466	x.GetProperty("name", &v)
467	return v.GetString()
468}
469
470// GetPropertyNameOwner gets the "name-owner" property.
471// The unique name that owns #GDBusObjectManagerClient:name or %NULL if
472// no-one is currently owning the name. Connect to the
473// #GObject::notify signal to track changes to this property.
474func (x *DBusObjectManagerClient) GetPropertyNameOwner() string {
475	var v gobject.Value
476	x.GetProperty("name-owner", &v)
477	return v.GetString()
478}
479
480// SetPropertyObjectPath sets the "object-path" property.
481// The object path the manager is for.
482func (x *DBusObjectManagerClient) SetPropertyObjectPath(value string) {
483	var v gobject.Value
484	v.Init(gobject.TypeStringVal)
485	v.SetString(&value)
486	x.SetProperty("object-path", &v)
487}
488
489// GetPropertyObjectPath gets the "object-path" property.
490// The object path the manager is for.
491func (x *DBusObjectManagerClient) GetPropertyObjectPath() string {
492	var v gobject.Value
493	x.GetProperty("object-path", &v)
494	return v.GetString()
495}
496
497// Emitted when one or more D-Bus properties on proxy changes. The
498// local cache has already been updated when this signal fires. Note
499// that both @changed_properties and @invalidated_properties are
500// guaranteed to never be %NULL (either may be empty though).
501//
502// This signal exists purely as a convenience to avoid having to
503// connect signals to all interface proxies managed by @manager.
504//
505// This signal is emitted in the thread-default main context
506// (see [method@GLib.MainContext.push_thread_default])
507// that @manager was constructed in.
508func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb *func(DBusObjectManagerClient, uintptr, uintptr, uintptr, []string)) uint {
509	cbPtr := uintptr(unsafe.Pointer(cb))
510	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
511		handlerID := gobject.SignalConnect(x.GoPointer(), "interface-proxy-properties-changed", cbRefPtr)
512		glib.SaveHandlerMapping(handlerID, cbPtr)
513		return handlerID
514	}
515
516	fcb := func(clsPtr uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, ChangedPropertiesVarp uintptr, InvalidatedPropertiesVarp []string) {
517		fa := DBusObjectManagerClient{}
518		fa.Ptr = clsPtr
519		cbFn := *cb
520
521		cbFn(fa, ObjectProxyVarp, InterfaceProxyVarp, ChangedPropertiesVarp, InvalidatedPropertiesVarp)
522
523	}
524	cbRefPtr := purego.NewCallback(fcb)
525	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
526	handlerID := gobject.SignalConnect(x.GoPointer(), "interface-proxy-properties-changed", cbRefPtr)
527	glib.SaveHandlerMapping(handlerID, cbPtr)
528	return handlerID
529}
530
531// Emitted when a D-Bus signal is received on @interface_proxy.
532//
533// This signal exists purely as a convenience to avoid having to
534// connect signals to all interface proxies managed by @manager.
535//
536// This signal is emitted in the thread-default main context
537// (see [method@GLib.MainContext.push_thread_default])
538// that @manager was constructed in.
539func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb *func(DBusObjectManagerClient, uintptr, uintptr, string, string, uintptr)) uint {
540	cbPtr := uintptr(unsafe.Pointer(cb))
541	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
542		handlerID := gobject.SignalConnect(x.GoPointer(), "interface-proxy-signal", cbRefPtr)
543		glib.SaveHandlerMapping(handlerID, cbPtr)
544		return handlerID
545	}
546
547	fcb := func(clsPtr uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, SenderNameVarp uintptr, SignalNameVarp uintptr, ParametersVarp uintptr) {
548		fa := DBusObjectManagerClient{}
549		fa.Ptr = clsPtr
550		cbFn := *cb
551
552		cbFn(fa, ObjectProxyVarp, InterfaceProxyVarp, core.GoString(SenderNameVarp), core.GoString(SignalNameVarp), ParametersVarp)
553
554	}
555	cbRefPtr := purego.NewCallback(fcb)
556	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
557	handlerID := gobject.SignalConnect(x.GoPointer(), "interface-proxy-signal", cbRefPtr)
558	glib.SaveHandlerMapping(handlerID, cbPtr)
559	return handlerID
560}
561
562// Starts asynchronous initialization of the object implementing the
563// interface. This must be done before any real use of the object after
564// initial construction. If the object also implements #GInitable you can
565// optionally call g_initable_init() instead.
566//
567// This method is intended for language bindings. If writing in C,
568// g_async_initable_new_async() should typically be used instead.
569//
570// When the initialization is finished, @callback will be called. You can
571// then call g_async_initable_init_finish() to get the result of the
572// initialization.
573//
574// Implementations may also support cancellation. If @cancellable is not
575// %NULL, then initialization can be cancelled by triggering the cancellable
576// object from another thread. If the operation was cancelled, the error
577// %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL, and
578// the object doesn't support cancellable initialization, the error
579// %G_IO_ERROR_NOT_SUPPORTED will be returned.
580//
581// As with #GInitable, if the object is not initialized, or initialization
582// returns with an error, then all operations on the object except
583// g_object_ref() and g_object_unref() are considered to be invalid, and
584// have undefined behaviour. They will often fail with g_critical() or
585// g_warning(), but this must not be relied on.
586//
587// Callers should not assume that a class which implements #GAsyncInitable can
588// be initialized multiple times; for more information, see g_initable_init().
589// If a class explicitly supports being initialized multiple times,
590// implementation requires yielding all subsequent calls to init_async() on the
591// results of the first call.
592//
593// For classes that also support the #GInitable interface, the default
594// implementation of this method will run the g_initable_init() function
595// in a thread, so if you want to support asynchronous initialization via
596// threads, just implement the #GAsyncInitable interface without overriding
597// any interface methods.
598func (x *DBusObjectManagerClient) InitAsync(IoPriorityVar int, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
599
600	XGAsyncInitableInitAsync(x.GoPointer(), IoPriorityVar, CancellableVar.GoPointer(), glib.NewCallbackNullable(CallbackVar), UserDataVar)
601
602}
603
604// Finishes asynchronous initialization and returns the result.
605// See g_async_initable_init_async().
606func (x *DBusObjectManagerClient) InitFinish(ResVar AsyncResult) (bool, error) {
607	var cerr *glib.Error
608
609	cret := XGAsyncInitableInitFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
610	if cerr == nil {
611		return cret, nil
612	}
613	return cret, cerr
614
615}
616
617// Finishes the async construction for the various g_async_initable_new
618// calls, returning the created object or %NULL on error.
619func (x *DBusObjectManagerClient) NewFinish(ResVar AsyncResult) (*gobject.Object, error) {
620	var cls *gobject.Object
621	var cerr *glib.Error
622
623	cret := XGAsyncInitableNewFinish(x.GoPointer(), ResVar.GoPointer(), &cerr)
624
625	if cret == 0 {
626		return nil, cerr
627	}
628	cls = &gobject.Object{}
629	cls.Ptr = cret
630	if cerr == nil {
631		return cls, nil
632	}
633	return cls, cerr
634
635}
636
637// Gets the interface proxy for @interface_name at @object_path, if
638// any.
639func (x *DBusObjectManagerClient) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
640	var cls *DBusInterfaceBase
641
642	cret := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)
643
644	if cret == 0 {
645		return nil
646	}
647	cls = &DBusInterfaceBase{}
648	cls.Ptr = cret
649	return cls
650}
651
652// Gets the #GDBusObject at @object_path, if any.
653func (x *DBusObjectManagerClient) GetObject(ObjectPathVar string) *DBusObjectBase {
654	var cls *DBusObjectBase
655
656	cret := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)
657
658	if cret == 0 {
659		return nil
660	}
661	cls = &DBusObjectBase{}
662	cls.Ptr = cret
663	return cls
664}
665
666// Gets the object path that @manager is for.
667func (x *DBusObjectManagerClient) GetObjectPath() string {
668
669	cret := XGDbusObjectManagerGetObjectPath(x.GoPointer())
670	return cret
671}
672
673// Gets all #GDBusObject objects known to @manager.
674func (x *DBusObjectManagerClient) GetObjects() *glib.List {
675
676	cret := XGDbusObjectManagerGetObjects(x.GoPointer())
677	return cret
678}
679
680// Initializes the object implementing the interface.
681//
682// This method is intended for language bindings. If writing in C,
683// g_initable_new() should typically be used instead.
684//
685// The object must be initialized before any real use after initial
686// construction, either with this function or g_async_initable_init_async().
687//
688// Implementations may also support cancellation. If @cancellable is not %NULL,
689// then initialization can be cancelled by triggering the cancellable object
690// from another thread. If the operation was cancelled, the error
691// %G_IO_ERROR_CANCELLED will be returned. If @cancellable is not %NULL and
692// the object doesn't support cancellable initialization the error
693// %G_IO_ERROR_NOT_SUPPORTED will be returned.
694//
695// If the object is not initialized, or initialization returns with an
696// error, then all operations on the object except g_object_ref() and
697// g_object_unref() are considered to be invalid, and have undefined
698// behaviour. See the [description][iface@Gio.Initable#description] for more details.
699//
700// Callers should not assume that a class which implements #GInitable can be
701// initialized multiple times, unless the class explicitly documents itself as
702// supporting this. Generally, a class’ implementation of init() can assume
703// (and assert) that it will only be called once. Previously, this documentation
704// recommended all #GInitable implementations should be idempotent; that
705// recommendation was relaxed in GLib 2.54.
706//
707// If a class explicitly supports being initialized multiple times, it is
708// recommended that the method is idempotent: multiple calls with the same
709// arguments should return the same results. Only the first call initializes
710// the object; further calls return the result of the first call.
711//
712// One reason why a class might need to support idempotent initialization is if
713// it is designed to be used via the singleton pattern, with a
714// #GObjectClass.constructor that sometimes returns an existing instance.
715// In this pattern, a caller would expect to be able to call g_initable_init()
716// on the result of g_object_new(), regardless of whether it is in fact a new
717// instance.
718func (x *DBusObjectManagerClient) Init(CancellableVar *Cancellable) (bool, error) {
719	var cerr *glib.Error
720
721	cret := XGInitableInit(x.GoPointer(), CancellableVar.GoPointer(), &cerr)
722	if cerr == nil {
723		return cret, nil
724	}
725	return cret, cerr
726
727}
728
729var xDBusObjectManagerClientNew func(uintptr, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr)
730
731// Asynchronously creates a new #GDBusObjectManagerClient object.
732//
733// This is an asynchronous failable constructor. When the result is
734// ready, @callback will be invoked in the thread-default main context
735// (see [method@GLib.MainContext.push_thread_default])
736// of the thread you are calling this method from. You can then call
737// g_dbus_object_manager_client_new_finish() to get the result. See
738// g_dbus_object_manager_client_new_sync() for the synchronous version.
739func DBusObjectManagerClientNew(ConnectionVar *DBusConnection, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
740
741	var GetProxyTypeFuncVarRef uintptr
742	if GetProxyTypeFuncVar != nil {
743		GetProxyTypeFuncVarPtr := uintptr(unsafe.Pointer(GetProxyTypeFuncVar))
744		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeFuncVarPtr); ok {
745			GetProxyTypeFuncVarRef = cbRefPtr
746		} else {
747			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr) types.GType {
748				cbFn := *GetProxyTypeFuncVar
749				return cbFn(arg0, core.GoString(arg1), core.GoString(arg2), arg3)
750			}
751			GetProxyTypeFuncVarRef = purego.NewCallback(fcb)
752			glib.SaveCallbackWithClosure(GetProxyTypeFuncVarPtr, GetProxyTypeFuncVarRef, GetProxyTypeFuncVar)
753		}
754	}
755
756	var GetProxyTypeDestroyNotifyVarRef uintptr
757	if GetProxyTypeDestroyNotifyVar != nil {
758		GetProxyTypeDestroyNotifyVarPtr := uintptr(unsafe.Pointer(GetProxyTypeDestroyNotifyVar))
759		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeDestroyNotifyVarPtr); ok {
760			GetProxyTypeDestroyNotifyVarRef = cbRefPtr
761		} else {
762			fcb := func(arg0 uintptr) {
763				cbFn := *GetProxyTypeDestroyNotifyVar
764				cbFn(arg0)
765			}
766			GetProxyTypeDestroyNotifyVarRef = purego.NewCallback(fcb)
767			glib.SaveCallbackWithClosure(GetProxyTypeDestroyNotifyVarPtr, GetProxyTypeDestroyNotifyVarRef, GetProxyTypeDestroyNotifyVar)
768		}
769	}
770
771	var CallbackVarRef uintptr
772	if CallbackVar != nil {
773		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
774		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
775			CallbackVarRef = cbRefPtr
776		} else {
777			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
778				cbFn := *CallbackVar
779				cbFn(arg0, arg1, arg2)
780			}
781			CallbackVarRef = purego.NewCallback(fcb)
782			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
783		}
784	}
785
786	xDBusObjectManagerClientNew(ConnectionVar.GoPointer(), FlagsVar, NameVar, ObjectPathVar, GetProxyTypeFuncVarRef, GetProxyTypeUserDataVar, GetProxyTypeDestroyNotifyVarRef, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
787
788}
789
790var xDBusObjectManagerClientNewForBus func(BusType, DBusObjectManagerClientFlags, string, string, uintptr, uintptr, uintptr, uintptr, uintptr, uintptr)
791
792// Like g_dbus_object_manager_client_new() but takes a #GBusType instead of a
793// #GDBusConnection.
794//
795// This is an asynchronous failable constructor. When the result is
796// ready, @callback will be invoked in the thread-default main context
797// (see [method@GLib.MainContext.push_thread_default])
798// of the thread you are calling this method from. You can
799// then call g_dbus_object_manager_client_new_for_bus_finish() to get the result. See
800// g_dbus_object_manager_client_new_for_bus_sync() for the synchronous version.
801func DBusObjectManagerClientNewForBus(BusTypeVar BusType, FlagsVar DBusObjectManagerClientFlags, NameVar string, ObjectPathVar string, GetProxyTypeFuncVar *DBusProxyTypeFunc, GetProxyTypeUserDataVar uintptr, GetProxyTypeDestroyNotifyVar *glib.DestroyNotify, CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
802
803	var GetProxyTypeFuncVarRef uintptr
804	if GetProxyTypeFuncVar != nil {
805		GetProxyTypeFuncVarPtr := uintptr(unsafe.Pointer(GetProxyTypeFuncVar))
806		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeFuncVarPtr); ok {
807			GetProxyTypeFuncVarRef = cbRefPtr
808		} else {
809			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr, arg3 uintptr) types.GType {
810				cbFn := *GetProxyTypeFuncVar
811				return cbFn(arg0, core.GoString(arg1), core.GoString(arg2), arg3)
812			}
813			GetProxyTypeFuncVarRef = purego.NewCallback(fcb)
814			glib.SaveCallbackWithClosure(GetProxyTypeFuncVarPtr, GetProxyTypeFuncVarRef, GetProxyTypeFuncVar)
815		}
816	}
817
818	var GetProxyTypeDestroyNotifyVarRef uintptr
819	if GetProxyTypeDestroyNotifyVar != nil {
820		GetProxyTypeDestroyNotifyVarPtr := uintptr(unsafe.Pointer(GetProxyTypeDestroyNotifyVar))
821		if cbRefPtr, ok := glib.GetCallback(GetProxyTypeDestroyNotifyVarPtr); ok {
822			GetProxyTypeDestroyNotifyVarRef = cbRefPtr
823		} else {
824			fcb := func(arg0 uintptr) {
825				cbFn := *GetProxyTypeDestroyNotifyVar
826				cbFn(arg0)
827			}
828			GetProxyTypeDestroyNotifyVarRef = purego.NewCallback(fcb)
829			glib.SaveCallbackWithClosure(GetProxyTypeDestroyNotifyVarPtr, GetProxyTypeDestroyNotifyVarRef, GetProxyTypeDestroyNotifyVar)
830		}
831	}
832
833	var CallbackVarRef uintptr
834	if CallbackVar != nil {
835		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
836		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
837			CallbackVarRef = cbRefPtr
838		} else {
839			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
840				cbFn := *CallbackVar
841				cbFn(arg0, arg1, arg2)
842			}
843			CallbackVarRef = purego.NewCallback(fcb)
844			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
845		}
846	}
847
848	xDBusObjectManagerClientNewForBus(BusTypeVar, FlagsVar, NameVar, ObjectPathVar, GetProxyTypeFuncVarRef, GetProxyTypeUserDataVar, GetProxyTypeDestroyNotifyVarRef, CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
849
850}
851
852func init() {
853	core.SetPackageName("GIO", "gio-2.0")
854	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
855	var libs []uintptr
856	for _, libPath := range core.GetPaths("GIO") {
857		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
858		if err != nil {
859			panic(err)
860		}
861		libs = append(libs, lib)
862	}
863
864	core.PuregoSafeRegister(&xDBusObjectManagerClientGLibType, libs, "g_dbus_object_manager_client_get_type")
865
866	core.PuregoSafeRegister(&xNewDBusObjectManagerClientFinish, libs, "g_dbus_object_manager_client_new_finish")
867	core.PuregoSafeRegister(&xNewDBusObjectManagerClientForBusFinish, libs, "g_dbus_object_manager_client_new_for_bus_finish")
868	core.PuregoSafeRegister(&xNewDBusObjectManagerClientForBusSync, libs, "g_dbus_object_manager_client_new_for_bus_sync")
869	core.PuregoSafeRegister(&xNewDBusObjectManagerClientSync, libs, "g_dbus_object_manager_client_new_sync")
870
871	core.PuregoSafeRegister(&xDBusObjectManagerClientGetConnection, libs, "g_dbus_object_manager_client_get_connection")
872	core.PuregoSafeRegister(&xDBusObjectManagerClientGetFlags, libs, "g_dbus_object_manager_client_get_flags")
873	core.PuregoSafeRegister(&xDBusObjectManagerClientGetName, libs, "g_dbus_object_manager_client_get_name")
874	core.PuregoSafeRegister(&xDBusObjectManagerClientGetNameOwner, libs, "g_dbus_object_manager_client_get_name_owner")
875
876	core.PuregoSafeRegister(&xDBusObjectManagerClientNew, libs, "g_dbus_object_manager_client_new")
877	core.PuregoSafeRegister(&xDBusObjectManagerClientNewForBus, libs, "g_dbus_object_manager_client_new_for_bus")
878
879}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 102

↑↓ moveenter openesc close