// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT package gio import ( "github.com/ebitengine/purego" "github.com/bnema/puregotk/pkg/core" "github.com/bnema/puregotk/v4/gobject/types" ) // `GDBusMenuModel` is an implementation of [class@Gio.MenuModel] that can be // used as a proxy for a menu model that is exported over D-Bus with // [method@Gio.DBusConnection.export_menu_model]. type DBusMenuModel struct { MenuModel } var xDBusMenuModelGLibType func() types.GType func DBusMenuModelGLibType() types.GType { return xDBusMenuModelGLibType() } func DBusMenuModelNewFromInternalPtr(ptr uintptr) *DBusMenuModel { cls := &DBusMenuModel{} cls.Ptr = ptr return cls } func (c *DBusMenuModel) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *DBusMenuModel) SetGoPointer(ptr uintptr) { c.Ptr = ptr } var xDBusMenuModelGet func(uintptr, uintptr, string) uintptr // Obtains a #GDBusMenuModel for the menu model which is exported // at the given @bus_name and @object_path. // // The thread default main context is taken at the time of this call. // All signals on the menu model (and any linked models) are reported // with respect to this context. All calls on the returned menu model // (and linked models) must also originate from this same context, with // the thread default main context unchanged. func DBusMenuModelGet(ConnectionVar *DBusConnection, BusNameVar *string, ObjectPathVar string) *DBusMenuModel { var cls *DBusMenuModel BusNameVarPtr := core.GStrdupNullable(BusNameVar) defer core.GFreeNullable(BusNameVarPtr) cret := xDBusMenuModelGet(ConnectionVar.GoPointer(), BusNameVarPtr, ObjectPathVar) if cret == 0 { return nil } cls = &DBusMenuModel{} cls.Ptr = cret return cls } 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(&xDBusMenuModelGLibType, libs, "g_dbus_menu_model_get_type") core.PuregoSafeRegister(&xDBusMenuModelGet, libs, "g_dbus_menu_model_get") }