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.

  • 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

    In case of error, error will be set either with a GTK_RECENT_MANAGER_ERROR or a G_IO_ERROR

    Declaration

    Swift

    @inlinable
    func createAppInfo(appName: UnsafePointer<CChar>? = 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 the time when the resource was added to the recently used resources list.

    Declaration

    Swift

    @inlinable
    func getAdded() -> GLib.DateTimeRef!
  • 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<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 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!
  • getGicon() Extension method

    Retrieves 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 be nil.

    Declaration

    Swift

    @inlinable
    func getGroups(length: UnsafeMutablePointer<gsize>! = nil) -> UnsafeMutablePointer<UnsafeMutablePointer<CChar>?>!
  • getMimeType() Extension method

    Gets the MIME type of the resource.

    Declaration

    Swift

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

    Gets the time when the meta-data for the resource was last modified.

    Declaration

    Swift

    @inlinable
    func getModified() -> GLib.DateTimeRef!
  • 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 [methodGtk.RecentInfo.get_uri].

    Declaration

    Swift

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

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

    Declaration

    Swift

    @inlinable
    func hasGroup(groupName: UnsafePointer<CChar>!) -> 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 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 the time when the resource was added to the recently used resources list.

    Declaration

    Swift

    @inlinable
    var added: GLib.DateTimeRef! { 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 time when the meta-data for the resource was last modified.

    Declaration

    Swift

    @inlinable
    var modified: GLib.DateTimeRef! { 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 [methodGtk.RecentInfo.get_uri].

    Declaration

    Swift

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

    Gets the time when the meta-data for the resource was last visited.

    Declaration

    Swift

    @inlinable
    var visited: GLib.DateTimeRef! { get }