Class

GioDesktopAppInfo

Description [src]

final class Gio.DesktopAppInfo : GObject.Object {
  /* No available fields */
}

GDesktopAppInfo is an implementation of GAppInfo 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 when using it.

Hierarchy

hierarchy this GDesktopAppInfo implements_0 GAppInfo this--implements_0 ancestor_0 GObject ancestor_0--this

Ancestors

Implements

Constructors

g_desktop_app_info_new

Creates a new GDesktopAppInfo based on a desktop file id.

g_desktop_app_info_new_from_filename

Creates a new GDesktopAppInfo.

g_desktop_app_info_new_from_keyfile

Creates a new GDesktopAppInfo.

Available since: 2.18

Functions

g_desktop_app_info_get_implementations

Gets all applications that implement interface.

Available since: 2.42

g_desktop_app_info_search

Searches desktop files for ones that match search_string.

g_desktop_app_info_set_desktop_env

Sets the name of the desktop that the application is running in. This is used by g_app_info_should_show() and g_desktop_app_info_get_show_in() to evaluate the OnlyShowIn and NotShowIn desktop entry fields.

Deprecated since: 2.42

Instance methods

g_desktop_app_info_get_action_name

Gets the user-visible display name of the “additional application action” specified by action_name.

Available since: 2.38

g_desktop_app_info_get_boolean

Looks up a boolean value in the keyfile backing info.

Available since: 2.36

g_desktop_app_info_get_categories

Gets the categories from the desktop file.

g_desktop_app_info_get_filename

When info was created from a known filename, return it. In some situations such as the GDesktopAppInfo returned from g_desktop_app_info_new_from_keyfile(), this function will return NULL.

Available since: 2.24

g_desktop_app_info_get_generic_name

Gets the generic name from the desktop file.

g_desktop_app_info_get_is_hidden

A desktop file is hidden if the Hidden key in it is set to True.

g_desktop_app_info_get_keywords

Gets the keywords from the desktop file.

Available since: 2.32

g_desktop_app_info_get_locale_string

Looks up a localized string value in the keyfile backing info translated to the current locale.

Available since: 2.56

g_desktop_app_info_get_nodisplay

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 g_app_info_should_show().

Available since: 2.30

g_desktop_app_info_get_show_in

Checks if the application info should be shown in menus that list available applications for a specific name of the desktop, based on the OnlyShowIn and NotShowIn keys.

Available since: 2.30

g_desktop_app_info_get_startup_wm_class

Retrieves the StartupWMClass field from info. This represents the WM_CLASS property of the main window of the application, if launched through info.

Available since: 2.34

g_desktop_app_info_get_string

Looks up a string value in the keyfile backing info.

Available since: 2.36

g_desktop_app_info_get_string_list

Looks up a string list value in the keyfile backing info.

Available since: 2.60

g_desktop_app_info_has_key

Returns whether key exists in the “Desktop Entry” group of the keyfile backing info.

Available since: 2.36

g_desktop_app_info_launch_action

Activates the named application action.

Available since: 2.38

g_desktop_app_info_launch_uris_as_manager

This function performs the equivalent of g_app_info_launch_uris(), but is intended primarily for operating system components that launch applications. Ordinary applications should use g_app_info_launch_uris().

g_desktop_app_info_launch_uris_as_manager_with_fds

Equivalent to g_desktop_app_info_launch_uris_as_manager() but allows you to pass in file descriptors for the stdin, stdout and stderr streams of the launched process.

Available since: 2.58

g_desktop_app_info_list_actions

Returns the list of “additional application actions” supported on the desktop file, as per the desktop file specification.

Available since: 2.38

Methods inherited from GObject (43)
Methods inherited from GAppInfo (25)
g_app_info_add_supports_type

Adds a content type to the application information to indicate the application is capable of opening files with the given content type.

g_app_info_can_delete

Obtains the information whether the GAppInfo can be deleted. See g_app_info_delete().

Available since: 2.20

g_app_info_can_remove_supports_type

Checks if a supported content type can be removed from an application.

g_app_info_delete

Tries to delete a GAppInfo.

Available since: 2.20

g_app_info_dup

Creates a duplicate of a GAppInfo.

g_app_info_equal

Checks if two GAppInfos are equal.

g_app_info_get_commandline

Gets the commandline with which the application will be started.

Available since: 2.20

g_app_info_get_description

Gets a human-readable description of an installed application.

g_app_info_get_display_name

Gets the display name of the application. The display name is often more descriptive to the user than the name itself.

Available since: 2.24

g_app_info_get_executable

Gets the executable’s name for the installed application.

g_app_info_get_icon

Gets the icon for the application.

g_app_info_get_id

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.

g_app_info_get_name

Gets the installed name of the application.

g_app_info_get_supported_types

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 g_app_info_add_supports_type(), but only those exported directly by the application.

Available since: 2.34

g_app_info_launch

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.

g_app_info_launch_uris

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.

g_app_info_launch_uris_async

Async version of g_app_info_launch_uris().

Available since: 2.60

g_app_info_launch_uris_finish

Finishes a g_app_info_launch_uris_async() operation.

Available since: 2.60

g_app_info_remove_supports_type

Removes a supported type from an application, if possible.

g_app_info_set_as_default_for_extension

Sets the application as the default handler for the given file extension.

g_app_info_set_as_default_for_type

Sets the application as the default handler for a given type.

g_app_info_set_as_last_used_for_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 g_app_info_get_recommended_for_type(), regardless of the default application for that content type.

g_app_info_should_show

Checks if the application info should be shown in menus that list available applications.

Properties

Gio.DesktopAppInfo:filename

The origin filename of this GDesktopAppInfo.

Signals

Signals inherited from GObject (1)

Class structure

struct GioDesktopAppInfoClass {
  GObjectClass parent_class;
  
}
Class members
parent_class
GObjectClass
  No description available.