summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm/alertdialog.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
commit29eb802f09da07421099238eceaee9e3b1d61ff2 (patch)
treed07784be13475237d58f65033959c1e27e6245c0 /adw/include/adwaitamm/alertdialog.hpp
parentdff2f80ddc8f742b8181409d6feeca33e856112e (diff)
downloadturns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz
turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip
adw: extract libadwaitamm
Diffstat (limited to 'adw/include/adwaitamm/alertdialog.hpp')
-rw-r--r--adw/include/adwaitamm/alertdialog.hpp76
1 files changed, 0 insertions, 76 deletions
diff --git a/adw/include/adwaitamm/alertdialog.hpp b/adw/include/adwaitamm/alertdialog.hpp
deleted file mode 100644
index 367512d..0000000
--- a/adw/include/adwaitamm/alertdialog.hpp
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @author Felix Morgner (felix.morgner@gmail.com)
- * @copyright Copyright (c) 2025
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#ifndef LIBADWAITAMM_ALERT_DIALOG_HPP
-#define LIBADWAITAMM_ALERT_DIALOG_HPP
-
-#include "adwaitamm/dialog.hpp"
-#include "adwaitamm/helpers/gobj_mixin.hpp"
-
-#include <glibmm/class.h>
-#include <glibmm/object.h>
-#include <glibmm/objectbase.h>
-#include <glibmm/refptr.h>
-#include <glibmm/ustring.h>
-
-#include <giomm/asyncresult.h>
-#include <giomm/cancellable.h>
-
-#include <gtkmm/widget.h>
-
-#include <glib-object.h>
-
-#define _ADWAITA_INSIDE
-#include <adw-alert-dialog.h>
-#undef _ADWAITA_INSIDE
-
-namespace Adwaita
-{
- enum struct ResponseAppearance;
-
- struct AlertDialog : Dialog,
- helpers::gobj_mixin<AlertDialog, AdwAlertDialog>
- {
- using BaseObjectType = AdwAlertDialog;
- using BaseClassType = AdwAlertDialogClass;
- using CppObjectType = AlertDialog;
- using CppClassType = struct AlertDialog_Class;
-
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy;
-
- AlertDialog(Glib::ustring heading, Glib::ustring body);
- AlertDialog(AlertDialog const & other) = delete;
- AlertDialog(AlertDialog && other) noexcept = default;
-
- auto operator=(AlertDialog const & other) noexcept -> AlertDialog & = delete;
- auto operator=(AlertDialog && other) noexcept -> AlertDialog & = default;
-
- auto static create(Glib::ustring heading, Glib::ustring body) -> Glib::RefPtr<AlertDialog>;
- auto static get_type() -> GType;
- auto static get_base_type() -> GType;
-
- auto add_response(Glib::ustring id, Glib::ustring label) -> void;
- auto choose(Gtk::Widget & parent, Glib::RefPtr<Gio::Cancellable> const & cancellable, Gio::SlotAsyncReady const & slot) -> void;
- auto choose_finish(Glib::RefPtr<Gio::AsyncResult> const & result) -> Glib::ustring;
- auto set_close_response(Glib::ustring id) -> void;
- auto set_default_response(Glib::ustring id) -> void;
- auto set_response_appearance(Glib::ustring id, ResponseAppearance value) -> void;
-
- protected:
- friend AlertDialog_Class;
-
- explicit AlertDialog(Glib::ConstructParams const & params);
- explicit AlertDialog(BaseObjectType * gobj);
- };
-} // namespace Adwaita
-
-namespace Glib
-{
- auto wrap(AdwAlertDialog * object, bool copy = false) -> Adwaita::AlertDialog *;
-} // namespace Glib
-
-#endif \ No newline at end of file