Skip to content
Snippets Groups Projects
Commit 517c92a0 authored by Lance Dillon's avatar Lance Dillon
Browse files

added GtkRecentInfo

Rev: src/post_modules/GTK2/source/gtkrecentinfo.pre:1.1
parent cd168821
No related branches found
No related tags found
No related merge requests found
require gtk210;
/* -*- C -*- */
class GTK2.RecentInfo;
void destroy()
//! Destructor.
{
if (THIS->obj)
gtk_recent_info_unref();
THIS->obj=NULL;
pgtk2_pop_n_elems(args);
push_int(0);
}
string get_uri();
//! Gets the URI of the resource.
string get_display_name();
//! Gets the name of the resource. If none has been defined, the basename
//! of the resource is obtained.
string get_description();
//! Gets the (short) description of the resource.
string get_mime_type();
//! Gets the MIME type of the resource.
int get_added();
//! Gets the timestamp (seconds from system's Epoch) when the resource was
//! added to the recently used resources list.
int get_modified();
//! Gets the timestamp (seconds from system's Epoch) when the resource was
//! last modified.
int get_visited();
//! Gets the timestamp (seconds from system's Epoch) when the resource was
//! last visited.
int get_private_hint();
//! 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.
string last_application();
//! Gets the name of the last application that have registered the recently
//! used resource represented by info.
array get_groups()
//! Returns all groups registered for the recently used item.
{
pgtk2_verify_inited();
pgtk2_pop_n_elems(args);
{
gchar **groups,**gr;
int i;
groups=gr=gtk_recent_info_get_groups((GtkRecentInfo *)THIS->obj);
i=0;
while (gr) {
push_string(make_shared_binary_string(*gr));
i++;
gr++;
}
if (i)
f_aggregate(i);
else
push_int(0);
if (groups)
g_strfreev(groups);
}
}
int has_group(string group_name);
//! Checks whether group_name appears inside the groups registered for the
//! recently used item info.
int has_application();
//! Checks whether an application registered this resource using app_name.
GDK2.Pixbuf get_icon(int size);
//! Retrieves the icon of size size associated to the resource MIME type.
string get_short_name();
//! 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".
string get_uri_display();
//! Gets a displayable version of the resource's URI.
int get_age();
//! Gets the number of days elapsed since the last update of the resource
//! pointed by info.
int is_local();
//! Checks whether the resource is local or not by looking at the scheme
//! of its URI.
int exists();
//! Checks whether the resource pointed by info still exists. At the moment
//! this check is done only on resources pointing to local files.
int match(GTK2.RecentInfo b)
//! Checks whether two GTK2.RecentInfo structures point to the same resource.
{
pgtk2_verify_inited();
{
struct object *o1;
int res;
get_all_args("match",args,"%o",&o1);
res=gtk_recent_info_match((GtkRecentInfo *)THIS->obj,
(GtkRecentInfo *)get_pg2object(o1,pgtk2_recent_info_program));
pgtk2_pop_n_elems(args);
push_int(res);
}
}
endrequire;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment