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
GtkRecentInfoinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
recent_info_ptrDefault implementationTyped pointer to the underlying
GtkRecentInfoinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GtkRecentInfoinstance.Declaration
Swift
var recent_info_ptr: UnsafeMutablePointer<GtkRecentInfo>! { get } -
Required Initialiser for types conforming to
RecentInfoProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
createAppInfo(appName:Extension method) Creates a
GAppInfofor the specifiedGtkRecentInfoDeclaration
Swift
@inlinable func createAppInfo(appName: UnsafePointer<gchar>? = nil) throws -> GIO.AppInfoRef! -
exists()Extension methodChecks whether the resource pointed by
infostill 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 benilterminated, 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
sizeassociated 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
trueshould 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_nameappears 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-structpoint to the same resource.Declaration
Swift
@inlinable func match<RecentInfoT>(infoB: RecentInfoT) -> Bool where RecentInfoT : RecentInfoProtocol -
ref()Extension methodIncreases the reference count of
recent_infoby one.Declaration
Swift
@discardableResult @inlinable func ref() -> RecentInfoRef! -
unref()Extension methodDecreases the reference count of
infoby one. If the reference count reaches zero,infois deallocated, and the memory freed.Declaration
Swift
@inlinable func unref() -
addedExtension 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 } -
ageExtension methodGets the number of days elapsed since the last update of the resource pointed by
info.Declaration
Swift
@inlinable var age: Int { get } -
descriptionExtension methodGets the (short) description of the resource.
Declaration
Swift
@inlinable var description: String! { get } -
displayNameExtension 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 } -
giconExtension methodRetrieves the icon associated to the resource MIME type.
Declaration
Swift
@inlinable var gicon: GIO.IconRef! { get } -
isLocalExtension methodChecks whether the resource is local or not by looking at the scheme of its URI.
Declaration
Swift
@inlinable var isLocal: Bool { get } -
mimeTypeExtension methodGets the MIME type of the resource.
Declaration
Swift
@inlinable var mimeType: String! { get } -
modifiedExtension 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 } -
privateHintExtension methodGets the value of the “private” flag. Resources in the recently used list that have this flag set to
trueshould only be displayed by the applications that have registered them.Declaration
Swift
@inlinable var privateHint: Bool { get } -
shortNameExtension 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 } -
uriExtension methodGets the URI of the resource.
Declaration
Swift
@inlinable var uri: String! { get } -
uriDisplayExtension 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 } -
visitedExtension 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 }
View on GitHub
Install in Dash
RecentInfoProtocol Protocol Reference