diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-28 14:01:30 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-28 14:01:30 +0200 |
| commit | 29eb802f09da07421099238eceaee9e3b1d61ff2 (patch) | |
| tree | d07784be13475237d58f65033959c1e27e6245c0 /adw/src/private/actionrow_p.cpp | |
| parent | dff2f80ddc8f742b8181409d6feeca33e856112e (diff) | |
| download | turns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip | |
adw: extract libadwaitamm
Diffstat (limited to 'adw/src/private/actionrow_p.cpp')
| -rw-r--r-- | adw/src/private/actionrow_p.cpp | 84 |
1 files changed, 0 insertions, 84 deletions
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 <glibmm/class.h> -#include <glibmm/exceptionhandler.h> -#include <glibmm/objectbase.h> - -#include <gtkmm/object.h> - -#include <adwaita.h> -#include <glib-object.h> - -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<BaseClassType *>(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 *>(Glib::ObjectBase::_get_current_wrapper(G_OBJECT(self))); - if (base_object && base_object->is_derived_()) - { - auto object = dynamic_cast<ActionRow *>(base_object); - if (object) - { - try - { - object->activate_vfunc(); - return; - } - catch (...) - { - Glib::exception_handlers_invoke(); - } - } - } - - auto base_class = static_cast<BaseClassType *>(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 |
