21 #ifndef FM_FILELAUNCHER_H 22 #define FM_FILELAUNCHER_H 24 #include "libfmqtglobals.h" 35 bool launchFiles(QWidget* parent, FmFileInfoList* file_infos) {
36 GList* fileList = fm_file_info_list_peek_head_link(file_infos);
37 return launchFiles(parent, fileList);
39 bool launchPaths(QWidget* parent, FmPathList* paths) {
40 GList* pathList = fm_path_list_peek_head_link(paths);
41 return launchPaths(parent, pathList);
44 bool launchFiles(QWidget* parent, GList* file_infos);
45 bool launchPaths(QWidget* parent, GList* paths);
47 bool quickExec()
const {
51 void setQuickExec(
bool value) {
57 virtual GAppInfo* getApp(GList* file_infos, FmMimeType* mime_type, GError** err);
58 virtual bool openFolder(GAppLaunchContext* ctx, GList* folder_infos, GError** err);
59 virtual FmFileLauncherExecAction execFile(FmFileInfo* file);
60 virtual bool error(GAppLaunchContext* ctx, GError* err, FmPath* path);
61 virtual int ask(
const char* msg,
char*
const* btn_labels,
int default_btn);
64 static GAppInfo* _getApp(GList* file_infos, FmMimeType* mime_type, gpointer user_data, GError** err) {
65 return reinterpret_cast<FileLauncher*
>(user_data)->getApp(file_infos, mime_type, err);
67 static gboolean _openFolder(GAppLaunchContext* ctx, GList* folder_infos, gpointer user_data, GError** err) {
68 return reinterpret_cast<FileLauncher*
>(user_data)->openFolder(ctx, folder_infos, err);
70 static FmFileLauncherExecAction _execFile(FmFileInfo* file, gpointer user_data) {
71 return reinterpret_cast<FileLauncher*
>(user_data)->execFile(file);
73 static gboolean _error(GAppLaunchContext* ctx, GError* err, FmPath* file, gpointer user_data) {
74 return reinterpret_cast<FileLauncher*
>(user_data)->error(ctx, err, file);
76 static int _ask(
const char* msg,
char*
const* btn_labels,
int default_btn, gpointer user_data) {
77 return reinterpret_cast<FileLauncher*
>(user_data)->ask(msg, btn_labels, default_btn);
81 static FmFileLauncher funcs;
87 #endif // FM_FILELAUNCHER_H Definition: appchoosercombobox.cpp:26
Definition: filelauncher.h:30