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


#include <glibmm.h>

#include <gtkmm/shortcutcontroller.h>
#include <gtkmm/private/shortcutcontroller_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/>.
 */

#include <gtk/gtk.h>

namespace
{
} // anonymous namespace


namespace Glib
{

Glib::RefPtr<Gtk::ShortcutController> wrap(GtkShortcutController* object, bool take_copy)
{
  return Glib::make_refptr_for_instance<Gtk::ShortcutController>( dynamic_cast<Gtk::ShortcutController*> (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& ShortcutController_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_ = &ShortcutController_Class::class_init_function;

    // This is actually just optimized away, apparently with no harm.
    // Make sure that the parent type has been created.
    //CppClassParent::CppObjectType::get_type();

    // Create the wrapper type, with the same class/instance size as the base type.
    register_derived_type(gtk_shortcut_controller_get_type());

    // Add derived versions of interfaces, if the C type implements any interfaces:
  Gio::ListModel::add_interface(get_type());
  Buildable::add_interface(get_type());

  }

  return *this;
}


void ShortcutController_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* ShortcutController_Class::wrap_new(GObject* object)
{
  return new ShortcutController((GtkShortcutController*)object);
}


/* The implementation: */

GtkShortcutController* ShortcutController::gobj_copy()
{
  reference();
  return gobj();
}

ShortcutController::ShortcutController(const Glib::ConstructParams& construct_params)
:
  EventController(construct_params)
{

}

ShortcutController::ShortcutController(GtkShortcutController* castitem)
:
  EventController((GtkEventController*)(castitem))
{}


ShortcutController::ShortcutController(ShortcutController&& src) noexcept
: EventController(std::move(src))
  , Gio::ListModel(std::move(src))
  , Buildable(std::move(src))
{}

ShortcutController& ShortcutController::operator=(ShortcutController&& src) noexcept
{
  EventController::operator=(std::move(src));
  Gio::ListModel::operator=(std::move(src));
  Buildable::operator=(std::move(src));
  return *this;
}


ShortcutController::~ShortcutController() noexcept
{}


ShortcutController::CppClassType ShortcutController::shortcutcontroller_class_; // initialize static member

GType ShortcutController::get_type()
{
  return shortcutcontroller_class_.init().get_type();
}


GType ShortcutController::get_base_type()
{
  return gtk_shortcut_controller_get_type();
}


ShortcutController::ShortcutController()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  EventController(Glib::ConstructParams(shortcutcontroller_class_.init()))
{
  

}

ShortcutController::ShortcutController(const Glib::RefPtr<Gio::ListModel>& model)
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  EventController(Glib::ConstructParams(shortcutcontroller_class_.init(), "model", Glib::unwrap(model), nullptr))
{
  

}

Glib::RefPtr<ShortcutController> ShortcutController::create()
{
  return Glib::make_refptr_for_instance<ShortcutController>( new ShortcutController() );
}

Glib::RefPtr<ShortcutController> ShortcutController::create(const Glib::RefPtr<Gio::ListModel>& model)
{
  return Glib::make_refptr_for_instance<ShortcutController>( new ShortcutController(model) );
}

void ShortcutController::set_mnemonics_modifiers(Gdk::ModifierType modifiers)
{
  gtk_shortcut_controller_set_mnemonics_modifiers(gobj(), static_cast<GdkModifierType>(modifiers));
}

Gdk::ModifierType ShortcutController::get_mnemonics_modifiers() const
{
  return static_cast<Gdk::ModifierType>(gtk_shortcut_controller_get_mnemonics_modifiers(const_cast<GtkShortcutController*>(gobj())));
}

void ShortcutController::set_scope(ShortcutScope scope)
{
  gtk_shortcut_controller_set_scope(gobj(), static_cast<GtkShortcutScope>(scope));
}

#ifndef GTKMM_DISABLE_DEPRECATED
G_GNUC_BEGIN_IGNORE_DEPRECATIONS
ShortcutScope ShortcutController::set_scope() const
{
  return static_cast<ShortcutScope>(gtk_shortcut_controller_get_scope(const_cast<GtkShortcutController*>(gobj())));
}
G_GNUC_END_IGNORE_DEPRECATIONS
#endif // GTKMM_DISABLE_DEPRECATED

ShortcutScope ShortcutController::get_scope() const
{
  return static_cast<ShortcutScope>(gtk_shortcut_controller_get_scope(const_cast<GtkShortcutController*>(gobj())));
}

void ShortcutController::add_shortcut(const Glib::RefPtr<Shortcut>& shortcut)
{
  gtk_shortcut_controller_add_shortcut(gobj(), Glib::unwrap_copy(shortcut));
}

void ShortcutController::remove_shortcut(const Glib::RefPtr<const Shortcut>& shortcut)
{
  gtk_shortcut_controller_remove_shortcut(gobj(), const_cast<GtkShortcut*>(Glib::unwrap(shortcut)));
}


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

Glib::PropertyProxy_ReadOnly< GType > ShortcutController::property_item_type() const
{
  return Glib::PropertyProxy_ReadOnly< GType >(this, "item-type");
}

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

Glib::PropertyProxy< Gdk::ModifierType > ShortcutController::property_mnemonic_modifiers() 
{
  return Glib::PropertyProxy< Gdk::ModifierType >(this, "mnemonic-modifiers");
}

Glib::PropertyProxy_ReadOnly< Gdk::ModifierType > ShortcutController::property_mnemonic_modifiers() const
{
  return Glib::PropertyProxy_ReadOnly< Gdk::ModifierType >(this, "mnemonic-modifiers");
}

Glib::PropertyProxy_ReadOnly< unsigned int > ShortcutController::property_n_items() const
{
  return Glib::PropertyProxy_ReadOnly< unsigned int >(this, "n-items");
}

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

Glib::PropertyProxy< ShortcutScope > ShortcutController::property_scope() 
{
  return Glib::PropertyProxy< ShortcutScope >(this, "scope");
}

Glib::PropertyProxy_ReadOnly< ShortcutScope > ShortcutController::property_scope() const
{
  return Glib::PropertyProxy_ReadOnly< ShortcutScope >(this, "scope");
}


} // namespace Gtk


