DesktopAppInfo
Object Hierarchy:
Description:
public class DesktopAppInfo :
Object,
AppInfo
`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.
Content:
Properties:
Static methods:
- public static List<DesktopAppInfo> get_implementations (string @interface)
Gets all applications that implement interface.
- public static unowned string**[] search (string search_string)
Searches desktop files for ones that match search_string.
- public static void set_desktop_env (string desktop_env)
Sets the name of the desktop that the application is running in.
Creation methods:
Methods:
- public string get_action_name (string action_name)
- public bool get_boolean (string key)
Looks up a boolean value in the keyfile backing
this.
- public unowned string get_categories ()
Gets the categories from the desktop file.
- public unowned string get_filename ()
When this was created from a known
filename, return it.
- public unowned string get_generic_name ()
Gets the generic name from the desktop file.
- public bool get_is_hidden ()
A desktop file is hidden if the
`Hidden` key in
it is set to `True`.
- public unowned string[] get_keywords ()
Gets the keywords from the desktop file.
- public string? get_locale_string (string key)
Looks up a localized string value in the keyfile backing
this translated to the current locale.
- public bool get_nodisplay ()
Gets the value of the
`NoDisplay` key
which helps determine if the application info should be shown in menus.
- public bool get_show_in (string desktop_env)
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.
- public unowned string get_startup_wm_class ()
Retrieves the `StartupWMClass` field from
this.
- public string get_string (string key)
Looks up a string value in the keyfile backing
this.
- public string[] get_string_list (string key)
Looks up a string list value in the keyfile backing
this.
- public bool has_key (string key)
Returns whether key exists in the `Desktop Entry` group
of the keyfile backing this.
- public void launch_action (string action_name, AppLaunchContext launch_context)
Activates the named application action.
- public bool launch_uris_as_manager (List<string> uris, AppLaunchContext? launch_context, SpawnFlags spawn_flags, SpawnChildSetupFunc? user_setup = null, DesktopAppLaunchCallback? pid_callback = null) throws Error
This function performs the equivalent of [method@Gio.
- public bool launch_uris_as_manager_with_fds (List<string> uris, AppLaunchContext? launch_context, SpawnFlags spawn_flags, SpawnChildSetupFunc? user_setup = null, DesktopAppLaunchCallback? pid_callback = null, int stdin_fd = -1, int stdout_fd = -1, int stderr_fd = -1) throws Error
Equivalent to [method@GioUnix.
- public unowned string[] list_actions ()
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface GLib.AppInfo