3.14 <GtkRecentInfo>

Structure: <GtkRecentInfo>

Contains the metadata associated with an item in the recently used files list.

Procedures

Method: recent-info:create-app-info self [app-name] ⇒ %return
Method: create-app-info self [app-name] ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

app-name

Passed, or left out: a string, or #f.

the name of the application that should be mapped to a <GAppInfo>; if #f is used then the default application for the MIME type is used

%return

Returned: a <GAppInfo>, or #f.

the newly created <GAppInfo>

Method: recent-info:exists? self ⇒ %return
Method: exists? self ⇒ %return

Checks whether the resource pointed by self still exists. At the moment this check is done only on resources pointing to local files.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a boolean.

#t if the resource exists

Method: recent-info:get-added self ⇒ %return
Method: get-added self ⇒ %return

Gets the time when the resource was added to the recently used resources list.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a <GDateTime>.

a <GDateTime> for the time when the resource was added

Method: recent-info:get-age self ⇒ %return
Method: get-age self ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a 32-bit integer.

a positive integer containing the number of days elapsed since the time this resource was last modified

Method: recent-info:get-application-info self app-name ⇒ %return app-exec count stamp
Method: get-application-info self app-name ⇒ %return app-exec count stamp

Gets the data regarding the application that has registered the resource pointed by self.

If the command line contains any escape characters defined inside the storage specification, they will be expanded.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

app-name

Passed: a string.

the name of the application that has registered this item

%return

Returned: a boolean.

#t if an application with app-name has registered this resource inside the recently used list, or #f otherwise. The app-exec string is owned by the <GtkRecentInfo> and should not be modified or freed

app-exec

Returned: a string.

return location for the string containing the command line

count

Returned: an unsigned 32-bit integer.

return location for the number of times this item was registered

stamp

Returned: a <GDateTime>.

return location for the time this item was last registered for this application

Method: recent-info:get-applications self ⇒ %return
Method: get-applications self ⇒ %return

Retrieves the list of applications that have registered this resource.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a vector, each a string.

a newly allocated #f-terminated array of strings. Use strfreev to free it.

length

Not returned: it is the length of %return.

return location for the length of the returned list

Method: recent-info:get-description self ⇒ %return
Method: get-description self ⇒ %return

Gets the (short) description of the resource.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a string.

the description of the resource. The returned string is owned by the recent manager, and should not be freed.

Method: recent-info:get-display-name self ⇒ %return
Method: get-display-name self ⇒ %return

Gets the name of the resource.

If none has been defined, the basename of the resource is obtained.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a string.

the display name of the resource. The returned string is owned by the recent manager, and should not be freed.

Method: recent-info:get-gicon self ⇒ %return
Method: get-gicon self ⇒ %return

Retrieves the icon associated to the resource MIME type.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a <GIcon>, or #f.

a <GIcon> containing the icon

Method: recent-info:get-groups self ⇒ %return
Method: get-groups self ⇒ %return

Returns all groups registered for the recently used item self.

The array of returned group names will be #f terminated, so length might optionally be #f.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a vector, each a string.

a newly allocated #f terminated array of strings. Use strfreev to free it.

length

Not returned: it is the length of %return.

return location for the number of groups returned

Method: recent-info:get-mime-type self ⇒ %return
Method: get-mime-type self ⇒ %return

Gets the MIME type of the resource.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a string.

the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed.

Method: recent-info:get-modified self ⇒ %return
Method: get-modified self ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a <GDateTime>.

a <GDateTime> for the time when the resource was last modified

Method: recent-info:get-private-hint? self ⇒ %return
Method: get-private-hint? self ⇒ %return

Gets the value of the “private” flag.

Resources in the recently used list that have this flag set to #t should only be displayed by the applications that have registered them.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a boolean.

#t if the private flag was found, #f otherwise

Method: recent-info:get-short-name self ⇒ %return
Method: get-short-name self ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

an <GtkRecentInfo>

%return

Returned: a string.

A newly-allocated string in UTF-8 encoding free it with byte-array:free

Method: recent-info:get-uri self ⇒ %return
Method: get-uri self ⇒ %return

Gets the URI of the resource.

self

Passed: a <GtkRecentInfo>.

a tkRecentInfo

%return

Returned: a string.

the URI of the resource. The returned string is owned by the recent manager, and should not be freed.

Method: recent-info:get-uri-display self ⇒ %return
Method: get-uri-display self ⇒ %return

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 recent-info:get-uri.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a string, or #f.

a newly allocated UTF-8 string containing the resource’s URI or #f. Use byte-array:free when done using it.

Method: recent-info:get-visited self ⇒ %return
Method: get-visited self ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a <GDateTime>.

a <GDateTime> for the time when the resource was last visited

Method: recent-info:has-application? self app-name ⇒ %return
Method: has-application? self app-name ⇒ %return

Checks whether an application registered this resource using app-name.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

app-name

Passed: a string.

a string containing an application name

%return

Returned: a boolean.

#t if an application with name app-name was found, #f otherwise

Method: recent-info:has-group? self group-name ⇒ %return
Method: has-group? self group-name ⇒ %return

Checks whether group-name appears inside the groups registered for the recently used item self.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

group-name

Passed: a string.

name of a group

%return

Returned: a boolean.

#t if the group was found

Method: recent-info:is-local? self ⇒ %return
Method: is-local? self ⇒ %return

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

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a boolean.

#t if the resource is local

Method: recent-info:last-application self ⇒ %return
Method: last-application self ⇒ %return

Gets the name of the last application that have registered the recently used resource represented by self.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a string.

an application name. Use byte-array:free to free it.

Method: recent-info:match? self info-b ⇒ %return
Method: match? self info-b ⇒ %return

Checks whether two <GtkRecentInfo> point to the same resource.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

info-b

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a boolean.

#t if both <GtkRecentInfo> point to the same resource, #f otherwise

Method: recent-info:ref self ⇒ %return
Method: ref self ⇒ %return

Increases the reference count of recent-info by one.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>

%return

Returned: a <GtkRecentInfo>.

the recent info object with its reference count increased by one

Method: recent-info:unref self
Method: unref self

Decreases the reference count of self by one.

If the reference count reaches zero, self is deallocated, and the memory freed.

self

Passed: a <GtkRecentInfo>.

a <GtkRecentInfo>