From 7423eb56342bc58a5705ab55a50f1b08177afcf8 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Thu, 3 Apr 2025 18:41:43 +0200 Subject: adw: prepare files for extraction --- include/turns/adw/breakpoint.hpp | 113 --------------------------------------- 1 file changed, 113 deletions(-) delete mode 100644 include/turns/adw/breakpoint.hpp (limited to 'include/turns/adw/breakpoint.hpp') diff --git a/include/turns/adw/breakpoint.hpp b/include/turns/adw/breakpoint.hpp deleted file mode 100644 index e5dabe3..0000000 --- a/include/turns/adw/breakpoint.hpp +++ /dev/null @@ -1,113 +0,0 @@ -#ifndef TURNS_ADW_BREAKPOINT_HPP -#define TURNS_ADW_BREAKPOINT_HPP - -#include "turns/adw/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include -#include - -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace turns::adw -{ - struct BreakpointCondition - { - enum struct LengthType : int - { - min_width, - max_width, - min_height, - max_height, - }; - - enum struct RatioType : int - { - min_aspect_ratio, - max_aspect_ratio - }; - - 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 - { - struct Class : Glib::Class - { - using BaseClassParent = GObjectClass; - using BaseClassType = AdwBreakpointClass; - using BaseObjectType = AdwBreakpoint; - using CppClassParent = struct Glib::Object_Class; - using CppObjectType = Breakpoint; - - auto init() -> Glib::Class const &; - auto static class_init_function(void * gclass, void * data) -> void; - auto static wrap_new(GObject * object) -> Glib::ObjectBase *; - }; - - using BaseObjectType = Class::BaseObjectType; - using BaseClassType = Class::BaseClassType; - using CppObjectType = Class::CppObjectType; - using CppClassType = 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; - - protected: - explicit Breakpoint(BreakpointCondition & condition); - explicit Breakpoint(Glib::ConstructParams const & params); - explicit Breakpoint(BaseObjectType * gobj); - }; - -} // namespace turns::adw - -namespace Glib -{ - auto wrap(AdwBreakpoint * object, bool copy = false) -> Glib::RefPtr; -} // namespace Glib - - -#endif \ No newline at end of file -- cgit v1.2.3