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/switchrow.cpp | |
| parent | dff2f80ddc8f742b8181409d6feeca33e856112e (diff) | |
| download | turns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip | |
adw: extract libadwaitamm
Diffstat (limited to 'adw/src/switchrow.cpp')
| -rw-r--r-- | adw/src/switchrow.cpp | 80 |
1 files changed, 0 insertions, 80 deletions
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 <glibmm/object.h> -#include <glibmm/objectbase.h> -#include <glibmm/propertyproxy.h> -#include <glibmm/wrap.h> - -#include <glib-object.h> - -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<BaseObjectType *>(unwrap(this))); - } - - auto SwitchRow::set_active(bool value) noexcept -> void - { - adw_switch_row_set_active(unwrap(this), value); - } - - auto SwitchRow::property_active() -> Glib::PropertyProxy<bool> - { - return Glib::PropertyProxy<bool>{this, "active"}; - } - - auto SwitchRow::property_active() const -> Glib::PropertyProxy_ReadOnly<bool> - { - return Glib::PropertyProxy_ReadOnly<bool>{this, "active"}; - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwSwitchRow * object, bool copy) -> Adwaita::SwitchRow * - { - return dynamic_cast<Adwaita::SwitchRow *>(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib
\ No newline at end of file |
