RecentInfoProtocol
public protocol RecentInfoProtocol
GtkRecentInfo
contains the metadata associated with an item 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
In case of error,
error
will be set either with aGTK_RECENT_MANAGER_ERROR
or aG_IO_ERROR
Declaration
Swift
@inlinable func createAppInfo(appName: UnsafePointer<CChar>? = 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 the time when the resource was added to the recently used resources list.
Declaration
Swift
@inlinable func getAdded() -> GLib.DateTimeRef!
-
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: stamp: ) 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<CChar>!, appExec: UnsafeMutablePointer<UnsafePointer<CChar>?>!, count: UnsafeMutablePointer<guint>!, stamp: UnsafeMutablePointer<UnsafeMutablePointer<GDateTime>?>!) -> 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<CChar>?>!
-
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!
-
getGicon()
Extension methodRetrieves the icon associated to the resource MIME type.
Declaration
Swift
@inlinable func getGicon() -> GIO.IconRef!
-
getGroups(length:
Extension method) Returns all groups registered for the recently used item
info
.The array of returned group names will be
nil
terminated, so length might optionally benil
.Declaration
Swift
@inlinable func getGroups(length: UnsafeMutablePointer<gsize>! = nil) -> UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>!
-
getMimeType()
Extension methodGets the MIME type of the resource.
Declaration
Swift
@inlinable func getMimeType() -> String!
-
getModified()
Extension methodGets the time when the meta-data for the resource was last modified.
Declaration
Swift
@inlinable func getModified() -> GLib.DateTimeRef!
-
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 [method
Gtk.RecentInfo.get_uri
].Declaration
Swift
@inlinable func getUriDisplay() -> String!
-
getVisited()
Extension methodGets the time when the meta-data for the resource was last visited.
Declaration
Swift
@inlinable func getVisited() -> GLib.DateTimeRef!
-
hasApplication(appName:
Extension method) Checks whether an application registered this resource using
app_name
.Declaration
Swift
@inlinable func hasApplication(appName: UnsafePointer<CChar>!) -> 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<CChar>!) -> 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
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 the time when the resource was added to the recently used resources list.
Declaration
Swift
@inlinable var added: GLib.DateTimeRef! { 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 time when the meta-data for the resource was last modified.
Declaration
Swift
@inlinable var modified: GLib.DateTimeRef! { 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 [method
Gtk.RecentInfo.get_uri
].Declaration
Swift
@inlinable var uriDisplay: String! { get }
-
visited
Extension methodGets the time when the meta-data for the resource was last visited.
Declaration
Swift
@inlinable var visited: GLib.DateTimeRef! { get }