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/switchrow.cpp | 80 --------------------------------------------------- 1 file changed, 80 deletions(-) delete mode 100644 adw/src/switchrow.cpp (limited to 'adw/src/switchrow.cpp') diff --git a/adw/src/switchrow.cpp b/adw/src/switchrow.cpp deleted file mode 100644 index e620ee6..0000000 --- a/adw/src/switchrow.cpp +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/switchrow.hpp" - -#include "adwaitamm/actionrow.hpp" -#include "adwaitamm/private/switchrow_p.hpp" - -#include -#include -#include -#include - -#include - -namespace Adwaita -{ - namespace - { - auto constinit _class = SwitchRow_Class{}; - } // namespace - - 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)) - { - } - - auto SwitchRow::get_active() const noexcept -> bool - { - return adw_switch_row_get_active(const_cast(unwrap(this))); - } - - auto SwitchRow::set_active(bool value) noexcept -> void - { - adw_switch_row_set_active(unwrap(this), value); - } - - auto SwitchRow::property_active() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, "active"}; - } - - auto SwitchRow::property_active() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, "active"}; - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwSwitchRow * object, bool copy) -> Adwaita::SwitchRow * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file -- cgit v1.2.3