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