## Gtk file launcher Gtk file launcher — Gtk file launcher utilities. |

## Functions

gboolean | fm_launch_command_simple ()
gboolean | fm_launch_desktop_entry_simple ()
gboolean | fm_launch_file_simple ()
gboolean | fm_launch_files_simple ()
gboolean | fm_launch_path_simple ()
gboolean | fm_launch_paths_simple ()
gboolean | fm_launch_search_simple ()

## Description

`include` : libfm/fm-gtk.h

Utilities to launch files using libfm file launchers.

## Functions

### fm_launch_command_simple ()

    gboolean
    fm_launch_command_simple (GtkWindow *parent,
                              GAppLaunchContext *ctx,
                              GAppInfoCreateFlags flags,
                              const char *cmd,
                              FmPathList *files);

Launches command. `files` will be supplied to launch if `cmd` accepts arguments. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching the command.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
flags | flags to launch command |
cmd | command to launch |
files | files to supply launch. | [allow-none]

#### Returns

`TRUE` if launch was succesful.

Since: 1.2.0

### fm_launch_desktop_entry_simple ()

    gboolean
    fm_launch_desktop_entry_simple (GtkWindow *parent,
                                    GAppLaunchContext *ctx,
                                    FmFileInfo *entry,
                                    FmPathList *files);

Launches desktop entry. `files` will be supplied to launch if `entry` accepts arguments. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching the application.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
entry | desktop entry file to launch |
files | files to supply launch. | [allow-none]

#### Returns

`TRUE` if launch was succesful.

Since: 1.0.1

### fm_launch_file_simple ()

    gboolean
    fm_launch_file_simple (GtkWindow *parent,
                           GAppLaunchContext *ctx,
                           FmFileInfo *file_info,
                           FmLaunchFolderFunc func,
                           gpointer user_data);

Launches file. If `file_info` is folder then uses `func` to launch it. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
file_info | file to launch |
func | callback to launch folder |
user_data | data supplied for `func` |

#### Returns

`TRUE` if launch was succesful.

Since: 0.1.0

### fm_launch_files_simple ()

    gboolean
    fm_launch_files_simple (GtkWindow *parent,
                            GAppLaunchContext *ctx,
                            GList *file_infos,
                            FmLaunchFolderFunc func,
                            gpointer user_data);

Launches files using `func` to launch folders. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
file_infos | files to launch. | [element-type FmFileInfo]
func | callback to launch folder |
user_data | data supplied for `func` |

#### Returns

`TRUE` if launch was succesful.

Since: 0.1.0

### fm_launch_path_simple ()

    gboolean
    fm_launch_path_simple (GtkWindow *parent,
                           GAppLaunchContext *ctx,
                           FmPath *path,
                           FmLaunchFolderFunc func,
                           gpointer user_data);

Launches file. If `path` is folder then uses `func` to launch it. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
path | file to launch |
func | callback to launch folder |
user_data | data supplied for `func` |

#### Returns

`TRUE` if launch was succesful.

Since: 0.1.0

### fm_launch_paths_simple ()

    gboolean
    fm_launch_paths_simple (GtkWindow *parent,
                            GAppLaunchContext *ctx,
                            GList *paths,
                            FmLaunchFolderFunc func,
                            gpointer user_data);

Launches files using `func` to launch folders. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
paths | files to launch. | [element-type FmPath]
func | callback to launch folder |
user_data | data supplied for `func` |

#### Returns

`TRUE` if launch was succesful.

Since: 0.1.0

### fm_launch_search_simple ()

    gboolean
    fm_launch_search_simple (GtkWindow *parent,
                             GAppLaunchContext *ctx,
                             const GList *paths,
                             FmLaunchFolderFunc func,
                             gpointer user_data);

Launches filesystem search. Uses `func` to open folder with search results. If `ctx` is `NULL` then new context on the same screen as `parent` will be created for launching.

#### Parameters

parent | window to determine launch screen. | [allow-none]
ctx | launch context. | [allow-none]
paths | paths to set initial search paths list. | [allow-none][element-type FmPath]
func | callback to launch folder |
user_data | data supplied for `func` |

#### Returns

`TRUE` if launch was succesful.

Since: 1.0.2

## Types and Values