summaryrefslogtreecommitdiff
path: root/adw/include/turns
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
commitc61998283c8436dd4360e35ce10c309e7d3ee723 (patch)
tree849e3c2ba5df9cf27b76c6c18fa1263091063815 /adw/include/turns
parent02a030a95b27034eedc151488a014950595510de (diff)
downloadturns-c61998283c8436dd4360e35ce10c309e7d3ee723.tar.xz
turns-c61998283c8436dd4360e35ce10c309e7d3ee723.zip
adw: add bare bones wrapper for AdwApplication
Diffstat (limited to 'adw/include/turns')
-rw-r--r--adw/include/turns/adw/application.hpp55
-rw-r--r--adw/include/turns/adw/wrap_init.hpp9
2 files changed, 64 insertions, 0 deletions
diff --git a/adw/include/turns/adw/application.hpp b/adw/include/turns/adw/application.hpp
new file mode 100644
index 0000000..26bec41
--- /dev/null
+++ b/adw/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
diff --git a/adw/include/turns/adw/wrap_init.hpp b/adw/include/turns/adw/wrap_init.hpp
new file mode 100644
index 0000000..5096736
--- /dev/null
+++ b/adw/include/turns/adw/wrap_init.hpp
@@ -0,0 +1,9 @@
+#ifndef TURNS_ADW_WRAP_INIT_HPP
+#define TURNS_ADW_WRAP_INIT_HPP
+
+namespace turns::adw
+{
+ auto wrap_init() -> void;
+} // namespace turns::adw
+
+#endif \ No newline at end of file