v0.2.2 9100209

gdbusobjectmanager.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/types"
13)
14
15// Base type for D-Bus object managers.
16type DBusObjectManagerIface struct {
17	_ structs.HostLayout
18
19	ParentIface uintptr
20
21	xGetObjectPath uintptr
22
23	xGetObjects uintptr
24
25	xGetObject uintptr
26
27	xGetInterface uintptr
28
29	xObjectAdded uintptr
30
31	xObjectRemoved uintptr
32
33	xInterfaceAdded uintptr
34
35	xInterfaceRemoved uintptr
36}
37
38func (x *DBusObjectManagerIface) GoPointer() uintptr {
39	return uintptr(unsafe.Pointer(x))
40}
41
42// OverrideGetObjectPath sets the "get_object_path" callback function.
43// Virtual function for g_dbus_object_manager_get_object_path().
44func (x *DBusObjectManagerIface) OverrideGetObjectPath(cb func(DBusObjectManager) string) {
45	if cb == nil {
46		x.xGetObjectPath = 0
47	} else {
48		x.xGetObjectPath = purego.NewCallback(func(ManagerVarp uintptr) string {
49			return cb(&DBusObjectManagerBase{Ptr: ManagerVarp})
50		})
51	}
52}
53
54// GetGetObjectPath gets the "get_object_path" callback function.
55// Virtual function for g_dbus_object_manager_get_object_path().
56func (x *DBusObjectManagerIface) GetGetObjectPath() func(DBusObjectManager) string {
57	if x.xGetObjectPath == 0 {
58		return nil
59	}
60	var rawCallback func(ManagerVarp uintptr) string
61	purego.RegisterFunc(&rawCallback, x.xGetObjectPath)
62	return func(ManagerVar DBusObjectManager) string {
63		return rawCallback(ManagerVar.GoPointer())
64	}
65}
66
67// OverrideGetObjects sets the "get_objects" callback function.
68// Virtual function for g_dbus_object_manager_get_objects().
69func (x *DBusObjectManagerIface) OverrideGetObjects(cb func(DBusObjectManager) *glib.List) {
70	if cb == nil {
71		x.xGetObjects = 0
72	} else {
73		x.xGetObjects = purego.NewCallback(func(ManagerVarp uintptr) *glib.List {
74			return cb(&DBusObjectManagerBase{Ptr: ManagerVarp})
75		})
76	}
77}
78
79// GetGetObjects gets the "get_objects" callback function.
80// Virtual function for g_dbus_object_manager_get_objects().
81func (x *DBusObjectManagerIface) GetGetObjects() func(DBusObjectManager) *glib.List {
82	if x.xGetObjects == 0 {
83		return nil
84	}
85	var rawCallback func(ManagerVarp uintptr) *glib.List
86	purego.RegisterFunc(&rawCallback, x.xGetObjects)
87	return func(ManagerVar DBusObjectManager) *glib.List {
88		return rawCallback(ManagerVar.GoPointer())
89	}
90}
91
92// OverrideGetObject sets the "get_object" callback function.
93// Virtual function for g_dbus_object_manager_get_object().
94func (x *DBusObjectManagerIface) OverrideGetObject(cb func(DBusObjectManager, string) *DBusObjectBase) {
95	if cb == nil {
96		x.xGetObject = 0
97	} else {
98		x.xGetObject = purego.NewCallback(func(ManagerVarp uintptr, ObjectPathVarp string) uintptr {
99			ret := cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, ObjectPathVarp)
100			if ret == nil {
101				return 0
102			}
103			return ret.GoPointer()
104		})
105	}
106}
107
108// GetGetObject gets the "get_object" callback function.
109// Virtual function for g_dbus_object_manager_get_object().
110func (x *DBusObjectManagerIface) GetGetObject() func(DBusObjectManager, string) *DBusObjectBase {
111	if x.xGetObject == 0 {
112		return nil
113	}
114	var rawCallback func(ManagerVarp uintptr, ObjectPathVarp string) uintptr
115	purego.RegisterFunc(&rawCallback, x.xGetObject)
116	return func(ManagerVar DBusObjectManager, ObjectPathVar string) *DBusObjectBase {
117		rawRet := rawCallback(ManagerVar.GoPointer(), ObjectPathVar)
118		if rawRet == 0 {
119			return nil
120		}
121		ret := &DBusObjectBase{}
122		ret.Ptr = rawRet
123		return ret
124	}
125}
126
127// OverrideGetInterface sets the "get_interface" callback function.
128// Virtual function for g_dbus_object_manager_get_interface().
129func (x *DBusObjectManagerIface) OverrideGetInterface(cb func(DBusObjectManager, string, string) *DBusInterfaceBase) {
130	if cb == nil {
131		x.xGetInterface = 0
132	} else {
133		x.xGetInterface = purego.NewCallback(func(ManagerVarp uintptr, ObjectPathVarp string, InterfaceNameVarp string) uintptr {
134			ret := cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, ObjectPathVarp, InterfaceNameVarp)
135			if ret == nil {
136				return 0
137			}
138			return ret.GoPointer()
139		})
140	}
141}
142
143// GetGetInterface gets the "get_interface" callback function.
144// Virtual function for g_dbus_object_manager_get_interface().
145func (x *DBusObjectManagerIface) GetGetInterface() func(DBusObjectManager, string, string) *DBusInterfaceBase {
146	if x.xGetInterface == 0 {
147		return nil
148	}
149	var rawCallback func(ManagerVarp uintptr, ObjectPathVarp string, InterfaceNameVarp string) uintptr
150	purego.RegisterFunc(&rawCallback, x.xGetInterface)
151	return func(ManagerVar DBusObjectManager, ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
152		rawRet := rawCallback(ManagerVar.GoPointer(), ObjectPathVar, InterfaceNameVar)
153		if rawRet == 0 {
154			return nil
155		}
156		ret := &DBusInterfaceBase{}
157		ret.Ptr = rawRet
158		return ret
159	}
160}
161
162// OverrideObjectAdded sets the "object_added" callback function.
163// Signal handler for the #GDBusObjectManager::object-added signal.
164func (x *DBusObjectManagerIface) OverrideObjectAdded(cb func(DBusObjectManager, DBusObject)) {
165	if cb == nil {
166		x.xObjectAdded = 0
167	} else {
168		x.xObjectAdded = purego.NewCallback(func(ManagerVarp uintptr, ObjectVarp uintptr) {
169			cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, &DBusObjectBase{Ptr: ObjectVarp})
170		})
171	}
172}
173
174// GetObjectAdded gets the "object_added" callback function.
175// Signal handler for the #GDBusObjectManager::object-added signal.
176func (x *DBusObjectManagerIface) GetObjectAdded() func(DBusObjectManager, DBusObject) {
177	if x.xObjectAdded == 0 {
178		return nil
179	}
180	var rawCallback func(ManagerVarp uintptr, ObjectVarp uintptr)
181	purego.RegisterFunc(&rawCallback, x.xObjectAdded)
182	return func(ManagerVar DBusObjectManager, ObjectVar DBusObject) {
183		rawCallback(ManagerVar.GoPointer(), ObjectVar.GoPointer())
184	}
185}
186
187// OverrideObjectRemoved sets the "object_removed" callback function.
188// Signal handler for the #GDBusObjectManager::object-removed signal.
189func (x *DBusObjectManagerIface) OverrideObjectRemoved(cb func(DBusObjectManager, DBusObject)) {
190	if cb == nil {
191		x.xObjectRemoved = 0
192	} else {
193		x.xObjectRemoved = purego.NewCallback(func(ManagerVarp uintptr, ObjectVarp uintptr) {
194			cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, &DBusObjectBase{Ptr: ObjectVarp})
195		})
196	}
197}
198
199// GetObjectRemoved gets the "object_removed" callback function.
200// Signal handler for the #GDBusObjectManager::object-removed signal.
201func (x *DBusObjectManagerIface) GetObjectRemoved() func(DBusObjectManager, DBusObject) {
202	if x.xObjectRemoved == 0 {
203		return nil
204	}
205	var rawCallback func(ManagerVarp uintptr, ObjectVarp uintptr)
206	purego.RegisterFunc(&rawCallback, x.xObjectRemoved)
207	return func(ManagerVar DBusObjectManager, ObjectVar DBusObject) {
208		rawCallback(ManagerVar.GoPointer(), ObjectVar.GoPointer())
209	}
210}
211
212// OverrideInterfaceAdded sets the "interface_added" callback function.
213// Signal handler for the #GDBusObjectManager::interface-added signal.
214func (x *DBusObjectManagerIface) OverrideInterfaceAdded(cb func(DBusObjectManager, DBusObject, DBusInterface)) {
215	if cb == nil {
216		x.xInterfaceAdded = 0
217	} else {
218		x.xInterfaceAdded = purego.NewCallback(func(ManagerVarp uintptr, ObjectVarp uintptr, InterfaceVarp uintptr) {
219			cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, &DBusObjectBase{Ptr: ObjectVarp}, &DBusInterfaceBase{Ptr: InterfaceVarp})
220		})
221	}
222}
223
224// GetInterfaceAdded gets the "interface_added" callback function.
225// Signal handler for the #GDBusObjectManager::interface-added signal.
226func (x *DBusObjectManagerIface) GetInterfaceAdded() func(DBusObjectManager, DBusObject, DBusInterface) {
227	if x.xInterfaceAdded == 0 {
228		return nil
229	}
230	var rawCallback func(ManagerVarp uintptr, ObjectVarp uintptr, InterfaceVarp uintptr)
231	purego.RegisterFunc(&rawCallback, x.xInterfaceAdded)
232	return func(ManagerVar DBusObjectManager, ObjectVar DBusObject, InterfaceVar DBusInterface) {
233		rawCallback(ManagerVar.GoPointer(), ObjectVar.GoPointer(), InterfaceVar.GoPointer())
234	}
235}
236
237// OverrideInterfaceRemoved sets the "interface_removed" callback function.
238// Signal handler for the #GDBusObjectManager::interface-removed signal.
239func (x *DBusObjectManagerIface) OverrideInterfaceRemoved(cb func(DBusObjectManager, DBusObject, DBusInterface)) {
240	if cb == nil {
241		x.xInterfaceRemoved = 0
242	} else {
243		x.xInterfaceRemoved = purego.NewCallback(func(ManagerVarp uintptr, ObjectVarp uintptr, InterfaceVarp uintptr) {
244			cb(&DBusObjectManagerBase{Ptr: ManagerVarp}, &DBusObjectBase{Ptr: ObjectVarp}, &DBusInterfaceBase{Ptr: InterfaceVarp})
245		})
246	}
247}
248
249// GetInterfaceRemoved gets the "interface_removed" callback function.
250// Signal handler for the #GDBusObjectManager::interface-removed signal.
251func (x *DBusObjectManagerIface) GetInterfaceRemoved() func(DBusObjectManager, DBusObject, DBusInterface) {
252	if x.xInterfaceRemoved == 0 {
253		return nil
254	}
255	var rawCallback func(ManagerVarp uintptr, ObjectVarp uintptr, InterfaceVarp uintptr)
256	purego.RegisterFunc(&rawCallback, x.xInterfaceRemoved)
257	return func(ManagerVar DBusObjectManager, ObjectVar DBusObject, InterfaceVar DBusInterface) {
258		rawCallback(ManagerVar.GoPointer(), ObjectVar.GoPointer(), InterfaceVar.GoPointer())
259	}
260}
261
262// The `GDBusObjectManager` type is the base type for service- and
263// client-side implementations of the standardized
264// [`org.freedesktop.DBus.ObjectManager`](http://dbus.freedesktop.org/doc/dbus-specification.html#standard-interfaces-objectmanager)
265// interface.
266//
267// See [class@Gio.DBusObjectManagerClient] for the client-side implementation
268// and [class@Gio.DBusObjectManagerServer] for the service-side implementation.
269type DBusObjectManager interface {
270	GoPointer() uintptr
271	SetGoPointer(uintptr)
272	GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase
273	GetObject(ObjectPathVar string) *DBusObjectBase
274	GetObjectPath() string
275	GetObjects() *glib.List
276}
277
278var xDBusObjectManagerGLibType func() types.GType
279
280func DBusObjectManagerGLibType() types.GType {
281	return xDBusObjectManagerGLibType()
282}
283
284type DBusObjectManagerBase struct {
285	Ptr uintptr
286}
287
288func (x *DBusObjectManagerBase) GoPointer() uintptr {
289	if x == nil {
290		return 0
291	}
292	return x.Ptr
293}
294
295func (x *DBusObjectManagerBase) SetGoPointer(ptr uintptr) {
296	x.Ptr = ptr
297}
298
299// Gets the interface proxy for @interface_name at @object_path, if
300// any.
301func (x *DBusObjectManagerBase) GetInterface(ObjectPathVar string, InterfaceNameVar string) *DBusInterfaceBase {
302	var cls *DBusInterfaceBase
303
304	cret := XGDbusObjectManagerGetInterface(x.GoPointer(), ObjectPathVar, InterfaceNameVar)
305
306	if cret == 0 {
307		return nil
308	}
309	cls = &DBusInterfaceBase{}
310	cls.Ptr = cret
311	return cls
312}
313
314// Gets the #GDBusObject at @object_path, if any.
315func (x *DBusObjectManagerBase) GetObject(ObjectPathVar string) *DBusObjectBase {
316	var cls *DBusObjectBase
317
318	cret := XGDbusObjectManagerGetObject(x.GoPointer(), ObjectPathVar)
319
320	if cret == 0 {
321		return nil
322	}
323	cls = &DBusObjectBase{}
324	cls.Ptr = cret
325	return cls
326}
327
328// Gets the object path that @manager is for.
329func (x *DBusObjectManagerBase) GetObjectPath() string {
330
331	cret := XGDbusObjectManagerGetObjectPath(x.GoPointer())
332	return cret
333}
334
335// Gets all #GDBusObject objects known to @manager.
336func (x *DBusObjectManagerBase) GetObjects() *glib.List {
337
338	cret := XGDbusObjectManagerGetObjects(x.GoPointer())
339	return cret
340}
341
342var XGDbusObjectManagerGetInterface func(uintptr, string, string) uintptr
343var XGDbusObjectManagerGetObject func(uintptr, string) uintptr
344var XGDbusObjectManagerGetObjectPath func(uintptr) string
345var XGDbusObjectManagerGetObjects func(uintptr) *glib.List
346
347func init() {
348	core.SetPackageName("GIO", "gio-2.0")
349	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
350	var libs []uintptr
351	for _, libPath := range core.GetPaths("GIO") {
352		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
353		if err != nil {
354			panic(err)
355		}
356		libs = append(libs, lib)
357	}
358
359	core.PuregoSafeRegister(&xDBusObjectManagerGLibType, libs, "g_dbus_object_manager_get_type")
360
361	core.PuregoSafeRegister(&XGDbusObjectManagerGetInterface, libs, "g_dbus_object_manager_get_interface")
362	core.PuregoSafeRegister(&XGDbusObjectManagerGetObject, libs, "g_dbus_object_manager_get_object")
363	core.PuregoSafeRegister(&XGDbusObjectManagerGetObjectPath, libs, "g_dbus_object_manager_get_object_path")
364	core.PuregoSafeRegister(&XGDbusObjectManagerGetObjects, libs, "g_dbus_object_manager_get_objects")
365
366}

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