// 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/v4/gobject/types" ) type NativeVolumeMonitorClass struct { _ structs.HostLayout ParentClass VolumeMonitorClass xGetMountForMountPath uintptr } func (x *NativeVolumeMonitorClass) GoPointer() uintptr { return uintptr(unsafe.Pointer(x)) } // OverrideGetMountForMountPath sets the "get_mount_for_mount_path" callback function. func (x *NativeVolumeMonitorClass) OverrideGetMountForMountPath(cb func(string, *Cancellable) *MountBase) { if cb == nil { x.xGetMountForMountPath = 0 } else { x.xGetMountForMountPath = purego.NewCallback(func(MountPathVarp string, CancellableVarp uintptr) uintptr { ret := cb(MountPathVarp, CancellableNewFromInternalPtr(CancellableVarp)) if ret == nil { return 0 } return ret.GoPointer() }) } } // GetGetMountForMountPath gets the "get_mount_for_mount_path" callback function. func (x *NativeVolumeMonitorClass) GetGetMountForMountPath() func(string, *Cancellable) *MountBase { if x.xGetMountForMountPath == 0 { return nil } var rawCallback func(MountPathVarp string, CancellableVarp uintptr) uintptr purego.RegisterFunc(&rawCallback, x.xGetMountForMountPath) return func(MountPathVar string, CancellableVar *Cancellable) *MountBase { rawRet := rawCallback(MountPathVar, CancellableVar.GoPointer()) if rawRet == 0 { return nil } ret := &MountBase{} ret.Ptr = rawRet return ret } } const ( NATIVE_VOLUME_MONITOR_EXTENSION_POINT_NAME string = "gio-native-volume-monitor" ) type NativeVolumeMonitor struct { VolumeMonitor } var xNativeVolumeMonitorGLibType func() types.GType func NativeVolumeMonitorGLibType() types.GType { return xNativeVolumeMonitorGLibType() } func NativeVolumeMonitorNewFromInternalPtr(ptr uintptr) *NativeVolumeMonitor { cls := &NativeVolumeMonitor{} cls.Ptr = ptr return cls } func (c *NativeVolumeMonitor) GoPointer() uintptr { if c == nil { return 0 } return c.Ptr } func (c *NativeVolumeMonitor) SetGoPointer(ptr uintptr) { c.Ptr = ptr }