Function
GioAppInfocreate_from_commandline
Declaration [src]
GAppInfo*
g_app_info_create_from_commandline (
const char* commandline,
const char* application_name,
GAppInfoCreateFlags flags,
GError** error
)
Description [src]
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
-
Type:
const char*
The command line to use.
The data is owned by the caller of the function. The value is a platform-native string, using the preferred OS encoding on Unix and UTF-8 on Windows. application_name
-
Type:
const char*
The application name, or
NULL
to usecommandline
.The argument can be NULL
.The data is owned by the caller of the function. The value is a NUL terminated UTF-8 string. flags
-
Type:
GAppInfoCreateFlags
Flags that can specify details of the created
GAppInfo
. error
-
Type:
GError **
The return location for a recoverable error.
The argument can be NULL
.If the return location is not NULL
, then you must initialize it to aNULL
GError*
.The argument will be left initialized to NULL
by the function if there are no errors.In case of error, the argument will be set to a newly allocated GError
; the caller will take ownership of the data, and be responsible for freeing it.