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/helpers | |
| parent | dff2f80ddc8f742b8181409d6feeca33e856112e (diff) | |
| download | turns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip | |
adw: extract libadwaitamm
Diffstat (limited to 'adw/include/adwaitamm/helpers')
| -rw-r--r-- | adw/include/adwaitamm/helpers/async_callback.hpp | 15 | ||||
| -rw-r--r-- | adw/include/adwaitamm/helpers/gobj_mixin.hpp | 45 |
2 files changed, 0 insertions, 60 deletions
diff --git a/adw/include/adwaitamm/helpers/async_callback.hpp b/adw/include/adwaitamm/helpers/async_callback.hpp deleted file mode 100644 index e352359..0000000 --- a/adw/include/adwaitamm/helpers/async_callback.hpp +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef LIBADWAITAMM_HELPERS_ASYNC_CALLBACK_HPP -#define LIBADWAITAMM_HELPERS_ASYNC_CALLBACK_HPP - -#include <glibmm/object.h> - -#include <giomm/asyncresult.h> - -namespace Adwaita::helpers -{ - - auto async_callback(GObject *, GAsyncResult * result, void * data) noexcept -> void; - -} // namespace Adwaita::helpers - -#endif
\ No newline at end of file diff --git a/adw/include/adwaitamm/helpers/gobj_mixin.hpp b/adw/include/adwaitamm/helpers/gobj_mixin.hpp deleted file mode 100644 index ec15996..0000000 --- a/adw/include/adwaitamm/helpers/gobj_mixin.hpp +++ /dev/null @@ -1,45 +0,0 @@ -#ifndef LIBADWAITAMM_HELPERS_GOBJ_MIXIN_HPP -#define LIBADWAITAMM_HELPERS_GOBJ_MIXIN_HPP - -#include <glibmm/object.h> - -#include <type_traits> - -namespace Adwaita::helpers -{ - - template<typename SourceType, typename TargetType> - struct copy_const - { - using type = TargetType; - }; - - template<typename SourceType, typename TargetType> - struct copy_const<SourceType const, TargetType> - { - using type = std::add_const_t<TargetType>; - }; - - template<typename SourceType, typename TargetType> - using copy_const_t = typename copy_const<SourceType, TargetType>::type; - - template<typename CppType, typename BaseType> - struct gobj_mixin - { - template<typename Self> - auto gobj(this Self && self) noexcept - { - using base_type = copy_const_t<std::remove_reference_t<Self>, BaseType>; - return reinterpret_cast<base_type *>(self.::Glib::Object::gobj()); - } - - template<typename Self> - auto gobj_copy(this Self && self) noexcept - { - return reinterpret_cast<BaseType *>(self.::Glib::Object::gobj_copy()); - } - }; - -} // namespace Adwaita::helpers - -#endif
\ No newline at end of file |
