From 29eb802f09da07421099238eceaee9e3b1d61ff2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 14:01:30 +0200 Subject: adw: extract libadwaitamm --- adw/src/private/actionrow_p.cpp | 84 ----------------------------------------- 1 file changed, 84 deletions(-) delete mode 100644 adw/src/private/actionrow_p.cpp (limited to 'adw/src/private/actionrow_p.cpp') diff --git a/adw/src/private/actionrow_p.cpp b/adw/src/private/actionrow_p.cpp deleted file mode 100644 index 9c4e936..0000000 --- a/adw/src/private/actionrow_p.cpp +++ /dev/null @@ -1,84 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/private/actionrow_p.hpp" - -#include "adwaitamm/actionrow.hpp" - -#include -#include -#include - -#include - -#include -#include - -namespace Adwaita -{ - namespace - { - namespace vfuncs - { - void (*activate_vfunc_ptr)(AdwActionRow *){}; - auto static activate_vfunc_c_callback(AdwActionRow * self) - { - activate_vfunc_ptr(self); - } - } // namespace vfuncs - } // namespace - - auto ActionRow_Class::init() -> Glib::Class const & - { - if (!gtype_) - { - class_init_func_ = &class_init_function; - register_derived_type(adw_action_row_get_type()); - } - return *this; - } - - auto ActionRow_Class::class_init_function(void * gclass, void * data) -> void - { - auto const klass = static_cast(gclass); - CppClassParent::class_init_function(klass, data); - - klass->activate = &vfuncs::activate_vfunc_c_callback; - vfuncs::activate_vfunc_ptr = &ActionRow_Class::activate_vfunc_callback; - } - - auto ActionRow_Class::wrap_new(GObject * object) -> Glib::ObjectBase * - { - return Gtk::manage(new ActionRow(ADW_ACTION_ROW(object))); - } - - auto ActionRow_Class::activate_vfunc_callback(AdwActionRow * self) -> void - { - auto base_object = static_cast(Glib::ObjectBase::_get_current_wrapper(G_OBJECT(self))); - if (base_object && base_object->is_derived_()) - { - auto object = dynamic_cast(base_object); - if (object) - { - try - { - object->activate_vfunc(); - return; - } - catch (...) - { - Glib::exception_handlers_invoke(); - } - } - } - - auto base_class = static_cast(g_type_class_peek_parent(G_OBJECT_GET_CLASS(self))); - if (base_class && base_class->activate) - { - (base_class->activate)(self); - } - } -} // namespace Adwaita \ No newline at end of file -- cgit v1.2.3