1 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
2
3
4 #include <glibmm.h>
5
6 #include <gtkmm/recentchooser.h>
7 #include <gtkmm/private/recentchooser_p.h>
8
9
10 /* Copyright 2006 The gtkmm Development Team
11 *
12 * This library is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU Lesser General Public
14 * License as published by the Free Software Foundation; either
15 * version 2.1 of the License, or (at your option) any later version.
16 *
17 * This library is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * Lesser General Public License for more details.
21 *
22 * You should have received a copy of the GNU Lesser General Public
23 * License along with this library; if not, write to the Free
24 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
25 */
26
27 #include <gtk/gtk.h>
28
29 // This Signal Proxy allows the C++ coder to specify a sigc::slot instead of a static function.
30
SignalProxy_Compare_gtk_callback(GtkRecentInfo * a,GtkRecentInfo * b,gpointer data)31 static int SignalProxy_Compare_gtk_callback(GtkRecentInfo* a, GtkRecentInfo* b, gpointer data)
32 {
33 const Gtk::RecentChooser::SlotCompare* the_slot = static_cast<Gtk::RecentChooser::SlotCompare*>(data);
34
35 try
36 {
37 return (*the_slot)(Glib::wrap(a, true /* take reference */), Glib::wrap(b, true /* take reference */));
38 }
39 catch(...)
40 {
41 Glib::exception_handlers_invoke();
42 }
43
44 return 0;
45 }
46
SignalProxy_Compare_gtk_callback_destroy(gpointer data)47 static void SignalProxy_Compare_gtk_callback_destroy(gpointer data)
48 {
49 delete static_cast<Gtk::RecentChooser::SlotCompare*>(data);
50 }
51
52
53 namespace Gtk
54 {
55
56 //Allow the generated code to work without the prefix:
57 typedef RecentChooser::ListHandle_RecentInfos ListHandle_RecentInfos;
58
set_sort_func(const SlotCompare & slot)59 void RecentChooser::set_sort_func(const SlotCompare& slot)
60 {
61 SlotCompare* slot_copy = new SlotCompare(slot);
62
63 gtk_recent_chooser_set_sort_func(
64 gobj(),
65 &SignalProxy_Compare_gtk_callback, slot_copy,
66 &SignalProxy_Compare_gtk_callback_destroy);
67 }
68
get_uris() const69 Glib::StringArrayHandle RecentChooser::get_uris() const
70 {
71 return Glib::StringArrayHandle(gtk_recent_chooser_get_uris(const_cast<GtkRecentChooser*>(gobj()), NULL));
72 }
73
unset_limit()74 void RecentChooser::unset_limit()
75 {
76 gtk_recent_chooser_set_limit(gobj(), -1 /* See C docs */);
77 }
78
79 } // namespace Gtk
80
81
82 namespace
83 {
84
85
86 static const Glib::SignalProxyInfo RecentChooser_signal_selection_changed_info =
87 {
88 "selection-changed",
89 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
90 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
91 };
92
93
94 static const Glib::SignalProxyInfo RecentChooser_signal_item_activated_info =
95 {
96 "item-activated",
97 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
98 (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
99 };
100
101
102 } // anonymous namespace
103
104 // static
value_type()105 GType Glib::Value<Gtk::RecentSortType>::value_type()
106 {
107 return gtk_recent_sort_type_get_type();
108 }
109
110
RecentChooserError(Gtk::RecentChooserError::Code error_code,const Glib::ustring & error_message)111 Gtk::RecentChooserError::RecentChooserError(Gtk::RecentChooserError::Code error_code, const Glib::ustring& error_message)
112 :
113 Glib::Error (GTK_RECENT_CHOOSER_ERROR, error_code, error_message)
114 {}
115
RecentChooserError(GError * gobject)116 Gtk::RecentChooserError::RecentChooserError(GError* gobject)
117 :
118 Glib::Error (gobject)
119 {}
120
code() const121 Gtk::RecentChooserError::Code Gtk::RecentChooserError::code() const
122 {
123 return static_cast<Code>(Glib::Error::code());
124 }
125
throw_func(GError * gobject)126 void Gtk::RecentChooserError::throw_func(GError* gobject)
127 {
128 throw Gtk::RecentChooserError(gobject);
129 }
130
131 // static
value_type()132 GType Glib::Value<Gtk::RecentChooserError::Code>::value_type()
133 {
134 return gtk_recent_chooser_error_get_type();
135 }
136
137
138 namespace Glib
139 {
140
wrap(GtkRecentChooser * object,bool take_copy)141 Glib::RefPtr<Gtk::RecentChooser> wrap(GtkRecentChooser* object, bool take_copy)
142 {
143 return Glib::RefPtr<Gtk::RecentChooser>( dynamic_cast<Gtk::RecentChooser*> (Glib::wrap_auto_interface<Gtk::RecentChooser> ((GObject*)(object), take_copy)) );
144 //We use dynamic_cast<> in case of multiple inheritance.
145 }
146
147 } // namespace Glib
148
149
150 namespace Gtk
151 {
152
153
154 /* The *_Class implementation: */
155
init()156 const Glib::Interface_Class& RecentChooser_Class::init()
157 {
158 if(!gtype_) // create the GType if necessary
159 {
160 // Glib::Interface_Class has to know the interface init function
161 // in order to add interfaces to implementing types.
162 class_init_func_ = &RecentChooser_Class::iface_init_function;
163
164 // We can not derive from another interface, and it is not necessary anyway.
165 gtype_ = gtk_recent_chooser_get_type();
166 }
167
168 return *this;
169 }
170
iface_init_function(void * g_iface,void *)171 void RecentChooser_Class::iface_init_function(void* g_iface, void*)
172 {
173 BaseClassType *const klass = static_cast<BaseClassType*>(g_iface);
174
175 //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
176 //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
177 g_assert(klass != 0);
178
179 klass->get_current_uri = &get_current_uri_vfunc_callback;
180 klass->unselect_uri = &unselect_uri_vfunc_callback;
181 klass->select_all = &select_all_vfunc_callback;
182 klass->unselect_all = &unselect_all_vfunc_callback;
183 klass->get_recent_manager = &get_recent_manager_vfunc_callback;
184 klass->add_filter = &add_filter_vfunc_callback;
185 klass->remove_filter = &remove_filter_vfunc_callback;
186
187 }
188
get_current_uri_vfunc_callback(GtkRecentChooser * self)189 gchar* RecentChooser_Class::get_current_uri_vfunc_callback(GtkRecentChooser* self)
190 {
191 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
192 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
193
194 // Non-gtkmmproc-generated custom classes implicitly call the default
195 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
196 // generated classes can use this optimisation, which avoids the unnecessary
197 // parameter conversions if there is no possibility of the virtual function
198 // being overridden:
199 if(obj_base && obj_base->is_derived_())
200 {
201 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
202 if(obj) // This can be NULL during destruction.
203 {
204 try // Trap C++ exceptions which would normally be lost because this is a C callback.
205 {
206 // Call the virtual member method, which derived classes might override.
207 return g_strdup((obj->get_current_uri_vfunc()).c_str());
208 }
209 catch(...)
210 {
211 Glib::exception_handlers_invoke();
212 }
213 }
214 }
215
216 BaseClassType *const base = static_cast<BaseClassType*>(
217 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
218 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
219 ) );
220
221 // Call the original underlying C function:
222 if(base && base->get_current_uri)
223 {
224 gchar* retval = (*base->get_current_uri)(self);
225 return retval;
226 }
227
228 typedef gchar* RType;
229 return RType();
230 }
unselect_uri_vfunc_callback(GtkRecentChooser * self,const gchar * uri)231 void RecentChooser_Class::unselect_uri_vfunc_callback(GtkRecentChooser* self, const gchar* uri)
232 {
233 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
234 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
235
236 // Non-gtkmmproc-generated custom classes implicitly call the default
237 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
238 // generated classes can use this optimisation, which avoids the unnecessary
239 // parameter conversions if there is no possibility of the virtual function
240 // being overridden:
241 if(obj_base && obj_base->is_derived_())
242 {
243 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
244 if(obj) // This can be NULL during destruction.
245 {
246 try // Trap C++ exceptions which would normally be lost because this is a C callback.
247 {
248 // Call the virtual member method, which derived classes might override.
249 obj->unselect_uri_vfunc(Glib::convert_const_gchar_ptr_to_ustring(uri)
250 );
251 return;
252 }
253 catch(...)
254 {
255 Glib::exception_handlers_invoke();
256 }
257 }
258 }
259
260 BaseClassType *const base = static_cast<BaseClassType*>(
261 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
262 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
263 ) );
264
265 // Call the original underlying C function:
266 if(base && base->unselect_uri)
267 {
268 (*base->unselect_uri)(self, uri);
269 }
270
271 }
select_all_vfunc_callback(GtkRecentChooser * self)272 void RecentChooser_Class::select_all_vfunc_callback(GtkRecentChooser* self)
273 {
274 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
275 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
276
277 // Non-gtkmmproc-generated custom classes implicitly call the default
278 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
279 // generated classes can use this optimisation, which avoids the unnecessary
280 // parameter conversions if there is no possibility of the virtual function
281 // being overridden:
282 if(obj_base && obj_base->is_derived_())
283 {
284 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
285 if(obj) // This can be NULL during destruction.
286 {
287 try // Trap C++ exceptions which would normally be lost because this is a C callback.
288 {
289 // Call the virtual member method, which derived classes might override.
290 obj->select_all_vfunc();
291 return;
292 }
293 catch(...)
294 {
295 Glib::exception_handlers_invoke();
296 }
297 }
298 }
299
300 BaseClassType *const base = static_cast<BaseClassType*>(
301 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
302 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
303 ) );
304
305 // Call the original underlying C function:
306 if(base && base->select_all)
307 {
308 (*base->select_all)(self);
309 }
310
311 }
unselect_all_vfunc_callback(GtkRecentChooser * self)312 void RecentChooser_Class::unselect_all_vfunc_callback(GtkRecentChooser* self)
313 {
314 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
315 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
316
317 // Non-gtkmmproc-generated custom classes implicitly call the default
318 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
319 // generated classes can use this optimisation, which avoids the unnecessary
320 // parameter conversions if there is no possibility of the virtual function
321 // being overridden:
322 if(obj_base && obj_base->is_derived_())
323 {
324 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
325 if(obj) // This can be NULL during destruction.
326 {
327 try // Trap C++ exceptions which would normally be lost because this is a C callback.
328 {
329 // Call the virtual member method, which derived classes might override.
330 obj->unselect_all_vfunc();
331 return;
332 }
333 catch(...)
334 {
335 Glib::exception_handlers_invoke();
336 }
337 }
338 }
339
340 BaseClassType *const base = static_cast<BaseClassType*>(
341 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
342 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
343 ) );
344
345 // Call the original underlying C function:
346 if(base && base->unselect_all)
347 {
348 (*base->unselect_all)(self);
349 }
350
351 }
get_recent_manager_vfunc_callback(GtkRecentChooser * self)352 GtkRecentManager* RecentChooser_Class::get_recent_manager_vfunc_callback(GtkRecentChooser* self)
353 {
354 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
355 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
356
357 // Non-gtkmmproc-generated custom classes implicitly call the default
358 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
359 // generated classes can use this optimisation, which avoids the unnecessary
360 // parameter conversions if there is no possibility of the virtual function
361 // being overridden:
362 if(obj_base && obj_base->is_derived_())
363 {
364 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
365 if(obj) // This can be NULL during destruction.
366 {
367 try // Trap C++ exceptions which would normally be lost because this is a C callback.
368 {
369 // Call the virtual member method, which derived classes might override.
370 return Glib::unwrap(obj->get_recent_manager_vfunc());
371 }
372 catch(...)
373 {
374 Glib::exception_handlers_invoke();
375 }
376 }
377 }
378
379 BaseClassType *const base = static_cast<BaseClassType*>(
380 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
381 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
382 ) );
383
384 // Call the original underlying C function:
385 if(base && base->get_recent_manager)
386 {
387 GtkRecentManager* retval = (*base->get_recent_manager)(self);
388 return retval;
389 }
390
391 typedef GtkRecentManager* RType;
392 return RType();
393 }
add_filter_vfunc_callback(GtkRecentChooser * self,GtkRecentFilter * filter)394 void RecentChooser_Class::add_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
395 {
396 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
397 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
398
399 // Non-gtkmmproc-generated custom classes implicitly call the default
400 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
401 // generated classes can use this optimisation, which avoids the unnecessary
402 // parameter conversions if there is no possibility of the virtual function
403 // being overridden:
404 if(obj_base && obj_base->is_derived_())
405 {
406 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
407 if(obj) // This can be NULL during destruction.
408 {
409 try // Trap C++ exceptions which would normally be lost because this is a C callback.
410 {
411 // Call the virtual member method, which derived classes might override.
412 obj->add_filter_vfunc(*Glib::wrap(filter)
413 );
414 return;
415 }
416 catch(...)
417 {
418 Glib::exception_handlers_invoke();
419 }
420 }
421 }
422
423 BaseClassType *const base = static_cast<BaseClassType*>(
424 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
425 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
426 ) );
427
428 // Call the original underlying C function:
429 if(base && base->add_filter)
430 {
431 (*base->add_filter)(self, filter);
432 }
433
434 }
remove_filter_vfunc_callback(GtkRecentChooser * self,GtkRecentFilter * filter)435 void RecentChooser_Class::remove_filter_vfunc_callback(GtkRecentChooser* self, GtkRecentFilter* filter)
436 {
437 Glib::ObjectBase *const obj_base = static_cast<Glib::ObjectBase*>(
438 Glib::ObjectBase::_get_current_wrapper((GObject*)self));
439
440 // Non-gtkmmproc-generated custom classes implicitly call the default
441 // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
442 // generated classes can use this optimisation, which avoids the unnecessary
443 // parameter conversions if there is no possibility of the virtual function
444 // being overridden:
445 if(obj_base && obj_base->is_derived_())
446 {
447 CppObjectType *const obj = dynamic_cast<CppObjectType* const>(obj_base);
448 if(obj) // This can be NULL during destruction.
449 {
450 try // Trap C++ exceptions which would normally be lost because this is a C callback.
451 {
452 // Call the virtual member method, which derived classes might override.
453 obj->remove_filter_vfunc(*Glib::wrap(filter)
454 );
455 return;
456 }
457 catch(...)
458 {
459 Glib::exception_handlers_invoke();
460 }
461 }
462 }
463
464 BaseClassType *const base = static_cast<BaseClassType*>(
465 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
466 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
467 ) );
468
469 // Call the original underlying C function:
470 if(base && base->remove_filter)
471 {
472 (*base->remove_filter)(self, filter);
473 }
474
475 }
476
477
wrap_new(GObject * object)478 Glib::ObjectBase* RecentChooser_Class::wrap_new(GObject* object)
479 {
480 return new RecentChooser((GtkRecentChooser*)(object));
481 }
482
483
484 /* The implementation: */
485
RecentChooser()486 RecentChooser::RecentChooser()
487 :
488 Glib::Interface(recentchooser_class_.init())
489 {}
490
RecentChooser(GtkRecentChooser * castitem)491 RecentChooser::RecentChooser(GtkRecentChooser* castitem)
492 :
493 Glib::Interface((GObject*)(castitem))
494 {}
495
RecentChooser(const Glib::Interface_Class & interface_class)496 RecentChooser::RecentChooser(const Glib::Interface_Class& interface_class)
497 : Glib::Interface(interface_class)
498 {
499 }
500
~RecentChooser()501 RecentChooser::~RecentChooser()
502 {}
503
504 // static
add_interface(GType gtype_implementer)505 void RecentChooser::add_interface(GType gtype_implementer)
506 {
507 recentchooser_class_.init().add_interface(gtype_implementer);
508 }
509
510 RecentChooser::CppClassType RecentChooser::recentchooser_class_; // initialize static member
511
get_type()512 GType RecentChooser::get_type()
513 {
514 return recentchooser_class_.init().get_type();
515 }
516
517
get_base_type()518 GType RecentChooser::get_base_type()
519 {
520 return gtk_recent_chooser_get_type();
521 }
522
523
set_show_private(bool show_private)524 void RecentChooser::set_show_private(bool show_private)
525 {
526 gtk_recent_chooser_set_show_private(gobj(), static_cast<int>(show_private));
527 }
528
get_show_private() const529 bool RecentChooser::get_show_private() const
530 {
531 return gtk_recent_chooser_get_show_private(const_cast<GtkRecentChooser*>(gobj()));
532 }
533
set_show_not_found(bool show_not_found)534 void RecentChooser::set_show_not_found(bool show_not_found)
535 {
536 gtk_recent_chooser_set_show_not_found(gobj(), static_cast<int>(show_not_found));
537 }
538
get_show_not_found() const539 bool RecentChooser::get_show_not_found() const
540 {
541 return gtk_recent_chooser_get_show_not_found(const_cast<GtkRecentChooser*>(gobj()));
542 }
543
set_select_multiple(bool select_multiple)544 void RecentChooser::set_select_multiple(bool select_multiple)
545 {
546 gtk_recent_chooser_set_select_multiple(gobj(), static_cast<int>(select_multiple));
547 }
548
get_select_multiple() const549 bool RecentChooser::get_select_multiple() const
550 {
551 return gtk_recent_chooser_get_select_multiple(const_cast<GtkRecentChooser*>(gobj()));
552 }
553
set_limit(int limit)554 void RecentChooser::set_limit(int limit)
555 {
556 gtk_recent_chooser_set_limit(gobj(), limit);
557 }
558
get_limit() const559 int RecentChooser::get_limit() const
560 {
561 return gtk_recent_chooser_get_limit(const_cast<GtkRecentChooser*>(gobj()));
562 }
563
set_local_only(bool local_only)564 void RecentChooser::set_local_only(bool local_only)
565 {
566 gtk_recent_chooser_set_local_only(gobj(), static_cast<int>(local_only));
567 }
568
get_local_only() const569 bool RecentChooser::get_local_only() const
570 {
571 return gtk_recent_chooser_get_local_only(const_cast<GtkRecentChooser*>(gobj()));
572 }
573
set_show_tips(bool show_tips)574 void RecentChooser::set_show_tips(bool show_tips)
575 {
576 gtk_recent_chooser_set_show_tips(gobj(), static_cast<int>(show_tips));
577 }
578
get_show_tips() const579 bool RecentChooser::get_show_tips() const
580 {
581 return gtk_recent_chooser_get_show_tips(const_cast<GtkRecentChooser*>(gobj()));
582 }
583
set_show_icons(bool show_icons)584 void RecentChooser::set_show_icons(bool show_icons)
585 {
586 gtk_recent_chooser_set_show_icons(gobj(), static_cast<int>(show_icons));
587 }
588
get_show_icons() const589 bool RecentChooser::get_show_icons() const
590 {
591 return gtk_recent_chooser_get_show_icons(const_cast<GtkRecentChooser*>(gobj()));
592 }
593
set_sort_type(RecentSortType sort_type)594 void RecentChooser::set_sort_type(RecentSortType sort_type)
595 {
596 gtk_recent_chooser_set_sort_type(gobj(), ((GtkRecentSortType)(sort_type)));
597 }
598
get_sort_type() const599 RecentSortType RecentChooser::get_sort_type() const
600 {
601 return ((RecentSortType)(gtk_recent_chooser_get_sort_type(const_cast<GtkRecentChooser*>(gobj()))));
602 }
603
set_current_uri(const Glib::ustring & uri)604 bool RecentChooser::set_current_uri(const Glib::ustring& uri)
605 {
606 GError* gerror = 0;
607 bool retvalue = gtk_recent_chooser_set_current_uri(gobj(), uri.c_str(), &(gerror));
608 if(gerror)
609 ::Glib::Error::throw_exception(gerror);
610 return retvalue;
611 }
612
get_current_uri() const613 Glib::ustring RecentChooser::get_current_uri() const
614 {
615 return Glib::convert_return_gchar_ptr_to_ustring(gtk_recent_chooser_get_current_uri(const_cast<GtkRecentChooser*>(gobj())));
616 }
617
get_current_item()618 Glib::RefPtr<RecentInfo> RecentChooser::get_current_item()
619 {
620 Glib::RefPtr<RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(gobj()));
621 if(retvalue)
622 retvalue->reference(); //The function does not do a ref for us.
623 return retvalue;
624 }
625
get_current_item() const626 Glib::RefPtr<const RecentInfo> RecentChooser::get_current_item() const
627 {
628 Glib::RefPtr<const RecentInfo> retvalue = Glib::wrap(gtk_recent_chooser_get_current_item(const_cast<GtkRecentChooser*>(gobj())));
629 if(retvalue)
630 retvalue->reference(); //The function does not do a ref for us.
631 return retvalue;
632 }
633
select_uri(const Glib::ustring & uri)634 bool RecentChooser::select_uri(const Glib::ustring& uri)
635 {
636 GError* gerror = 0;
637 bool retvalue = gtk_recent_chooser_select_uri(gobj(), uri.c_str(), &(gerror));
638 if(gerror)
639 ::Glib::Error::throw_exception(gerror);
640 return retvalue;
641 }
642
unselect_uri(const Glib::ustring & uri)643 void RecentChooser::unselect_uri(const Glib::ustring& uri)
644 {
645 gtk_recent_chooser_unselect_uri(gobj(), uri.c_str());
646 }
647
select_all()648 void RecentChooser::select_all()
649 {
650 gtk_recent_chooser_select_all(gobj());
651 }
652
unselect_all()653 void RecentChooser::unselect_all()
654 {
655 gtk_recent_chooser_unselect_all(gobj());
656 }
657
get_items() const658 ListHandle_RecentInfos RecentChooser::get_items() const
659 {
660 return ListHandle_RecentInfos(gtk_recent_chooser_get_items(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
661 }
662
add_filter(const RecentFilter & filter)663 void RecentChooser::add_filter(const RecentFilter& filter)
664 {
665 gtk_recent_chooser_add_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
666 }
667
remove_filter(const RecentFilter & filter)668 void RecentChooser::remove_filter(const RecentFilter& filter)
669 {
670 gtk_recent_chooser_remove_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
671 }
672
list_filters()673 Glib::SListHandle<RecentFilter*> RecentChooser::list_filters()
674 {
675 return Glib::SListHandle<RecentFilter*>(gtk_recent_chooser_list_filters(gobj()), Glib::OWNERSHIP_SHALLOW);
676 }
677
list_filters() const678 Glib::SListHandle<const RecentFilter*> RecentChooser::list_filters() const
679 {
680 return Glib::SListHandle<const RecentFilter*>(gtk_recent_chooser_list_filters(const_cast<GtkRecentChooser*>(gobj())), Glib::OWNERSHIP_SHALLOW);
681 }
682
set_filter(const RecentFilter & filter)683 void RecentChooser::set_filter(const RecentFilter& filter)
684 {
685 gtk_recent_chooser_set_filter(gobj(), const_cast<GtkRecentFilter*>((filter).gobj()));
686 }
687
get_filter()688 RecentFilter* RecentChooser::get_filter()
689 {
690 return Glib::wrap(gtk_recent_chooser_get_filter(gobj()));
691 }
692
get_filter() const693 const RecentFilter* RecentChooser::get_filter() const
694 {
695 return Glib::wrap(gtk_recent_chooser_get_filter(const_cast<GtkRecentChooser*>(gobj())));
696 }
697
698
signal_selection_changed()699 Glib::SignalProxy0< void > RecentChooser::signal_selection_changed()
700 {
701 return Glib::SignalProxy0< void >(this, &RecentChooser_signal_selection_changed_info);
702 }
703
704
signal_item_activated()705 Glib::SignalProxy0< void > RecentChooser::signal_item_activated()
706 {
707 return Glib::SignalProxy0< void >(this, &RecentChooser_signal_item_activated_info);
708 }
709
710
property_show_private()711 Glib::PropertyProxy< bool > RecentChooser::property_show_private()
712 {
713 return Glib::PropertyProxy< bool >(this, "show-private");
714 }
715
property_show_private() const716 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_show_private() const
717 {
718 return Glib::PropertyProxy_ReadOnly< bool >(this, "show-private");
719 }
720
property_show_tips()721 Glib::PropertyProxy< bool > RecentChooser::property_show_tips()
722 {
723 return Glib::PropertyProxy< bool >(this, "show-tips");
724 }
725
property_show_tips() const726 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_show_tips() const
727 {
728 return Glib::PropertyProxy_ReadOnly< bool >(this, "show-tips");
729 }
730
property_show_icons()731 Glib::PropertyProxy< bool > RecentChooser::property_show_icons()
732 {
733 return Glib::PropertyProxy< bool >(this, "show-icons");
734 }
735
property_show_icons() const736 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_show_icons() const
737 {
738 return Glib::PropertyProxy_ReadOnly< bool >(this, "show-icons");
739 }
740
property_show_not_found()741 Glib::PropertyProxy< bool > RecentChooser::property_show_not_found()
742 {
743 return Glib::PropertyProxy< bool >(this, "show-not-found");
744 }
745
property_show_not_found() const746 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_show_not_found() const
747 {
748 return Glib::PropertyProxy_ReadOnly< bool >(this, "show-not-found");
749 }
750
property_select_multiple()751 Glib::PropertyProxy< bool > RecentChooser::property_select_multiple()
752 {
753 return Glib::PropertyProxy< bool >(this, "select-multiple");
754 }
755
property_select_multiple() const756 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_select_multiple() const
757 {
758 return Glib::PropertyProxy_ReadOnly< bool >(this, "select-multiple");
759 }
760
property_local_only()761 Glib::PropertyProxy< bool > RecentChooser::property_local_only()
762 {
763 return Glib::PropertyProxy< bool >(this, "local-only");
764 }
765
property_local_only() const766 Glib::PropertyProxy_ReadOnly< bool > RecentChooser::property_local_only() const
767 {
768 return Glib::PropertyProxy_ReadOnly< bool >(this, "local-only");
769 }
770
property_limit()771 Glib::PropertyProxy< int > RecentChooser::property_limit()
772 {
773 return Glib::PropertyProxy< int >(this, "limit");
774 }
775
property_limit() const776 Glib::PropertyProxy_ReadOnly< int > RecentChooser::property_limit() const
777 {
778 return Glib::PropertyProxy_ReadOnly< int >(this, "limit");
779 }
780
property_sort_type()781 Glib::PropertyProxy< RecentSortType > RecentChooser::property_sort_type()
782 {
783 return Glib::PropertyProxy< RecentSortType >(this, "sort-type");
784 }
785
property_sort_type() const786 Glib::PropertyProxy_ReadOnly< RecentSortType > RecentChooser::property_sort_type() const
787 {
788 return Glib::PropertyProxy_ReadOnly< RecentSortType >(this, "sort-type");
789 }
790
property_filter()791 Glib::PropertyProxy< RecentFilter* > RecentChooser::property_filter()
792 {
793 return Glib::PropertyProxy< RecentFilter* >(this, "filter");
794 }
795
property_filter() const796 Glib::PropertyProxy_ReadOnly< RecentFilter* > RecentChooser::property_filter() const
797 {
798 return Glib::PropertyProxy_ReadOnly< RecentFilter* >(this, "filter");
799 }
800
801
get_current_uri_vfunc() const802 Glib::ustring Gtk::RecentChooser::get_current_uri_vfunc() const
803 {
804 BaseClassType *const base = static_cast<BaseClassType*>(
805 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
806 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
807 ) );
808
809 if(base && base->get_current_uri)
810 {
811 Glib::ustring retval(Glib::convert_const_gchar_ptr_to_ustring((*base->get_current_uri)(const_cast<GtkRecentChooser*>(gobj()))));
812 return retval;
813 }
814
815 typedef Glib::ustring RType;
816 return RType();
817 }
unselect_uri_vfunc(const Glib::ustring & uri)818 void Gtk::RecentChooser::unselect_uri_vfunc(const Glib::ustring& uri)
819 {
820 BaseClassType *const base = static_cast<BaseClassType*>(
821 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
822 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
823 ) );
824
825 if(base && base->unselect_uri)
826 {
827 (*base->unselect_uri)(gobj(),uri.c_str());
828 }
829 }
select_all_vfunc()830 void Gtk::RecentChooser::select_all_vfunc()
831 {
832 BaseClassType *const base = static_cast<BaseClassType*>(
833 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
834 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
835 ) );
836
837 if(base && base->select_all)
838 {
839 (*base->select_all)(gobj());
840 }
841 }
unselect_all_vfunc()842 void Gtk::RecentChooser::unselect_all_vfunc()
843 {
844 BaseClassType *const base = static_cast<BaseClassType*>(
845 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
846 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
847 ) );
848
849 if(base && base->unselect_all)
850 {
851 (*base->unselect_all)(gobj());
852 }
853 }
get_recent_manager_vfunc()854 Glib::RefPtr<RecentManager> Gtk::RecentChooser::get_recent_manager_vfunc()
855 {
856 BaseClassType *const base = static_cast<BaseClassType*>(
857 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
858 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
859 ) );
860
861 if(base && base->get_recent_manager)
862 {
863 Glib::RefPtr<RecentManager> retval(Glib::wrap((*base->get_recent_manager)(gobj())));
864 return retval;
865 }
866
867 typedef Glib::RefPtr<RecentManager> RType;
868 return RType();
869 }
add_filter_vfunc(const RecentFilter & filter)870 void Gtk::RecentChooser::add_filter_vfunc(const RecentFilter& filter)
871 {
872 BaseClassType *const base = static_cast<BaseClassType*>(
873 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
874 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
875 ) );
876
877 if(base && base->add_filter)
878 {
879 (*base->add_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
880 }
881 }
remove_filter_vfunc(const RecentFilter & filter)882 void Gtk::RecentChooser::remove_filter_vfunc(const RecentFilter& filter)
883 {
884 BaseClassType *const base = static_cast<BaseClassType*>(
885 g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
886 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
887 ) );
888
889 if(base && base->remove_filter)
890 {
891 (*base->remove_filter)(gobj(),const_cast<GtkRecentFilter*>((filter).gobj()));
892 }
893 }
894
895
896 } // namespace Gtk
897
898
899