1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
/**
* @author Felix Morgner (felix.morgner@gmail.com)
* @copyright Copyright (c) 2025
* SPDX-License-Identifier: LGPL-2.1-or-later
*/
#ifndef LIBADWAITAMM_ENUMS_HPP
#define LIBADWAITAMM_ENUMS_HPP
#include <glibmm/value.h>
#include <glib-object.h>
namespace Adwaita
{
enum struct AccentColor
{
Blue,
Teal,
Green,
Yellow,
Orange,
Red,
Pink,
Purple,
Slate,
};
enum struct ColorScheme
{
Default,
ForceLight,
PreferLight,
PreferDark,
ForceDark,
};
enum struct LengthType
{
MinWidth,
MaxWidth,
MinHeight,
MaxHeight,
};
enum struct RatioType
{
MinAspectRatio,
MaxAspectRatio
};
enum struct ResponseAppearance
{
Default,
Suggested,
Destructive,
};
enum class ToastPriority
{
Normal,
High,
};
} // namespace Adwaita
namespace Glib
{
#define VALUE_SPECIALIZATION(Enum) \
template<> \
class Value<Adwaita::Enum> : public Glib::Value_Enum<Adwaita::Enum> \
{ \
public: \
auto static value_type() -> GType; \
}
VALUE_SPECIALIZATION(AccentColor);
VALUE_SPECIALIZATION(ColorScheme);
VALUE_SPECIALIZATION(LengthType);
VALUE_SPECIALIZATION(RatioType);
VALUE_SPECIALIZATION(ResponseAppearance);
VALUE_SPECIALIZATION(ToastPriority);
#undef VALUE_SPECIALIZATION
} // namespace Glib
#endif
|