From 95dc7e43a23300b3eacbb7e1e0a9d4f31a8bd5a0 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 24 Apr 2025 20:12:26 +0200 Subject: adw: extract class definitions --- adw/src/switchrow.cpp | 24 ++---------------------- 1 file changed, 2 insertions(+), 22 deletions(-) (limited to 'adw/src/switchrow.cpp') diff --git a/adw/src/switchrow.cpp b/adw/src/switchrow.cpp index 9c0245e..010c133 100644 --- a/adw/src/switchrow.cpp +++ b/adw/src/switchrow.cpp @@ -1,6 +1,7 @@ #include "adwaitamm/switchrow.hpp" #include "adwaitamm/actionrow.hpp" +#include "adwaitamm/private/switchrow_p.hpp" #include #include @@ -19,30 +20,9 @@ namespace Adwaita { namespace { - auto constinit _class = SwitchRow::Class{}; + 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()}} -- cgit v1.2.3