#include "adwaitamm/switchrow.hpp" #include "adwaitamm/actionrow.hpp" #include #include #include #include #include #include #include #include #include namespace Adwaita { namespace { auto constinit _class = SwitchRow::Class{}; } // namespace auto SwitchRow::Class::init() -> Glib::Class const & { if (!gtype_) { class_init_func_ = &class_init_function; register_derived_type(adw_switch_row_get_type()); } return *this; } auto SwitchRow::Class::class_init_function(void * gclass, void * data) -> void { auto const klass = static_cast(gclass); CppClassParent::class_init_function(klass, data); } auto SwitchRow::Class::wrap_new(GObject * object) -> Glib::ObjectBase * { return Gtk::manage(new SwitchRow(ADW_SWITCH_ROW(object))); } SwitchRow::SwitchRow() : Glib::ObjectBase{nullptr} , ActionRow{Glib::ConstructParams{_class.init()}} { } auto SwitchRow::get_type() -> GType { return _class.init().get_type(); } auto SwitchRow::get_base_type() -> GType { return adw_switch_row_get_type(); } SwitchRow::SwitchRow(Glib::ConstructParams const & params) : ActionRow{params} { } SwitchRow::SwitchRow(BaseObjectType * gobj) : ActionRow(ADW_ACTION_ROW(gobj)) { } } // namespace Adwaita namespace Glib { auto wrap(AdwSwitchRow * object, bool copy) -> Adwaita::SwitchRow * { return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); } } // namespace Glib