gio.desktop_app_info
Module for [DesktopAppInfo] class
Types 3
gio.desktop_app_info.DesktopAppInfo is an implementation of gio.app_info.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.
Methods
DesktopAppInfoGidBuilder builder() static nothrowGet builder for [gio.desktop_app_info.DesktopAppInfo] Returns: New builder objectstring filename() @property nothrowGet `filename` property. Returns: The origin filename of this #GDesktopAppInfogio.desktop_app_info.DesktopAppInfo newFromFilename(string filename) static nothrowCreates a new #GDesktopAppInfo.gio.desktop_app_info.DesktopAppInfo newFromKeyfile(glib.key_file.KeyFile keyFile) static nothrowCreates a new #GDesktopAppInfo.gio.desktop_app_info.DesktopAppInfo[] getImplementations(string interface_) static nothrowGets all applications that implement interface.void setDesktopEnv(string desktopEnv) static nothrowSets the name of the desktop that the application is running in. This is used by [gio.app_info.AppInfo.shouldShow] and [gio.desktop_app_info.DesktopAppInfo.getShowIn] to evaluate the `OnlyShowIn` a...string getActionName(string actionName) nothrowGets the user-visible display name of the "additional application action" specified by action_name.string getCategories() nothrowGets the categories from the desktop file. Returns: The unparsed Categories key from the desktop file; i.e. no attempt is made to split it by ';' or validate it.string getFilename() nothrowWhen info was created from a known filename, return it. In some situations such as the #GDesktopAppInfo returned from [gio.desktop_app_info.DesktopAppInfo.newFromKeyfile], this function will retur...string getGenericName() nothrowGets the generic name from the desktop file. Returns: The value of the GenericName keybool getIsHidden() nothrowA desktop file is hidden if the Hidden key in it is set to True. Returns: true if hidden, false otherwise.string[] getKeywords() nothrowGets the keywords from the desktop file. Returns: The value of the Keywords keystring getLocaleString(string key) nothrowLooks up a localized string value in the keyfile backing info translated to the current locale.bool getNodisplay() nothrowGets the value of the NoDisplay key, which helps determine if the application info should be shown in menus. See [glib.types.KEY_FILE_DESKTOP_KEY_NO_DISPLAY] and [gio.app_info.AppInfo.shouldShow]. ...bool getShowIn(string desktopEnv = null) nothrowChecks 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.string getStartupWmClass() nothrowRetrieves the StartupWMClass field from info. This represents the WM_CLASS property of the main window of the application, if launched through info. Returns: the startup WM class, or null if none i...bool hasKey(string key) nothrowReturns whether key exists in the "Desktop Entry" group of the keyfile backing info.void launchAction(string actionName, gio.app_launch_context.AppLaunchContext launchContext = null) nothrowActivates the named application action.bool launchUrisAsManager(string[] uris, gio.app_launch_context.AppLaunchContext launchContext, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc userSetup = null, gio.types.DesktopAppLaunchCallback pidCallback = null)This function performs the equivalent of [gio.app_info.AppInfo.launchUris], but is intended primarily for operating system components that launch applications. Ordinary applications should use [gi...bool launchUrisAsManagerWithFds(string[] uris, gio.app_launch_context.AppLaunchContext launchContext, glib.types.SpawnFlags spawnFlags, glib.types.SpawnChildSetupFunc userSetup, gio.types.DesktopAppLaunchCallback pidCallback, int stdinFd, int stdoutFd, int stderrFd)Equivalent to [gio.desktop_app_info.DesktopAppInfo.launchUrisAsManager] but allows you to pass in file descriptors for the stdin, stdout and stderr streams of the launched process.string[] listActions() nothrowReturns the list of "additional application actions" supported on the desktop file, as per the desktop file specification.classDesktopAppInfoGidBuilderImpl(T) : gobject.object.ObjectWrapGidBuilderImpl!T, gio.app_info.AppInfoGidBuilderImpl!T
Fluent builder implementation template for gio.desktop_app_info.DesktopAppInfo
Methods
T filename(string propval) nothrowSet `filename` property. Params: propval = The origin filename of this #GDesktopAppInfo Returns: Builder instance for fluent chainingFluent builder for gio.desktop_app_info.DesktopAppInfo
Methods