Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GI.Gio.Objects.DesktopAppInfo
Contents
- Exported types
- Methods
- getActionName
- getBoolean
- getCategories
- getFilename
- getGenericName
- getImplementations
- getIsHidden
- getKeywords
- getLocaleString
- getNodisplay
- getShowIn
- getStartupWmClass
- getString
- getStringList
- hasKey
- launchAction
- launchUrisAsManager
- launchUrisAsManagerWithFds
- listActions
- new
- newFromFilename
- newFromKeyfile
- search
- setDesktopEnv
- Properties
Description
GDesktopAppInfo
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 or the GioUnix-2.0
GIR namespace when using it.
Synopsis
- newtype DesktopAppInfo = DesktopAppInfo (ManagedPtr DesktopAppInfo)
- class (GObject o, IsDescendantOf DesktopAppInfo o) => IsDesktopAppInfo o
- toDesktopAppInfo :: (MonadIO m, IsDesktopAppInfo o) => o -> m DesktopAppInfo
- type family ResolveDesktopAppInfoMethod (t :: Symbol) o where ...
- data DesktopAppInfoGetActionNameMethodInfo
- desktopAppInfoGetActionName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Text
- data DesktopAppInfoGetBooleanMethodInfo
- desktopAppInfoGetBoolean :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
- data DesktopAppInfoGetCategoriesMethodInfo
- desktopAppInfoGetCategories :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
- data DesktopAppInfoGetFilenameMethodInfo
- desktopAppInfoGetFilename :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe [Char])
- data DesktopAppInfoGetGenericNameMethodInfo
- desktopAppInfoGetGenericName :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
- desktopAppInfoGetImplementations :: (HasCallStack, MonadIO m) => Text -> m [DesktopAppInfo]
- data DesktopAppInfoGetIsHiddenMethodInfo
- desktopAppInfoGetIsHidden :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
- data DesktopAppInfoGetKeywordsMethodInfo
- desktopAppInfoGetKeywords :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Text]
- data DesktopAppInfoGetLocaleStringMethodInfo
- desktopAppInfoGetLocaleString :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m (Maybe Text)
- data DesktopAppInfoGetNodisplayMethodInfo
- desktopAppInfoGetNodisplay :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m Bool
- data DesktopAppInfoGetShowInMethodInfo
- desktopAppInfoGetShowIn :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Maybe Text -> m Bool
- data DesktopAppInfoGetStartupWmClassMethodInfo
- desktopAppInfoGetStartupWmClass :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m (Maybe Text)
- data DesktopAppInfoGetStringMethodInfo
- desktopAppInfoGetString :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m (Maybe Text)
- data DesktopAppInfoGetStringListMethodInfo
- desktopAppInfoGetStringList :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m ([Text], CSize)
- data DesktopAppInfoHasKeyMethodInfo
- desktopAppInfoHasKey :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> Text -> m Bool
- data DesktopAppInfoLaunchActionMethodInfo
- desktopAppInfoLaunchAction :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> Text -> Maybe b -> m ()
- data DesktopAppInfoLaunchUrisAsManagerMethodInfo
- desktopAppInfoLaunchUrisAsManager :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> [Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> m ()
- data DesktopAppInfoLaunchUrisAsManagerWithFdsMethodInfo
- desktopAppInfoLaunchUrisAsManagerWithFds :: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => a -> [Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> Int32 -> Int32 -> Int32 -> m ()
- data DesktopAppInfoListActionsMethodInfo
- desktopAppInfoListActions :: (HasCallStack, MonadIO m, IsDesktopAppInfo a) => a -> m [Text]
- desktopAppInfoNew :: (HasCallStack, MonadIO m) => Text -> m (Maybe DesktopAppInfo)
- desktopAppInfoNewFromFilename :: (HasCallStack, MonadIO m) => [Char] -> m (Maybe DesktopAppInfo)
- desktopAppInfoNewFromKeyfile :: (HasCallStack, MonadIO m) => KeyFile -> m (Maybe DesktopAppInfo)
- desktopAppInfoSearch :: (HasCallStack, MonadIO m) => Text -> m [[Text]]
- desktopAppInfoSetDesktopEnv :: (HasCallStack, MonadIO m) => Text -> m ()
- data DesktopAppInfoFilenamePropertyInfo
- constructDesktopAppInfoFilename :: (IsDesktopAppInfo o, MonadIO m) => Text -> m (GValueConstruct o)
- desktopAppInfoFilename :: AttrLabelProxy "filename"
- getDesktopAppInfoFilename :: (MonadIO m, IsDesktopAppInfo o) => o -> m (Maybe Text)
Exported types
newtype DesktopAppInfo Source #
Memory-managed wrapper type.
Constructors
DesktopAppInfo (ManagedPtr DesktopAppInfo) |
Instances
class (GObject o, IsDescendantOf DesktopAppInfo o) => IsDesktopAppInfo o Source #
Type class for types which can be safely cast to DesktopAppInfo
, for instance with toDesktopAppInfo
.
Instances
(GObject o, IsDescendantOf DesktopAppInfo o) => IsDesktopAppInfo o Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo |
toDesktopAppInfo :: (MonadIO m, IsDesktopAppInfo o) => o -> m DesktopAppInfo Source #
Cast to DesktopAppInfo
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
addSupportsType, bindProperty, bindPropertyFull, canDelete, canRemoveSupportsType, delete, dup, equal, forceFloating, freezeNotify, getv, hasKey, isFloating, launch, launchAction, launchUris, launchUrisAsManager, launchUrisAsManagerWithFds, launchUrisAsync, launchUrisFinish, listActions, notify, notifyByPspec, ref, refSink, removeSupportsType, runDispose, shouldShow, stealData, stealQdata, supportsFiles, supportsUris, thawNotify, unref, watchClosure.
Getters
getActionName, getBoolean, getCategories, getCommandline, getData, getDescription, getDisplayName, getExecutable, getFilename, getGenericName, getIcon, getId, getIsHidden, getKeywords, getLocaleString, getName, getNodisplay, getProperty, getQdata, getShowIn, getStartupWmClass, getString, getStringList, getSupportedTypes.
Setters
setAsDefaultForExtension, setAsDefaultForType, setAsLastUsedForType, setData, setDataFull, setProperty.
type family ResolveDesktopAppInfoMethod (t :: Symbol) o where ... Source #
Equations
getActionName
data DesktopAppInfoGetActionNameMethodInfo Source #
Instances
(signature ~ (Text -> m Text), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetActionNameMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetActionNameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetActionName Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m Text | Returns: the locale-specific action name |
Gets the user-visible display name of the
‘additional application actions’
specified by actionName
.
This corresponds to the Name
key within the keyfile group for the
action.
Since: 2.38
getBoolean
data DesktopAppInfoGetBooleanMethodInfo Source #
Instances
(signature ~ (Text -> m Bool), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetBooleanMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetBooleanMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetBoolean Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: the boolean value, or |
Looks up a boolean value in the keyfile backing info
.
The key
is looked up in the Desktop Entry
group.
Since: 2.36
getCategories
data DesktopAppInfoGetCategoriesMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetCategoriesMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetCategoriesMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetCategories Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m (Maybe Text) | Returns: The unparsed
`Categories` key
from the desktop file;
i.e. no attempt is made to split it by |
Gets the categories from the desktop file.
getFilename
data DesktopAppInfoGetFilenameMethodInfo Source #
Instances
(signature ~ m (Maybe [Char]), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetFilenameMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetFilenameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetFilename Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m (Maybe [Char]) | Returns: The full path to the file for |
When info
was created from a known filename, return it. In some
situations such as a DesktopAppInfo
returned from
desktopAppInfoNewFromKeyfile
, this function will return NULL
.
Since: 2.24
getGenericName
data DesktopAppInfoGetGenericNameMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetGenericNameMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetGenericNameMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetGenericName Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m (Maybe Text) | Returns: The value of the `GenericName` key |
Gets the generic name from the desktop file.
getImplementations
desktopAppInfoGetImplementations Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m [DesktopAppInfo] | Returns: a list of
|
Gets all applications that implement interface
.
An application implements an interface if that interface is listed in
the Implements
line of the desktop file of the application.
Since: 2.42
getIsHidden
data DesktopAppInfoGetIsHiddenMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetIsHiddenMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetIsHiddenMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetIsHidden Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m Bool | Returns: |
A desktop file is hidden if the
`Hidden` key
in it is set to True
.
getKeywords
data DesktopAppInfoGetKeywordsMethodInfo Source #
Instances
(signature ~ m [Text], MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetKeywordsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetKeywordsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetKeywords Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m [Text] | Returns: The value of the `Keywords` key |
Gets the keywords from the desktop file.
Since: 2.32
getLocaleString
data DesktopAppInfoGetLocaleStringMethodInfo Source #
Instances
(signature ~ (Text -> m (Maybe Text)), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetLocaleStringMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetLocaleStringMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetLocaleString Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: a newly allocated string, or |
Looks 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.
Since: 2.56
getNodisplay
data DesktopAppInfoGetNodisplayMethodInfo Source #
Instances
(signature ~ m Bool, MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetNodisplayMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetNodisplayMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetNodisplay Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m Bool | Returns: The value of the |
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 appInfoShouldShow
.
Since: 2.30
getShowIn
data DesktopAppInfoGetShowInMethodInfo Source #
Instances
(signature ~ (Maybe Text -> m Bool), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetShowInMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetShowInMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetShowIn Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Maybe Text |
|
-> m Bool | Returns: |
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.
desktopEnv
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 desktopEnv
,
but this is not recommended.
Note that appInfoShouldShow
for info
will include this check
(with NULL
for desktopEnv
) as well as additional checks.
Since: 2.30
getStartupWmClass
data DesktopAppInfoGetStartupWmClassMethodInfo Source #
Instances
(signature ~ m (Maybe Text), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetStartupWmClassMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetStartupWmClassMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetStartupWmClass Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m (Maybe Text) | Returns: the startup WM class, or |
Retrieves the StartupWMClass
field from info
. This represents the
WM_CLASS
property of the main window of the application, if launched
through info
.
Since: 2.34
getString
data DesktopAppInfoGetStringMethodInfo Source #
Instances
(signature ~ (Text -> m (Maybe Text)), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetStringMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetStringMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetString Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m (Maybe Text) | Returns: a newly allocated string, or |
Looks up a string value in the keyfile backing info
.
The key
is looked up in the Desktop Entry
group.
Since: 2.36
getStringList
data DesktopAppInfoGetStringListMethodInfo Source #
Instances
(signature ~ (Text -> m ([Text], CSize)), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoGetStringListMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoGetStringListMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoGetStringList Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m ([Text], CSize) | Returns:
a |
Looks up a string list value in the keyfile backing info
.
The key
is looked up in the Desktop Entry
group.
Since: 2.60
hasKey
data DesktopAppInfoHasKeyMethodInfo Source #
Instances
(signature ~ (Text -> m Bool), MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoHasKeyMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoHasKeyMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
Returns whether key
exists in the Desktop Entry
group
of the keyfile backing info
.
Since: 2.36
launchAction
data DesktopAppInfoLaunchActionMethodInfo Source #
Instances
(signature ~ (Text -> Maybe b -> m ()), MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => OverloadedMethod DesktopAppInfoLaunchActionMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoLaunchActionMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoLaunchAction Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) | |
=> a |
|
-> Text |
|
-> Maybe b |
|
-> m () |
Activates the named application action.
You may only call this function on action names that were
returned from desktopAppInfoListActions
.
Note that if the main entry of the desktop file indicates that the
application supports startup notification, and launchContext
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 appInfoLaunch
there is no way to detect failures that
occur while using this function.
Since: 2.38
launchUrisAsManager
data DesktopAppInfoLaunchUrisAsManagerMethodInfo Source #
Instances
(signature ~ ([Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> m ()), MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => OverloadedMethod DesktopAppInfoLaunchUrisAsManagerMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoLaunchUrisAsManagerMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoLaunchUrisAsManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) | |
=> a |
|
-> [Text] |
|
-> Maybe b |
|
-> [SpawnFlags] |
|
-> Maybe SpawnChildSetupFunc |
|
-> Maybe DesktopAppLaunchCallback |
|
-> m () | (Can throw |
This function performs the equivalent of appInfoLaunchUris
,
but is intended primarily for operating system components that
launch applications. Ordinary applications should use
appInfoLaunchUris
.
If the application is launched via GSpawn, then spawnFlags
, userSetup
and userSetupData
are used for the call to spawnAsync
.
Additionally, pidCallback
(with pidCallbackData
) will be called to
inform about the PID of the created process. See
spawnAsyncWithPipes
for information on certain parameter
conditions that can enable an optimized `posix_spawn()`)
code path to be used.
If application launching occurs via some other mechanism (for example, D-Bus
activation) then spawnFlags
, userSetup
, userSetupData
,
pidCallback
and pidCallbackData
are ignored.
launchUrisAsManagerWithFds
data DesktopAppInfoLaunchUrisAsManagerWithFdsMethodInfo Source #
Instances
(signature ~ ([Text] -> Maybe b -> [SpawnFlags] -> Maybe SpawnChildSetupFunc -> Maybe DesktopAppLaunchCallback -> Int32 -> Int32 -> Int32 -> m ()), MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) => OverloadedMethod DesktopAppInfoLaunchUrisAsManagerWithFdsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoLaunchUrisAsManagerWithFdsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoLaunchUrisAsManagerWithFds Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a, IsAppLaunchContext b) | |
=> a |
|
-> [Text] |
|
-> Maybe b |
|
-> [SpawnFlags] |
|
-> Maybe SpawnChildSetupFunc |
|
-> Maybe DesktopAppLaunchCallback |
|
-> Int32 |
|
-> Int32 |
|
-> Int32 |
|
-> m () | (Can throw |
Equivalent to desktopAppInfoLaunchUrisAsManager
but allows
you to pass in file descriptors for the stdin, stdout and stderr streams
of the launched process.
If application launching occurs via some non-spawn mechanism (e.g. D-Bus
activation) then stdinFd
, stdoutFd
and stderrFd
are ignored.
Since: 2.58
listActions
data DesktopAppInfoListActionsMethodInfo Source #
Instances
(signature ~ m [Text], MonadIO m, IsDesktopAppInfo a) => OverloadedMethod DesktopAppInfoListActionsMethodInfo a signature Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods overloadedMethod :: a -> signature # | |
OverloadedMethodInfo DesktopAppInfoListActionsMethodInfo (a :: Type) Source # | |
Defined in GI.Gio.Objects.DesktopAppInfo Methods |
desktopAppInfoListActions Source #
Arguments
:: (HasCallStack, MonadIO m, IsDesktopAppInfo a) | |
=> a |
|
-> m [Text] | Returns: a
list of strings, always non- |
Returns 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.
Since: 2.38
new
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m (Maybe DesktopAppInfo) | Returns: a new |
Creates a new DesktopAppInfo
based on a desktop file ID.
A desktop file ID is the basename of the desktop file, including the
.desktop
extension. GIO is looking for a desktop file with this name
in the applications
subdirectories of the XDG
data directories (i.e. the directories specified in the XDG_DATA_HOME
and XDG_DATA_DIRS
environment variables). GIO also supports the
prefix-to-subdirectory mapping that is described in the
Menu Spec
(i.e. a desktop ID of kde-foo.desktop
will match
/usr/share/applications/kde/foo.desktop
).
newFromFilename
desktopAppInfoNewFromFilename Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> [Char] |
|
-> m (Maybe DesktopAppInfo) | Returns: a new |
Creates a new DesktopAppInfo
.
newFromKeyfile
desktopAppInfoNewFromKeyfile Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> KeyFile |
|
-> m (Maybe DesktopAppInfo) | Returns: a new |
Creates a new DesktopAppInfo
.
Since: 2.18
search
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m [[Text]] | Returns: a
list of strvs. Free each item with |
Searches desktop files for ones that match searchString
.
The return value is an array of strvs. Each strv contains a list of
applications that matched searchString
with an equal score. The
outer list is sorted by score so that the first strv contains the
best-matching applications, and so on.
The algorithm for determining matches is undefined and may change at
any time.
None of the search results are subjected to the normal validation
checks performed by desktopAppInfoNew
(for example, checking that
the executable referenced by a result exists), and so it is possible for
desktopAppInfoNew
to return NULL
when passed an app ID returned
by this function. It is expected that calling code will do this when
subsequently creating a DesktopAppInfo
for each result.
setDesktopEnv
desktopAppInfoSetDesktopEnv Source #
Arguments
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m () |
Deprecated: (Since version 2.42)do not use this API. Since 2.42 the value of theXDG_CURRENT_DESKTOP
environment variable will be used.
Sets the name of the desktop that the application is running in.
This is used by appInfoShouldShow
and
desktopAppInfoGetShowIn
to evaluate the
`OnlyShowIn`
and `NotShowIn`
keys.
Should be called only once; subsequent calls are ignored.
Properties
filename
The origin filename of this DesktopAppInfo
data DesktopAppInfoFilenamePropertyInfo Source #
Instances
constructDesktopAppInfoFilename :: (IsDesktopAppInfo o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “filename
” property. This is rarely needed directly, but it is used by new
.
desktopAppInfoFilename :: AttrLabelProxy "filename" Source #
getDesktopAppInfoFilename :: (MonadIO m, IsDesktopAppInfo o) => o -> m (Maybe Text) Source #
Get the value of the “filename
” property.
When overloading is enabled, this is equivalent to
get
desktopAppInfo #filename