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


#include <glibmm.h>

#include <gtkmm/passwordentry.h>
#include <gtkmm/private/passwordentry_p.h>


/* Copyright (C) 2019 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
{


static const Glib::SignalProxyInfo PasswordEntry_signal_activate_info =
{
  "activate",
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback,
  (GCallback) &Glib::SignalProxyNormal::slot0_void_callback
};


} // anonymous namespace


namespace Glib
{

Gtk::PasswordEntry* wrap(GtkPasswordEntry* object, bool take_copy)
{
  return dynamic_cast<Gtk::PasswordEntry *> (Glib::wrap_auto ((GObject*)(object), take_copy));
}

} /* namespace Glib */

namespace Gtk
{


/* The *_Class implementation: */

const Glib::Class& PasswordEntry_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_ = &PasswordEntry_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_password_entry_get_type());

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

  }

  return *this;
}


void PasswordEntry_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* PasswordEntry_Class::wrap_new(GObject* o)
{
  return manage(new PasswordEntry((GtkPasswordEntry*)(o)));

}


/* The implementation: */

PasswordEntry::PasswordEntry(const Glib::ConstructParams& construct_params)
:
  Gtk::Widget(construct_params)
{
  }

PasswordEntry::PasswordEntry(GtkPasswordEntry* castitem)
:
  Gtk::Widget((GtkWidget*)(castitem))
{
  }


PasswordEntry::PasswordEntry(PasswordEntry&& src) noexcept
: Gtk::Widget(std::move(src))
  , Editable(std::move(src))
{}

PasswordEntry& PasswordEntry::operator=(PasswordEntry&& src) noexcept
{
  Gtk::Widget::operator=(std::move(src));
  Editable::operator=(std::move(src));
  return *this;
}

PasswordEntry::~PasswordEntry() noexcept
{
  destroy_();
}

PasswordEntry::CppClassType PasswordEntry::passwordentry_class_; // initialize static member

GType PasswordEntry::get_type()
{
  return passwordentry_class_.init().get_type();
}


GType PasswordEntry::get_base_type()
{
  return gtk_password_entry_get_type();
}


PasswordEntry::PasswordEntry()
:
  // Mark this class as non-derived to allow C++ vfuncs to be skipped.
  Glib::ObjectBase(nullptr),
  Gtk::Widget(Glib::ConstructParams(passwordentry_class_.init()))
{
  

}

void PasswordEntry::set_show_peek_icon(bool show_peek_icon)
{
  gtk_password_entry_set_show_peek_icon(gobj(), static_cast<int>(show_peek_icon));
}

bool PasswordEntry::get_show_peek_icon() const
{
  return gtk_password_entry_get_show_peek_icon(const_cast<GtkPasswordEntry*>(gobj()));
}

void PasswordEntry::set_extra_menu(const Glib::RefPtr<Gio::MenuModel>& model)
{
  gtk_password_entry_set_extra_menu(gobj(), Glib::unwrap(model));
}

Glib::RefPtr<Gio::MenuModel> PasswordEntry::get_extra_menu()
{
  auto retvalue = Glib::wrap(gtk_password_entry_get_extra_menu(gobj()));
  if(retvalue)
    retvalue->reference(); //The function does not do a ref for us.
  return retvalue;
}

Glib::RefPtr<const Gio::MenuModel> PasswordEntry::get_extra_menu() const
{
  return const_cast<PasswordEntry*>(this)->get_extra_menu();
}


Glib::SignalProxy<void()> PasswordEntry::signal_activate()
{
  return Glib::SignalProxy<void() >(this, &PasswordEntry_signal_activate_info);
}


Glib::PropertyProxy< Glib::ustring > PasswordEntry::property_placeholder_text() 
{
  return Glib::PropertyProxy< Glib::ustring >(this, "placeholder-text");
}

Glib::PropertyProxy_ReadOnly< Glib::ustring > PasswordEntry::property_placeholder_text() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::ustring >(this, "placeholder-text");
}

Glib::PropertyProxy< bool > PasswordEntry::property_activates_default() 
{
  return Glib::PropertyProxy< bool >(this, "activates-default");
}

Glib::PropertyProxy_ReadOnly< bool > PasswordEntry::property_activates_default() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "activates-default");
}

Glib::PropertyProxy< bool > PasswordEntry::property_show_peek_icon() 
{
  return Glib::PropertyProxy< bool >(this, "show-peek-icon");
}

Glib::PropertyProxy_ReadOnly< bool > PasswordEntry::property_show_peek_icon() const
{
  return Glib::PropertyProxy_ReadOnly< bool >(this, "show-peek-icon");
}

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

Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> > PasswordEntry::property_extra_menu() 
{
  return Glib::PropertyProxy< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}

Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> > PasswordEntry::property_extra_menu() const
{
  return Glib::PropertyProxy_ReadOnly< Glib::RefPtr<Gio::MenuModel> >(this, "extra-menu");
}


} // namespace Gtk


