aboutsummaryrefslogtreecommitdiff
path: root/include/turns/adw/application.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2024-07-25 13:05:02 +0200
committerFelix Morgner <felix.morgner@gmail.com>2024-07-25 13:14:45 +0200
commit4c173365127531fa32b6675890a65dead59c3e8e (patch)
tree3fe24ac9e42ca0d800a44bbe6fb29ab1bacb9c32 /include/turns/adw/application.hpp
downloadlibadwaitamm-4c173365127531fa32b6675890a65dead59c3e8e.tar.xz
libadwaitamm-4c173365127531fa32b6675890a65dead59c3e8e.zip
adw: add bare bones wrapper for AdwApplication
Diffstat (limited to 'include/turns/adw/application.hpp')
-rw-r--r--include/turns/adw/application.hpp55
1 files changed, 55 insertions, 0 deletions
diff --git a/include/turns/adw/application.hpp b/include/turns/adw/application.hpp
new file mode 100644
index 0000000..26bec41
--- /dev/null
+++ b/include/turns/adw/application.hpp
@@ -0,0 +1,55 @@
+#ifndef TURNS_ADW_APPLICATION_HPP
+#define TURNS_ADW_APPLICATION_HPP
+
+#include <glibmm/refptr.h>
+#include <glibmm/ustring.h>
+
+#include <giomm/application.h>
+
+#include <gtkmm/application.h>
+
+using AdwApplication = struct _AdwApplication;
+
+namespace turns::adw
+{
+ struct Application_Class;
+
+ struct Application : Gtk::Application
+ {
+ Application(Application && other) noexcept = default;
+ auto operator=(Application && other) noexcept -> Application & = default;
+
+ Application(Application const & other) = delete;
+ auto operator=(Application const & other) noexcept -> Application & = delete;
+
+ auto static get_type() -> GType;
+ auto static get_base_type() -> GType;
+
+ template<typename Self>
+ auto gobj(this Self && self) noexcept
+ {
+ return reinterpret_cast<AdwApplication *>(self.gobject_);
+ }
+
+ auto gobj_copy() -> AdwApplication *;
+
+ auto static create(Glib::ustring const & id = {},
+ Gio::Application::Flags flags = Gio::Application::Flags::NONE) -> Glib::RefPtr<Application>;
+
+ protected:
+ explicit Application(Glib::ConstructParams const & params);
+ explicit Application(AdwApplication * gobj);
+ explicit Application(Glib::ustring const & id = {}, Gio::Application::Flags flags = Gio::Application::Flags::NONE);
+
+ private:
+ friend Application_Class;
+ static Application_Class s_class;
+ };
+} // namespace turns::adw
+
+namespace Glib
+{
+ auto wrap(AdwApplication * object, bool copy = false) -> Glib::RefPtr<turns::adw::Application>;
+} // namespace Glib
+
+#endif \ No newline at end of file