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.

  • ptr

    Untyped pointer to the underlying GtkRecentInfo instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • recent_info_ptr Default implementation

    Typed 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)

RecentInfo Record: RecentInfoProtocol extension (methods and fields)

  • createAppInfo(appName:) Extension method

    Creates a GAppInfo for the specified GtkRecentInfo

    Declaration

    Swift

    @inlinable
    func createAppInfo(appName: UnsafePointer<gchar>? = nil) throws -> GIO.AppInfoRef!
  • exists() Extension method

    Checks 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 method

    Gets 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 method

    Gets the number of days elapsed since the last update of the resource pointed by info.

    Declaration

    Swift

    @inlinable
    func getAge() -> Int
  • 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 method

    Gets the (short) description of the resource.

    Declaration

    Swift

    @inlinable
    func getDescription() -> String!
  • getDisplayName() Extension method

    Gets 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 method

    Retrieves 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 be nil terminated, so length might optionally be nil.

    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 method

    Gets the MIME type of the resource.

    Declaration

    Swift

    @inlinable
    func getMimeType() -> String!
  • getModified() Extension method

    Gets 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 method

    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.

    Declaration

    Swift

    @inlinable
    func getPrivateHint() -> Bool
  • getShortName() Extension method

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

    Declaration

    Swift

    @inlinable
    func getShortName() -> String!
  • getURI() Extension method

    Gets the URI of the resource.

    Declaration

    Swift

    @inlinable
    func getURI() -> String!
  • getURIDisplay() Extension method

    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 gtk_recent_info_get_uri().

    Declaration

    Swift

    @inlinable
    func getURIDisplay() -> String!
  • getVisited() Extension method

    Gets 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 item info.

    Declaration

    Swift

    @inlinable
    func hasGroup(groupName: UnsafePointer<gchar>!) -> Bool
  • lastApplication() Extension method

    Gets 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 method

    Increases the reference count of recent_info by one.

    Declaration

    Swift

    @discardableResult
    @inlinable
    func ref() -> RecentInfoRef!
  • unref() Extension method

    Decreases 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 method

    Gets 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 method

    Gets the number of days elapsed since the last update of the resource pointed by info.

    Declaration

    Swift

    @inlinable
    var age: Int { get }
  • description Extension method

    Gets the (short) description of the resource.

    Declaration

    Swift

    @inlinable
    var description: String! { get }
  • displayName Extension method

    Gets 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 method

    Retrieves the icon associated to the resource MIME type.

    Declaration

    Swift

    @inlinable
    var gicon: GIO.IconRef! { get }
  • isLocal Extension method

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

    Declaration

    Swift

    @inlinable
    var isLocal: Bool { get }
  • mimeType Extension method

    Gets the MIME type of the resource.

    Declaration

    Swift

    @inlinable
    var mimeType: String! { get }
  • modified Extension method

    Gets 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 method

    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.

    Declaration

    Swift

    @inlinable
    var privateHint: Bool { get }
  • shortName Extension method

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

    Declaration

    Swift

    @inlinable
    var shortName: String! { get }
  • uri Extension method

    Gets the URI of the resource.

    Declaration

    Swift

    @inlinable
    var uri: String! { get }
  • uriDisplay Extension method

    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 gtk_recent_info_get_uri().

    Declaration

    Swift

    @inlinable
    var uriDisplay: String! { get }
  • visited Extension method

    Gets 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 }