diff options
| author | Felix Morgner <felix.morgner@gmail.com> | 2025-04-28 14:01:30 +0200 |
|---|---|---|
| committer | Felix Morgner <felix.morgner@gmail.com> | 2025-04-28 14:01:30 +0200 |
| commit | 29eb802f09da07421099238eceaee9e3b1d61ff2 (patch) | |
| tree | d07784be13475237d58f65033959c1e27e6245c0 /adw/include/adwaitamm/toast.hpp | |
| parent | dff2f80ddc8f742b8181409d6feeca33e856112e (diff) | |
| download | turns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip | |
adw: extract libadwaitamm
Diffstat (limited to 'adw/include/adwaitamm/toast.hpp')
| -rw-r--r-- | adw/include/adwaitamm/toast.hpp | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/adw/include/adwaitamm/toast.hpp b/adw/include/adwaitamm/toast.hpp deleted file mode 100644 index 8c84fad..0000000 --- a/adw/include/adwaitamm/toast.hpp +++ /dev/null @@ -1,119 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_TOAST_HPP -#define LIBADWAITAMM_TOAST_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include <glibmm/object.h> -#include <glibmm/propertyproxy.h> -#include <glibmm/refptr.h> -#include <glibmm/signalproxy.h> -#include <glibmm/ustring.h> -#include <glibmm/variant.h> - -#include <gtkmm/widget.h> - -#include <glib-object.h> - -#define _ADWAITA_INSIDE -#include <adw-toast.h> -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct Toast_Class; - - enum struct ToastPriority; - - struct Toast final : Glib::Object, - helpers::gobj_mixin<Toast, AdwToast> - { - using BaseObjectType = AdwToast; - using BaseClassType = AdwToastClass; - using CppObjectType = Toast; - using CppClassType = Toast_Class; - -#pragma mark - Special Member Functions - Toast(Toast const & other) = delete; - Toast(Toast && other) noexcept = default; - - auto operator=(Toast const & other) noexcept -> Toast & = delete; - auto operator=(Toast && other) noexcept -> Toast & = default; - -#pragma mark - GObject Support - using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj; - using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy; - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Factories - auto static create(Glib::ustring const & title) -> Glib::RefPtr<Toast>; - -#pragma mark - Functions - auto dismiss() -> void; - -#pragma mark - Getters - auto get_action_name() const -> Glib::ustring; - 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 -> ToastPriority; - auto get_timeout() const -> unsigned; - auto get_title() const -> Glib::ustring; - auto get_use_markup() const -> bool; - -#pragma mark - Setters - auto set_action_name(Glib::ustring value) -> void; - auto set_action_target_value(Glib::VariantBase const & value) -> void; - 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(ToastPriority value) -> void; - auto set_timeout(unsigned value) -> void; - auto set_title(Glib::ustring value) -> void; - auto set_use_markup(bool value) -> void; - -#pragma mark - Properties - auto property_action_name() -> Glib::PropertyProxy<Glib::ustring>; - auto property_action_name() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>; - auto property_action_target() -> Glib::PropertyProxy<Glib::VariantBase>; - auto property_action_target() const -> Glib::PropertyProxy_ReadOnly<Glib::VariantBase>; - auto property_button_label() -> Glib::PropertyProxy<Glib::ustring>; - auto property_button_label() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>; - auto property_custom_title() -> Glib::PropertyProxy<Gtk::Widget *>; - auto property_custom_title() const -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *>; - auto property_priority() -> Glib::PropertyProxy<ToastPriority>; - auto property_priority() const -> Glib::PropertyProxy_ReadOnly<ToastPriority>; - auto property_timeout() -> Glib::PropertyProxy<unsigned>; - auto property_timeout() const -> Glib::PropertyProxy_ReadOnly<unsigned>; - auto property_title() -> Glib::PropertyProxy<Glib::ustring>; - auto property_title() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>; - auto property_use_markup() -> Glib::PropertyProxy<bool>; - auto property_use_markup() const -> Glib::PropertyProxy_ReadOnly<bool>; - -#pragma mark - Signals - auto signal_button_clicked() -> Glib::SignalProxy<void()>; - auto signal_dismissed() -> Glib::SignalProxy<void()>; - - protected: - friend Toast_Class; - -#pragma mark - Constructors - explicit Toast(Glib::ustring const & title); - explicit Toast(Glib::ConstructParams const & params); - explicit Toast(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwToast * object, bool copy = false) -> Glib::RefPtr<Adwaita::Toast>; -} // namespace Glib - -#endif
\ No newline at end of file |
