1
  
2
  
3
  
4
  
5
  
6
  
7
  
8
  
9
  
10
  
11
  
12
  
13
  
14
  
15
  
16
  
17
  
18
  
19
  
20
  
21
  
22
  
23
  
24
  
25
  
26
  
27
  
28
  
29
  
30
  
31
  
32
  
33
  
34
  
35
  
36
  
37
  
38
  
39
  
40
  
41
  
42
  
43
  
44
  
45
  
46
  
47
  
48
  
49
  
50
  
51
  
52
  
53
  
54
  
55
  
56
  
57
  
58
  
59
  
60
  
61
  
62
  
63
  
64
  
65
  
66
  
67
  
68
  
69
  
70
  
71
  
72
  
73
  
74
  
75
  
76
  
77
  
78
  
79
  
80
  
81
  
82
  
83
  
84
  
85
  
86
  
87
  
88
  
89
  
90
  
91
  
92
  
93
  
94
  
95
  
96
  
97
  
98
  
99
  
100
  
101
  
102
  
103
  
104
  
105
  
106
  
107
  
108
  
109
  
110
  
111
  
112
  
113
  
114
  
115
  
116
  
117
  
118
  
119
  
120
  
121
  
122
  
123
  
124
  
125
  
126
  
127
  
128
  
129
  
130
  
131
  
132
  
133
  
134
  
135
  
136
  
137
  
138
  
139
  
140
  
141
  
142
  
143
  
144
  
145
  
146
  
147
  
148
  
149
  
150
  
151
  
152
  
153
  
154
  
155
  
156
  
157
  
158
  
159
  
160
  
161
  
162
  
163
  
164
  
165
  
166
  
167
  
168
  
169
  
170
  
171
  
172
  
173
  
174
  
175
  
176
  
177
  
178
  
179
  
180
  
181
  
182
  
183
  
184
  
185
  
186
  
187
  
188
  
189
  
190
  
191
  
192
  
193
  
194
  
195
  
196
  
197
  
198
  
199
  
200
  
201
  
202
  
203
  
204
  
205
  
206
  
207
  
208
  
209
  
210
  
211
  
212
  
213
  
214
  
215
  
216
  
217
  
218
  
219
  
220
  
221
  
222
  
223
  
224
  
225
  
226
  
227
  
228
  
229
  
230
  
231
  
232
  
233
  
/* -*- C -*- */ 
require gtk210; 
class GTK2.RecentInfo; 
//! 
 
void _destruct() 
//! Destructor. 
{ 
  if (THIS->obj && THIS->owned) 
    gtk_recent_info_unref((GtkRecentInfo *)THIS->obj); 
  THIS->obj=NULL; 
  pgtk2_pop_n_elems(args); 
  push_int(0); 
} 
 
string get_uri() 
//! Gets the URI of the resource. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_uri((GtkRecentInfo *)THIS->obj)); 
} 
 
string get_display_name() 
//! Gets the name of the resource. If none has been defined, the basename 
//! of the resource is obtained. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_display_name((GtkRecentInfo *)THIS->obj)); 
} 
 
string get_description() 
//! Gets the (short) description of the resource. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_description((GtkRecentInfo *)THIS->obj)); 
} 
 
//! Gets the (short) description of the resource. 
 
string get_mime_type() 
//! Gets the MIME type of the resource. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_mime_type((GtkRecentInfo *)THIS->obj)); 
} 
 
 
int get_added() 
//! Gets the timestamp (seconds from system's Epoch) when the resource was 
//! added to the recently used resources list. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_get_added((GtkRecentInfo *)THIS->obj)); 
} 
 
int get_modified() 
//! Gets the timestamp (seconds from system's Epoch) when the resource was 
//! last modified. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_get_modified((GtkRecentInfo *)THIS->obj)); 
} 
 
int get_visited() 
//! Gets the timestamp (seconds from system's Epoch) when the resource was 
//! last visited. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_get_visited((GtkRecentInfo *)THIS->obj)); 
} 
 
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. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_get_private_hint((GtkRecentInfo *)THIS->obj)); 
} 
 
string last_application() 
//! Gets the name of the last application that have registered the recently 
//! used resource represented by info. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_last_application((GtkRecentInfo *)THIS->obj)); 
} 
 
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,NULL); 
    i=0; 
    while (*gr) { 
      PGTK_PUSH_GCHAR(*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. 
{ 
  pgtk2_verify_inited(); 
  { 
    char *name; 
    int hg; 
 
    get_all_args(NULL,args,"%s",&name); 
    hg=gtk_recent_info_has_group((GtkRecentInfo *)THIS->obj,name); 
    pgtk2_pop_n_elems(args); 
    push_int(hg); 
  } 
} 
 
int has_application() 
//! Checks whether an application registered this resource using app_name. 
{ 
  pgtk2_verify_inited(); 
  { 
    char *name; 
    int hg; 
  
    get_all_args(NULL,args,"%s",&name); 
    hg=gtk_recent_info_has_application((GtkRecentInfo *)THIS->obj,name); 
    pgtk2_pop_n_elems(args); 
    push_int(hg); 
  } 
} 
 
 
GDK2.Pixbuf get_icon(int size) 
//! Retrieves the icon of size size associated to the resource MIME type. 
{ 
  pgtk2_verify_inited(); 
  { 
    int size; 
    GdkPixbuf *gp; 
 
    get_all_args(NULL,args,"%i",&size); 
    pgtk2_pop_n_elems(args); 
    gp=gtk_recent_info_get_icon((GtkRecentInfo *)THIS->obj,size); 
    push_gobject(gp); 
  } 
} 
 
string get_short_name() 
//! Computes a 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". 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_short_name((GtkRecentInfo *)THIS->obj)); 
} 
 
string get_uri_display() 
//! Gets a displayable version of the resource's URI. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  PGTK_PUSH_GCHAR(gtk_recent_info_get_uri_display((GtkRecentInfo *)THIS->obj)); 
} 
 
int get_age() 
//! Gets the number of days elapsed since the last update of the resource 
//! pointed by info. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_get_age((GtkRecentInfo *)THIS->obj)); 
} 
 
int is_local() 
//! Checks whether the resource is local or not by looking at the scheme 
//! of its URI. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_is_local((GtkRecentInfo *)THIS->obj)); 
} 
 
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. 
{ 
  pgtk2_verify_inited(); 
  pgtk2_pop_n_elems(args); 
  push_int(gtk_recent_info_exists((GtkRecentInfo *)THIS->obj)); 
} 
 
 
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(NULL,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;