| Libfm Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | ||||
struct FmFileLauncher; enum FmFileLauncherExecAction; gboolean (*FmLaunchFolderFunc) (GAppLaunchContext *ctx,GList *folder_infos,gpointer user_data,GError **err); gboolean fm_launch_desktop_entry (GAppLaunchContext *ctx,const char *file_or_id,GList *uris,FmFileLauncher *launcher,gpointer user_data); gboolean fm_launch_files (GAppLaunchContext *ctx,GList *file_infos,FmFileLauncher *launcher,gpointer user_data); gboolean fm_launch_paths (GAppLaunchContext *ctx,GList *paths,FmFileLauncher *launcher,gpointer user_data);
struct FmFileLauncher {
GAppInfo* (*get_app)(GList* file_infos, FmMimeType* mime_type, gpointer user_data, GError** err);
/* gboolean (*before_open)(GAppLaunchContext* ctx, GList* folder_infos, gpointer user_data); */
FmLaunchFolderFunc open_folder;
FmFileLauncherExecAction (*exec_file)(FmFileInfo* file, gpointer user_data);
/* returns TRUE to continue, FALSE to retry */
gboolean (*error)(GAppLaunchContext* ctx, GError* err, FmPath* file, gpointer user_data);
int (*ask)(const char* msg, char* const* btn_labels, int default_btn, gpointer user_data);
};
| callback to get new GAppInfo | |
FmLaunchFolderFunc |
callback to open folders |
| callback to select file execution mode | |
| callback to show error message; returns TRUE to continue, FALSE to retry | |
| callback to ask for user interaction; returns choise from btn_labels |
typedef enum {
FM_FILE_LAUNCHER_EXEC = 1,
FM_FILE_LAUNCHER_EXEC_IN_TERMINAL,
FM_FILE_LAUNCHER_EXEC_OPEN,
FM_FILE_LAUNCHER_EXEC_CANCEL
} FmFileLauncherExecAction;
gboolean (*FmLaunchFolderFunc) (GAppLaunchContext *ctx,GList *folder_infos,gpointer user_data,GError **err);
gboolean fm_launch_desktop_entry (GAppLaunchContext *ctx,const char *file_or_id,GList *uris,FmFileLauncher *launcher,gpointer user_data);
Launches a desktop entry with optional files.
|
a launch context. [allow-none] |
|
a desktop entry to launch |
|
files to use in run substitutions. [element-type char *] |
|
FmFileLauncher with callbacks |
|
data supplied for callbacks |
Returns : |
TRUE in case of success. |
Since 0.1.0
gboolean fm_launch_files (GAppLaunchContext *ctx,GList *file_infos,FmFileLauncher *launcher,gpointer user_data);
Launches files using callbacks in launcher.
|
a launch context. [allow-none] |
|
files to launch. [element-type FmFileInfo] |
|
FmFileLauncher with callbacks |
|
data supplied for callbacks |
Returns : |
TRUE in case of success. |
Since 0.1.0
gboolean fm_launch_paths (GAppLaunchContext *ctx,GList *paths,FmFileLauncher *launcher,gpointer user_data);
Launches files using callbacks in launcher.
|
a launch context. [allow-none] |
|
files to launch. [element-type FmPath] |
|
FmFileLauncher with callbacks |
|
data supplied for callbacks |
Returns : |
TRUE in case of success. |
Since 0.1.0