DesktopAppInfo
Object Hierarchy:
GLib.DesktopAppInfo
GLib.DesktopAppInfo
GLib.DesktopAppInfo
GLib.Object
GLib.Object
GLib.Object->GLib.DesktopAppInfo
GLib.AppInfo
GLib.AppInfo
GLib.AppInfo->GLib.DesktopAppInfo
Description:
public class DesktopAppInfo : Object , AppInfo
DesktopAppInfo is an implementation of 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 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)
Gets the user-visible display name of the "additional application
action" specified by 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
launch_uris , but is intended primarily for operating system components that launch applications.
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
launch_uris_as_manager but allows you to pass in file
descriptors for the stdin, stdout and stderr streams of the launched process.
public unowned string [] list_actions ()
Returns the list of "additional application actions" supported on the
desktop file, as per the desktop file specification.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref
All known members inherited from interface GLib.AppInfo
@delete
add_supports_type
can_delete
can_remove_supports_type
create_from_commandline
dup
equal
get_all
get_all_for_type
get_commandline
get_default_for_type
get_default_for_type_async
get_default_for_uri_scheme
get_default_for_uri_scheme_async
get_description
get_display_name
get_executable
get_fallback_for_type
get_icon
get_id
get_name
get_recommended_for_type
get_supported_types
launch
launch_default_for_uri
launch_default_for_uri_async
launch_uris
launch_uris_async
remove_supports_type
reset_type_associations
set_as_default_for_extension
set_as_default_for_type
set_as_last_used_for_type
should_show
supports_files
supports_uris