1 // Generated by gmmproc 2.64.2 -- DO NOT MODIFY!
2 
3 
4 #include <glibmm.h>
5 
6 #include <giomm/actiongroup.h>
7 #include <giomm/private/actiongroup_p.h>
8 
9 
10 /* Copyright (C) 2010 The giomm 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, see <http://www.gnu.org/licenses/>.
24  */
25 
26 #include <glibmm/exceptionhandler.h>
27 #include <glibmm/variant.h>
28 #include <glibmm/vectorutils.h>
29 #include <gio/gio.h>
30 
31 namespace Gio
32 {
33 
34 } // namespace Gio
35 
36 namespace
37 {
38 
39 
ActionGroup_signal_action_added_callback(GActionGroup * self,const gchar * p0,void * data)40 static void ActionGroup_signal_action_added_callback(GActionGroup* self, const gchar* p0,void* data)
41 {
42   using namespace Gio;
43   using SlotType = sigc::slot< void,const Glib::ustring& >;
44 
45   auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
46   // Do not try to call a signal on a disassociated wrapper.
47   if(obj)
48   {
49     try
50     {
51       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
52         (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
53 );
54     }
55     catch(...)
56     {
57        Glib::exception_handlers_invoke();
58     }
59   }
60 }
61 
62 static const Glib::SignalProxyInfo ActionGroup_signal_action_added_info =
63 {
64   "action-added",
65   (GCallback) &ActionGroup_signal_action_added_callback,
66   (GCallback) &ActionGroup_signal_action_added_callback
67 };
68 
69 
ActionGroup_signal_action_enabled_changed_callback(GActionGroup * self,const gchar * p0,gboolean p1,void * data)70 static void ActionGroup_signal_action_enabled_changed_callback(GActionGroup* self, const gchar* p0,gboolean p1,void* data)
71 {
72   using namespace Gio;
73   using SlotType = sigc::slot< void,const Glib::ustring&,bool >;
74 
75   auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
76   // Do not try to call a signal on a disassociated wrapper.
77   if(obj)
78   {
79     try
80     {
81       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
82         (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
83 , p1
84 );
85     }
86     catch(...)
87     {
88        Glib::exception_handlers_invoke();
89     }
90   }
91 }
92 
93 static const Glib::SignalProxyInfo ActionGroup_signal_action_enabled_changed_info =
94 {
95   "action-enabled-changed",
96   (GCallback) &ActionGroup_signal_action_enabled_changed_callback,
97   (GCallback) &ActionGroup_signal_action_enabled_changed_callback
98 };
99 
100 
ActionGroup_signal_action_removed_callback(GActionGroup * self,const gchar * p0,void * data)101 static void ActionGroup_signal_action_removed_callback(GActionGroup* self, const gchar* p0,void* data)
102 {
103   using namespace Gio;
104   using SlotType = sigc::slot< void,const Glib::ustring& >;
105 
106   auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
107   // Do not try to call a signal on a disassociated wrapper.
108   if(obj)
109   {
110     try
111     {
112       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
113         (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
114 );
115     }
116     catch(...)
117     {
118        Glib::exception_handlers_invoke();
119     }
120   }
121 }
122 
123 static const Glib::SignalProxyInfo ActionGroup_signal_action_removed_info =
124 {
125   "action-removed",
126   (GCallback) &ActionGroup_signal_action_removed_callback,
127   (GCallback) &ActionGroup_signal_action_removed_callback
128 };
129 
130 
ActionGroup_signal_action_state_changed_callback(GActionGroup * self,const gchar * p0,GVariant * p1,void * data)131 static void ActionGroup_signal_action_state_changed_callback(GActionGroup* self, const gchar* p0,GVariant* p1,void* data)
132 {
133   using namespace Gio;
134   using SlotType = sigc::slot< void,const Glib::ustring&,const Glib::VariantBase& >;
135 
136   auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
137   // Do not try to call a signal on a disassociated wrapper.
138   if(obj)
139   {
140     try
141     {
142       if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
143         (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
144 , Glib::wrap(p1, true)
145 );
146     }
147     catch(...)
148     {
149        Glib::exception_handlers_invoke();
150     }
151   }
152 }
153 
154 static const Glib::SignalProxyInfo ActionGroup_signal_action_state_changed_info =
155 {
156   "action-state-changed",
157   (GCallback) &ActionGroup_signal_action_state_changed_callback,
158   (GCallback) &ActionGroup_signal_action_state_changed_callback
159 };
160 
161 
162 } // anonymous namespace
163 
164 
165 namespace Glib
166 {
167 
wrap(GActionGroup * object,bool take_copy)168 Glib::RefPtr<Gio::ActionGroup> wrap(GActionGroup* object, bool take_copy)
169 {
170   return Glib::RefPtr<Gio::ActionGroup>( dynamic_cast<Gio::ActionGroup*> (Glib::wrap_auto_interface<Gio::ActionGroup> ((GObject*)(object), take_copy)) );
171   //We use dynamic_cast<> in case of multiple inheritance.
172 }
173 
174 } // namespace Glib
175 
176 
177 namespace Gio
178 {
179 
180 
181 /* The *_Class implementation: */
182 
init()183 const Glib::Interface_Class& ActionGroup_Class::init()
184 {
185   if(!gtype_) // create the GType if necessary
186   {
187     // Glib::Interface_Class has to know the interface init function
188     // in order to add interfaces to implementing types.
189     class_init_func_ = &ActionGroup_Class::iface_init_function;
190 
191     // We can not derive from another interface, and it is not necessary anyway.
192     gtype_ = g_action_group_get_type();
193   }
194 
195   return *this;
196 }
197 
iface_init_function(void * g_iface,void *)198 void ActionGroup_Class::iface_init_function(void* g_iface, void*)
199 {
200   const auto klass = static_cast<BaseClassType*>(g_iface);
201 
202   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
203   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
204   g_assert(klass != nullptr);
205 
206   klass->has_action = &has_action_vfunc_callback;
207   klass->list_actions = &list_actions_vfunc_callback;
208   klass->get_action_enabled = &get_action_enabled_vfunc_callback;
209   klass->get_action_parameter_type = &get_action_parameter_type_vfunc_callback;
210   klass->get_action_state_type = &get_action_state_type_vfunc_callback;
211   klass->get_action_state_hint = &get_action_state_hint_vfunc_callback;
212   klass->get_action_state = &get_action_state_vfunc_callback;
213   klass->change_action_state = &change_action_state_vfunc_callback;
214   klass->activate_action = &activate_action_vfunc_callback;
215 
216   klass->action_added = &action_added_callback;
217   klass->action_enabled_changed = &action_enabled_changed_callback;
218   klass->action_removed = &action_removed_callback;
219   klass->action_state_changed = &action_state_changed_callback;
220 }
221 
has_action_vfunc_callback(GActionGroup * self,const gchar * action_name)222 gboolean ActionGroup_Class::has_action_vfunc_callback(GActionGroup* self, const gchar* action_name)
223 {
224   const auto obj_base = static_cast<Glib::ObjectBase*>(
225       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
226 
227   // Non-gtkmmproc-generated custom classes implicitly call the default
228   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
229   // generated classes can use this optimisation, which avoids the unnecessary
230   // parameter conversions if there is no possibility of the virtual function
231   // being overridden:
232   if(obj_base && obj_base->is_derived_())
233   {
234     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
235     if(obj) // This can be NULL during destruction.
236     {
237       try // Trap C++ exceptions which would normally be lost because this is a C callback.
238       {
239         // Call the virtual member method, which derived classes might override.
240         return static_cast<int>(obj->has_action_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
241 ));
242       }
243       catch(...)
244       {
245         Glib::exception_handlers_invoke();
246       }
247     }
248   }
249 
250   BaseClassType *const base = static_cast<BaseClassType*>(
251       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
252 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
253 )  );
254 
255   // Call the original underlying C function:
256   if(base && base->has_action)
257     return (*base->has_action)(self, action_name);
258 
259   using RType = gboolean;
260   return RType();
261 }
list_actions_vfunc_callback(GActionGroup * self)262 gchar** ActionGroup_Class::list_actions_vfunc_callback(GActionGroup* self)
263 {
264   const auto obj_base = static_cast<Glib::ObjectBase*>(
265       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
266 
267   // Non-gtkmmproc-generated custom classes implicitly call the default
268   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
269   // generated classes can use this optimisation, which avoids the unnecessary
270   // parameter conversions if there is no possibility of the virtual function
271   // being overridden:
272   if(obj_base && obj_base->is_derived_())
273   {
274     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
275     if(obj) // This can be NULL during destruction.
276     {
277       try // Trap C++ exceptions which would normally be lost because this is a C callback.
278       {
279         // Call the virtual member method, which derived classes might override.
280         return g_strdupv(const_cast<gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array(obj->list_actions_vfunc()).data()));
281       }
282       catch(...)
283       {
284         Glib::exception_handlers_invoke();
285       }
286     }
287   }
288 
289   BaseClassType *const base = static_cast<BaseClassType*>(
290       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
291 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
292 )  );
293 
294   // Call the original underlying C function:
295   if(base && base->list_actions)
296     return (*base->list_actions)(self);
297 
298   using RType = gchar**;
299   return RType();
300 }
get_action_enabled_vfunc_callback(GActionGroup * self,const gchar * action_name)301 gboolean ActionGroup_Class::get_action_enabled_vfunc_callback(GActionGroup* self, const gchar* action_name)
302 {
303   const auto obj_base = static_cast<Glib::ObjectBase*>(
304       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
305 
306   // Non-gtkmmproc-generated custom classes implicitly call the default
307   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
308   // generated classes can use this optimisation, which avoids the unnecessary
309   // parameter conversions if there is no possibility of the virtual function
310   // being overridden:
311   if(obj_base && obj_base->is_derived_())
312   {
313     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
314     if(obj) // This can be NULL during destruction.
315     {
316       try // Trap C++ exceptions which would normally be lost because this is a C callback.
317       {
318         // Call the virtual member method, which derived classes might override.
319         return static_cast<int>(obj->get_action_enabled_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
320 ));
321       }
322       catch(...)
323       {
324         Glib::exception_handlers_invoke();
325       }
326     }
327   }
328 
329   BaseClassType *const base = static_cast<BaseClassType*>(
330       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
331 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
332 )  );
333 
334   // Call the original underlying C function:
335   if(base && base->get_action_enabled)
336     return (*base->get_action_enabled)(self, action_name);
337 
338   using RType = gboolean;
339   return RType();
340 }
get_action_parameter_type_vfunc_callback(GActionGroup * self,const gchar * action_name)341 const GVariantType* ActionGroup_Class::get_action_parameter_type_vfunc_callback(GActionGroup* self, const gchar* action_name)
342 {
343   const auto obj_base = static_cast<Glib::ObjectBase*>(
344       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
345 
346   // Non-gtkmmproc-generated custom classes implicitly call the default
347   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
348   // generated classes can use this optimisation, which avoids the unnecessary
349   // parameter conversions if there is no possibility of the virtual function
350   // being overridden:
351   if(obj_base && obj_base->is_derived_())
352   {
353     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
354     if(obj) // This can be NULL during destruction.
355     {
356       try // Trap C++ exceptions which would normally be lost because this is a C callback.
357       {
358         // Call the virtual member method, which derived classes might override.
359         static auto quark_return_value = g_quark_from_static_string("Gio::ActionGroup::get_action_parameter_type_vfunc");
360 
361         auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
362         if (!return_value)
363         {
364           return_value = new Glib::VariantType();
365           g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
366           &Glib::destroy_notify_delete<Glib::VariantType>);
367         }
368         // Keep a copy of the return value. The caller is not expected
369         // to free the object that the returned pointer points to.
370         *return_value = obj->get_action_parameter_type_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
371 );
372         return (*return_value).gobj();
373       }
374       catch(...)
375       {
376         Glib::exception_handlers_invoke();
377       }
378     }
379   }
380 
381   BaseClassType *const base = static_cast<BaseClassType*>(
382       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
383 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
384 )  );
385 
386   // Call the original underlying C function:
387   if(base && base->get_action_parameter_type)
388     return (*base->get_action_parameter_type)(self, action_name);
389 
390   using RType = const GVariantType*;
391   return RType();
392 }
get_action_state_type_vfunc_callback(GActionGroup * self,const gchar * action_name)393 const GVariantType* ActionGroup_Class::get_action_state_type_vfunc_callback(GActionGroup* self, const gchar* action_name)
394 {
395   const auto obj_base = static_cast<Glib::ObjectBase*>(
396       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
397 
398   // Non-gtkmmproc-generated custom classes implicitly call the default
399   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
400   // generated classes can use this optimisation, which avoids the unnecessary
401   // parameter conversions if there is no possibility of the virtual function
402   // being overridden:
403   if(obj_base && obj_base->is_derived_())
404   {
405     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
406     if(obj) // This can be NULL during destruction.
407     {
408       try // Trap C++ exceptions which would normally be lost because this is a C callback.
409       {
410         // Call the virtual member method, which derived classes might override.
411         static auto quark_return_value = g_quark_from_static_string("Gio::ActionGroup::get_action_state_type_vfunc");
412 
413         auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
414         if (!return_value)
415         {
416           return_value = new Glib::VariantType();
417           g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
418           &Glib::destroy_notify_delete<Glib::VariantType>);
419         }
420         // Keep a copy of the return value. The caller is not expected
421         // to free the object that the returned pointer points to.
422         *return_value = obj->get_action_state_type_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
423 );
424         return (*return_value).gobj();
425       }
426       catch(...)
427       {
428         Glib::exception_handlers_invoke();
429       }
430     }
431   }
432 
433   BaseClassType *const base = static_cast<BaseClassType*>(
434       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
435 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
436 )  );
437 
438   // Call the original underlying C function:
439   if(base && base->get_action_state_type)
440     return (*base->get_action_state_type)(self, action_name);
441 
442   using RType = const GVariantType*;
443   return RType();
444 }
get_action_state_hint_vfunc_callback(GActionGroup * self,const gchar * action_name)445 GVariant* ActionGroup_Class::get_action_state_hint_vfunc_callback(GActionGroup* self, const gchar* action_name)
446 {
447   const auto obj_base = static_cast<Glib::ObjectBase*>(
448       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
449 
450   // Non-gtkmmproc-generated custom classes implicitly call the default
451   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
452   // generated classes can use this optimisation, which avoids the unnecessary
453   // parameter conversions if there is no possibility of the virtual function
454   // being overridden:
455   if(obj_base && obj_base->is_derived_())
456   {
457     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
458     if(obj) // This can be NULL during destruction.
459     {
460       try // Trap C++ exceptions which would normally be lost because this is a C callback.
461       {
462         // Call the virtual member method, which derived classes might override.
463         return Glib::unwrap_copy(obj->get_action_state_hint_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
464 ));
465       }
466       catch(...)
467       {
468         Glib::exception_handlers_invoke();
469       }
470     }
471   }
472 
473   BaseClassType *const base = static_cast<BaseClassType*>(
474       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
475 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
476 )  );
477 
478   // Call the original underlying C function:
479   if(base && base->get_action_state_hint)
480     return (*base->get_action_state_hint)(self, action_name);
481 
482   using RType = GVariant*;
483   return RType();
484 }
get_action_state_vfunc_callback(GActionGroup * self,const gchar * action_name)485 GVariant* ActionGroup_Class::get_action_state_vfunc_callback(GActionGroup* self, const gchar* action_name)
486 {
487   const auto obj_base = static_cast<Glib::ObjectBase*>(
488       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
489 
490   // Non-gtkmmproc-generated custom classes implicitly call the default
491   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
492   // generated classes can use this optimisation, which avoids the unnecessary
493   // parameter conversions if there is no possibility of the virtual function
494   // being overridden:
495   if(obj_base && obj_base->is_derived_())
496   {
497     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
498     if(obj) // This can be NULL during destruction.
499     {
500       try // Trap C++ exceptions which would normally be lost because this is a C callback.
501       {
502         // Call the virtual member method, which derived classes might override.
503         return Glib::unwrap_copy(obj->get_action_state_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
504 ));
505       }
506       catch(...)
507       {
508         Glib::exception_handlers_invoke();
509       }
510     }
511   }
512 
513   BaseClassType *const base = static_cast<BaseClassType*>(
514       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
515 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
516 )  );
517 
518   // Call the original underlying C function:
519   if(base && base->get_action_state)
520     return (*base->get_action_state)(self, action_name);
521 
522   using RType = GVariant*;
523   return RType();
524 }
change_action_state_vfunc_callback(GActionGroup * self,const gchar * action_name,GVariant * value)525 void ActionGroup_Class::change_action_state_vfunc_callback(GActionGroup* self, const gchar* action_name, GVariant* value)
526 {
527   const auto obj_base = static_cast<Glib::ObjectBase*>(
528       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
529 
530   // Non-gtkmmproc-generated custom classes implicitly call the default
531   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
532   // generated classes can use this optimisation, which avoids the unnecessary
533   // parameter conversions if there is no possibility of the virtual function
534   // being overridden:
535   if(obj_base && obj_base->is_derived_())
536   {
537     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
538     if(obj) // This can be NULL during destruction.
539     {
540       try // Trap C++ exceptions which would normally be lost because this is a C callback.
541       {
542         // Call the virtual member method, which derived classes might override.
543         obj->change_action_state_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
544 , Glib::wrap(value, true)
545 );
546         return;
547       }
548       catch(...)
549       {
550         Glib::exception_handlers_invoke();
551       }
552     }
553   }
554 
555   BaseClassType *const base = static_cast<BaseClassType*>(
556       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
557 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
558 )  );
559 
560   // Call the original underlying C function:
561   if(base && base->change_action_state)
562     (*base->change_action_state)(self, action_name, value);
563 }
activate_action_vfunc_callback(GActionGroup * self,const gchar * action_name,GVariant * parameter)564 void ActionGroup_Class::activate_action_vfunc_callback(GActionGroup* self, const gchar* action_name, GVariant* parameter)
565 {
566   const auto obj_base = static_cast<Glib::ObjectBase*>(
567       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
568 
569   // Non-gtkmmproc-generated custom classes implicitly call the default
570   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
571   // generated classes can use this optimisation, which avoids the unnecessary
572   // parameter conversions if there is no possibility of the virtual function
573   // being overridden:
574   if(obj_base && obj_base->is_derived_())
575   {
576     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
577     if(obj) // This can be NULL during destruction.
578     {
579       try // Trap C++ exceptions which would normally be lost because this is a C callback.
580       {
581         // Call the virtual member method, which derived classes might override.
582         obj->activate_action_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
583 , Glib::wrap(parameter, true)
584 );
585         return;
586       }
587       catch(...)
588       {
589         Glib::exception_handlers_invoke();
590       }
591     }
592   }
593 
594   BaseClassType *const base = static_cast<BaseClassType*>(
595       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
596 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
597 )  );
598 
599   // Call the original underlying C function:
600   if(base && base->activate_action)
601     (*base->activate_action)(self, action_name, parameter);
602 }
603 
action_added_callback(GActionGroup * self,const gchar * p0)604 void ActionGroup_Class::action_added_callback(GActionGroup* self, const gchar* p0)
605 {
606   const auto obj_base = static_cast<Glib::ObjectBase*>(
607       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
608 
609   // Non-gtkmmproc-generated custom classes implicitly call the default
610   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
611   // generated classes can use this optimisation, which avoids the unnecessary
612   // parameter conversions if there is no possibility of the virtual function
613   // being overridden:
614   if(obj_base && obj_base->is_derived_())
615   {
616     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
617     if(obj) // This can be NULL during destruction.
618     {
619       try // Trap C++ exceptions which would normally be lost because this is a C callback.
620       {
621         // Call the virtual member method, which derived classes might override.
622         obj->on_action_added(Glib::convert_const_gchar_ptr_to_ustring(p0)
623 );
624         return;
625       }
626       catch(...)
627       {
628         Glib::exception_handlers_invoke();
629       }
630     }
631   }
632 
633   const auto base = static_cast<BaseClassType*>(
634         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
635 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
636 )    );
637 
638   // Call the original underlying C function:
639   if(base && base->action_added)
640     (*base->action_added)(self, p0);
641 }
action_enabled_changed_callback(GActionGroup * self,const gchar * p0,gboolean p1)642 void ActionGroup_Class::action_enabled_changed_callback(GActionGroup* self, const gchar* p0, gboolean p1)
643 {
644   const auto obj_base = static_cast<Glib::ObjectBase*>(
645       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
646 
647   // Non-gtkmmproc-generated custom classes implicitly call the default
648   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
649   // generated classes can use this optimisation, which avoids the unnecessary
650   // parameter conversions if there is no possibility of the virtual function
651   // being overridden:
652   if(obj_base && obj_base->is_derived_())
653   {
654     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
655     if(obj) // This can be NULL during destruction.
656     {
657       try // Trap C++ exceptions which would normally be lost because this is a C callback.
658       {
659         // Call the virtual member method, which derived classes might override.
660         obj->on_action_enabled_changed(Glib::convert_const_gchar_ptr_to_ustring(p0)
661 , p1
662 );
663         return;
664       }
665       catch(...)
666       {
667         Glib::exception_handlers_invoke();
668       }
669     }
670   }
671 
672   const auto base = static_cast<BaseClassType*>(
673         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
674 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
675 )    );
676 
677   // Call the original underlying C function:
678   if(base && base->action_enabled_changed)
679     (*base->action_enabled_changed)(self, p0, p1);
680 }
action_removed_callback(GActionGroup * self,const gchar * p0)681 void ActionGroup_Class::action_removed_callback(GActionGroup* self, const gchar* p0)
682 {
683   const auto obj_base = static_cast<Glib::ObjectBase*>(
684       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
685 
686   // Non-gtkmmproc-generated custom classes implicitly call the default
687   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
688   // generated classes can use this optimisation, which avoids the unnecessary
689   // parameter conversions if there is no possibility of the virtual function
690   // being overridden:
691   if(obj_base && obj_base->is_derived_())
692   {
693     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
694     if(obj) // This can be NULL during destruction.
695     {
696       try // Trap C++ exceptions which would normally be lost because this is a C callback.
697       {
698         // Call the virtual member method, which derived classes might override.
699         obj->on_action_removed(Glib::convert_const_gchar_ptr_to_ustring(p0)
700 );
701         return;
702       }
703       catch(...)
704       {
705         Glib::exception_handlers_invoke();
706       }
707     }
708   }
709 
710   const auto base = static_cast<BaseClassType*>(
711         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
712 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
713 )    );
714 
715   // Call the original underlying C function:
716   if(base && base->action_removed)
717     (*base->action_removed)(self, p0);
718 }
action_state_changed_callback(GActionGroup * self,const gchar * p0,GVariant * p1)719 void ActionGroup_Class::action_state_changed_callback(GActionGroup* self, const gchar* p0, GVariant* p1)
720 {
721   const auto obj_base = static_cast<Glib::ObjectBase*>(
722       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
723 
724   // Non-gtkmmproc-generated custom classes implicitly call the default
725   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
726   // generated classes can use this optimisation, which avoids the unnecessary
727   // parameter conversions if there is no possibility of the virtual function
728   // being overridden:
729   if(obj_base && obj_base->is_derived_())
730   {
731     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
732     if(obj) // This can be NULL during destruction.
733     {
734       try // Trap C++ exceptions which would normally be lost because this is a C callback.
735       {
736         // Call the virtual member method, which derived classes might override.
737         obj->on_action_state_changed(Glib::convert_const_gchar_ptr_to_ustring(p0)
738 , Glib::wrap(p1, true)
739 );
740         return;
741       }
742       catch(...)
743       {
744         Glib::exception_handlers_invoke();
745       }
746     }
747   }
748 
749   const auto base = static_cast<BaseClassType*>(
750         g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
751 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
752 )    );
753 
754   // Call the original underlying C function:
755   if(base && base->action_state_changed)
756     (*base->action_state_changed)(self, p0, p1);
757 }
758 
759 
wrap_new(GObject * object)760 Glib::ObjectBase* ActionGroup_Class::wrap_new(GObject* object)
761 {
762   return new ActionGroup((GActionGroup*)(object));
763 }
764 
765 
766 /* The implementation: */
767 
ActionGroup()768 ActionGroup::ActionGroup()
769 :
770   Glib::Interface(actiongroup_class_.init())
771 {}
772 
ActionGroup(GActionGroup * castitem)773 ActionGroup::ActionGroup(GActionGroup* castitem)
774 :
775   Glib::Interface((GObject*)(castitem))
776 {}
777 
ActionGroup(const Glib::Interface_Class & interface_class)778 ActionGroup::ActionGroup(const Glib::Interface_Class& interface_class)
779 : Glib::Interface(interface_class)
780 {
781 }
782 
ActionGroup(ActionGroup && src)783 ActionGroup::ActionGroup(ActionGroup&& src) noexcept
784 : Glib::Interface(std::move(src))
785 {}
786 
operator =(ActionGroup && src)787 ActionGroup& ActionGroup::operator=(ActionGroup&& src) noexcept
788 {
789   Glib::Interface::operator=(std::move(src));
790   return *this;
791 }
792 
~ActionGroup()793 ActionGroup::~ActionGroup() noexcept
794 {}
795 
796 // static
add_interface(GType gtype_implementer)797 void ActionGroup::add_interface(GType gtype_implementer)
798 {
799   actiongroup_class_.init().add_interface(gtype_implementer);
800 }
801 
802 ActionGroup::CppClassType ActionGroup::actiongroup_class_; // initialize static member
803 
get_type()804 GType ActionGroup::get_type()
805 {
806   return actiongroup_class_.init().get_type();
807 }
808 
809 
get_base_type()810 GType ActionGroup::get_base_type()
811 {
812   return g_action_group_get_type();
813 }
814 
815 
has_action(const Glib::ustring & action_name) const816 bool ActionGroup::has_action(const Glib::ustring& action_name) const
817 {
818   return g_action_group_has_action(const_cast<GActionGroup*>(gobj()), action_name.c_str());
819 }
820 
list_actions() const821 std::vector<Glib::ustring> ActionGroup::list_actions() const
822 {
823   return Glib::ArrayHandler<Glib::ustring>::array_to_vector(g_action_group_list_actions(const_cast<GActionGroup*>(gobj())), Glib::OWNERSHIP_DEEP);
824 }
825 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantType & parameter_type,Glib::VariantBase & state_hint,Glib::VariantType & state_type,Glib::VariantBase & state)826 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantType& state_type, Glib::VariantBase& state)
827 {
828   gboolean g_enabled = gboolean();
829   const GVariantType* g_parameter_type = nullptr;
830   const GVariantType* g_state_type = nullptr;
831   GVariant* g_state_hint = nullptr;
832   GVariant* g_state = nullptr;
833   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, &g_state_type, &g_state_hint, &g_state);
834 enabled = static_cast<bool>(g_enabled);
835   parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
836   state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
837   state_hint = Glib::wrap(g_state_hint);
838   state = Glib::wrap(g_state);
839   return retvalue;
840 }
841 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantType & parameter_type,Glib::VariantBase & state_hint,Glib::VariantType & state_type)842 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
843 {
844   gboolean g_enabled = gboolean();
845   const GVariantType* g_parameter_type = nullptr;
846   const GVariantType* g_state_type = nullptr;
847   GVariant* g_state_hint = nullptr;
848   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, &g_state_type, &g_state_hint, nullptr);
849 enabled = static_cast<bool>(g_enabled);
850   parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
851   state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
852   state_hint = Glib::wrap(g_state_hint);
853   return retvalue;
854 }
855 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantType & parameter_type,Glib::VariantBase & state_hint,Glib::VariantBase & state)856 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantBase& state)
857 {
858   gboolean g_enabled = gboolean();
859   const GVariantType* g_parameter_type = nullptr;
860   GVariant* g_state_hint = nullptr;
861   GVariant* g_state = nullptr;
862   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, nullptr, &g_state_hint, &g_state);
863 enabled = static_cast<bool>(g_enabled);
864   parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
865   state_hint = Glib::wrap(g_state_hint);
866   state = Glib::wrap(g_state);
867   return retvalue;
868 }
869 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantType & parameter_type,Glib::VariantBase & state_hint)870 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint)
871 {
872   gboolean g_enabled = gboolean();
873   const GVariantType* g_parameter_type = nullptr;
874   GVariant* g_state_hint = nullptr;
875   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, nullptr, &g_state_hint, nullptr);
876 enabled = static_cast<bool>(g_enabled);
877   parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
878   state_hint = Glib::wrap(g_state_hint);
879   return retvalue;
880 }
881 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantBase & state_hint,Glib::VariantType & state_type,Glib::VariantBase & state)882 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type, Glib::VariantBase& state)
883 {
884   gboolean g_enabled = gboolean();
885   const GVariantType* g_state_type = nullptr;
886   GVariant* g_state_hint = nullptr;
887   GVariant* g_state = nullptr;
888   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, &g_state_type, &g_state_hint, &g_state);
889 enabled = static_cast<bool>(g_enabled);
890   state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
891   state_hint = Glib::wrap(g_state_hint);
892   state = Glib::wrap(g_state);
893   return retvalue;
894 }
895 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantBase & state_hint,Glib::VariantType & state_type)896 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
897 {
898   gboolean g_enabled = gboolean();
899   const GVariantType* g_state_type = nullptr;
900   GVariant* g_state_hint = nullptr;
901   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, &g_state_type, &g_state_hint, nullptr);
902 enabled = static_cast<bool>(g_enabled);
903   state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
904   state_hint = Glib::wrap(g_state_hint);
905   return retvalue;
906 }
907 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantBase & state_hint,Glib::VariantBase & state)908 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantBase& state)
909 {
910   gboolean g_enabled = gboolean();
911   GVariant* g_state_hint = nullptr;
912   GVariant* g_state = nullptr;
913   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, nullptr, &g_state_hint, &g_state);
914 enabled = static_cast<bool>(g_enabled);
915   state_hint = Glib::wrap(g_state_hint);
916   state = Glib::wrap(g_state);
917   return retvalue;
918 }
919 
query_action(const Glib::ustring & action_name,bool & enabled,Glib::VariantBase & state_hint)920 bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint)
921 {
922   gboolean g_enabled = gboolean();
923   GVariant* g_state_hint = nullptr;
924   bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, nullptr, &g_state_hint, nullptr);
925 enabled = static_cast<bool>(g_enabled);
926   state_hint = Glib::wrap(g_state_hint);
927   return retvalue;
928 }
929 
get_action_enabled(const Glib::ustring & action_name) const930 bool ActionGroup::get_action_enabled(const Glib::ustring& action_name) const
931 {
932   return g_action_group_get_action_enabled(const_cast<GActionGroup*>(gobj()), action_name.c_str());
933 }
934 
get_action_parameter_type(const Glib::ustring & action_name) const935 Glib::VariantType ActionGroup::get_action_parameter_type(const Glib::ustring& action_name) const
936 {
937   return Glib::wrap(const_cast<GVariantType*>(g_action_group_get_action_parameter_type(const_cast<GActionGroup*>(gobj()), action_name.c_str())), true);
938 }
939 
get_action_state_type(const Glib::ustring & action_name) const940 Glib::VariantType ActionGroup::get_action_state_type(const Glib::ustring& action_name) const
941 {
942   return Glib::wrap(const_cast<GVariantType*>(g_action_group_get_action_state_type(const_cast<GActionGroup*>(gobj()), action_name.c_str())), true);
943 }
944 
945 #ifndef GIOMM_DISABLE_DEPRECATED
946 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
get_action_state_hint(const Glib::ustring & action_name) const947 Glib::VariantContainerBase ActionGroup::get_action_state_hint(const Glib::ustring& action_name) const
948 {
949   return Glib::VariantContainerBase(g_action_group_get_action_state_hint(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
950 }
951 G_GNUC_END_IGNORE_DEPRECATIONS
952 #endif // GIOMM_DISABLE_DEPRECATED
953 
get_action_state_hint_variant(const Glib::ustring & action_name) const954 Glib::VariantContainerBase ActionGroup::get_action_state_hint_variant(const Glib::ustring& action_name) const
955 {
956   return Glib::VariantContainerBase(g_action_group_get_action_state_hint(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
957 }
958 
959 #ifndef GIOMM_DISABLE_DEPRECATED
960 G_GNUC_BEGIN_IGNORE_DEPRECATIONS
get_action_state(const Glib::ustring & action_name) const961 Glib::VariantBase ActionGroup::get_action_state(const Glib::ustring& action_name) const
962 {
963   return Glib::wrap(g_action_group_get_action_state(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
964 }
965 G_GNUC_END_IGNORE_DEPRECATIONS
966 #endif // GIOMM_DISABLE_DEPRECATED
967 
get_action_state_variant(const Glib::ustring & action_name) const968 Glib::VariantBase ActionGroup::get_action_state_variant(const Glib::ustring& action_name) const
969 {
970   return Glib::wrap(g_action_group_get_action_state(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
971 }
972 
change_action_state(const Glib::ustring & action_name,const Glib::VariantBase & value)973 void ActionGroup::change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value)
974 {
975   g_action_group_change_action_state(gobj(), action_name.c_str(), const_cast<GVariant*>((value).gobj()));
976 }
977 
activate_action(const Glib::ustring & action_name,const Glib::VariantBase & parameter)978 void ActionGroup::activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter)
979 {
980   g_action_group_activate_action(gobj(), action_name.c_str(), const_cast<GVariant*>((parameter).gobj()));
981 }
982 
activate_action(const Glib::ustring & action_name)983 void ActionGroup::activate_action(const Glib::ustring& action_name)
984 {
985   g_action_group_activate_action(gobj(), action_name.c_str(), nullptr);
986 }
987 
action_added(const Glib::ustring & action_name)988 void ActionGroup::action_added(const Glib::ustring& action_name)
989 {
990   g_action_group_action_added(gobj(), action_name.c_str());
991 }
992 
action_removed(const Glib::ustring & action_name)993 void ActionGroup::action_removed(const Glib::ustring& action_name)
994 {
995   g_action_group_action_removed(gobj(), action_name.c_str());
996 }
997 
action_enabled_changed(const Glib::ustring & action_name,bool enabled)998 void ActionGroup::action_enabled_changed(const Glib::ustring& action_name, bool enabled)
999 {
1000   g_action_group_action_enabled_changed(gobj(), action_name.c_str(), static_cast<int>(enabled));
1001 }
1002 
action_state_changed(const Glib::ustring & action_name,const Glib::VariantBase & state)1003 void ActionGroup::action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& state)
1004 {
1005   g_action_group_action_state_changed(gobj(), action_name.c_str(), const_cast<GVariant*>((state).gobj()));
1006 }
1007 
1008 
signal_action_added()1009 Glib::SignalProxy< void,const Glib::ustring& > ActionGroup::signal_action_added()
1010 {
1011   return Glib::SignalProxy< void,const Glib::ustring& >(this, &ActionGroup_signal_action_added_info);
1012 }
1013 
signal_action_added(const Glib::ustring & action_name)1014 Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& > ActionGroup::signal_action_added(const Glib::ustring& action_name)
1015 {
1016   return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& >(this, &ActionGroup_signal_action_added_info, action_name);
1017 }
1018 
1019 
signal_action_enabled_changed()1020 Glib::SignalProxy< void,const Glib::ustring&,bool > ActionGroup::signal_action_enabled_changed()
1021 {
1022   return Glib::SignalProxy< void,const Glib::ustring&,bool >(this, &ActionGroup_signal_action_enabled_changed_info);
1023 }
1024 
signal_action_enabled_changed(const Glib::ustring & action_name)1025 Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,bool > ActionGroup::signal_action_enabled_changed(const Glib::ustring& action_name)
1026 {
1027   return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,bool >(this, &ActionGroup_signal_action_enabled_changed_info, action_name);
1028 }
1029 
1030 
signal_action_removed()1031 Glib::SignalProxy< void,const Glib::ustring& > ActionGroup::signal_action_removed()
1032 {
1033   return Glib::SignalProxy< void,const Glib::ustring& >(this, &ActionGroup_signal_action_removed_info);
1034 }
1035 
signal_action_removed(const Glib::ustring & action_name)1036 Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& > ActionGroup::signal_action_removed(const Glib::ustring& action_name)
1037 {
1038   return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& >(this, &ActionGroup_signal_action_removed_info, action_name);
1039 }
1040 
1041 
signal_action_state_changed()1042 Glib::SignalProxy< void,const Glib::ustring&,const Glib::VariantBase& > ActionGroup::signal_action_state_changed()
1043 {
1044   return Glib::SignalProxy< void,const Glib::ustring&,const Glib::VariantBase& >(this, &ActionGroup_signal_action_state_changed_info);
1045 }
1046 
signal_action_state_changed(const Glib::ustring & action_name)1047 Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,const Glib::VariantBase& > ActionGroup::signal_action_state_changed(const Glib::ustring& action_name)
1048 {
1049   return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,const Glib::VariantBase& >(this, &ActionGroup_signal_action_state_changed_info, action_name);
1050 }
1051 
1052 
on_action_added(const Glib::ustring & action_name)1053 void Gio::ActionGroup::on_action_added(const Glib::ustring& action_name)
1054 {
1055   const auto base = static_cast<BaseClassType*>(
1056       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1057 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1058 )  );
1059 
1060   if(base && base->action_added)
1061     (*base->action_added)(gobj(),action_name.c_str());
1062 }
on_action_enabled_changed(const Glib::ustring & action_name,bool enabled)1063 void Gio::ActionGroup::on_action_enabled_changed(const Glib::ustring& action_name, bool enabled)
1064 {
1065   const auto base = static_cast<BaseClassType*>(
1066       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1067 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1068 )  );
1069 
1070   if(base && base->action_enabled_changed)
1071     (*base->action_enabled_changed)(gobj(),action_name.c_str(),static_cast<int>(enabled));
1072 }
on_action_removed(const Glib::ustring & action_name)1073 void Gio::ActionGroup::on_action_removed(const Glib::ustring& action_name)
1074 {
1075   const auto base = static_cast<BaseClassType*>(
1076       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1077 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1078 )  );
1079 
1080   if(base && base->action_removed)
1081     (*base->action_removed)(gobj(),action_name.c_str());
1082 }
on_action_state_changed(const Glib::ustring & action_name,const Glib::VariantBase & value)1083 void Gio::ActionGroup::on_action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value)
1084 {
1085   const auto base = static_cast<BaseClassType*>(
1086       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1087 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1088 )  );
1089 
1090   if(base && base->action_state_changed)
1091     (*base->action_state_changed)(gobj(),action_name.c_str(),const_cast<GVariant*>((value).gobj()));
1092 }
1093 
has_action_vfunc(const Glib::ustring & name) const1094 bool Gio::ActionGroup::has_action_vfunc(const Glib::ustring& name) const
1095 {
1096   const auto base = static_cast<BaseClassType*>(
1097       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1098 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1099 )  );
1100 
1101   if(base && base->has_action)
1102   {
1103     bool retval((*base->has_action)(const_cast<GActionGroup*>(gobj()),name.c_str()));
1104     return retval;
1105   }
1106 
1107   using RType = bool;
1108   return RType();
1109 }
list_actions_vfunc() const1110 std::vector<Glib::ustring> Gio::ActionGroup::list_actions_vfunc() const
1111 {
1112   const auto base = static_cast<BaseClassType*>(
1113       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1114 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1115 )  );
1116 
1117   if(base && base->list_actions)
1118   {
1119     std::vector<Glib::ustring> retval(Glib::ArrayHandler<Glib::ustring>::array_to_vector((*base->list_actions)(const_cast<GActionGroup*>(gobj())), Glib::OWNERSHIP_DEEP));
1120     return retval;
1121   }
1122 
1123   using RType = std::vector<Glib::ustring>;
1124   return RType();
1125 }
get_action_enabled_vfunc(const Glib::ustring & name) const1126 bool Gio::ActionGroup::get_action_enabled_vfunc(const Glib::ustring& name) const
1127 {
1128   const auto base = static_cast<BaseClassType*>(
1129       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1130 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1131 )  );
1132 
1133   if(base && base->get_action_enabled)
1134   {
1135     bool retval((*base->get_action_enabled)(const_cast<GActionGroup*>(gobj()),name.c_str()));
1136     return retval;
1137   }
1138 
1139   using RType = bool;
1140   return RType();
1141 }
get_action_parameter_type_vfunc(const Glib::ustring & name) const1142 Glib::VariantType Gio::ActionGroup::get_action_parameter_type_vfunc(const Glib::ustring& name) const
1143 {
1144   const auto base = static_cast<BaseClassType*>(
1145       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1146 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1147 )  );
1148 
1149   if(base && base->get_action_parameter_type)
1150   {
1151     Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_action_parameter_type)(const_cast<GActionGroup*>(gobj()),name.c_str())), true));
1152     return retval;
1153   }
1154 
1155   using RType = Glib::VariantType;
1156   return RType();
1157 }
get_action_state_type_vfunc(const Glib::ustring & name) const1158 Glib::VariantType Gio::ActionGroup::get_action_state_type_vfunc(const Glib::ustring& name) const
1159 {
1160   const auto base = static_cast<BaseClassType*>(
1161       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1162 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1163 )  );
1164 
1165   if(base && base->get_action_state_type)
1166   {
1167     Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_action_state_type)(const_cast<GActionGroup*>(gobj()),name.c_str())), true));
1168     return retval;
1169   }
1170 
1171   using RType = Glib::VariantType;
1172   return RType();
1173 }
get_action_state_hint_vfunc(const Glib::ustring & name) const1174 Glib::VariantBase Gio::ActionGroup::get_action_state_hint_vfunc(const Glib::ustring& name) const
1175 {
1176   const auto base = static_cast<BaseClassType*>(
1177       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1178 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1179 )  );
1180 
1181   if(base && base->get_action_state_hint)
1182   {
1183     Glib::VariantBase retval(Glib::wrap((*base->get_action_state_hint)(const_cast<GActionGroup*>(gobj()),name.c_str()), false));
1184     return retval;
1185   }
1186 
1187   using RType = Glib::VariantBase;
1188   return RType();
1189 }
get_action_state_vfunc(const Glib::ustring & name) const1190 Glib::VariantBase Gio::ActionGroup::get_action_state_vfunc(const Glib::ustring& name) const
1191 {
1192   const auto base = static_cast<BaseClassType*>(
1193       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1194 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1195 )  );
1196 
1197   if(base && base->get_action_state)
1198   {
1199     Glib::VariantBase retval(Glib::wrap((*base->get_action_state)(const_cast<GActionGroup*>(gobj()),name.c_str()), false));
1200     return retval;
1201   }
1202 
1203   using RType = Glib::VariantBase;
1204   return RType();
1205 }
change_action_state_vfunc(const Glib::ustring & name,const Glib::VariantBase & value)1206 void Gio::ActionGroup::change_action_state_vfunc(const Glib::ustring& name, const Glib::VariantBase& value)
1207 {
1208   const auto base = static_cast<BaseClassType*>(
1209       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1210 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1211 )  );
1212 
1213   if(base && base->change_action_state)
1214   {
1215     (*base->change_action_state)(gobj(),name.c_str(),const_cast<GVariant*>((value).gobj()));
1216   }
1217 }
activate_action_vfunc(const Glib::ustring & name,const Glib::VariantBase & parameter)1218 void Gio::ActionGroup::activate_action_vfunc(const Glib::ustring& name, const Glib::VariantBase& parameter)
1219 {
1220   const auto base = static_cast<BaseClassType*>(
1221       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
1222 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
1223 )  );
1224 
1225   if(base && base->activate_action)
1226   {
1227     (*base->activate_action)(gobj(),name.c_str(),const_cast<GVariant*>((parameter).gobj()));
1228   }
1229 }
1230 
1231 
1232 } // namespace Gio
1233 
1234 
1235