Package org.gnome.gio
Class UnixMountMonitor
java.lang.Object
io.github.jwharm.javagi.base.ProxyInstance
org.gnome.gobject.TypeInstance
org.gnome.gobject.GObject
org.gnome.gio.UnixMountMonitor
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
UnixMountMonitor.Builder<B extends UnixMountMonitor.Builder<B>>
Inner class implementing a builder pattern to construct a GObject with properties.static interface
Functional interface declaration of theMountpointsChangedCallback
callback.static interface
Functional interface declaration of theMountsChangedCallback
callback.static class
Nested classes/interfaces inherited from class org.gnome.gobject.GObject
GObject.NotifyCallback, GObject.ObjectClass
-
Constructor Summary
ConstructorDescriptionDeprecated.Use g_unix_mount_monitor_get() instead.UnixMountMonitor
(MemorySegment address) Create a UnixMountMonitor proxy instance for the provided memory address. -
Method Summary
Modifier and TypeMethodDescriptionprotected UnixMountMonitor
asParent()
Returns this instance as if it were its parent type.static UnixMountMonitor.Builder
<? extends UnixMountMonitor.Builder> builder()
AUnixMountMonitor.Builder
object constructs aUnixMountMonitor
with the specified properties.void
Emits the "mountpoints-changed" signal.void
Emits the "mounts-changed" signal.static UnixMountMonitor
get()
Gets theGUnixMountMonitor
for the current thread-default main context.static Type
getType()
Get the GType of the UnixMountMonitor classEmitted when the unix mount points have changed.Emitted when the unix mounts have changed.void
setRateLimit
(int limitMsec) Deprecated.This function does nothing.Methods inherited from class org.gnome.gobject.GObject
addToggleRef, addWeakPointer, bindProperty, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, connect, constructed, disconnect, dispatchPropertiesChanged, dispose, dupData, dupQdata, emit, emitNotify, finalize_, forceFloating, freezeNotify, get, getData, getMemoryLayout, getProperty, getProperty, getProperty, getQdata, getv, interfaceFindProperty, interfaceInstallProperty, interfaceListProperties, isFloating, newInstance, newInstance, newInstance, newInstance, newv, notify_, notify_, notifyByPspec, onNotify, ref, refSink, removeToggleRef, removeWeakPointer, replaceData, replaceQdata, runDispose, set, setData, setDataFull, setProperty, setProperty, setProperty, setQdata, setQdataFull, setv, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref, withProperties
Methods inherited from class org.gnome.gobject.TypeInstance
callParent, callParent, getPrivate, readGClass, writeGClass
Methods inherited from class io.github.jwharm.javagi.base.ProxyInstance
equals, handle, hashCode
-
Constructor Details
-
UnixMountMonitor
Create a UnixMountMonitor proxy instance for the provided memory address.- Parameters:
address
- the memory address of the native object
-
UnixMountMonitor
Deprecated.Use g_unix_mount_monitor_get() instead.Deprecated alias for g_unix_mount_monitor_get().This function was never a true constructor, which is why it was renamed.
- Throws:
UnsupportedPlatformException
- when run on a platform other than linux or macos
-
-
Method Details
-
getType
-
asParent
Returns this instance as if it were its parent type. This is mostly synonymous to the Javasuper
keyword, but will set the native typeclass function pointers to the parent type. When overriding a native virtual method in Java, "chaining up" withsuper.methodName()
doesn't work, because it invokes the overridden function pointer again. To chain up, callasParent().methodName()
. This will call the native function pointer of this virtual method in the typeclass of the parent type. -
get
Gets theGUnixMountMonitor
for the current thread-default main context.The mount monitor can be used to monitor for changes to the list of mounted filesystems as well as the list of mount points (ie: fstab entries).
You must only call g_object_unref() on the return value from under the same main context as you called this function.
- Returns:
- the
GUnixMountMonitor
. - Throws:
UnsupportedPlatformException
- when run on a platform other than linux or macos
-
setRateLimit
Deprecated.This function does nothing. Don't call it.This function does nothing.Before 2.44, this was a partially-effective way of controlling the rate at which events would be reported under some uncommon circumstances. Since this UnixMountMonitor is a singleton, it also meant that calling this function would have side effects for other users of the monitor.
- Parameters:
limitMsec
- a integer with the limit in milliseconds to poll for changes.
-
onMountpointsChanged
public SignalConnection<UnixMountMonitor.MountpointsChangedCallback> onMountpointsChanged(UnixMountMonitor.MountpointsChangedCallback handler) Emitted when the unix mount points have changed.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitMountpointsChanged
public void emitMountpointsChanged()Emits the "mountpoints-changed" signal. SeeonMountpointsChanged(org.gnome.gio.UnixMountMonitor.MountpointsChangedCallback)
. -
onMountsChanged
public SignalConnection<UnixMountMonitor.MountsChangedCallback> onMountsChanged(UnixMountMonitor.MountsChangedCallback handler) Emitted when the unix mounts have changed.- Parameters:
handler
- the signal handler- Returns:
- a signal handler ID to keep track of the signal connection
- See Also:
-
emitMountsChanged
public void emitMountsChanged()Emits the "mounts-changed" signal. SeeonMountsChanged(org.gnome.gio.UnixMountMonitor.MountsChangedCallback)
. -
builder
AUnixMountMonitor.Builder
object constructs aUnixMountMonitor
with the specified properties. Use the variousset...()
methods to set properties, and finish construction withUnixMountMonitor.Builder.build()
.
-