summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm/breakpoint.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
commit29eb802f09da07421099238eceaee9e3b1d61ff2 (patch)
treed07784be13475237d58f65033959c1e27e6245c0 /adw/include/adwaitamm/breakpoint.hpp
parentdff2f80ddc8f742b8181409d6feeca33e856112e (diff)
downloadturns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz
turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip
adw: extract libadwaitamm
Diffstat (limited to 'adw/include/adwaitamm/breakpoint.hpp')
-rw-r--r--adw/include/adwaitamm/breakpoint.hpp96
1 files changed, 0 insertions, 96 deletions
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 <glibmm/object.h>
-#include <glibmm/propertyproxy.h>
-#include <glibmm/refptr.h>
-#include <glibmm/ustring.h>
-
-#include <gtkmm/buildable.h>
-
-#include <glib-object.h>
-
-#include <optional>
-
-#define _ADWAITA_INSIDE
-#include <adw-breakpoint.h>
-#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<BreakpointCondition>;
-
- private:
- friend struct Breakpoint;
-
- explicit BreakpointCondition(AdwBreakpointCondition * object);
-
- AdwBreakpointCondition * m_object{nullptr};
- };
-
- struct Breakpoint final : Glib::Object,
- Gtk::Buildable,
- helpers::gobj_mixin<Breakpoint, AdwBreakpoint>
- {
- using BaseObjectType = AdwBreakpoint;
- using BaseClassType = AdwBreakpointClass;
- using CppObjectType = Breakpoint;
- using CppClassType = struct Breakpoint_Class;
-
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::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<Breakpoint>;
- auto static get_type() -> GType;
- auto static get_base_type() -> GType;
-
- auto property_condition() -> Glib::PropertyProxy<BreakpointCondition *>;
- auto property_condition() const -> Glib::PropertyProxy_ReadOnly<BreakpointCondition *>;
-
- 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<Adwaita::Breakpoint>;
-} // namespace Glib
-
-#endif \ No newline at end of file