Contains the metadata associated with an item in the recently used files list.
Metadata associated with an item in the recently used files list. Ref returns an additional reference; release owned references with Unref. The dates returned by Get_Added, Get_Modified and Get_Visited are borrowed from the manager's database. Take a Glib.Date_Time.Ref before retaining a date across changes to that database.
<group>Recent Files</group>
function Create_App_Info
(Self : Gtk_Recent_Info;
App_Name : UTF8_String := "";
Error : out Glib.Error.GError) return Glib.App_Info.Gapp_Info
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
the name of the application that should be mapped to a GAppInfo; if null is used then the default application for the MIME type is used
the return location for a recoverable error
the newly created GAppInfo
function Exists (Self : Gtk_Recent_Info) return Boolean
Checks whether the resource pointed by Info still exists. At the moment this check is done only on resources pointing to local files.
True if the resource exists
function From_Object (Object : System.Address) return Gtk_Recent_Info
function From_Object_Free (B : access Gtk_Recent_Info'Class) return Gtk_Recent_Info
function Get_Added
(Self : Gtk_Recent_Info) return Glib.Date_Time.Gdate_Time
Gets the time when the resource was added to the recently used resources list.
a GDateTime for the time when the resource was added. Has transfer-ownership='none'.
function Get_Age (Self : Gtk_Recent_Info) return Glib.Gint
Gets the number of days elapsed since the last update of the resource pointed by Info.
a positive integer containing the number of days elapsed since the time this resource was last modified
function Get_Application_Info
(Self : Gtk_Recent_Info;
App_Name : UTF8_String;
App_Exec : out Ada.Strings.Unbounded.Unbounded_String;
Count : out Guint;
Stamp : out Glib.Date_Time.Gdate_Time) return Boolean
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. App_Exec is copied into an Ada unbounded string. Stamp is borrowed from Self. On failure, App_Exec is empty, Count is zero and Stamp is null.
the name of the application that has registered this item
return location for the string containing the command line
return location for the number of times this item was registered
return location for the time this item was last registered for this application
True if the application registered this resource, False otherwise.
function Get_Applications
(Self : Gtk_Recent_Info;
Length : access Gsize := null) return GNAT.Strings.String_List
Returns the names of applications that registered this resource. Length, when supplied, receives their count. The returned Ada strings
return location for the length of the returned list
an Ada list of application names.
function Get_Description (Self : Gtk_Recent_Info) return UTF8_String
Gets the (short) description of the resource.
the description of the resource. The returned string is owned by the recent manager, and should not be freed.
function Get_Display_Name (Self : Gtk_Recent_Info) return UTF8_String
Gets the name of the resource. If none has been defined, the basename of the resource is obtained.
the display name of the resource. The returned string is owned by the recent manager, and should not be freed.
function Get_Gicon (Self : Gtk_Recent_Info) return Glib.G_Icon.G_Icon
Retrieves the icon associated to the resource MIME type.
a GIcon containing the icon
function Get_Groups
(Self : Gtk_Recent_Info;
Length : access Gsize := null) return GNAT.Strings.String_List
Returns the group names registered for this resource. Length, when supplied, receives their count. The returned Ada strings belong to the
return location for the number of groups returned
an Ada list of group names.
function Get_Mime_Type (Self : Gtk_Recent_Info) return UTF8_String
Gets the MIME type of the resource.
the MIME type of the resource. The returned string is owned by the recent manager, and should not be freed.
function Get_Modified
(Self : Gtk_Recent_Info) return Glib.Date_Time.Gdate_Time
Gets the time when the meta-data for the resource was last modified.
a GDateTime for the time when the resource was last modified. Has transfer-ownership='none'.
function Get_Private_Hint (Self : Gtk_Recent_Info) return Boolean
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.
True if the private flag was found, False otherwise
function Get_Short_Name (Self : Gtk_Recent_Info) return UTF8_String
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".
A newly-allocated string in UTF-8 encoding free it with g_free
function Get_Type return Glib.GType
function Get_Uri (Self : Gtk_Recent_Info) return UTF8_String
Gets the URI of the resource.
the URI of the resource. The returned string is owned by the recent manager, and should not be freed.
function Get_Uri_Display (Self : Gtk_Recent_Info) return UTF8_String
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].
a newly allocated UTF-8 string containing the resource's URI or null. Use g_free when done using it.
function Get_Visited
(Self : Gtk_Recent_Info) return Glib.Date_Time.Gdate_Time
Gets the time when the meta-data for the resource was last visited.
a GDateTime for the time when the resource was last visited. Has transfer-ownership='none'.
type Gtk_Recent_Info is new Glib.C_Boxed with null record;
function Has_Application
(Self : Gtk_Recent_Info;
App_Name : UTF8_String) return Boolean
Checks whether an application registered this resource using App_Name.
a string containing an application name
True if an application with name App_Name was found, False otherwise
function Has_Group
(Self : Gtk_Recent_Info;
Group_Name : UTF8_String) return Boolean
Checks whether Group_Name appears inside the groups registered for the recently used item Info.
name of a group
True if the group was found
function Is_Local (Self : Gtk_Recent_Info) return Boolean
Checks whether the resource is local or not by looking at the scheme of its URI.
True if the resource is local
function Last_Application (Self : Gtk_Recent_Info) return UTF8_String
Gets the name of the last application that have registered the recently used resource represented by Info.
an application name. Use g_free to free it.
function Match
(Self : Gtk_Recent_Info;
Info_B : Gtk_Recent_Info) return Boolean
Checks whether two GtkRecentInfo point to the same resource.
a GtkRecentInfo
True if both GtkRecentInfo point to the same resource, False otherwise
Null_Gtk_Recent_Info : constant Gtk_Recent_Info;
function Ref (Self : Gtk_Recent_Info) return Gtk_Recent_Info
Increases the reference count of Recent_Info by one.
the recent info object with its reference count increased by one. Has transfer-ownership='full'.
procedure Unref (Self : Gtk_Recent_Info)
Decreases the reference count of Info by one. If the reference count reaches zero, Info is deallocated, and the memory freed.