Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
RecentInfo
-struct contains private data only, and should
be accessed using the provided API.
RecentInfo
constains all the meta-data
associated with an entry in the recently used files list.
- newtype RecentInfo = RecentInfo (ManagedPtr RecentInfo)
- noRecentInfo :: Maybe RecentInfo
- data RecentInfoCreateAppInfoMethodInfo
- recentInfoCreateAppInfo :: (HasCallStack, MonadIO m) => RecentInfo -> Maybe Text -> m (Maybe AppInfo)
- data RecentInfoExistsMethodInfo
- recentInfoExists :: (HasCallStack, MonadIO m) => RecentInfo -> m Bool
- data RecentInfoGetAddedMethodInfo
- recentInfoGetAdded :: (HasCallStack, MonadIO m) => RecentInfo -> m CLong
- data RecentInfoGetAgeMethodInfo
- recentInfoGetAge :: (HasCallStack, MonadIO m) => RecentInfo -> m Int32
- data RecentInfoGetApplicationInfoMethodInfo
- recentInfoGetApplicationInfo :: (HasCallStack, MonadIO m) => RecentInfo -> Text -> m (Bool, Text, Word32, CLong)
- data RecentInfoGetApplicationsMethodInfo
- recentInfoGetApplications :: (HasCallStack, MonadIO m) => RecentInfo -> m ([Text], Word64)
- data RecentInfoGetDescriptionMethodInfo
- recentInfoGetDescription :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoGetDisplayNameMethodInfo
- recentInfoGetDisplayName :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoGetGiconMethodInfo
- recentInfoGetGicon :: (HasCallStack, MonadIO m) => RecentInfo -> m (Maybe Icon)
- data RecentInfoGetGroupsMethodInfo
- recentInfoGetGroups :: (HasCallStack, MonadIO m) => RecentInfo -> m ([Text], Word64)
- data RecentInfoGetIconMethodInfo
- recentInfoGetIcon :: (HasCallStack, MonadIO m) => RecentInfo -> Int32 -> m (Maybe Pixbuf)
- data RecentInfoGetMimeTypeMethodInfo
- recentInfoGetMimeType :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoGetModifiedMethodInfo
- recentInfoGetModified :: (HasCallStack, MonadIO m) => RecentInfo -> m CLong
- data RecentInfoGetPrivateHintMethodInfo
- recentInfoGetPrivateHint :: (HasCallStack, MonadIO m) => RecentInfo -> m Bool
- data RecentInfoGetShortNameMethodInfo
- recentInfoGetShortName :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoGetUriMethodInfo
- recentInfoGetUri :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoGetUriDisplayMethodInfo
- recentInfoGetUriDisplay :: (HasCallStack, MonadIO m) => RecentInfo -> m (Maybe Text)
- data RecentInfoGetVisitedMethodInfo
- recentInfoGetVisited :: (HasCallStack, MonadIO m) => RecentInfo -> m CLong
- data RecentInfoHasApplicationMethodInfo
- recentInfoHasApplication :: (HasCallStack, MonadIO m) => RecentInfo -> Text -> m Bool
- data RecentInfoHasGroupMethodInfo
- recentInfoHasGroup :: (HasCallStack, MonadIO m) => RecentInfo -> Text -> m Bool
- data RecentInfoIsLocalMethodInfo
- recentInfoIsLocal :: (HasCallStack, MonadIO m) => RecentInfo -> m Bool
- data RecentInfoLastApplicationMethodInfo
- recentInfoLastApplication :: (HasCallStack, MonadIO m) => RecentInfo -> m Text
- data RecentInfoMatchMethodInfo
- recentInfoMatch :: (HasCallStack, MonadIO m) => RecentInfo -> RecentInfo -> m Bool
- data RecentInfoRefMethodInfo
- recentInfoRef :: (HasCallStack, MonadIO m) => RecentInfo -> m RecentInfo
- data RecentInfoUnrefMethodInfo
- recentInfoUnref :: (HasCallStack, MonadIO m) => RecentInfo -> m ()
Exported types
newtype RecentInfo Source #
Methods
createAppInfo
data RecentInfoCreateAppInfoMethodInfo Source #
((~) * signature (Maybe Text -> m (Maybe AppInfo)), MonadIO m) => MethodInfo * RecentInfoCreateAppInfoMethodInfo RecentInfo signature Source # | |
recentInfoCreateAppInfo Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> Maybe Text |
|
-> m (Maybe AppInfo) | Returns: the newly created |
Creates a AppInfo
for the specified RecentInfo
exists
data RecentInfoExistsMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * RecentInfoExistsMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Bool | Returns: |
Checks whether the resource pointed by info
still exists.
At the moment this check is done only on resources pointing
to local files.
Since: 2.10
getAdded
data RecentInfoGetAddedMethodInfo Source #
((~) * signature (m CLong), MonadIO m) => MethodInfo * RecentInfoGetAddedMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m CLong | Returns: the number of seconds elapsed from system’s Epoch when the resource was added to the list, or -1 on failure. |
Gets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list.
Since: 2.10
getAge
data RecentInfoGetAgeMethodInfo Source #
((~) * signature (m Int32), MonadIO m) => MethodInfo * RecentInfoGetAgeMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Int32 | Returns: a positive integer containing the number of days elapsed since the time this resource was last modified |
Gets the number of days elapsed since the last update
of the resource pointed by info
.
Since: 2.10
getApplicationInfo
data RecentInfoGetApplicationInfoMethodInfo Source #
((~) * signature (Text -> m (Bool, Text, Word32, CLong)), MonadIO m) => MethodInfo * RecentInfoGetApplicationInfoMethodInfo RecentInfo signature Source # | |
recentInfoGetApplicationInfo Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> Text |
|
-> m (Bool, Text, Word32, CLong) | Returns: |
Gets the data regarding the application that has registered the resource
pointed by info
.
If the command line contains any escape characters defined inside the storage specification, they will be expanded.
Since: 2.10
getApplications
data RecentInfoGetApplicationsMethodInfo Source #
((~) * signature (m ([Text], Word64)), MonadIO m) => MethodInfo * RecentInfoGetApplicationsMethodInfo RecentInfo signature Source # | |
recentInfoGetApplications Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m ([Text], Word64) | Returns:
a newly allocated |
Retrieves the list of applications that have registered this resource.
Since: 2.10
getDescription
data RecentInfoGetDescriptionMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoGetDescriptionMethodInfo RecentInfo signature Source # | |
recentInfoGetDescription Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: the description of the resource. The returned string is owned by the recent manager, and should not be freed. |
Gets the (short) description of the resource.
Since: 2.10
getDisplayName
data RecentInfoGetDisplayNameMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoGetDisplayNameMethodInfo RecentInfo signature Source # | |
recentInfoGetDisplayName Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: the display name of the resource. The returned string is owned by the recent manager, and should not be freed. |
Gets the name of the resource. If none has been defined, the basename of the resource is obtained.
Since: 2.10
getGicon
data RecentInfoGetGiconMethodInfo Source #
((~) * signature (m (Maybe Icon)), MonadIO m) => MethodInfo * RecentInfoGetGiconMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m (Maybe Icon) | Returns: a |
Retrieves the icon associated to the resource MIME type.
Since: 2.22
getGroups
data RecentInfoGetGroupsMethodInfo Source #
((~) * signature (m ([Text], Word64)), MonadIO m) => MethodInfo * RecentInfoGetGroupsMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m ([Text], Word64) | Returns:
a newly allocated |
getIcon
data RecentInfoGetIconMethodInfo Source #
((~) * signature (Int32 -> m (Maybe Pixbuf)), MonadIO m) => MethodInfo * RecentInfoGetIconMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> Int32 |
|
-> m (Maybe Pixbuf) | Returns: a |
Retrieves the icon of size size
associated to the resource MIME type.
Since: 2.10
getMimeType
data RecentInfoGetMimeTypeMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoGetMimeTypeMethodInfo RecentInfo signature Source # | |
recentInfoGetMimeType Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed. |
Gets the MIME type of the resource.
Since: 2.10
getModified
data RecentInfoGetModifiedMethodInfo Source #
((~) * signature (m CLong), MonadIO m) => MethodInfo * RecentInfoGetModifiedMethodInfo RecentInfo signature Source # | |
recentInfoGetModified Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m CLong | Returns: the number of seconds elapsed from system’s Epoch when the resource was last modified, or -1 on failure. |
Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last modified.
Since: 2.10
getPrivateHint
data RecentInfoGetPrivateHintMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * RecentInfoGetPrivateHintMethodInfo RecentInfo signature Source # | |
recentInfoGetPrivateHint Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Bool | Returns: |
Gets the value of the “private” flag. Resources in the recently used
list that have this flag set to True
should only be displayed by the
applications that have registered them.
Since: 2.10
getShortName
data RecentInfoGetShortNameMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoGetShortNameMethodInfo RecentInfo signature Source # | |
recentInfoGetShortName Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: A newly-allocated string in UTF-8 encoding
free it with |
Computes a valid UTF-8 string that can be used as the name of the item in a menu or list. For example, calling this function on an item that refers to “file:///foo/bar.txt” will yield “bar.txt”.
Since: 2.10
getUri
data RecentInfoGetUriMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoGetUriMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: the URI of the resource. The returned string is owned by the recent manager, and should not be freed. |
Gets the URI of the resource.
Since: 2.10
getUriDisplay
data RecentInfoGetUriDisplayMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m) => MethodInfo * RecentInfoGetUriDisplayMethodInfo RecentInfo signature Source # | |
recentInfoGetUriDisplay Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m (Maybe Text) | Returns: a newly allocated UTF-8 string containing the
resource’s URI or |
Gets a displayable version of the resource’s URI. If the resource
is local, it returns a local path; if the resource is not local,
it returns the UTF-8 encoded content of recentInfoGetUri
.
Since: 2.10
getVisited
data RecentInfoGetVisitedMethodInfo Source #
((~) * signature (m CLong), MonadIO m) => MethodInfo * RecentInfoGetVisitedMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m CLong | Returns: the number of seconds elapsed from system’s Epoch when the resource was last visited, or -1 on failure. |
Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last visited.
Since: 2.10
hasApplication
data RecentInfoHasApplicationMethodInfo Source #
((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * RecentInfoHasApplicationMethodInfo RecentInfo signature Source # | |
recentInfoHasApplication Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> Text |
|
-> m Bool | Returns: |
Checks whether an application registered this resource using appName
.
Since: 2.10
hasGroup
data RecentInfoHasGroupMethodInfo Source #
((~) * signature (Text -> m Bool), MonadIO m) => MethodInfo * RecentInfoHasGroupMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> Text |
|
-> m Bool | Returns: |
Checks whether groupName
appears inside the groups
registered for the recently used item info
.
Since: 2.10
isLocal
data RecentInfoIsLocalMethodInfo Source #
((~) * signature (m Bool), MonadIO m) => MethodInfo * RecentInfoIsLocalMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Bool | Returns: |
Checks whether the resource is local or not by looking at the scheme of its URI.
Since: 2.10
lastApplication
data RecentInfoLastApplicationMethodInfo Source #
((~) * signature (m Text), MonadIO m) => MethodInfo * RecentInfoLastApplicationMethodInfo RecentInfo signature Source # | |
recentInfoLastApplication Source #
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m Text | Returns: an application name. Use |
Gets the name of the last application that have registered the
recently used resource represented by info
.
Since: 2.10
match
data RecentInfoMatchMethodInfo Source #
((~) * signature (RecentInfo -> m Bool), MonadIO m) => MethodInfo * RecentInfoMatchMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> RecentInfo |
|
-> m Bool | Returns: |
Checks whether two RecentInfo
-struct point to the same
resource.
Since: 2.10
ref
data RecentInfoRefMethodInfo Source #
((~) * signature (m RecentInfo), MonadIO m) => MethodInfo * RecentInfoRefMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m RecentInfo | Returns: the recent info object with its reference count increased by one |
Increases the reference count of recentInfo
by one.
Since: 2.10
unref
data RecentInfoUnrefMethodInfo Source #
((~) * signature (m ()), MonadIO m) => MethodInfo * RecentInfoUnrefMethodInfo RecentInfo signature Source # | |
:: (HasCallStack, MonadIO m) | |
=> RecentInfo |
|
-> m () |
Decreases the reference count of info
by one. If the reference
count reaches zero, info
is deallocated, and the memory freed.
Since: 2.10