Top | ![]() |
![]() |
![]() |
![]() |
void (*ThunarVfsMonitorCallback) (ThunarVfsMonitor *monitor
,ThunarVfsMonitorHandle *handle
,ThunarVfsMonitorEvent event
,ThunarVfsPath *handle_path
,ThunarVfsPath *event_path
,gpointer user_data
);
The prototype for callback functions that will be called by a ThunarVfsMonitor whenever one of its associated ThunarVfsMonitorHandles notice a change.
monitor |
||
handle |
||
event |
the event that occurred. |
|
handle_path |
the ThunarVfsPath that was specified when registering the |
|
event_path |
the ThunarVfsPath on which the |
|
user_data |
the user data that was specified when registering the |
ThunarVfsMonitor *
thunar_vfs_monitor_get_default (void
);
Returns the shared ThunarVfsMonitor instance. The caller
is responsible to call g_object_unref()
on the returned
object when no longer needed.
ThunarVfsMonitorHandle * thunar_vfs_monitor_add_directory (ThunarVfsMonitor *monitor
,ThunarVfsPath *path
,ThunarVfsMonitorCallback callback
,gpointer user_data
);
Registers path
as directory for monitor
. monitor
will invoke
callback
whenever it notices a change to the directory to which
path
refers or any of the files within the directory.
The returned ThunarVfsMonitorHandle can be used to remove
the path
from monitor
using thunar_vfs_monitor_remove()
.
monitor |
||
path |
the ThunarVfsPath of the directory that should be watched. |
|
callback |
the callback function to invoke. |
|
user_data |
additional data to pass to |
ThunarVfsMonitorHandle * thunar_vfs_monitor_add_file (ThunarVfsMonitor *monitor
,ThunarVfsPath *path
,ThunarVfsMonitorCallback callback
,gpointer user_data
);
Registers path
as file with monitor
. monitor
will then invoke
callback
whenever it notices a change to the file to which
path
refers.
The returned ThunarVfsMonitorHandle can be used to remove
the path
from monitor
using thunar_vfs_monitor_remove()
.
monitor |
||
path |
the ThunarVfsPath of the file that should be watched. |
|
callback |
the callback function to invoke. |
|
user_data |
additional data to pass to |
void thunar_vfs_monitor_remove (ThunarVfsMonitor *monitor
,ThunarVfsMonitorHandle *handle
);
Removes handle
from monitor
.
void thunar_vfs_monitor_feed (ThunarVfsMonitor *monitor
,ThunarVfsMonitorEvent event
,ThunarVfsPath *path
);
Explicitly injects the given event
into monitor
s event
processing logic.
monitor |
||
event |
the ThunarVfsMonitorEvent that should be emulated. |
|
path |
the ThunarVfsPath on which |
void
thunar_vfs_monitor_wait (ThunarVfsMonitor *monitor
);
Suspends the execution of the current thread until the
monitor
has processed all currently pending events. The
calling thread must own a reference on the monitor
!
This method should never be called from the main thread or you'll lock up your application!!
typedef struct _ThunarVfsMonitor ThunarVfsMonitor;
The ThunarVfsMonitor contains private data only, and should be accessed using the functions below.
typedef struct _ThunarVfsMonitorHandle ThunarVfsMonitorHandle;
A handle on a file system entity, which is currently watched by a ThunarVfsMonitor.