![]() |
![]() |
![]() |
Thunar-VFS Reference Manual | ![]() |
---|---|---|---|---|
#include <thunar-vfs/thunar-vfs.h> enum ThunarVfsJobResponse; ThunarVfsJob; ThunarVfsJob* thunar_vfs_job_launch (ThunarVfsJob *job); void thunar_vfs_job_cancel (ThunarVfsJob *job); gboolean thunar_vfs_job_cancelled (const ThunarVfsJob *job);
"ask" : Run Last / No Hooks "error" : No Hooks "finished" : No Hooks "info-message" : No Hooks "infos-ready" : No Hooks "new-files" : No Hooks "percent" : No Hooks
typedef enum /*< flags >*/ { THUNAR_VFS_JOB_RESPONSE_YES = 1 << 0, THUNAR_VFS_JOB_RESPONSE_YES_ALL = 1 << 1, THUNAR_VFS_JOB_RESPONSE_NO = 1 << 2, THUNAR_VFS_JOB_RESPONSE_CANCEL = 1 << 3, THUNAR_VFS_JOB_RESPONSE_NO_ALL = 1 << 4, } ThunarVfsJobResponse;
Possible responses for the ThunarVfsJob::ask signal.
ThunarVfsJob* thunar_vfs_job_launch (ThunarVfsJob *job);
This functions schedules job to be run as soon as possible, in a separate thread.
job : | a ThunarVfsJob. |
Returns : | a pointer to job. |
void thunar_vfs_job_cancel (ThunarVfsJob *job);
Attempts to cancel the operation currently performed by job. Even after the cancellation of job, it may still emit signals, so you must take care of disconnecting all handlers appropriately if you cannot handle signals after cancellation.
job : | a ThunarVfsJob. |
gboolean thunar_vfs_job_cancelled (const ThunarVfsJob *job);
Checks whether job was previously cancelled by a call to thunar_vfs_job_cancel().
job : | a ThunarVfsJob. |
Returns : | TRUE if job is cancelled. |
ThunarVfsJobResponseuser_function (ThunarVfsJob *thunarvfsjob, gchar *arg1, ThunarVfsJobResponse arg2, gpointer user_data) : Run Last / No Hooks
thunarvfsjob : | the object which received the signal. |
arg1 : | |
arg2 : | |
user_data : | user data set when the signal handler was connected. |
Returns : |
void user_function (ThunarVfsJob *job, gpointer error, gpointer user_data) : No Hooks
Emitted whenever an error occurs while executing the job.
job : | a ThunarVfsJob. |
error : | a GError describing the cause. |
user_data : | user data set when the signal handler was connected. |
void user_function (ThunarVfsJob *job, gpointer user_data) : No Hooks
This signal will be automatically emitted once the job finishes its execution, no matter whether job completed successfully or was cancelled by the user.
job : | a ThunarVfsJob. |
user_data : | user data set when the signal handler was connected. |
void user_function (ThunarVfsJob *job, gchar *message, gpointer user_data) : No Hooks
This signal is emitted to display information about the job. Examples of messages are "Preparing..." or "Cleaning up...".
The message is garantied to contain valid UTF-8, so it can be displayed by GtkWidgets out of the box.
job : | a ThunarVfsJob. |
message : | information to be displayed about job. |
user_data : | user data set when the signal handler was connected. |
gboolean user_function (ThunarVfsJob *job, gpointer info_list, gpointer user_data) : No Hooks
This signal is used by ThunarVfsJobs returned by the thunar_vfs_listdir() function whenever there's a bunch of ThunarVfsInfos ready. This signal is garantied to be never emitted with an info_list parameter of NULL.
To allow some further optimizations on the handler-side, the handler is allowed to take over ownership of the info_list, i.e. it can reuse the infos list and just replace the data elements with it's own objects based on the ThunarVfsInfos contained within the info_list (and of course properly unreffing the previously contained infos). If a handler takes over ownership of info_list it must return TRUE here, and no further handlers will be run. Else, if the handler doesn't want to take over ownership of infos, it must return FALSE, and other handlers will be run. Use this feature with care, and only if you can be sure that you are the only handler connected to this signal for a given job!
job : | a ThunarVfsJob. |
info_list : | a list of ThunarVfsInfos. |
user_data : | user data set when the signal handler was connected. |
Returns : | TRUE if the handler took over ownership of info_list, else FALSE. |
void user_function (ThunarVfsJob *job, gpointer path_list, gpointer user_data) : No Hooks
This signal is emitted by the job right before the job is terminated and informs the application about the list of created files in path_list. path_list contains only the toplevel path items, that were specified by the application on creation of the job.
job : | a ThunarVfsJob. |
path_list : | a list of ThunarVfsPaths that were created by job. |
user_data : | user data set when the signal handler was connected. |
void user_function (ThunarVfsJob *job, gdouble percent, gpointer user_data) : No Hooks
This signal is emitted to present the state of the overall progress.
The percent value is garantied to be in the range 0.0 to 100.0.
job : | a ThunarVfsJob. |
percent : | the percentage of completeness. |
user_data : | user data set when the signal handler was connected. |