## GAppInfo extensions GAppInfo extensions — FM application launch handlers |

## Functions

GAppInfo * | fm_app_info_create_from_commandline ()
gboolean | fm_app_info_launch ()
gboolean | fm_app_info_launch_default_for_uri ()
gboolean | fm_app_info_launch_uris ()

## Description

`include` : libfm/fm.h

## Functions

### fm_app_info_create_from_commandline ()

    GAppInfo *
    fm_app_info_create_from_commandline (const char *commandline,
                                         const char *application_name,
                                         GAppInfoCreateFlags flags,
                                         GError **error);

Creates a new GAppInfo from the given information.

Note that for `commandline` , the quoting rules of the Exec key of the

freedesktop.org Desktop Entry Specification are applied. For example, if the `commandline` contains

percent-encoded URIs, the percent-character must be doubled in order to prevent it from being swallowed by Exec key unquoting. See the specification for exact quoting rules.

#### Parameters

commandline | the commandline to use |
application_name | the application name, or `NULL` to use `commandline` . | [allow-none]
flags | flags that can specify details of the created GAppInfo |
error | location to store error. | [out][allow-none]

#### Returns

new GAppInfo for given command.

[transfer full]

Since: 0.1.15

### fm_app_info_launch ()

    gboolean
    fm_app_info_launch (GAppInfo *appinfo,
                        GList *files,
                        GAppLaunchContext *launch_context,
                        GError **error);

Launches desktop application doing substitutions in application info.

#### Parameters

appinfo | application info to launch |
files | files to use in run substitutions. | [element-type GFile]
launch_context | a launch context. | [allow-none]
error | location to store error. | [out][allow-none]

#### Returns

`TRUE` if application was launched.

Since: 0.1.15

### fm_app_info_launch_default_for_uri ()

    gboolean
    fm_app_info_launch_default_for_uri (const char *uri,
                                        GAppLaunchContext *launch_context,
                                        GError **error);

Utility function that launches the default application registered to handle the specified uri. Synchronous I/O is done on the uri to detect the type of the file if required.

#### Parameters

uri | the uri to show |
launch_context | a launch context. | [allow-none]
error | location to store error. | [out][allow-none]

#### Returns

`TRUE` if application was launched.

Since: 0.1.15

### fm_app_info_launch_uris ()

    gboolean
    fm_app_info_launch_uris (GAppInfo *appinfo,
                             GList *uris,
                             GAppLaunchContext *launch_context,
                             GError **error);

Launches desktop application doing substitutions in application info.

#### Parameters

appinfo | application info to launch |
uris | URIs to use in run substitutions. | [element-type char *]
launch_context | a launch context. | [allow-none]
error | location to store error. | [out][allow-none]

#### Returns

`TRUE` if application was launched.

Since: 0.1.15

## Types and Values