Information about an installed application and methods to launch it (with file arguments).
<GAppInfo> and
<GAppLaunchContext> are used for
describing and launching applications installed on the system.
As of GLib 2.20, URIs will always be converted to POSIX paths (using
file:get-path) when using app-info:launch? even if the application requested an URI and
not a POSIX path. For example for a desktop-file based application with
the following Exec key:
Exec=totem %U
and a single URI, sftp://foo/file.avi, then
/home/user/.gvfs/sftp on foo/file.avi will be passed. This will
only work if a set of suitable GIO extensions (such as GVfs 2.26
compiled with FUSE support), is available and operational; if this is
not the case, the URI will be passed unmodified to the application. Some
URIs, such as mailto:, of course cannot be mapped to a POSIX path
(in GVfs there’s no FUSE mount for it); such URIs will be passed
unmodified to the application.
Specifically for GVfs 2.26 and later, the POSIX URI will be mapped back
to the GIO URI in the <GFile> constructors (since
GVfs implements the GVfs extension point). As such, if the application
needs to examine the URI, it needs to use file:get-uri or similar on <GFile>. In
other words, an application cannot assume that the URI passed to e.g.
file:new-for-commandline-arg
is equal to the result of file:get-uri. The
following snippet illustrates this:
GFile *f;
char *uri;
file = g_file_new_for_commandline_arg (uri_from_commandline);
uri = g_file_get_uri (file);
strcmp (uri, uri_from_commandline) == 0;
g_free (uri);
if (g_file_has_uri_scheme (file, "cdda"))
{
// do something special with uri
}
g_object_unref (file);
This code will work when both cdda://sr0/Track 1.wav and
/home/user/.gvfs/cdda on sr0/Track 1.wav is passed to the
application. It should be noted that it’s generally not safe for
applications to rely on the format of a particular URIs. Different
launcher applications (e.g. file managers) may have different ideas of
what a given URI means.
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
Passed: a <GAppInfo>.
the app info
Passed: a string.
a string.
Returned: a boolean.
TRUE on success, FALSE on error.
Obtains the information whether the <GAppInfo> can
be deleted. See app-info:delete?.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if self can be deleted
Checks if a supported content type can be removed from an application.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if it is possible to remove supported content types from a
given self, FALSE if not.
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.
Passed: a file name, as a string.
the command line to use
Passed: a string, or #f.
the application name, or NULL to use commandline
Passed: a <GAppInfoCreateFlags>, or a
list of its symbols, or one of them.
flags that can specify details of the created
<GAppInfo>
Returned: a <GAppInfo>.
new <GAppInfo> for given command.
Tries to delete a <GAppInfo>.
On some platforms, there may be a difference between user-defined
<GAppInfo>s which can be deleted, and system-wide
ones which cannot. See app-info:can-delete?.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if self has been deleted
Creates a duplicate of a <GAppInfo>.
Passed: a <GAppInfo>.
the app info
Returned: a <GAppInfo>.
a duplicate of self.
Checks if two <GAppInfo>s are equal.
Note that the check may not compare each individual field, and only does an identity check. In case detecting changes in the contents is needed, program code must additionally compare relevant fields.
Passed: a <GAppInfo>.
the first <GAppInfo>.
Passed: a <GAppInfo>.
the second <GAppInfo>.
Returned: a boolean.
TRUE if self is equal to appinfo2. FALSE
otherwise.
Gets a list of all of the applications currently registered on this system.
For desktop files, this includes applications that have
‘NoDisplay=true‘
set or are excluded from display by means of
‘OnlyShowIn‘
or
‘NotShowIn‘.
See app-info:should-show?.
The returned list does not include applications which have the ‘Hidden‘ key set.
Returned: a list, each a <GAppInfo>.
a newly allocated list of references to
<GAppInfo>s.
Gets a list of all <GAppInfo>s for a given content
type, including the recommended and fallback
<GAppInfo>s. See app-info:get-recommended-for-type and
app-info:get-fallback-for-type.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type.
Gets the commandline with which the application will be started.
Passed: a <GAppInfo>.
the app info
Returned: a file name, as a string, or #f.
a string containing the self’s commandline, or NULL if this
information is not available
Gets the default <GAppInfo> for a given content
type.
Passed: a string.
the content type to find a <GAppInfo> for
Passed: a boolean.
if TRUE, the <GAppInfo> is expected to
support URIs
Returned: a <GAppInfo>, or #f.
<GAppInfo> for given content-type or
NULL on error.
Asynchronously gets the default <GAppInfo> for a
given content type.
Passed: a string.
the content type to find a <GAppInfo> for
Passed: a boolean.
if TRUE, the <GAppInfo> is expected to
support URIs
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a default <GAppInfo> lookup started by
app-info:get-default-for-type-async.
If no #<GAppInfo> is found, then error will
be set to Gio.IOErrorEnum.NOT_FOUND.
Passed: a <GAsyncResult>.
the async result
Returned: a <GAppInfo>.
<GAppInfo> for given content-type or
NULL on error.
Gets the default application for handling URIs with the given URI scheme.
A URI scheme is the initial part of the URI, up to but not including the
:. For example, http, ftp or sip.
Passed: a string.
a string containing a URI scheme.
Returned: a <GAppInfo>, or #f.
<GAppInfo> for given uri-scheme or
NULL on error.
Asynchronously gets the default application for handling URIs with the
given URI scheme. A URI scheme is the initial part of the URI, up to
but not including the :, e.g. http, ftp or
sip.
Passed: a string.
a string containing a URI scheme.
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a default <GAppInfo> lookup started by
app-info:get-default-for-uri-scheme-async.
If no <GAppInfo> is found, then error will
be set to Gio.IOErrorEnum.NOT_FOUND.
Passed: a <GAsyncResult>.
the async result
Returned: a <GAppInfo>.
<GAppInfo> for given uri-scheme or
NULL on error.
Gets a human-readable description of an installed application.
Passed: a <GAppInfo>.
the app info
Returned: a string, or #f.
a string containing a description of the application self, or
NULL if none.
Gets the display name of the application. The display name is often more descriptive to the user than the name itself.
Passed: a <GAppInfo>.
the app info
Returned: a string.
the display name of the application for self, or the name if no display name is available.
Gets the executable’s name for the installed application.
This is intended to be used for debugging or labelling what program is
going to be run. To launch the executable, use app-info:launch? and related functions, rather than spawning
the return value from this function.
Passed: a <GAppInfo>.
the app info
Returned: a file name, as a string.
a string containing the self’s application binaries name
Gets a list of fallback <GAppInfo>s for a given
content type, i.e. those applications which claim to support the given
content type by MIME type subclassing and not directly.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type
or NULL on error.
Gets the icon for the application.
Passed: a <GAppInfo>.
the app info
Returned: a <GIcon>, or #f.
the default <GIcon> for self or NULL if
there is no default icon.
Gets the ID of an application. An id is a string that identifies the application. The exact format of the id is platform dependent. For instance, on Unix this is the desktop file id from the xdg menu specification.
Note that the returned ID may be NULL, depending on how the
self has been constructed.
Passed: a <GAppInfo>.
the app info
Returned: a string, or #f.
a string containing the application’s ID.
Gets the installed name of the application.
Passed: a <GAppInfo>.
the app info
Returned: a string.
the name of the application for self.
Gets a list of recommended <GAppInfo>s for a given
content type, i.e. those applications which claim to support the given
content type exactly, and not by MIME type subclassing.
Note that the first application of the list is the last used one, i.e.
the last one for which app-info:set-as-last-used-for-type? has
been called.
Passed: a string.
the content type to find a <GAppInfo> for
Returned: a list, each a <GAppInfo>.
list of <GAppInfo>s for given content-type
or NULL on error.
Retrieves the list of content types that app-info claims to
support. If this information is not provided by the environment, this
function will return NULL.
This function does not take in consideration associations added with
app-info:add-supports-type?, but
only those exported directly by the application.
Passed: a <GAppInfo>.
an app info that can handle files
Returned: a vector, each a string, or #f.
a list of content types.
Async version of app-info:launch-default-for-uri?.
This version is useful if you are interested in receiving error information in the case where the application is sandboxed and the portal may present an application chooser dialog to the user.
This is also useful if you want to be sure that the D-Bus–activated applications are really started before termination and if you are interested in receiving error information from their activation.
Passed: a string.
the uri to show
Passed, or left out: a
<GAppLaunchContext>, or #f.
optional launch context
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes an asynchronous launch-default-for-uri operation.
Passed: a <GAsyncResult>.
the async result
Returned: a boolean.
TRUE if the launch was successful, FALSE if error is
set
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.
The D-Bus–activated applications don’t have to be started if your
application terminates too soon after this function. To prevent this,
use app-info:launch-default-for-uri-async
instead.
Passed: a string.
the uri to show
Passed, or left out: a
<GAppLaunchContext>, or #f.
optional launch context
Returned: a boolean.
TRUE on success, FALSE on error.
Async version of app-info:launch-uris?.
The callback is invoked immediately after the application launch,
but it waits for activation in case of D-Bus–activated applications and
also provides extended error information for sandboxed applications, see
notes for app-info:launch-default-for-uri-async.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a string, or #f.
a list of URIs to launch.
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a app-info:launch-uris-async operation.
Passed: a <GAppInfo>.
the app info
Passed: a <GAsyncResult>.
the async result
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Launches the application. This passes the uris to the launched application as arguments, using the optional context to get information about the details of the launcher (like what screen it is on). On error, error will be set accordingly. If the application only supports one URI per invocation as part of their command-line, multiple instances of the application will be spawned.
To launch the application without arguments pass a NULL
uris list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a string, or #f.
a list of URIs to launch.
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Launches the application. Passes files to the launched application as arguments, using the optional context to get information about the details of the launcher (like what screen it is on). On error, error will be set accordingly.
To launch the application without arguments pass a NULL
files list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
Some URIs can be changed when passed through a GFile (for instance
unsupported URIs with strange formats like mailto:), so if you have a
textual URI you want to pass in as argument, consider using
app-info:launch-uris? instead.
The launched application inherits the environment of the launching
process, but it can be modified with app-launch-context:setenv and app-launch-context:unsetenv.
On UNIX, this function sets the GIO_LAUNCHED_DESKTOP_FILE
environment variable with the path of the launched desktop file and
GIO_LAUNCHED_DESKTOP_FILE_PID to the process id of the launched
process. This can be used to ignore GIO_LAUNCHED_DESKTOP_FILE,
should it be inherited by further processes. The DISPLAY,
XDG_ACTIVATION_TOKEN and DESKTOP_STARTUP_ID environment
variables are also set, based on information provided in context.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a <GFile>, or
#f.
a list of <GFile> objects
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Removes a supported type from an application, if possible.
Passed: a <GAppInfo>.
the app info
Passed: a string.
a string.
Returned: a boolean.
TRUE on success, FALSE on error.
Removes all changes to the type associations done by app-info:set-as-default-for-type?,
app-info:set-as-default-for-extension?,
app-info:add-supports-type? or
app-info:remove-supports-type?.
Passed: a string.
a content type
Sets the application as the default handler for the given file extension.
Passed: a <GAppInfo>.
the app info
Passed: a file name, as a string.
a string containing the file extension (without the dot).
Returned: a boolean.
TRUE on success, FALSE on error.
Sets the application as the default handler for a given type.
Passed: a <GAppInfo>.
the app info
Passed: a string.
the content type.
Returned: a boolean.
TRUE on success, FALSE on error.
Sets the application as the last used application for a given type. This
will make the application appear as first in the list returned by
app-info:get-recommended-for-type,
regardless of the default application for that content type.
Passed: a <GAppInfo>.
the app info
Passed: a string.
the content type.
Returned: a boolean.
TRUE on success, FALSE on error.
Checks if the application info should be shown in menus that list available applications.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self should be shown, FALSE otherwise.
Checks if the application accepts files as arguments.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self supports files.
Checks if the application supports reading files and directories from URIs.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self supports URIs.
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
To override it in a new class, give register-type #:vfuncs
`((add-supports-type . ,procedure)). The procedure is called as
(procedure self content-type) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a string.
a string.
Returned: a boolean.
TRUE on success, FALSE on error.
Obtains the information whether the <GAppInfo> can
be deleted. See app-info:delete?.
To override it in a new class, give register-type #:vfuncs
`((can-delete . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if self can be deleted
Checks if a supported content type can be removed from an application.
To override it in a new class, give register-type #:vfuncs
`((can-remove-supports-type . ,procedure)). The procedure is called
as (procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if it is possible to remove supported content types from a
given self, FALSE if not.
Tries to delete a <GAppInfo>.
On some platforms, there may be a difference between user-defined
<GAppInfo>s which can be deleted, and system-wide
ones which cannot. See app-info:can-delete?.
To override it in a new class, give register-type #:vfuncs
`((do-delete . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if self has been deleted
Creates a duplicate of a <GAppInfo>.
To override it in a new class, give register-type #:vfuncs
`((dup . ,procedure)). The procedure is called as (procedure
self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a <GAppInfo>.
a duplicate of self.
Checks if two <GAppInfo>s are equal.
Note that the check may not compare each individual field, and only does an identity check. In case detecting changes in the contents is needed, program code must additionally compare relevant fields.
To override it in a new class, give register-type #:vfuncs
`((equal . ,procedure)). The procedure is called as (procedure
self appinfo2) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the first <GAppInfo>.
Passed: a <GAppInfo>.
the second <GAppInfo>.
Returned: a boolean.
TRUE if self is equal to appinfo2. FALSE
otherwise.
Gets the commandline with which the application will be started.
To override it in a new class, give register-type #:vfuncs
`((get-commandline . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a file name, as a string, or #f.
a string containing the self’s commandline, or NULL if this
information is not available
Gets a human-readable description of an installed application.
To override it in a new class, give register-type #:vfuncs
`((get-description . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a string, or #f.
a string containing a description of the application self, or
NULL if none.
Gets the display name of the application. The display name is often more descriptive to the user than the name itself.
To override it in a new class, give register-type #:vfuncs
`((get-display-name . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a string.
the display name of the application for self, or the name if no display name is available.
Gets the executable’s name for the installed application.
This is intended to be used for debugging or labelling what program is
going to be run. To launch the executable, use app-info:launch? and related functions, rather than spawning
the return value from this function.
To override it in a new class, give register-type #:vfuncs
`((get-executable . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a file name, as a string.
a string containing the self’s application binaries name
Gets the icon for the application.
To override it in a new class, give register-type #:vfuncs
`((get-icon . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a <GIcon>, or #f.
the default <GIcon> for self or NULL if
there is no default icon.
Gets the ID of an application. An id is a string that identifies the application. The exact format of the id is platform dependent. For instance, on Unix this is the desktop file id from the xdg menu specification.
Note that the returned ID may be NULL, depending on how the
self has been constructed.
To override it in a new class, give register-type #:vfuncs
`((get-id . ,procedure)). The procedure is called as (procedure
self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a string, or #f.
a string containing the application’s ID.
Gets the installed name of the application.
To override it in a new class, give register-type #:vfuncs
`((get-name . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a string.
the name of the application for self.
Retrieves the list of content types that app-info claims to
support. If this information is not provided by the environment, this
function will return NULL.
This function does not take in consideration associations added with
app-info:add-supports-type?, but
only those exported directly by the application.
To override it in a new class, give register-type #:vfuncs
`((get-supported-types . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
an app info that can handle files
Returned: a vector, each a string, or #f.
a list of content types.
Launches the application. Passes files to the launched application as arguments, using the optional context to get information about the details of the launcher (like what screen it is on). On error, error will be set accordingly.
To launch the application without arguments pass a NULL
files list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
Some URIs can be changed when passed through a GFile (for instance
unsupported URIs with strange formats like mailto:), so if you have a
textual URI you want to pass in as argument, consider using
app-info:launch-uris? instead.
The launched application inherits the environment of the launching
process, but it can be modified with app-launch-context:setenv and app-launch-context:unsetenv.
On UNIX, this function sets the GIO_LAUNCHED_DESKTOP_FILE
environment variable with the path of the launched desktop file and
GIO_LAUNCHED_DESKTOP_FILE_PID to the process id of the launched
process. This can be used to ignore GIO_LAUNCHED_DESKTOP_FILE,
should it be inherited by further processes. The DISPLAY,
XDG_ACTIVATION_TOKEN and DESKTOP_STARTUP_ID environment
variables are also set, based on information provided in context.
To override it in a new class, give register-type #:vfuncs
`((launch . ,procedure)). The procedure is called as (procedure
self files context) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a <GFile>, or
#f.
a list of <GFile> objects
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Launches the application. This passes the uris to the launched application as arguments, using the optional context to get information about the details of the launcher (like what screen it is on). On error, error will be set accordingly. If the application only supports one URI per invocation as part of their command-line, multiple instances of the application will be spawned.
To launch the application without arguments pass a NULL
uris list.
Note that even if the launch is successful the application launched can fail to start if it runs into problems during startup. There is no way to detect this.
To override it in a new class, give register-type #:vfuncs
`((launch-uris . ,procedure)). The procedure is called as
(procedure self uris context) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a string, or #f.
a list of URIs to launch.
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Async version of app-info:launch-uris?.
The callback is invoked immediately after the application launch,
but it waits for activation in case of D-Bus–activated applications and
also provides extended error information for sandboxed applications, see
notes for app-info:launch-default-for-uri-async.
To override it in a new class, give register-type #:vfuncs
`((launch-uris-async . ,procedure)). The procedure is called as
(procedure self uris context cancellable callback user-data).
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed, or left out: a list, each a string, or #f.
a list of URIs to launch.
Passed, or left out: a
<GAppLaunchContext>, or #f.
the launch context
Passed, or left out: a <GCancellable>, or
#f.
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when the
request is done
See GAsyncReadyCallback for how it is
called.
Not passed: guile-gi supplies it.
data to pass to callback
Finishes a app-info:launch-uris-async operation.
To override it in a new class, give register-type #:vfuncs
`((launch-uris-finish . ,procedure)). The procedure is called as
(procedure self result) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a <GAsyncResult>.
the async result
Returned: a boolean.
TRUE on successful launch, FALSE otherwise.
Removes a supported type from an application, if possible.
To override it in a new class, give register-type #:vfuncs
`((remove-supports-type . ,procedure)). The procedure is called as
(procedure self content-type) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a string.
a string.
Returned: a boolean.
TRUE on success, FALSE on error.
Sets the application as the default handler for the given file extension.
To override it in a new class, give register-type #:vfuncs
`((set-as-default-for-extension . ,procedure)). The procedure is
called as (procedure self extension) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a file name, as a string.
a string containing the file extension (without the dot).
Returned: a boolean.
TRUE on success, FALSE on error.
Sets the application as the default handler for a given type.
To override it in a new class, give register-type #:vfuncs
`((set-as-default-for-type . ,procedure)). The procedure is called as
(procedure self content-type) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a string.
the content type.
Returned: a boolean.
TRUE on success, FALSE on error.
Sets the application as the last used application for a given type. This
will make the application appear as first in the list returned by
app-info:get-recommended-for-type,
regardless of the default application for that content type.
To override it in a new class, give register-type #:vfuncs
`((set-as-last-used-for-type . ,procedure)). The procedure is called
as (procedure self content-type) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Passed: a string.
the content type.
Returned: a boolean.
TRUE on success, FALSE on error.
Checks if the application info should be shown in menus that list available applications.
To override it in a new class, give register-type #:vfuncs
`((should-show . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self should be shown, FALSE otherwise.
Checks if the application accepts files as arguments.
To override it in a new class, give register-type #:vfuncs
`((supports-files . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self supports files.
Checks if the application supports reading files and directories from URIs.
To override it in a new class, give register-type #:vfuncs
`((supports-uris . ,procedure)). The procedure is called as
(procedure self) ⇒ %return.
Passed: the class whose implementation to call: a class that implements
<GAppInfo>, or its GType number.
Passed: a <GAppInfo>.
the app info
Returned: a boolean.
TRUE if the self supports URIs.