Package ch.bailu.gtk.gio
Klasse FileMonitor
java.lang.Object
ch.bailu.gtk.type.Type
ch.bailu.gtk.type.Pointer
ch.bailu.gtk.gobject.Object
ch.bailu.gtk.type.PropertyHolder
ch.bailu.gtk.gio.FileMonitor
- Alle implementierten Schnittstellen:
PointerInterface
Monitors a file or directory for changes.
To obtain a `GFileMonitor` for a file or directory, use
[method@Gio.File.monitor], [method@Gio.File.monitor_file], or
[method@Gio.File.monitor_directory].
To get informed about changes to the file or directory you are
monitoring, connect to the [signal@Gio.FileMonitor::changed] signal. The
signal will be emitted in the thread-default main context (see
[method@GLib.MainContext.push_thread_default]) of the thread that the monitor
was created in (though if the global default main context is blocked, this
may cause notifications to be blocked even if the thread-default
context is still running).
To obtain a `GFileMonitor` for a file or directory, use
[method@Gio.File.monitor], [method@Gio.File.monitor_file], or
[method@Gio.File.monitor_directory].
To get informed about changes to the file or directory you are
monitoring, connect to the [signal@Gio.FileMonitor::changed] signal. The
signal will be emitted in the thread-default main context (see
[method@GLib.MainContext.push_thread_default]) of the thread that the monitor
was created in (though if the global default main context is blocked, this
may cause notifications to be blocked even if the thread-default
context is still running).
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenVon Klasse geerbte verschachtelte Klassen/Schnittstellen ch.bailu.gtk.gobject.Object
Object.OnBindingTransformFunc, Object.OnDestroyNotify, Object.OnDuplicateFunc, Object.OnNotify, Object.OnToggleNotify, Object.OnWeakNotify
-
Feldübersicht
FelderVon Klasse geerbte Felder ch.bailu.gtk.gobject.Object
SIGNAL_ON_NOTIFY
-
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungboolean
cancel()
Cancels a file monitor.void
Emits the #GFileMonitor::changed signal if a change
has taken place.static ClassHandler
static int
static long
static TypeSystem.TypeSize
static long
static TypeSystem.TypeSize
boolean
Returns whether the monitor is canceled.onChanged
(FileMonitor.OnChanged signal) Connect to signal "changed".void
setRateLimit
(int limit_msecs) Sets the rate limit to which the @monitor will report
consecutive change events to the same file.Von Klasse geerbte Methoden ch.bailu.gtk.type.PropertyHolder
getBooleanProperty, getIntProperty, getObjectProperty, getStringProperty, getStrProperty, setBooleanProperty, setIntProperty, setObjectProperty, setStringProperty, setStrProperty
Von Klasse geerbte Methoden ch.bailu.gtk.gobject.Object
addToggleRef, bindProperty, bindProperty, bindPropertyFull, bindPropertyFull, bindPropertyWithClosures, bindPropertyWithClosures, compatControl, connect, connect, disconnect, disconnect, dupData, dupData, dupQdata, forceFloating, freezeNotify, get, get, getData, getData, getProperty, getProperty, getQdata, interfaceFindProperty, interfaceInstallProperty, isFloating, notify, notify, notifyByPspec, onNotify, ref, refSink, removeToggleRef, replaceData, replaceData, replaceQdata, runDispose, set, set, setData, setData, setDataFull, setDataFull, setProperty, setProperty, setQdata, setQdataFull, stealData, stealData, stealQdata, takeRef, thawNotify, unref, watchClosure, weakRef, weakUnref
Von Klasse geerbte Methoden ch.bailu.gtk.type.Pointer
asCPointer, cast, connectSignal, disconnectSignals, disconnectSignals, equals, hashCode, throwIfNull, throwNullPointerException, toString, unregisterCallbacks, unregisterCallbacks
Von Klasse geerbte Methoden ch.bailu.gtk.type.Type
asCPointer, asCPointer, asCPointerNotNull, asJnaPointer, asJnaPointer, asPointer, asPointer, cast, cast, throwIfNull
Von Klasse geerbte Methoden java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Von Schnittstelle geerbte Methoden ch.bailu.gtk.type.PointerInterface
asCPointerNotNull, asJnaPointer, asPointer, isNotNull, isNull
-
Felddetails
-
SIGNAL_ON_CHANGED
- Siehe auch:
-
-
Konstruktordetails
-
FileMonitor
-
-
Methodendetails
-
getClassHandler
-
cancel
public boolean cancel()Cancels a file monitor.- Gibt zurück:
- always %TRUE
-
emitEvent
Emits the #GFileMonitor::changed signal if a change
has taken place. Should be called from file monitor
implementations only.
Implementations are responsible to call this method from the
thread-default main context (see [method@GLib.MainContext.push_thread_default])
of the thread that the monitor was created in.- Parameter:
child
- a #GFile.other_file
- a #GFile.event_type
- a set of #GFileMonitorEvent flags.
-
isCancelled
public boolean isCancelled()Returns whether the monitor is canceled.- Gibt zurück:
- %TRUE if monitor is canceled. %FALSE otherwise.
-
setRateLimit
public void setRateLimit(int limit_msecs) Sets the rate limit to which the @monitor will report
consecutive change events to the same file.- Parameter:
limit_msecs
- a non-negative integer with the limit in milliseconds to poll for changes
-
onChanged
Connect to signal "changed".
SeeFileMonitor.OnChanged.onChanged(ch.bailu.gtk.gio.File, ch.bailu.gtk.gio.File, int)
for signal description.
FieldSIGNAL_ON_CHANGED
contains original signal name and can be used as resource reference.- Parameter:
signal
- callback function (lambda).- Gibt zurück:
SignalHandler
. Can be used to disconnect signal and to release callback function.
-
getTypeID
public static long getTypeID() -
getParentTypeID
public static long getParentTypeID() -
getTypeSize
-
getParentTypeSize
-
getInstanceSize
public static int getInstanceSize()
-