// Generated by gmmproc 2.54.0 -- DO NOT MODIFY!


#include <glibmm.h>

#include <giomm/actiongroup.h>
#include <giomm/private/actiongroup_p.h>


/* Copyright (C) 2010 The giomm Development Team
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 */

#include <glibmm/exceptionhandler.h>
#include <glibmm/variant.h>
#include <glibmm/vectorutils.h>
#include <gio/gio.h>

namespace Gio
{

} // namespace Gio

namespace
{


static void ActionGroup_signal_action_added_callback(GActionGroup* self, const gchar* p0,void* data)
{
  using namespace Gio;
  using SlotType = sigc::slot< void,const Glib::ustring& >;

  auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo ActionGroup_signal_action_added_info =
{
  "action-added",
  (GCallback) &ActionGroup_signal_action_added_callback,
  (GCallback) &ActionGroup_signal_action_added_callback
};


static void ActionGroup_signal_action_enabled_changed_callback(GActionGroup* self, const gchar* p0,gboolean p1,void* data)
{
  using namespace Gio;
  using SlotType = sigc::slot< void,const Glib::ustring&,bool >;

  auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
, p1
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo ActionGroup_signal_action_enabled_changed_info =
{
  "action-enabled-changed",
  (GCallback) &ActionGroup_signal_action_enabled_changed_callback,
  (GCallback) &ActionGroup_signal_action_enabled_changed_callback
};


static void ActionGroup_signal_action_removed_callback(GActionGroup* self, const gchar* p0,void* data)
{
  using namespace Gio;
  using SlotType = sigc::slot< void,const Glib::ustring& >;

  auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo ActionGroup_signal_action_removed_info =
{
  "action-removed",
  (GCallback) &ActionGroup_signal_action_removed_callback,
  (GCallback) &ActionGroup_signal_action_removed_callback
};


static void ActionGroup_signal_action_state_changed_callback(GActionGroup* self, const gchar* p0,GVariant* p1,void* data)
{
  using namespace Gio;
  using SlotType = sigc::slot< void,const Glib::ustring&,const Glib::VariantBase& >;

  auto obj = dynamic_cast<ActionGroup*>(Glib::ObjectBase::_get_current_wrapper((GObject*) self));
  // Do not try to call a signal on a disassociated wrapper.
  if(obj)
  {
    try
    {
      if(const auto slot = Glib::SignalProxyNormal::data_to_slot(data))
        (*static_cast<SlotType*>(slot))(Glib::convert_const_gchar_ptr_to_ustring(p0)
, Glib::wrap(p1, true)
);
    }
    catch(...)
    {
       Glib::exception_handlers_invoke();
    }
  }
}

static const Glib::SignalProxyInfo ActionGroup_signal_action_state_changed_info =
{
  "action-state-changed",
  (GCallback) &ActionGroup_signal_action_state_changed_callback,
  (GCallback) &ActionGroup_signal_action_state_changed_callback
};


} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gio::ActionGroup> wrap(GActionGroup* object, bool take_copy)
{
  return Glib::RefPtr<Gio::ActionGroup>( dynamic_cast<Gio::ActionGroup*> (Glib::wrap_auto_interface<Gio::ActionGroup> ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} // namespace Glib


namespace Gio
{


/* The *_Class implementation: */

const Glib::Interface_Class& ActionGroup_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Interface_Class has to know the interface init function
    // in order to add interfaces to implementing types.
    class_init_func_ = &ActionGroup_Class::iface_init_function;

    // We can not derive from another interface, and it is not necessary anyway.
    gtype_ = g_action_group_get_type();
  }

  return *this;
}

void ActionGroup_Class::iface_init_function(void* g_iface, void*)
{
  const auto klass = static_cast<BaseClassType*>(g_iface);

  //This is just to avoid an "unused variable" warning when there are no vfuncs or signal handlers to connect.
  //This is a temporary fix until I find out why I can not seem to derive a GtkFileChooser interface. murrayc
  g_assert(klass != nullptr);

  klass->has_action = &has_action_vfunc_callback;
  klass->list_actions = &list_actions_vfunc_callback;
  klass->get_action_enabled = &get_action_enabled_vfunc_callback;
  klass->get_action_parameter_type = &get_action_parameter_type_vfunc_callback;
  klass->get_action_state_type = &get_action_state_type_vfunc_callback;
  klass->get_action_state_hint = &get_action_state_hint_vfunc_callback;
  klass->get_action_state = &get_action_state_vfunc_callback;
  klass->change_action_state = &change_action_state_vfunc_callback;
  klass->activate_action = &activate_action_vfunc_callback;

  klass->action_added = &action_added_callback;
  klass->action_enabled_changed = &action_enabled_changed_callback;
  klass->action_removed = &action_removed_callback;
  klass->action_state_changed = &action_state_changed_callback;
}

gboolean ActionGroup_Class::has_action_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->has_action_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->has_action)
    return (*base->has_action)(self, action_name);

  using RType = gboolean;
  return RType();
}
gchar** ActionGroup_Class::list_actions_vfunc_callback(GActionGroup* self)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return g_strdupv(const_cast<gchar**>(Glib::ArrayHandler<Glib::ustring>::vector_to_array(obj->list_actions_vfunc()).data()));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->list_actions)
    return (*base->list_actions)(self);

  using RType = gchar**;
  return RType();
}
gboolean ActionGroup_Class::get_action_enabled_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return static_cast<int>(obj->get_action_enabled_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_action_enabled)
    return (*base->get_action_enabled)(self, action_name);

  using RType = gboolean;
  return RType();
}
const GVariantType* ActionGroup_Class::get_action_parameter_type_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        static auto quark_return_value = g_quark_from_static_string("Gio::ActionGroup::get_action_parameter_type_vfunc");

        auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
        if (!return_value)
        {
          return_value = new Glib::VariantType();
          g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
          &Glib::destroy_notify_delete<Glib::VariantType>);
        }
        // Keep a copy of the return value. The caller is not expected
        // to free the object that the returned pointer points to.
        *return_value = obj->get_action_parameter_type_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
);
        return (*return_value).gobj();
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_action_parameter_type)
    return (*base->get_action_parameter_type)(self, action_name);

  using RType = const GVariantType*;
  return RType();
}
const GVariantType* ActionGroup_Class::get_action_state_type_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        static auto quark_return_value = g_quark_from_static_string("Gio::ActionGroup::get_action_state_type_vfunc");

        auto return_value = static_cast<Glib::VariantType*>(g_object_get_qdata(obj_base->gobj(), quark_return_value));
        if (!return_value)
        {
          return_value = new Glib::VariantType();
          g_object_set_qdata_full(obj_base->gobj(), quark_return_value, return_value,
          &Glib::destroy_notify_delete<Glib::VariantType>);
        }
        // Keep a copy of the return value. The caller is not expected
        // to free the object that the returned pointer points to.
        *return_value = obj->get_action_state_type_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
);
        return (*return_value).gobj();
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_action_state_type)
    return (*base->get_action_state_type)(self, action_name);

  using RType = const GVariantType*;
  return RType();
}
GVariant* ActionGroup_Class::get_action_state_hint_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return Glib::unwrap_copy(obj->get_action_state_hint_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_action_state_hint)
    return (*base->get_action_state_hint)(self, action_name);

  using RType = GVariant*;
  return RType();
}
GVariant* ActionGroup_Class::get_action_state_vfunc_callback(GActionGroup* self, const gchar* action_name)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        return Glib::unwrap_copy(obj->get_action_state_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
));
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->get_action_state)
    return (*base->get_action_state)(self, action_name);

  using RType = GVariant*;
  return RType();
}
void ActionGroup_Class::change_action_state_vfunc_callback(GActionGroup* self, const gchar* action_name, GVariant* value)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->change_action_state_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
, Glib::wrap(value, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->change_action_state)
    (*base->change_action_state)(self, action_name, value);
}
void ActionGroup_Class::activate_action_vfunc_callback(GActionGroup* self, const gchar* action_name, GVariant* parameter)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->activate_action_vfunc(Glib::convert_const_gchar_ptr_to_ustring(action_name)
, Glib::wrap(parameter, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  BaseClassType *const base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)  );

  // Call the original underlying C function:
  if(base && base->activate_action)
    (*base->activate_action)(self, action_name, parameter);
}

void ActionGroup_Class::action_added_callback(GActionGroup* self, const gchar* p0)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_action_added(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->action_added)
    (*base->action_added)(self, p0);
}
void ActionGroup_Class::action_enabled_changed_callback(GActionGroup* self, const gchar* p0, gboolean p1)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_action_enabled_changed(Glib::convert_const_gchar_ptr_to_ustring(p0)
, p1
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->action_enabled_changed)
    (*base->action_enabled_changed)(self, p0, p1);
}
void ActionGroup_Class::action_removed_callback(GActionGroup* self, const gchar* p0)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_action_removed(Glib::convert_const_gchar_ptr_to_ustring(p0)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->action_removed)
    (*base->action_removed)(self, p0);
}
void ActionGroup_Class::action_state_changed_callback(GActionGroup* self, const gchar* p0, GVariant* p1)
{
  const auto obj_base = static_cast<Glib::ObjectBase*>(
      Glib::ObjectBase::_get_current_wrapper((GObject*)self));

  // Non-gtkmmproc-generated custom classes implicitly call the default
  // Glib::ObjectBase constructor, which sets is_derived_. But gtkmmproc-
  // generated classes can use this optimisation, which avoids the unnecessary
  // parameter conversions if there is no possibility of the virtual function
  // being overridden:
  if(obj_base && obj_base->is_derived_())
  {
    const auto obj = dynamic_cast<CppObjectType* const>(obj_base);
    if(obj) // This can be NULL during destruction.
    {
      try // Trap C++ exceptions which would normally be lost because this is a C callback.
      {
        // Call the virtual member method, which derived classes might override.
        obj->on_action_state_changed(Glib::convert_const_gchar_ptr_to_ustring(p0)
, Glib::wrap(p1, true)
);
        return;
      }
      catch(...)
      {
        Glib::exception_handlers_invoke();
      }
    }
  }

  const auto base = static_cast<BaseClassType*>(
        g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(self), CppObjectType::get_type()) // Get the interface.
)    );

  // Call the original underlying C function:
  if(base && base->action_state_changed)
    (*base->action_state_changed)(self, p0, p1);
}


Glib::ObjectBase* ActionGroup_Class::wrap_new(GObject* object)
{
  return new ActionGroup((GActionGroup*)(object));
}


/* The implementation: */

ActionGroup::ActionGroup()
:
  Glib::Interface(actiongroup_class_.init())
{}

ActionGroup::ActionGroup(GActionGroup* castitem)
:
  Glib::Interface((GObject*)(castitem))
{}

ActionGroup::ActionGroup(const Glib::Interface_Class& interface_class)
: Glib::Interface(interface_class)
{
}

ActionGroup::ActionGroup(ActionGroup&& src) noexcept
: Glib::Interface(std::move(src))
{}

ActionGroup& ActionGroup::operator=(ActionGroup&& src) noexcept
{
  Glib::Interface::operator=(std::move(src));
  return *this;
}

ActionGroup::~ActionGroup() noexcept
{}

// static
void ActionGroup::add_interface(GType gtype_implementer)
{
  actiongroup_class_.init().add_interface(gtype_implementer);
}

ActionGroup::CppClassType ActionGroup::actiongroup_class_; // initialize static member

GType ActionGroup::get_type()
{
  return actiongroup_class_.init().get_type();
}


GType ActionGroup::get_base_type()
{
  return g_action_group_get_type();
}


bool ActionGroup::has_action(const Glib::ustring& action_name) const
{
  return g_action_group_has_action(const_cast<GActionGroup*>(gobj()), action_name.c_str());
}

std::vector<Glib::ustring> ActionGroup::list_actions() const
{
  return Glib::ArrayHandler<Glib::ustring>::array_to_vector(g_action_group_list_actions(const_cast<GActionGroup*>(gobj())), Glib::OWNERSHIP_DEEP);
}

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)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_parameter_type = nullptr;
  const GVariantType* g_state_type = nullptr;
  GVariant* g_state_hint = nullptr;
  GVariant* g_state = nullptr;
  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);
enabled = static_cast<bool>(g_enabled);
  parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
  state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
  state_hint = Glib::wrap(g_state_hint);
  state = Glib::wrap(g_state);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_parameter_type = nullptr;
  const GVariantType* g_state_type = nullptr;
  GVariant* g_state_hint = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, &g_state_type, &g_state_hint, nullptr);
enabled = static_cast<bool>(g_enabled);
  parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
  state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
  state_hint = Glib::wrap(g_state_hint);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint, Glib::VariantBase& state)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_parameter_type = nullptr;
  GVariant* g_state_hint = nullptr;
  GVariant* g_state = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, nullptr, &g_state_hint, &g_state);
enabled = static_cast<bool>(g_enabled);
  parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
  state_hint = Glib::wrap(g_state_hint);
  state = Glib::wrap(g_state);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantType& parameter_type, Glib::VariantBase& state_hint)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_parameter_type = nullptr;
  GVariant* g_state_hint = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, &g_parameter_type, nullptr, &g_state_hint, nullptr);
enabled = static_cast<bool>(g_enabled);
  parameter_type = Glib::wrap(const_cast<GVariantType*>(g_parameter_type));
  state_hint = Glib::wrap(g_state_hint);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type, Glib::VariantBase& state)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_state_type = nullptr;
  GVariant* g_state_hint = nullptr;
  GVariant* g_state = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, &g_state_type, &g_state_hint, &g_state);
enabled = static_cast<bool>(g_enabled);
  state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
  state_hint = Glib::wrap(g_state_hint);
  state = Glib::wrap(g_state);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantType& state_type)
{
  gboolean g_enabled = gboolean();
  const GVariantType* g_state_type = nullptr;
  GVariant* g_state_hint = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, &g_state_type, &g_state_hint, nullptr);
enabled = static_cast<bool>(g_enabled);
  state_type = Glib::wrap(const_cast<GVariantType*>(g_state_type));
  state_hint = Glib::wrap(g_state_hint);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint, Glib::VariantBase& state)
{
  gboolean g_enabled = gboolean();
  GVariant* g_state_hint = nullptr;
  GVariant* g_state = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, nullptr, &g_state_hint, &g_state);
enabled = static_cast<bool>(g_enabled);
  state_hint = Glib::wrap(g_state_hint);
  state = Glib::wrap(g_state);
  return retvalue;
}

bool ActionGroup::query_action(const Glib::ustring& action_name, bool& enabled, Glib::VariantBase& state_hint)
{
  gboolean g_enabled = gboolean();
  GVariant* g_state_hint = nullptr;
  bool retvalue = g_action_group_query_action(gobj(), action_name.c_str(), &g_enabled, nullptr, nullptr, &g_state_hint, nullptr);
enabled = static_cast<bool>(g_enabled);
  state_hint = Glib::wrap(g_state_hint);
  return retvalue;
}

bool ActionGroup::get_action_enabled(const Glib::ustring& action_name) const
{
  return g_action_group_get_action_enabled(const_cast<GActionGroup*>(gobj()), action_name.c_str());
}

Glib::VariantType ActionGroup::get_action_parameter_type(const Glib::ustring& action_name) const
{
  return Glib::wrap(const_cast<GVariantType*>(g_action_group_get_action_parameter_type(const_cast<GActionGroup*>(gobj()), action_name.c_str())), true);
}

Glib::VariantType ActionGroup::get_action_state_type(const Glib::ustring& action_name) const
{
  return Glib::wrap(const_cast<GVariantType*>(g_action_group_get_action_state_type(const_cast<GActionGroup*>(gobj()), action_name.c_str())), true);
}

#ifndef GIOMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Glib::VariantContainerBase ActionGroup::get_action_state_hint(const Glib::ustring& action_name) const
{
  return Glib::VariantContainerBase(g_action_group_get_action_state_hint(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GIOMM_DISABLE_DEPRECATED

Glib::VariantContainerBase ActionGroup::get_action_state_hint_variant(const Glib::ustring& action_name) const
{
  return Glib::VariantContainerBase(g_action_group_get_action_state_hint(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
}

#ifndef GIOMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
Glib::VariantBase ActionGroup::get_action_state(const Glib::ustring& action_name) const
{
  return Glib::wrap(g_action_group_get_action_state(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GIOMM_DISABLE_DEPRECATED

Glib::VariantBase ActionGroup::get_action_state_variant(const Glib::ustring& action_name) const
{
  return Glib::wrap(g_action_group_get_action_state(const_cast<GActionGroup*>(gobj()), action_name.c_str()), false);
}

void ActionGroup::change_action_state(const Glib::ustring& action_name, const Glib::VariantBase& value)
{
  g_action_group_change_action_state(gobj(), action_name.c_str(), const_cast<GVariant*>((value).gobj()));
}

void ActionGroup::activate_action(const Glib::ustring& action_name, const Glib::VariantBase& parameter)
{
  g_action_group_activate_action(gobj(), action_name.c_str(), const_cast<GVariant*>((parameter).gobj()));
}

void ActionGroup::activate_action(const Glib::ustring& action_name)
{
  g_action_group_activate_action(gobj(), action_name.c_str(), nullptr);
}

void ActionGroup::action_added(const Glib::ustring& action_name)
{
  g_action_group_action_added(gobj(), action_name.c_str());
}

void ActionGroup::action_removed(const Glib::ustring& action_name)
{
  g_action_group_action_removed(gobj(), action_name.c_str());
}

void ActionGroup::action_enabled_changed(const Glib::ustring& action_name, bool enabled)
{
  g_action_group_action_enabled_changed(gobj(), action_name.c_str(), static_cast<int>(enabled));
}

void ActionGroup::action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& state)
{
  g_action_group_action_state_changed(gobj(), action_name.c_str(), const_cast<GVariant*>((state).gobj()));
}


Glib::SignalProxy< void,const Glib::ustring& > ActionGroup::signal_action_added()
{
  return Glib::SignalProxy< void,const Glib::ustring& >(this, &ActionGroup_signal_action_added_info);
}

Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& > ActionGroup::signal_action_added(const Glib::ustring& action_name)
{
  return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& >(this, &ActionGroup_signal_action_added_info, action_name);
}


Glib::SignalProxy< void,const Glib::ustring&,bool > ActionGroup::signal_action_enabled_changed()
{
  return Glib::SignalProxy< void,const Glib::ustring&,bool >(this, &ActionGroup_signal_action_enabled_changed_info);
}

Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,bool > ActionGroup::signal_action_enabled_changed(const Glib::ustring& action_name)
{
  return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,bool >(this, &ActionGroup_signal_action_enabled_changed_info, action_name);
}


Glib::SignalProxy< void,const Glib::ustring& > ActionGroup::signal_action_removed()
{
  return Glib::SignalProxy< void,const Glib::ustring& >(this, &ActionGroup_signal_action_removed_info);
}

Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& > ActionGroup::signal_action_removed(const Glib::ustring& action_name)
{
  return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring& >(this, &ActionGroup_signal_action_removed_info, action_name);
}


Glib::SignalProxy< void,const Glib::ustring&,const Glib::VariantBase& > ActionGroup::signal_action_state_changed()
{
  return Glib::SignalProxy< void,const Glib::ustring&,const Glib::VariantBase& >(this, &ActionGroup_signal_action_state_changed_info);
}

Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,const Glib::VariantBase& > ActionGroup::signal_action_state_changed(const Glib::ustring& action_name)
{
  return Glib::SignalProxyDetailedAnyType< void,const Glib::ustring&,const Glib::VariantBase& >(this, &ActionGroup_signal_action_state_changed_info, action_name);
}


void Gio::ActionGroup::on_action_added(const Glib::ustring& action_name)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->action_added)
    (*base->action_added)(gobj(),action_name.c_str());
}
void Gio::ActionGroup::on_action_enabled_changed(const Glib::ustring& action_name, bool enabled)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->action_enabled_changed)
    (*base->action_enabled_changed)(gobj(),action_name.c_str(),static_cast<int>(enabled));
}
void Gio::ActionGroup::on_action_removed(const Glib::ustring& action_name)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->action_removed)
    (*base->action_removed)(gobj(),action_name.c_str());
}
void Gio::ActionGroup::on_action_state_changed(const Glib::ustring& action_name, const Glib::VariantBase& value)
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->action_state_changed)
    (*base->action_state_changed)(gobj(),action_name.c_str(),const_cast<GVariant*>((value).gobj()));
}

bool Gio::ActionGroup::has_action_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->has_action)
  {
    bool retval((*base->has_action)(const_cast<GActionGroup*>(gobj()),name.c_str()));
    return retval;
  }

  using RType = bool;
  return RType();
}
std::vector<Glib::ustring> Gio::ActionGroup::list_actions_vfunc() const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->list_actions)
  {
    std::vector<Glib::ustring> retval(Glib::ArrayHandler<Glib::ustring>::array_to_vector((*base->list_actions)(const_cast<GActionGroup*>(gobj())), Glib::OWNERSHIP_DEEP));
    return retval;
  }

  using RType = std::vector<Glib::ustring>;
  return RType();
}
bool Gio::ActionGroup::get_action_enabled_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_action_enabled)
  {
    bool retval((*base->get_action_enabled)(const_cast<GActionGroup*>(gobj()),name.c_str()));
    return retval;
  }

  using RType = bool;
  return RType();
}
Glib::VariantType Gio::ActionGroup::get_action_parameter_type_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_action_parameter_type)
  {
    Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_action_parameter_type)(const_cast<GActionGroup*>(gobj()),name.c_str())), true));
    return retval;
  }

  using RType = Glib::VariantType;
  return RType();
}
Glib::VariantType Gio::ActionGroup::get_action_state_type_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_action_state_type)
  {
    Glib::VariantType retval(Glib::wrap(const_cast<GVariantType*>((*base->get_action_state_type)(const_cast<GActionGroup*>(gobj()),name.c_str())), true));
    return retval;
  }

  using RType = Glib::VariantType;
  return RType();
}
Glib::VariantBase Gio::ActionGroup::get_action_state_hint_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_action_state_hint)
  {
    Glib::VariantBase retval(Glib::wrap((*base->get_action_state_hint)(const_cast<GActionGroup*>(gobj()),name.c_str()), false));
    return retval;
  }

  using RType = Glib::VariantBase;
  return RType();
}
Glib::VariantBase Gio::ActionGroup::get_action_state_vfunc(const Glib::ustring& name) const
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->get_action_state)
  {
    Glib::VariantBase retval(Glib::wrap((*base->get_action_state)(const_cast<GActionGroup*>(gobj()),name.c_str()), false));
    return retval;
  }

  using RType = Glib::VariantBase;
  return RType();
}
void Gio::ActionGroup::change_action_state_vfunc(const Glib::ustring& name, const Glib::VariantBase& value) 
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->change_action_state)
  {
    (*base->change_action_state)(gobj(),name.c_str(),const_cast<GVariant*>((value).gobj()));
  }
}
void Gio::ActionGroup::activate_action_vfunc(const Glib::ustring& name, const Glib::VariantBase& parameter) 
{
  const auto base = static_cast<BaseClassType*>(
      g_type_interface_peek_parent( // Get the parent interface of the interface (The original underlying C interface).
g_type_interface_peek(G_OBJECT_GET_CLASS(gobject_), CppObjectType::get_type()) // Get the interface.
)  );

  if(base && base->activate_action)
  {
    (*base->activate_action)(gobj(),name.c_str(),const_cast<GVariant*>((parameter).gobj()));
  }
}


} // namespace Gio


