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


#include <glibmm.h>

#include <gtkmm/shortcut.h>
#include <gtkmm/private/shortcut_p.h>


/* Copyright (C) 2020 The gtkmm 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/>.
 */

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gtk::Shortcut> wrap(GtkShortcut* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::Shortcut>( dynamic_cast<Gtk::Shortcut*> (Glib::wrap_auto ((GObject*)(object), take_copy)) );
  //We use dynamic_cast<> in case of multiple inheritance.
}

} /* namespace Glib */


namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& Shortcut_Class::init()
{
  if(!gtype_) // create the GType if necessary
  {
    // Glib::Class has to know the class init function to clone custom types.
    class_init_func_ = &Shortcut_Class::class_init_function;

    // Do not derive a GType, or use a derived class:
    gtype_ = gtk_shortcut_get_type();

  }

  return *this;
}


void Shortcut_Class::class_init_function(void* g_class, void* class_data)
{
  const auto klass = static_cast<BaseClassType*>(g_class);
  CppClassParent::class_init_function(klass, class_data);


}


Glib::ObjectBase* Shortcut_Class::wrap_new(GObject* object)
{
  return new Shortcut((GtkShortcut*)object);
}


/* The implementation: */

GtkShortcut* Shortcut::gobj_copy()
{
  reference();
  return gobj();
}

Shortcut::Shortcut(const Glib::ConstructParams& construct_params)
:
  Glib::Object(construct_params)
{

}

Shortcut::Shortcut(GtkShortcut* castitem)
:
  Glib::Object((GObject*)(castitem))
{}


Shortcut::Shortcut(Shortcut&& src) noexcept
: Glib::Object(std::move(src))
{}

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


Shortcut::~Shortcut() noexcept
{}


Shortcut::CppClassType Shortcut::shortcut_class_; // initialize static member

GType Shortcut::get_type()
{
  return shortcut_class_.init().get_type();
}


GType Shortcut::get_base_type()
{
  return gtk_shortcut_get_type();
}


Shortcut::Shortcut(const Glib::RefPtr<const ShortcutTrigger>& trigger, const Glib::RefPtr<const ShortcutAction>& action)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Glib::Object(Glib::ConstructParams(shortcut_class_.init(), "trigger", const_cast<GtkShortcutTrigger*>(Glib::unwrap(trigger)), "action", const_cast<GtkShortcutAction*>(Glib::unwrap(action)), nullptr))
{
  

}

Glib::RefPtr<Shortcut> Shortcut::create(const Glib::RefPtr<const ShortcutTrigger>& trigger, const Glib::RefPtr<const ShortcutAction>& action)
{
  return Glib::make_refptr_for_instance<Shortcut>( new Shortcut(trigger, action) );
}

Glib::RefPtr<ShortcutTrigger> Shortcut::get_trigger() const
{
  auto retvalue = Glib::wrap(gtk_shortcut_get_trigger(const_cast<GtkShortcut*>(gobj())));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

void Shortcut::set_trigger(const Glib::RefPtr<const ShortcutTrigger>& trigger)
{
  gtk_shortcut_set_trigger(gobj(), Glib::unwrap_copy(std::const_pointer_cast<ShortcutTrigger>(trigger)));
}

Glib::RefPtr<ShortcutAction> Shortcut::get_action() const
{
  auto retvalue = Glib::wrap(gtk_shortcut_get_action(const_cast<GtkShortcut*>(gobj())));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

void Shortcut::set_action(const Glib::RefPtr<const ShortcutAction>& action)
{
  gtk_shortcut_set_action(gobj(), Glib::unwrap_copy(std::const_pointer_cast<ShortcutAction>(action)));
}

#ifndef GTKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
void Shortcut::set_trigger(const Glib::RefPtr<const ShortcutAction>& action)
{
  gtk_shortcut_set_action(gobj(), Glib::unwrap_copy(std::const_pointer_cast<ShortcutAction>(action)));
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED

Glib::VariantBase Shortcut::get_arguments() const
{
  return Glib::wrap(gtk_shortcut_get_arguments(const_cast<GtkShortcut*>(gobj())), true);
}

void Shortcut::set_arguments(const Glib::VariantBase& args) const
{
  gtk_shortcut_set_arguments(const_cast<GtkShortcut*>(gobj()), const_cast<GVariant*>((args).gobj()));
}


static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<ShortcutTrigger>>::value,
  "Type Glib::RefPtr<ShortcutTrigger> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<ShortcutTrigger> > Shortcut::property_trigger() 
{
  return Glib::PropertyProxy< Glib::RefPtr<ShortcutTrigger> >(this, "trigger");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ShortcutTrigger> > Shortcut::property_trigger() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ShortcutTrigger> >(this, "trigger");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::RefPtr<ShortcutAction>>::value,
  "Type Glib::RefPtr<ShortcutAction> cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::RefPtr<ShortcutAction> > Shortcut::property_action() 
{
  return Glib::PropertyProxy< Glib::RefPtr<ShortcutAction> >(this, "action");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ShortcutAction> > Shortcut::property_action() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<ShortcutAction> >(this, "action");
}

static_assert(Glib::Traits::ValueCompatibleWithWrapProperty<Glib::VariantBase>::value,
  "Type Glib::VariantBase cannot be used in _WRAP_PROPERTY. "
  "There is no suitable template specialization of Glib::Value<>.");

Glib::PropertyProxy< Glib::VariantBase > Shortcut::property_arguments() 
{
  return Glib::PropertyProxy< Glib::VariantBase >(this, "arguments");
}

Glib::PropertyProxy_ReadOnly< Glib::VariantBase > Shortcut::property_arguments() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::VariantBase >(this, "arguments");
}


} // namespace Gtk


