"Fossies" - the Fresh Open Source Software Archive

Member "glibmm-2.74.0/untracked/gio/giomm/action.cc" (19 Sep 2022, 25094 Bytes) of package /linux/misc/glibmm-2.74.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "action.cc" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes reports: 2.73.2_vs_2.74.0 or 2.72.1_vs_2.74.0.

    1 // Generated by gmmproc 2.74.0 -- DO NOT MODIFY!
    2 
    3 
    4 #include <glibmm.h>
    5 
    6 #include <giomm/action.h>
    7 #include <giomm/private/action_p.h>
    8 
    9 
   10 /* Copyright (C) 2011 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 <gio/gio.h>
   27 
   28 namespace Gio
   29 {
   30 
   31 void
   32 Action::activate()
   33 {
   34   g_action_activate(gobj(), nullptr);
   35 }
   36 
   37 } // namespace Gio
   38 
   39 namespace
   40 {
   41 } // anonymous namespace
   42 
   43 
   44 namespace Glib
   45 {
   46 
   47 Glib::RefPtr<Gio::Action> wrap(GAction* object, bool take_copy)
   48 {
   49   return Glib::make_refptr_for_instance<Gio::Action>( dynamic_cast<Gio::Action*> (Glib::wrap_auto_interface<Gio::Action> ((GObject*)(object), take_copy)) );
   50   //We use dynamic_cast<> in case of multiple inheritance.
   51 }
   52 
   53 } // namespace Glib
   54 
   55 
   56 namespace Gio
   57 {
   58 
   59 
   60 /* The *_Class implementation: */
   61 
   62 const Glib::Interface_Class& Action_Class::init()
   63 {
   64   if(!gtype_) // create the GType if necessary
   65   {
   66     // Glib::Interface_Class has to know the interface init function
   67     // in order to add interfaces to implementing types.
   68     class_init_func_ = &Action_Class::iface_init_function;
   69 
   70     // We can not derive from another interface, and it is not necessary anyway.
   71     gtype_ = g_action_get_type();
   72   }
   73 
   74   return *this;
   75 }
   76 
   77 void Action_Class::iface_init_function(void* g_iface, void*)
   78 {
   79   const auto klass = static_cast<BaseClassType*>(g_iface);
   80 
   81   //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
   82   //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
   83   g_assert(klass != nullptr);
   84 
   85   klass->get_name = &get_name_vfunc_callback;
   86   klass->get_parameter_type = &get_parameter_type_vfunc_callback;
   87   klass->get_state_type = &get_state_type_vfunc_callback;
   88   klass->get_state_hint = &get_state_hint_vfunc_callback;
   89   klass->get_enabled = &get_enabled_vfunc_callback;
   90   klass->get_state = &get_state_vfunc_callback;
   91   klass->change_state = &change_state_vfunc_callback;
   92   klass->activate = &activate_vfunc_callback;
   93 
   94 }
   95 
   96 const gchar* Action_Class::get_name_vfunc_callback(GAction* self)
   97 {
   98   const auto obj_base = static_cast<Glib::ObjectBase*>(
   99       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  100 
  101   // Non-gtkmmproc-generated custom classes implicitly call the default
  102   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  103   // generated classes can use this optimisation, which avoids the unnecessary
  104   // parameter conversions if there is no possibility of the virtual function
  105   // being overridden:
  106   if(obj_base && obj_base->is_derived_())
  107   {
  108     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  109     if(obj) // This can be NULL during destruction.
  110     {
  111       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  112       {
  113         // Call the virtual member method, which derived classes might override.
  114         static auto quark_return_value = g_quark_from_static_string("Gio::Action::get_name_vfunc");
  115 
  116         auto return_value = static_cast<Glib::ustring*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
  117         if (!return_value)
  118         {
  119           return_value = new Glib::ustring();
  120           g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
  121           &Glib::destroy_notify_delete<Glib::ustring>);
  122         }
  123         // Keep a copy of the return value. The caller is not expected
  124         // to free the object that the returned pointer points to.
  125         *return_value = obj->get_name_vfunc();
  126         return (*return_value).c_str();
  127       }
  128       catch(...)
  129       {
  130         Glib::exception_handlers_invoke();
  131       }
  132     }
  133   }
  134 
  135   BaseClassType *const base = static_cast<BaseClassType*>(
  136       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  137 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  138 )  );
  139 
  140   // Call the original underlying C function:
  141   if(base && base->get_name)
  142     return (*base->get_name)(self);
  143 
  144   using RType = const gchar*;
  145   return RType();
  146 }
  147 const GVariantType* Action_Class::get_parameter_type_vfunc_callback(GAction* self)
  148 {
  149   const auto obj_base = static_cast<Glib::ObjectBase*>(
  150       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  151 
  152   // Non-gtkmmproc-generated custom classes implicitly call the default
  153   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  154   // generated classes can use this optimisation, which avoids the unnecessary
  155   // parameter conversions if there is no possibility of the virtual function
  156   // being overridden:
  157   if(obj_base && obj_base->is_derived_())
  158   {
  159     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  160     if(obj) // This can be NULL during destruction.
  161     {
  162       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  163       {
  164         // Call the virtual member method, which derived classes might override.
  165         static auto quark_return_value = g_quark_from_static_string("Gio::Action::get_parameter_type_vfunc");
  166 
  167         auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
  168         if (!return_value)
  169         {
  170           return_value = new Glib::VariantType();
  171           g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
  172           &Glib::destroy_notify_delete<Glib::VariantType>);
  173         }
  174         // Keep a copy of the return value. The caller is not expected
  175         // to free the object that the returned pointer points to.
  176         *return_value = obj->get_parameter_type_vfunc();
  177         return (*return_value).gobj();
  178       }
  179       catch(...)
  180       {
  181         Glib::exception_handlers_invoke();
  182       }
  183     }
  184   }
  185 
  186   BaseClassType *const base = static_cast<BaseClassType*>(
  187       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  188 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  189 )  );
  190 
  191   // Call the original underlying C function:
  192   if(base && base->get_parameter_type)
  193     return (*base->get_parameter_type)(self);
  194 
  195   using RType = const GVariantType*;
  196   return RType();
  197 }
  198 const GVariantType* Action_Class::get_state_type_vfunc_callback(GAction* self)
  199 {
  200   const auto obj_base = static_cast<Glib::ObjectBase*>(
  201       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  202 
  203   // Non-gtkmmproc-generated custom classes implicitly call the default
  204   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  205   // generated classes can use this optimisation, which avoids the unnecessary
  206   // parameter conversions if there is no possibility of the virtual function
  207   // being overridden:
  208   if(obj_base && obj_base->is_derived_())
  209   {
  210     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  211     if(obj) // This can be NULL during destruction.
  212     {
  213       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  214       {
  215         // Call the virtual member method, which derived classes might override.
  216         static auto quark_return_value = g_quark_from_static_string("Gio::Action::get_state_type_vfunc");
  217 
  218         auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
  219         if (!return_value)
  220         {
  221           return_value = new Glib::VariantType();
  222           g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
  223           &Glib::destroy_notify_delete<Glib::VariantType>);
  224         }
  225         // Keep a copy of the return value. The caller is not expected
  226         // to free the object that the returned pointer points to.
  227         *return_value = obj->get_state_type_vfunc();
  228         return (*return_value).gobj();
  229       }
  230       catch(...)
  231       {
  232         Glib::exception_handlers_invoke();
  233       }
  234     }
  235   }
  236 
  237   BaseClassType *const base = static_cast<BaseClassType*>(
  238       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  239 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  240 )  );
  241 
  242   // Call the original underlying C function:
  243   if(base && base->get_state_type)
  244     return (*base->get_state_type)(self);
  245 
  246   using RType = const GVariantType*;
  247   return RType();
  248 }
  249 GVariant* Action_Class::get_state_hint_vfunc_callback(GAction* self)
  250 {
  251   const auto obj_base = static_cast<Glib::ObjectBase*>(
  252       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  253 
  254   // Non-gtkmmproc-generated custom classes implicitly call the default
  255   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  256   // generated classes can use this optimisation, which avoids the unnecessary
  257   // parameter conversions if there is no possibility of the virtual function
  258   // being overridden:
  259   if(obj_base && obj_base->is_derived_())
  260   {
  261     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  262     if(obj) // This can be NULL during destruction.
  263     {
  264       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  265       {
  266         // Call the virtual member method, which derived classes might override.
  267         return Glib::unwrap_copy(obj->get_state_hint_vfunc());
  268       }
  269       catch(...)
  270       {
  271         Glib::exception_handlers_invoke();
  272       }
  273     }
  274   }
  275 
  276   BaseClassType *const base = static_cast<BaseClassType*>(
  277       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  278 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  279 )  );
  280 
  281   // Call the original underlying C function:
  282   if(base && base->get_state_hint)
  283     return (*base->get_state_hint)(self);
  284 
  285   using RType = GVariant*;
  286   return RType();
  287 }
  288 gboolean Action_Class::get_enabled_vfunc_callback(GAction* self)
  289 {
  290   const auto obj_base = static_cast<Glib::ObjectBase*>(
  291       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  292 
  293   // Non-gtkmmproc-generated custom classes implicitly call the default
  294   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  295   // generated classes can use this optimisation, which avoids the unnecessary
  296   // parameter conversions if there is no possibility of the virtual function
  297   // being overridden:
  298   if(obj_base && obj_base->is_derived_())
  299   {
  300     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  301     if(obj) // This can be NULL during destruction.
  302     {
  303       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  304       {
  305         // Call the virtual member method, which derived classes might override.
  306         return static_cast<int>(obj->get_enabled_vfunc());
  307       }
  308       catch(...)
  309       {
  310         Glib::exception_handlers_invoke();
  311       }
  312     }
  313   }
  314 
  315   BaseClassType *const base = static_cast<BaseClassType*>(
  316       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  317 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  318 )  );
  319 
  320   // Call the original underlying C function:
  321   if(base && base->get_enabled)
  322     return (*base->get_enabled)(self);
  323 
  324   using RType = gboolean;
  325   return RType();
  326 }
  327 GVariant* Action_Class::get_state_vfunc_callback(GAction* self)
  328 {
  329   const auto obj_base = static_cast<Glib::ObjectBase*>(
  330       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  331 
  332   // Non-gtkmmproc-generated custom classes implicitly call the default
  333   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  334   // generated classes can use this optimisation, which avoids the unnecessary
  335   // parameter conversions if there is no possibility of the virtual function
  336   // being overridden:
  337   if(obj_base && obj_base->is_derived_())
  338   {
  339     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  340     if(obj) // This can be NULL during destruction.
  341     {
  342       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  343       {
  344         // Call the virtual member method, which derived classes might override.
  345         return Glib::unwrap_copy(obj->get_state_vfunc());
  346       }
  347       catch(...)
  348       {
  349         Glib::exception_handlers_invoke();
  350       }
  351     }
  352   }
  353 
  354   BaseClassType *const base = static_cast<BaseClassType*>(
  355       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  356 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  357 )  );
  358 
  359   // Call the original underlying C function:
  360   if(base && base->get_state)
  361     return (*base->get_state)(self);
  362 
  363   using RType = GVariant*;
  364   return RType();
  365 }
  366 void Action_Class::change_state_vfunc_callback(GAction* self, GVariant* value)
  367 {
  368   const auto obj_base = static_cast<Glib::ObjectBase*>(
  369       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  370 
  371   // Non-gtkmmproc-generated custom classes implicitly call the default
  372   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  373   // generated classes can use this optimisation, which avoids the unnecessary
  374   // parameter conversions if there is no possibility of the virtual function
  375   // being overridden:
  376   if(obj_base && obj_base->is_derived_())
  377   {
  378     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  379     if(obj) // This can be NULL during destruction.
  380     {
  381       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  382       {
  383         // Call the virtual member method, which derived classes might override.
  384         obj->change_state_vfunc(Glib::wrap(value, true)
  385 );
  386         return;
  387       }
  388       catch(...)
  389       {
  390         Glib::exception_handlers_invoke();
  391       }
  392     }
  393   }
  394 
  395   BaseClassType *const base = static_cast<BaseClassType*>(
  396       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  397 g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
  398 )  );
  399 
  400   // Call the original underlying C function:
  401   if(base && base->change_state)
  402     (*base->change_state)(self, value);
  403 }
  404 void Action_Class::activate_vfunc_callback(GAction* self, GVariant* parameter)
  405 {
  406   const auto obj_base = static_cast<Glib::ObjectBase*>(
  407       Glib::ObjectBase::_get_current_wrapper((GObject*)self));
  408 
  409   // Non-gtkmmproc-generated custom classes implicitly call the default
  410   // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  411   // generated classes can use this optimisation, which avoids the unnecessary
  412   // parameter conversions if there is no possibility of the virtual function
  413   // being overridden:
  414   if(obj_base && obj_base->is_derived_())
  415   {
  416     const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
  417     if(obj) // This can be NULL during destruction.
  418     {
  419       try // Trap C++ exceptions which would normally be lost because this is a C callback.
  420       {
  421         // Call the virtual member method, which derived classes might override.
  422         obj->activate_vfunc(Glib::wrap(parameter, true)
  423 );
  424         return;
  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->activate)
  440     (*base->activate)(self, parameter);
  441 }
  442 
  443 
  444 Glib::ObjectBase* Action_Class::wrap_new(GObject* object)
  445 {
  446   return new Action((GAction*)(object));
  447 }
  448 
  449 
  450 /* The implementation: */
  451 
  452 Action::Action()
  453 :
  454   Glib::Interface(action_class_.init())
  455 {}
  456 
  457 Action::Action(GAction* castitem)
  458 :
  459   Glib::Interface((GObject*)(castitem))
  460 {}
  461 
  462 Action::Action(const Glib::Interface_Class& interface_class)
  463 : Glib::Interface(interface_class)
  464 {
  465 }
  466 
  467 Action::Action(Action&& src) noexcept
  468 : Glib::Interface(std::move(src))
  469 {}
  470 
  471 Action& Action::operator=(Action&& src) noexcept
  472 {
  473   Glib::Interface::operator=(std::move(src));
  474   return *this;
  475 }
  476 
  477 Action::~Action() noexcept
  478 {}
  479 
  480 // static
  481 void Action::add_interface(GType gtype_implementer)
  482 {
  483   action_class_.init().add_interface(gtype_implementer);
  484 }
  485 
  486 Action::CppClassType Action::action_class_; // initialize static member
  487 
  488 GType Action::get_type()
  489 {
  490   return action_class_.init().get_type();
  491 }
  492 
  493 
  494 GType Action::get_base_type()
  495 {
  496   return g_action_get_type();
  497 }
  498 
  499 
  500 Glib::ustring Action::get_name() const
  501 {
  502   return Glib::convert_const_gchar_ptr_to_ustring(g_action_get_name(const_cast<GAction*>(gobj())));
  503 }
  504 
  505 Glib::VariantType Action::get_parameter_type() const
  506 {
  507   return Glib::wrap(const_cast<GVariantType*>(g_action_get_parameter_type(const_cast<GAction*>(gobj()))), true);
  508 }
  509 
  510 Glib::VariantType Action::get_state_type() const
  511 {
  512   return Glib::wrap(const_cast<GVariantType*>(g_action_get_state_type(const_cast<GAction*>(gobj()))), true);
  513 }
  514 
  515 Glib::VariantContainerBase Action::get_state_hint_variant() const
  516 {
  517   return Glib::VariantContainerBase(g_action_get_state_hint(const_cast<GAction*>(gobj())), false);
  518 }
  519 
  520 bool Action::get_enabled() const
  521 {
  522   return g_action_get_enabled(const_cast<GAction*>(gobj()));
  523 }
  524 
  525 void Action::change_state_variant(const Glib::VariantBase& value)
  526 {
  527   g_action_change_state(gobj(), const_cast<GVariant*>((value).gobj()));
  528 }
  529 
  530 Glib::VariantBase Action::get_state_variant() const
  531 {
  532   return Glib::wrap(g_action_get_state(const_cast<GAction*>(gobj())), false);
  533 }
  534 
  535 void Action::activate_variant(const Glib::VariantBase& parameter)
  536 {
  537   g_action_activate(gobj(), const_cast<GVariant*>((parameter).gobj()));
  538 }
  539 
  540 bool Action::name_is_valid(const Glib::ustring& action_name)
  541 {
  542   return g_action_name_is_valid(action_name.c_str());
  543 }
  544 
  545 void Action::parse_detailed_name_variant(const Glib::ustring& detailed_name, Glib::ustring& action_name, Glib::VariantBase& target_value)
  546 {
  547   GError* gerror = nullptr;
  548   gchar* g_action_name = nullptr;
  549   GVariant* g_target_value = nullptr;
  550   g_action_parse_detailed_name(detailed_name.c_str(), &g_action_name, &g_target_value, &(gerror));
  551   if(gerror)
  552     ::Glib::Error::throw_exception(gerror);
  553 action_name = Glib::convert_return_gchar_ptr_to_ustring(g_action_name);
  554   target_value = Glib::wrap(g_target_value);
  555 }
  556 
  557 Glib::ustring Action::print_detailed_name_variant(const Glib::ustring& action_name, const Glib::VariantBase& target_value)
  558 {
  559   return Glib::convert_return_gchar_ptr_to_ustring(g_action_print_detailed_name(action_name.c_str(), const_cast<GVariant*>((target_value).gobj())));
  560 }
  561 
  562 
  563 Glib::PropertyProxy_ReadOnly< bool > Action::property_enabled() const
  564 {
  565   return Glib::PropertyProxy_ReadOnly< bool >(this, "enabled");
  566 }
  567 
  568 Glib::PropertyProxy_ReadOnly< Glib::ustring > Action::property_name() const
  569 {
  570   return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "name");
  571 }
  572 
  573 static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::VariantType>::value,
  574   "Type Glib::VariantType cannot be used in _WRAP_PROPERTY. "
  575   "There is no suitable template specialization of Glib::Value<>.");
  576 
  577 Glib::PropertyProxy_ReadOnly< Glib::VariantType > Action::property_parameter_type() const
  578 {
  579   return Glib::PropertyProxy_ReadOnly< Glib::VariantType >(this, "parameter-type");
  580 }
  581 
  582 static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::VariantBase>::value,
  583   "Type Glib::VariantBase cannot be used in _WRAP_PROPERTY. "
  584   "There is no suitable template specialization of Glib::Value<>.");
  585 
  586 Glib::PropertyProxy_ReadOnly< Glib::VariantBase > Action::property_state() const
  587 {
  588   return Glib::PropertyProxy_ReadOnly< Glib::VariantBase >(this, "state");
  589 }
  590 
  591 static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::VariantType>::value,
  592   "Type Glib::VariantType cannot be used in _WRAP_PROPERTY. "
  593   "There is no suitable template specialization of Glib::Value<>.");
  594 
  595 Glib::PropertyProxy_ReadOnly< Glib::VariantType > Action::property_state_type() const
  596 {
  597   return Glib::PropertyProxy_ReadOnly< Glib::VariantType >(this, "state-type");
  598 }
  599 
  600 
  601 Glib::ustring Gio::Action::get_name_vfunc() const
  602 {
  603   const auto base = static_cast<BaseClassType*>(
  604       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  605 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  606 )  );
  607 
  608   if(base && base->get_name)
  609   {
  610     Glib::ustring retval(Glib::convert_const_gchar_ptr_to_ustring((*base->get_name)(const_cast<GAction*>(gobj()))));
  611     return retval;
  612   }
  613 
  614   using RType = Glib::ustring;
  615   return RType();
  616 }
  617 Glib::VariantType Gio::Action::get_parameter_type_vfunc() const
  618 {
  619   const auto base = static_cast<BaseClassType*>(
  620       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  621 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  622 )  );
  623 
  624   if(base && base->get_parameter_type)
  625   {
  626     Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_parameter_type)(const_cast<GAction*>(gobj()))), true));
  627     return retval;
  628   }
  629 
  630   using RType = Glib::VariantType;
  631   return RType();
  632 }
  633 Glib::VariantType Gio::Action::get_state_type_vfunc() const
  634 {
  635   const auto base = static_cast<BaseClassType*>(
  636       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  637 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  638 )  );
  639 
  640   if(base && base->get_state_type)
  641   {
  642     Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_state_type)(const_cast<GAction*>(gobj()))), true));
  643     return retval;
  644   }
  645 
  646   using RType = Glib::VariantType;
  647   return RType();
  648 }
  649 Glib::VariantBase Gio::Action::get_state_hint_vfunc() const
  650 {
  651   const auto base = static_cast<BaseClassType*>(
  652       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  653 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  654 )  );
  655 
  656   if(base && base->get_state_hint)
  657   {
  658     Glib::VariantBase retval(Glib::wrap((*base->get_state_hint)(const_cast<GAction*>(gobj())), false));
  659     return retval;
  660   }
  661 
  662   using RType = Glib::VariantBase;
  663   return RType();
  664 }
  665 bool Gio::Action::get_enabled_vfunc() const
  666 {
  667   const auto base = static_cast<BaseClassType*>(
  668       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  669 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  670 )  );
  671 
  672   if(base && base->get_enabled)
  673   {
  674     bool retval((*base->get_enabled)(const_cast<GAction*>(gobj())));
  675     return retval;
  676   }
  677 
  678   using RType = bool;
  679   return RType();
  680 }
  681 Glib::VariantBase Gio::Action::get_state_vfunc() const
  682 {
  683   const auto base = static_cast<BaseClassType*>(
  684       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  685 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  686 )  );
  687 
  688   if(base && base->get_state)
  689   {
  690     Glib::VariantBase retval(Glib::wrap((*base->get_state)(const_cast<GAction*>(gobj())), false));
  691     return retval;
  692   }
  693 
  694   using RType = Glib::VariantBase;
  695   return RType();
  696 }
  697 void Gio::Action::change_state_vfunc(const Glib::VariantBase& value) 
  698 {
  699   const auto base = static_cast<BaseClassType*>(
  700       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  701 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  702 )  );
  703 
  704   if(base && base->change_state)
  705   {
  706     (*base->change_state)(gobj(),const_cast<GVariant*>((value).gobj()));
  707   }
  708 }
  709 void Gio::Action::activate_vfunc(const Glib::VariantBase& parameter) 
  710 {
  711   const auto base = static_cast<BaseClassType*>(
  712       g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
  713 g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
  714 )  );
  715 
  716   if(base && base->activate)
  717   {
  718     (*base->activate)(gobj(),const_cast<GVariant*>((parameter).gobj()));
  719   }
  720 }
  721 
  722 
  723 } // namespace Gio
  724 
  725