From cfa7e877aba0dc9dcd4db9d46052d58a3c4db4b6 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 4 Apr 2025 20:20:32 +0200 Subject: adw: move LengthType and RatioType --- adw/src/breakpoint.cpp | 10 ++-------- adw/src/enums.cpp | 10 ++++++++++ 2 files changed, 12 insertions(+), 8 deletions(-) (limited to 'adw/src') diff --git a/adw/src/breakpoint.cpp b/adw/src/breakpoint.cpp index a34fcf7..3907a15 100644 --- a/adw/src/breakpoint.cpp +++ b/adw/src/breakpoint.cpp @@ -1,5 +1,6 @@ #include "adwaitamm/breakpoint.hpp" +#include "adwaitamm/enums.hpp" #include "adwaitamm/helpers/properties.hpp" #include @@ -10,6 +11,7 @@ #include #include #include + #include #include @@ -20,14 +22,6 @@ namespace Adwaita { - static_assert(static_cast(BreakpointCondition::LengthType::min_width) == ADW_BREAKPOINT_CONDITION_MIN_WIDTH); - static_assert(static_cast(BreakpointCondition::LengthType::max_width) == ADW_BREAKPOINT_CONDITION_MAX_WIDTH); - static_assert(static_cast(BreakpointCondition::LengthType::min_height) == ADW_BREAKPOINT_CONDITION_MIN_HEIGHT); - static_assert(static_cast(BreakpointCondition::LengthType::max_height) == ADW_BREAKPOINT_CONDITION_MAX_HEIGHT); - - static_assert(static_cast(BreakpointCondition::RatioType::min_aspect_ratio) == ADW_BREAKPOINT_CONDITION_MIN_ASPECT_RATIO); - static_assert(static_cast(BreakpointCondition::RatioType::max_aspect_ratio) == ADW_BREAKPOINT_CONDITION_MAX_ASPECT_RATIO); - BreakpointCondition::BreakpointCondition(BreakpointCondition const & other) : BreakpointCondition{adw_breakpoint_condition_copy(other.m_object)} { diff --git a/adw/src/enums.cpp b/adw/src/enums.cpp index 9da6bc1..9891845 100644 --- a/adw/src/enums.cpp +++ b/adw/src/enums.cpp @@ -33,6 +33,14 @@ namespace Adwaita static_assert(matches); static_assert(matches); + static_assert(matches); + static_assert(matches); + static_assert(matches); + static_assert(matches); + + static_assert(matches); + static_assert(matches); + static_assert(matches); static_assert(matches); static_assert(matches); @@ -49,6 +57,8 @@ namespace Glib VALUE_SPECIALIZATION(AccentColor, accent_color) VALUE_SPECIALIZATION(ColorScheme, color_scheme) + VALUE_SPECIALIZATION(LengthType, breakpoint_condition) + VALUE_SPECIALIZATION(RatioType, breakpoint_condition) VALUE_SPECIALIZATION(ResponseAppearance, response_appearance) #undef VALUE_SPECIALIZATION -- cgit v1.2.3