summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-04 20:26:02 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-04 20:26:02 +0200
commit51babee1fc579cd99d32d1b7156ee553ed847339 (patch)
treee009f952487e556e15a65355538b65f051f5b068 /adw/include/adwaitamm
parentcfa7e877aba0dc9dcd4db9d46052d58a3c4db4b6 (diff)
downloadturns-51babee1fc579cd99d32d1b7156ee553ed847339.tar.xz
turns-51babee1fc579cd99d32d1b7156ee553ed847339.zip
adw: move ToastPriority
Diffstat (limited to 'adw/include/adwaitamm')
-rw-r--r--adw/include/adwaitamm/enums.hpp7
-rw-r--r--adw/include/adwaitamm/toast.hpp14
2 files changed, 12 insertions, 9 deletions
diff --git a/adw/include/adwaitamm/enums.hpp b/adw/include/adwaitamm/enums.hpp
index 2fca425..03f5dc9 100644
--- a/adw/include/adwaitamm/enums.hpp
+++ b/adw/include/adwaitamm/enums.hpp
@@ -50,6 +50,12 @@ namespace Adwaita
Destructive,
};
+ enum class ToastPriority
+ {
+ Normal,
+ High,
+ };
+
} // namespace Adwaita
namespace Glib
@@ -68,6 +74,7 @@ namespace Glib
VALUE_SPECIALIZATION(LengthType);
VALUE_SPECIALIZATION(RatioType);
VALUE_SPECIALIZATION(ResponseAppearance);
+ VALUE_SPECIALIZATION(ToastPriority);
#undef VALUE_SPECIALIZATION
diff --git a/adw/include/adwaitamm/toast.hpp b/adw/include/adwaitamm/toast.hpp
index 4f69c1e..ba82497 100644
--- a/adw/include/adwaitamm/toast.hpp
+++ b/adw/include/adwaitamm/toast.hpp
@@ -24,6 +24,8 @@ using AdwToast = struct _AdwToast;
namespace Adwaita
{
+ enum struct ToastPriority;
+
struct Toast final : Glib::Object,
helpers::gobj_mixin<Toast, AdwToast>
{
@@ -45,12 +47,6 @@ namespace Adwaita
using CppObjectType = Class::CppObjectType;
using CppClassType = Class;
- enum class Priority
- {
- NORMAL,
- HIGH,
- };
-
using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy;
@@ -69,7 +65,7 @@ namespace Adwaita
auto get_action_target_value() const -> Glib::VariantBase;
auto get_button_label() const -> Glib::ustring;
auto get_custom_title() const -> Gtk::Widget *;
- auto get_priority() const -> Priority;
+ auto get_priority() const -> ToastPriority;
auto get_timeout() const -> unsigned;
auto get_title() const -> Glib::ustring;
auto get_use_markup() const -> bool;
@@ -78,7 +74,7 @@ namespace Adwaita
auto set_button_label(Glib::ustring value) -> void;
auto set_custom_title(Gtk::Widget * value) -> void;
auto set_detailed_action_name(Glib::ustring value) -> void;
- auto set_priority(Priority value) -> void;
+ auto set_priority(ToastPriority value) -> void;
auto set_timeout(unsigned value) -> void;
auto set_title(Glib::ustring value) -> void;
auto set_use_markup(bool value) -> void;
@@ -87,7 +83,7 @@ namespace Adwaita
auto property_action_target() -> Glib::PropertyProxy<Glib::VariantBase>;
auto property_button_label() -> Glib::PropertyProxy<Glib::ustring>;
auto property_custom_title() -> Glib::PropertyProxy<Gtk::Widget *>;
- auto property_priority() -> Glib::PropertyProxy<Priority>;
+ auto property_priority() -> Glib::PropertyProxy<ToastPriority>;
auto property_timeout() -> Glib::PropertyProxy<unsigned>;
auto property_title() -> Glib::PropertyProxy<Glib::ustring>;
auto property_use_markup() -> Glib::PropertyProxy<bool>;