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/include/adwaitamm/breakpoint.hpp | 96 ------------------------------------ 1 file changed, 96 deletions(-) delete mode 100644 adw/include/adwaitamm/breakpoint.hpp (limited to 'adw/include/adwaitamm/breakpoint.hpp') diff --git a/adw/include/adwaitamm/breakpoint.hpp b/adw/include/adwaitamm/breakpoint.hpp deleted file mode 100644 index 4b40574..0000000 --- a/adw/include/adwaitamm/breakpoint.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_BREAKPOINT_HPP -#define LIBADWAITAMM_BREAKPOINT_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include - -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - enum struct LengthType; - enum struct RatioType; - - struct BreakpointCondition - { - BreakpointCondition(BreakpointCondition const & other); - BreakpointCondition(BreakpointCondition && other); - BreakpointCondition(LengthType type, double value, int unit); // FIXME: replace unit type with actual enum. - BreakpointCondition(RatioType type, int width, int height); - - ~BreakpointCondition() noexcept; - - auto operator&&(BreakpointCondition & rhs) & -> BreakpointCondition; - auto operator||(BreakpointCondition & lhs) & -> BreakpointCondition; - - explicit operator Glib::ustring() const; - - auto static parse(Glib::ustring str) -> std::optional; - - private: - friend struct Breakpoint; - - explicit BreakpointCondition(AdwBreakpointCondition * object); - - AdwBreakpointCondition * m_object{nullptr}; - }; - - struct Breakpoint final : Glib::Object, - Gtk::Buildable, - helpers::gobj_mixin - { - using BaseObjectType = AdwBreakpoint; - using BaseClassType = AdwBreakpointClass; - using CppObjectType = Breakpoint; - using CppClassType = struct Breakpoint_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - Breakpoint(Breakpoint const & other) = delete; - Breakpoint(Breakpoint && other) noexcept = default; - - auto operator=(Breakpoint const & other) noexcept -> Breakpoint & = delete; - auto operator=(Breakpoint && other) noexcept -> Breakpoint & = default; - - auto static create(BreakpointCondition & condition) -> Glib::RefPtr; - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - auto property_condition() -> Glib::PropertyProxy; - auto property_condition() const -> Glib::PropertyProxy_ReadOnly; - - protected: - friend Breakpoint_Class; - - explicit Breakpoint(BreakpointCondition & condition); - explicit Breakpoint(Glib::ConstructParams const & params); - explicit Breakpoint(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwBreakpoint * object, bool copy = false) -> Glib::RefPtr; -} // namespace Glib - -#endif \ No newline at end of file -- cgit v1.2.3