DesktopAppInfo
GDesktopAppInfo
is an implementation of iface@Gio.AppInfo based on desktop files.
Note that <gio/gdesktopappinfo.h>
belongs to the UNIX-specific GIO interfaces, thus you have to use the gio-unix-2.0.pc
pkg-config file or the GioUnix-2.0
GIR namespace when using it.
Skipped during bindings generation
parameter
length
: length: Out parameter is not supportedfunction
search
: Nested array types are not supported
Constructors
Functions
Adds a content type to the application information to indicate the application is capable of opening files with the given content type.
Checks if a supported content type can be removed from an application.
Gets the user-visible display name of the ‘additional application actions’ specified by @action_name.
Looks up a boolean value in the keyfile backing @info.
Gets the categories from the desktop file.
Gets the commandline with which the application will be started.
Gets a human-readable description of an installed application.
Gets the display name of the application. The display name is often more descriptive to the user than the name itself.
Gets the executable’s name for the installed application.
Gets the generic name from the desktop file.
A desktop file is hidden if the Hidden
key in it is set to True
.
Gets the keywords from the desktop file.
Looks up a localized string value in the keyfile backing @info translated to the current locale.
Gets the value of the NoDisplay
key which helps determine if the application info should be shown in menus. See G_KEY_FILE_DESKTOP_KEY_NO_DISPLAY
and method@Gio.AppInfo.should_show.
Retrieves the StartupWMClass
field from @info. This represents the WM_CLASS
property of the main window of the application, if launched through @info.
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
.
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.
Activates the named application action.
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.
This function performs the equivalent of method@Gio.AppInfo.launch_uris, but is intended primarily for operating system components that launch applications. Ordinary applications should use method@Gio.AppInfo.launch_uris.
Equivalent to method@Gio.DesktopAppInfo.launch_uris_as_manager but allows you to pass in file descriptors for the stdin, stdout and stderr streams of the launched process.
Async version of method@Gio.AppInfo.launch_uris.
Finishes a method@Gio.AppInfo.launch_uris_async operation.
Returns the list of ‘additional application actions’ supported on the desktop file, as per the desktop file specification.
Removes a supported type from an application, if possible.
Sets the application as the default handler for the given file extension.
Sets the application as the default handler for a given type.
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 func@Gio.AppInfo.get_recommended_for_type, regardless of the default application for that content type.
Checks if the application info should be shown in menus that list available applications.
Checks if the application accepts files as arguments.
Checks if the application supports reading files and directories from URIs.