// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "structs" "unsafe" "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/glib" "github.com/bnema/puregotk/v4/gobject" "github.com/bnema/puregotk/v4/gobject/types" ) // Class structure for #GDBusObjectProxy. type DBusObjectProxyClass struct { _ structs.HostLayout ParentClass gobject.ObjectClass Padding [8]uintptr } func (x *DBusObjectProxyClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } type DBusObjectProxyPrivate struct { _ structs.HostLayout } func (x *DBusObjectProxyPrivate) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // A `GDBusObjectProxy` is an object used to represent a remote object // with one or more D-Bus interfaces. Normally, you don’t instantiate // a `GDBusObjectProxy` yourself — typically [class@Gio.DBusObjectManagerClient] // is used to obtain it. type DBusObjectProxy struct { gobject.Object } var xDBusObjectProxyGLibType func() types.GType func DBusObjectProxyGLibType() types.GType { return xDBusObjectProxyGLibType() } func DBusObjectProxyNewFromInternalPtr(ptr uintptr) *DBusObjectProxy { cls := &DBusObjectProxy{} cls.Ptr = ptr return cls } var xNewDBusObjectProxy func(uintptr, string) uintptr // Creates a new #GDBusObjectProxy for the given connection and // object path. func NewDBusObjectProxy(ConnectionVar *DBusConnection, ObjectPathVar string) *DBusObjectProxy { var cls *DBusObjectProxy cret := xNewDBusObjectProxy(ConnectionVar.GoPointer(), ObjectPathVar) if cret == 0 { return nil } cls = &DBusObjectProxy{} cls.Ptr = cret return cls } var xDBusObjectProxyGetConnection func(uintptr) uintptr // Gets the connection that @proxy is for. func (x *DBusObjectProxy) GetConnection() *DBusConnection { var cls *DBusConnection cret := xDBusObjectProxyGetConnection(x.GoPointer()) if cret == 0 { return nil } gobject.IncreaseRef(cret) cls = &DBusConnection{} cls.Ptr = cret return cls } func (c *DBusObjectProxy) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *DBusObjectProxy) SetGoPointer(ptr uintptr) { c.Ptr = ptr } // SetPropertyGObjectPath sets the "g-object-path" property. // The object path of the proxy. func (x *DBusObjectProxy) SetPropertyGObjectPath(value string) { var v gobject.Value v.Init(gobject.TypeStringVal) v.SetString(&value) x.SetProperty("g-object-path", &v) } // GetPropertyGObjectPath gets the "g-object-path" property. // The object path of the proxy. func (x *DBusObjectProxy) GetPropertyGObjectPath() string { var v gobject.Value x.GetProperty("g-object-path", &v) return v.GetString() } // Gets the D-Bus interface with name @interface_name associated with // @object, if any. func (x *DBusObjectProxy) GetInterface(InterfaceNameVar string) *DBusInterfaceBase { var cls *DBusInterfaceBase cret := XGDbusObjectGetInterface(x.GoPointer(), InterfaceNameVar) if cret == 0 { return nil } cls = &DBusInterfaceBase{} cls.Ptr = cret return cls } // Gets the D-Bus interfaces associated with @object. func (x *DBusObjectProxy) GetInterfaces() *glib.List { cret := XGDbusObjectGetInterfaces(x.GoPointer()) return cret } // Gets the object path for @object. func (x *DBusObjectProxy) GetObjectPath() string { cret := XGDbusObjectGetObjectPath(x.GoPointer()) return cret } func init() { core.SetPackageName("GIO", "gio-2.0") core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"}) var libs []uintptr for _, libPath := range core.GetPaths("GIO") { lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) if err != nil { panic(err) } libs = append(libs, lib) } core.PuregoSafeRegister(&xDBusObjectProxyGLibType, libs, "g_dbus_object_proxy_get_type") core.PuregoSafeRegister(&xNewDBusObjectProxy, libs, "g_dbus_object_proxy_new") core.PuregoSafeRegister(&xDBusObjectProxyGetConnection, libs, "g_dbus_object_proxy_get_connection") }