package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Desktop_app_info/index.html
Module Wrappers.Desktop_app_info
type t = [ `desktop_app_info | `object_ ] Gobject.objval new_ : string -> tCreate a new DesktopAppInfo
val new_from_filename : string -> tCreate a new DesktopAppInfo
val list_actions : t -> string arrayReturns the list of "additional application actions" supported on the desktop file, as per the desktop file specification.
As per the specification, this is the list of actions that are explicitly listed in the "Actions" key of the Desktop Entry group.
val launch_action :
t ->
string ->
[ `app_launch_context | `object_ ] Gobject.obj option ->
unitActivates the named application action.
You may only call this function on action names that were returned from g_desktop_app_info_list_actions().
Note that if the main entry of the desktop file indicates that the application supports startup notification, and @launch_context is non-%NULL, then startup notification will be used when activating the action (and as such, invocation of the action on the receiving side must signal the end of startup notification when it is completed). This is the expected behaviour of applications declaring additional actions, as per the desktop file specification.
As with g_app_info_launch() there is no way to detect failures that occur while using this function.
val has_key : t -> string -> boolReturns whether @key exists in the "Desktop Entry" group of the keyfile backing @info.
Looks up a string list value in the keyfile backing @info.
The @key is looked up in the "Desktop Entry" group.
val get_string : t -> string -> string optionLooks up a string value in the keyfile backing @info.
The @key is looked up in the "Desktop Entry" group.
val get_startup_wm_class : t -> string optionRetrieves the StartupWMClass field from @info. This represents the WM_CLASS property of the main window of the application, if launched through @info.
val get_show_in : t -> string option -> boolChecks 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.
@desktop_env should typically be given as %NULL, in which case the `XDG_CURRENT_DESKTOP` environment variable is consulted. If you want to override the default mechanism then you may specify @desktop_env, but this is not recommended.
Note that g_app_info_should_show() for @info will include this check (with %NULL for @desktop_env) as well as additional checks.
val get_nodisplay : t -> boolGets 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().
val get_locale_string : t -> string -> string optionLooks up a localized string value in the keyfile backing @info translated to the current locale.
The @key is looked up in the "Desktop Entry" group.
val get_keywords : t -> string arrayGets the keywords from the desktop file.
A desktop file is hidden if the Hidden key in it is set to True.
val get_generic_name : t -> string optionGets the generic name from the desktop file.
val get_filename : t -> string optionWhen @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.
val get_categories : t -> string optionGets the categories from the desktop file.
val get_boolean : t -> string -> boolLooks up a boolean value in the keyfile backing @info.
The @key is looked up in the "Desktop Entry" group.
val get_action_name : t -> string -> stringGets the user-visible display name of the "additional application action" specified by @action_name.
This corresponds to the "Name" key within the keyfile group for the action.