Gtk.Recent_Info

Entities

Tagged Types

Subtypes

Constants

Subprograms

Description

Gtk.Recent_Info.Gtk_Recent_Info-struct contains private data only, and should be accessed using the provided API.

Gtk.Recent_Info.Gtk_Recent_Info constains all the meta-data associated with an entry in the recently used files list.

Create_App_Info

function Create_App_Info
   (Self     : Gtk_Recent_Info;
    App_Name : UTF8_String := "") return Glib.GApp_Info

Creates a Glib.GApp_Info for the specified Gtk.Recent_Info.Gtk_Recent_Info

Parameters
Self
App_Name

the name of the application that should be mapped to a Glib.GApp_Info; if null is used then the default application for the MIME type is used

Return Value

the newly created Glib.GApp_Info, or null. In case of error, Error will be set either with a GTK_RECENT_MANAGER_ERROR or a G_IO_ERROR

Exists

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. Since: gtk+ 2.10

Parameters
Self
Return Value

True if the resource exists

From_Object

function From_Object (Object : System.Address) return Gtk_Recent_Info
Parameters
Object
Return Value

From_Object_Free

function From_Object_Free (B : access Gtk_Recent_Info'Class) return Gtk_Recent_Info
Parameters
B
Return Value

Get_Added

function Get_Added (Self : Gtk_Recent_Info) return time_t

Gets the timestamp (seconds from system's Epoch) when the resource was added to the recently used resources list. Since: gtk+ 2.10

Parameters
Self
Return Value

the number of seconds elapsed from system's Epoch when the resource was added to the list, or -1 on failure.

Get_Age

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. Since: gtk+ 2.10

Parameters
Self
Return Value

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

Get_Description

function Get_Description (Self : Gtk_Recent_Info) return UTF8_String

Gets the (short) description of the resource. Since: gtk+ 2.10

Parameters
Self
Return Value

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

Get_Display_Name

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. Since: gtk+ 2.10

Parameters
Self
Return Value

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

Get_Gicon

function Get_Gicon (Self : Gtk_Recent_Info) return Glib.G_Icon.G_Icon

Retrieves the icon associated to the resource MIME type. Since: gtk+ 2.22

Parameters
Self
Return Value

a Glib.G_Icon.G_Icon containing the icon, or null. Use g_object_unref when finished using the icon

Get_Icon

function Get_Icon
   (Self : Gtk_Recent_Info;
    Size : Glib.Gint) return Gdk.Pixbuf.Gdk_Pixbuf

Retrieves the icon of size Size associated to the resource MIME type. Since: gtk+ 2.10

Parameters
Self
Size

the size of the icon in pixels

Return Value

a Gdk.Pixbuf.Gdk_Pixbuf containing the icon, or null. Use g_object_unref when finished using the icon.

Get_Mime_Type

function Get_Mime_Type (Self : Gtk_Recent_Info) return UTF8_String

Gets the MIME type of the resource. Since: gtk+ 2.10

Parameters
Self
Return Value

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

Get_Modified

function Get_Modified (Self : Gtk_Recent_Info) return time_t

Gets the timestamp (seconds from system's Epoch) when the meta-data for the resource was last modified. Since: gtk+ 2.10

Parameters
Self
Return Value

the number of seconds elapsed from system's Epoch when the resource was last modified, or -1 on failure.

Get_Private_Hint

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. Since: gtk+ 2.10

Parameters
Self
Return Value

True if the private flag was found, False otherwise

Get_Short_Name

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". Since: gtk+ 2.10

Parameters
Self
Return Value

A newly-allocated string in UTF-8 encoding free it with g_free

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Uri

function Get_Uri (Self : Gtk_Recent_Info) return UTF8_String

Gets the URI of the resource. Since: gtk+ 2.10

Parameters
Self
Return Value

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

Get_Uri_Display

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 Gtk.Recent_Info.Get_Uri. Since: gtk+ 2.10

Parameters
Self
Return Value

a newly allocated UTF-8 string containing the resource's URI or null. Use g_free when done using it.

Get_Visited

function Get_Visited (Self : Gtk_Recent_Info) return time_t

Gets the timestamp (seconds from system's Epoch) when the meta-data for the resource was last visited. Since: gtk+ 2.10

Parameters
Self
Return Value

the number of seconds elapsed from system's Epoch when the resource was last visited, or -1 on failure.

Gtk_Recent_Info

type Gtk_Recent_Info is new Glib.C_Boxed with null record;

Has_Application

function Has_Application
   (Self     : Gtk_Recent_Info;
    App_Name : UTF8_String) return Boolean

Checks whether an application registered this resource using App_Name. Since: gtk+ 2.10

Parameters
Self
App_Name

a string containing an application name

Return Value

True if an application with name App_Name was found, False otherwise

Has_Group

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. Since: gtk+ 2.10

Parameters
Self
Group_Name

name of a group

Return Value

True if the group was found

Is_Local

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. Since: gtk+ 2.10

Parameters
Self
Return Value

True if the resource is local

Last_Application

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. Since: gtk+ 2.10

Parameters
Self
Return Value

an application name. Use g_free to free it.

Match

function Match
   (Self   : Gtk_Recent_Info;
    Info_B : Gtk_Recent_Info) return Boolean

Checks whether two Gtk.Recent_Info.Gtk_Recent_Info-struct point to the same resource. Since: gtk+ 2.10

Parameters
Self
Info_B

a Gtk.Recent_Info.Gtk_Recent_Info

Return Value

True if both Gtk.Recent_Info.Gtk_Recent_Info-struct point to the same resource, False otherwise

Null_Gtk_Recent_Info

Null_Gtk_Recent_Info : constant Gtk_Recent_Info;

Ref

procedure Ref (Self : Gtk_Recent_Info)

Increases the reference count of Recent_Info by one. Since: gtk+ 2.10

Parameters
Self

time_t

subtype time_t is Long_Integer;

Type to interface with C's time_t type. To convert this to/from an Ada type, look at Ada.Calendar.Conversion_Operations and be sure to pay special attention to the ranges each type is capable of representing.

Unref

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. Since: gtk+ 2.10

Parameters
Self