gtk.recent_info

Module for [RecentInfo] class

Types 1

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

Methods
void * _cPtr(Flag!"Dup" dup = No.Dup)
GType _gType() @property
RecentInfo self()Returns `this`, for use in `with` statements.
gio.app_info.AppInfo createAppInfo(string appName = null)Creates a #GAppInfo for the specified #GtkRecentInfo
bool exists()Checks whether the resource pointed by info still exists. At the moment this check is done only on resources pointing to local files. Returns: true if the resource exists
long getAdded()Gets the timestamp (seconds from system’s Epoch) when the resource was added to the recently used resources list. Returns: the number of seconds elapsed from system’s Epoch when the resource wa...
int getAge()Gets the number of days elapsed since the last update of the resource pointed by info. Returns: a positive integer containing the number of days elapsed since the time this resource was last modified
bool getApplicationInfo(string appName, out string appExec, out uint count, out long time)Gets the data regarding the application that has registered the resource pointed by info.
string[] getApplications()Retrieves the list of applications that have registered this resource. Returns: a newly allocated null-terminated array of strings. Use [glib.global.strfreev] to free it.
string getDescription()Gets the (short) description of the resource. Returns: the description of the resource. The returned string is owned by the recent manager, and should not be freed.
string getDisplayName()Gets the name of the resource. If none has been defined, the basename of the resource is obtained. Returns: the display name of the resource. The returned string is owned by the recent manager, and...
gio.icon.Icon getGicon()Retrieves the icon associated to the resource MIME type. Returns: a #GIcon containing the icon, or null. Use [gobject.object.ObjectWrap.unref] when finished using the icon
string[] getGroups()Returns all groups registered for the recently used item info. The array of returned group names will be null terminated, so length might optionally be null. Returns: a newly allocated null termina...
gdkpixbuf.pixbuf.Pixbuf getIcon(int size)Retrieves the icon of size size associated to the resource MIME type.
string getMimeType()Gets the MIME type of the resource. Returns: the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed.
long getModified()Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last modified. Returns: the number of seconds elapsed from system’s Epoch when the resource was last mod...
bool getPrivateHint()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. Returns: true i...
string getShortName()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.tx...
string getUri()Gets the URI of the resource. Returns: the URI of the resource. The returned string is owned by the recent manager, and should not be freed.
string getUriDisplay()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.RecentI...
long getVisited()Gets the timestamp (seconds from system’s Epoch) when the meta-data for the resource was last visited. Returns: the number of seconds elapsed from system’s Epoch when the resource was last visi...
bool hasApplication(string appName)Checks whether an application registered this resource using app_name.
bool hasGroup(string groupName)Checks whether group_name appears inside the groups registered for the recently used item info.
bool isLocal()Checks whether the resource is local or not by looking at the scheme of its URI. Returns: true if the resource is local
string lastApplication()Gets the name of the last application that have registered the recently used resource represented by info. Returns: an application name. Use [glib.global.gfree] to free it.
bool match(gtk.recent_info.RecentInfo infoB)Checks whether two #GtkRecentInfo-struct point to the same resource.
Constructors
this(void * ptr, Flag!"Take" take)