RecentInfoProtocol
public protocol RecentInfoProtocol
GtkRecentInfo-struct
contains private data only, and should
be accessed using the provided API.
GtkRecentInfo
constains all the meta-data
associated with an entry in the recently used files list.
The RecentInfoProtocol
protocol exposes the methods and properties of an underlying GtkRecentInfo
instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see RecentInfo
.
Alternatively, use RecentInfoRef
as a lighweight, unowned
reference if you already have an instance you just want to use.
-
Untyped pointer to the underlying
GtkRecentInfo
instance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get }
-
recent_info_ptr
Default implementationTyped pointer to the underlying
GtkRecentInfo
instance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkRecentInfo
instance.Declaration
Swift
var recent_info_ptr: UnsafeMutablePointer<GtkRecentInfo>! { get }
-
Required Initialiser for types conforming to
RecentInfoProtocol
Declaration
Swift
init(raw: UnsafeMutableRawPointer)
-
createAppInfo(appName:
Extension method) Creates a
GAppInfo
for the specifiedGtkRecentInfo
Declaration
Swift
@inlinable func createAppInfo(appName: UnsafePointer<gchar>? = nil) throws -> GIO.AppInfoRef!
-
exists()
Extension methodChecks whether the resource pointed by
info
still exists. At the moment this check is done only on resources pointing to local files.Declaration
Swift
@inlinable func exists() -> Bool
-
getAdded()
Extension methodGets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list.
Declaration
Swift
@inlinable func getAdded() -> time_t
-
getAge()
Extension methodGets the number of days elapsed since the last update of the resource pointed by
info
.Declaration
Swift
@inlinable func getAge() -> Int
-
getApplicationInfo(appName:
Extension methodappExec: count: time: ) 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.
Declaration
Swift
@inlinable func getApplicationInfo(appName: UnsafePointer<gchar>!, appExec: UnsafeMutablePointer<UnsafePointer<gchar>?>!, count: UnsafeMutablePointer<guint>!, time: UnsafeMutablePointer<time_t>!) -> Bool
-
getApplications(length:
Extension method) Retrieves the list of applications that have registered this resource.
Declaration
Swift
@inlinable func getApplications(length: UnsafeMutablePointer<gsize>! = nil) -> UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>!
-
getDescription()
Extension methodGets the (short) description of the resource.
Declaration
Swift
@inlinable func getDescription() -> String!
-
getDisplayName()
Extension methodGets the name of the resource. If none has been defined, the basename of the resource is obtained.
Declaration
Swift
@inlinable func getDisplayName() -> String!
-
getIcon()
Extension methodRetrieves the icon associated to the resource MIME type.
Declaration
Swift
@inlinable func getIcon() -> GIO.IconRef!
-
getGroups(length:
Extension method) Returns all groups registered for the recently used item
info
. The array of returned group names will benil
terminated, so length might optionally benil
.Declaration
Swift
@inlinable func getGroups(length: UnsafeMutablePointer<gsize>! = nil) -> UnsafeMutablePointer<UnsafeMutablePointer<gchar>?>!
-
getIcon(size:
Extension method) Retrieves the icon of size
size
associated to the resource MIME type.Declaration
Swift
@inlinable func getIcon(size: Int) -> PixbufRef!
-
getMimeType()
Extension methodGets the MIME type of the resource.
Declaration
Swift
@inlinable func getMimeType() -> String!
-
getModified()
Extension methodGets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last modified.
Declaration
Swift
@inlinable func getModified() -> time_t
-
getPrivateHint()
Extension methodGets 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.Declaration
Swift
@inlinable func getPrivateHint() -> Bool
-
getShortName()
Extension methodComputes 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”.
Declaration
Swift
@inlinable func getShortName() -> String!
-
getURI()
Extension methodGets the URI of the resource.
Declaration
Swift
@inlinable func getURI() -> String!
-
getURIDisplay()
Extension methodGets 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
gtk_recent_info_get_uri()
.Declaration
Swift
@inlinable func getURIDisplay() -> String!
-
getVisited()
Extension methodGets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last visited.
Declaration
Swift
@inlinable func getVisited() -> time_t
-
hasApplication(appName:
Extension method) Checks whether an application registered this resource using
app_name
.Declaration
Swift
@inlinable func hasApplication(appName: UnsafePointer<gchar>!) -> Bool
-
hasGroup(groupName:
Extension method) Checks whether
group_name
appears inside the groups registered for the recently used iteminfo
.Declaration
Swift
@inlinable func hasGroup(groupName: UnsafePointer<gchar>!) -> Bool
-
lastApplication()
Extension methodGets the name of the last application that have registered the recently used resource represented by
info
.Declaration
Swift
@inlinable func lastApplication() -> String!
-
match(infoB:
Extension method) Checks whether two
GtkRecentInfo-struct
point to the same resource.Declaration
Swift
@inlinable func match<RecentInfoT>(infoB: RecentInfoT) -> Bool where RecentInfoT : RecentInfoProtocol
-
ref()
Extension methodIncreases the reference count of
recent_info
by one.Declaration
Swift
@discardableResult @inlinable func ref() -> RecentInfoRef!
-
unref()
Extension methodDecreases the reference count of
info
by one. If the reference count reaches zero,info
is deallocated, and the memory freed.Declaration
Swift
@inlinable func unref()
-
added
Extension methodGets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list.
Declaration
Swift
@inlinable var added: time_t { get }
-
age
Extension methodGets the number of days elapsed since the last update of the resource pointed by
info
.Declaration
Swift
@inlinable var age: Int { get }
-
description
Extension methodGets the (short) description of the resource.
Declaration
Swift
@inlinable var description: String! { get }
-
displayName
Extension methodGets the name of the resource. If none has been defined, the basename of the resource is obtained.
Declaration
Swift
@inlinable var displayName: String! { get }
-
gicon
Extension methodRetrieves the icon associated to the resource MIME type.
Declaration
Swift
@inlinable var gicon: GIO.IconRef! { get }
-
isLocal
Extension methodChecks whether the resource is local or not by looking at the scheme of its URI.
Declaration
Swift
@inlinable var isLocal: Bool { get }
-
mimeType
Extension methodGets the MIME type of the resource.
Declaration
Swift
@inlinable var mimeType: String! { get }
-
modified
Extension methodGets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last modified.
Declaration
Swift
@inlinable var modified: time_t { get }
-
privateHint
Extension methodGets 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.Declaration
Swift
@inlinable var privateHint: Bool { get }
-
shortName
Extension methodComputes 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”.
Declaration
Swift
@inlinable var shortName: String! { get }
-
uri
Extension methodGets the URI of the resource.
Declaration
Swift
@inlinable var uri: String! { get }
-
uriDisplay
Extension methodGets 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
gtk_recent_info_get_uri()
.Declaration
Swift
@inlinable var uriDisplay: String! { get }
-
visited
Extension methodGets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last visited.
Declaration
Swift
@inlinable var visited: time_t { get }