summaryrefslogtreecommitdiff
path: root/adw/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-04 20:20:32 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-04 20:23:04 +0200
commitcfa7e877aba0dc9dcd4db9d46052d58a3c4db4b6 (patch)
tree9aff7899bee83dff38a06b5119a1b72d78187015 /adw/include
parentc900e09ec994a928b88112e379d334f03175ebff (diff)
downloadturns-cfa7e877aba0dc9dcd4db9d46052d58a3c4db4b6.tar.xz
turns-cfa7e877aba0dc9dcd4db9d46052d58a3c4db4b6.zip
adw: move LengthType and RatioType
Diffstat (limited to 'adw/include')
-rw-r--r--adw/include/adwaitamm/breakpoint.hpp17
-rw-r--r--adw/include/adwaitamm/enums.hpp19
2 files changed, 21 insertions, 15 deletions
diff --git a/adw/include/adwaitamm/breakpoint.hpp b/adw/include/adwaitamm/breakpoint.hpp
index db17d27..529344d 100644
--- a/adw/include/adwaitamm/breakpoint.hpp
+++ b/adw/include/adwaitamm/breakpoint.hpp
@@ -21,22 +21,11 @@
namespace Adwaita
{
+ enum struct LengthType;
+ enum struct RatioType;
+
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.
diff --git a/adw/include/adwaitamm/enums.hpp b/adw/include/adwaitamm/enums.hpp
index 9bc9f0e..2fca425 100644
--- a/adw/include/adwaitamm/enums.hpp
+++ b/adw/include/adwaitamm/enums.hpp
@@ -29,12 +29,27 @@ namespace Adwaita
ForceDark,
};
+ enum struct LengthType
+ {
+ MinWidth,
+ MaxWidth,
+ MinHeight,
+ MaxHeight,
+ };
+
+ enum struct RatioType
+ {
+ MinAspectRatio,
+ MaxAspectRatio
+ };
+
enum struct ResponseAppearance
{
Default,
Suggested,
- Destructive,
+ Destructive,
};
+
} // namespace Adwaita
namespace Glib
@@ -50,6 +65,8 @@ namespace Glib
VALUE_SPECIALIZATION(AccentColor);
VALUE_SPECIALIZATION(ColorScheme);
+ VALUE_SPECIALIZATION(LengthType);
+ VALUE_SPECIALIZATION(RatioType);
VALUE_SPECIALIZATION(ResponseAppearance);
#undef VALUE_SPECIALIZATION