Graphics.UI.Gtk.Recent.RecentInfo

gtk3-0.14.6: Binding to the Gtk+ 3 graphical user interface library

Maintainer | gtk2hs-users@lists.sourceforge.net
Stability | provisional
Portability | portable (depends on GHC)
Safe Haskell | None
Language | Haskell98

Graphics.UI.Gtk.Recent.RecentInfo

Contents

- Types
- Methods

Description

Synopsis

- data RecentInfo
- mkRecentInfo :: Ptr RecentInfo -> IO RecentInfo
- recentInfoExists :: RecentInfo -> IO Bool
- recentInfoGetAdded :: RecentInfo -> IO Int
- recentInfoGetAge :: RecentInfo -> IO Int
- recentInfoGetApplicationInfo :: GlibString string => RecentInfo -> string -> IO (Maybe ([string], Int, Int))
- recentInfoGetApplications :: GlibString string => RecentInfo -> IO [string]
- recentInfoGetDescription :: GlibString string => RecentInfo -> IO string
- recentInfoGetDisplayName :: GlibString string => RecentInfo -> IO string
- recentInfoGetGroups :: GlibString string => RecentInfo -> IO [string]
- recentInfoGetIcon :: RecentInfo -> Int -> IO (Maybe Pixbuf)
- recentInfoGetMimeType :: GlibString string => RecentInfo -> IO string
- recentInfoGetModified :: RecentInfo -> IO Int
- recentInfoGetPrivateHint :: RecentInfo -> IO Bool
- recentInfoGetShortName :: GlibString string => RecentInfo -> IO string
- recentInfoGetURI :: GlibString string => RecentInfo -> IO string
- recentInfoGetURIDisplay :: GlibString string => RecentInfo -> IO string
- recentInfoGetVisited :: RecentInfo -> IO Int
- recentInfoHasApplication :: GlibString string => RecentInfo -> string -> IO Bool
- recentInfoHasGroup :: GlibString string => RecentInfo -> string -> IO Bool
- recentInfoIsLocal :: RecentInfo -> IO Bool
- recentInfoLastApplication :: GlibString string => RecentInfo -> IO string
- recentInfoMatch :: RecentInfo -> RecentInfo -> IO Bool

# Types

data RecentInfo #

mkRecentInfo :: Ptr RecentInfo -> IO RecentInfo #

Helper function for build `RecentInfo`

# Methods

recentInfoExists #

Arguments

:: RecentInfo |
-> IO Bool | returns `True` if the resource exists

Checks whether the resource pointed by info still exists. At the moment this check is done only on resources pointing to local files.

- Available since Gtk+ version 2.10

recentInfoGetAdded #

Arguments

:: RecentInfo |
-> IO Int | 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.

- Available since Gtk+ version 2.10

recentInfoGetAge #

Arguments

:: RecentInfo |
-> IO Int | 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.

- Available since Gtk+ version 2.10

recentInfoGetApplicationInfo #

Arguments

:: GlibString string |
=> RecentInfo |
-> string | `appName` the name of the application that has registered this item
-> IO (Maybe ([string], Int, Int)) | `appExec` return location for the string containing the command line. transfer none. ^ `count` return location for the number of times this item was registered. out. ^ `time` out. out.

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.

- Available since Gtk+ version 2.10

recentInfoGetApplications :: GlibString string => RecentInfo -> IO [string] #

Retrieves the list of applications that have registered this resource.

- Available since Gtk+ version 2.10

recentInfoGetDescription #

Arguments

:: GlibString string |
=> RecentInfo |
-> IO string | returns the description of the resource.

Gets the (short) description of the resource.

- Available since Gtk+ version 2.10

recentInfoGetDisplayName #

Arguments

:: GlibString string |
=> RecentInfo |
-> IO string | returns the display name of the resource.

Gets the name of the resource. If none has been defined, the basename of the resource is obtained.

- Available since Gtk+ version 2.10

recentInfoGetGroups :: GlibString string => RecentInfo -> IO [string] #

Returns all groups registered for the recently used item info.

- Available since Gtk+ version 2.10

recentInfoGetIcon #

Arguments

:: RecentInfo |
-> Int | `size` the size of the icon in pixels
-> IO (Maybe Pixbuf) | returns a `Pixbuf` containing the icon, or `Nothing`

Retrieves the icon of size size associated to the resource MIME type.

- Available since Gtk+ version 2.10

recentInfoGetMimeType #

Arguments

:: GlibString string |
=> RecentInfo |
-> IO string | returns the MIME type of the resource.

Gets the MIME type of the resource.

- Available since Gtk+ version 2.10

recentInfoGetModified #

Arguments

:: RecentInfo |
-> IO Int | 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 resource was last modified.

- Available since Gtk+ version 2.10

recentInfoGetPrivateHint #

Arguments

:: RecentInfo |
-> IO Bool | returns `True` if the private flag was found, `False` otherwise.

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.

- Available since Gtk+ version 2.10

recentInfoGetShortName :: GlibString string => RecentInfo -> IO string #

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://foobar.txt" will yield "bar.txt".

- Available since Gtk+ version 2.10

recentInfoGetURI #

Arguments

:: GlibString string |
=> RecentInfo |
-> IO string | returns the URI of the resource.

Gets the URI of the resource.

- Available since Gtk+ version 2.10

recentInfoGetURIDisplay :: GlibString string => RecentInfo -> IO string #

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`.

- Available since Gtk+ version 2.10

recentInfoGetVisited #

Arguments

:: RecentInfo |
-> IO Int | 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 resource was last visited.

- Available since Gtk+ version 2.10

recentInfoHasApplication #

Arguments

:: GlibString string |
=> RecentInfo |
-> string | `appName` a string containing an application name
-> IO Bool | returns `True` if an application with name `appName` was found, `False` otherwise.

Checks whether an application registered this resource using `appName`.

- Available since Gtk+ version 2.10

recentInfoHasGroup #

Arguments

:: GlibString string |
=> RecentInfo |
-> string | `groupName` name of a group
-> IO Bool | returns `True` if the group was found.

Checks whether `groupName` appears inside the groups registered for the recently used item info.

- Available since Gtk+ version 2.10

recentInfoIsLocal #

Arguments

:: RecentInfo |
-> IO Bool | returns `True` if the resource is local.

Checks whether the resource is local or not by looking at the scheme of its URI.

- Available since Gtk+ version 2.10

recentInfoLastApplication #

Arguments

:: GlibString string |
=> RecentInfo |
-> IO string | returns an application name.

Gets the name of the last application that have registered the recently used resource represented by info.

- Available since Gtk+ version 2.10

recentInfoMatch #

Arguments

:: RecentInfo |
-> RecentInfo |
-> IO Bool | returns `True` if both `RecentInfo` structures point to se same resource, `False` otherwise.

Checks whether two `RecentInfo` structures point to the same resource.

- Available since Gtk+ version 2.10