summaryrefslogtreecommitdiff
path: root/adw/src/stylemanager.cpp
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/src/stylemanager.cpp
parentdff2f80ddc8f742b8181409d6feeca33e856112e (diff)
downloadturns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz
turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip
adw: extract libadwaitamm
Diffstat (limited to 'adw/src/stylemanager.cpp')
-rw-r--r--adw/src/stylemanager.cpp131
1 files changed, 0 insertions, 131 deletions
diff --git a/adw/src/stylemanager.cpp b/adw/src/stylemanager.cpp
deleted file mode 100644
index c79bcbc..0000000
--- a/adw/src/stylemanager.cpp
+++ /dev/null
@@ -1,131 +0,0 @@
-/**
- * @author Felix Morgner (felix.morgner@gmail.com)
- * @copyright Copyright (c) 2025
- * SPDX-License-Identifier: LGPL-2.1-or-later
- */
-
-#include "adwaitamm/stylemanager.hpp"
-
-#include "adwaitamm/enums.hpp"
-#include "adwaitamm/private/stylemanager_p.hpp"
-
-#include <glibmm/object.h>
-#include <glibmm/objectbase.h>
-#include <glibmm/refptr.h>
-#include <glibmm/ustring.h>
-#include <glibmm/wrap.h>
-
-#include <gdkmm/display.h>
-#include <gdkmm/rgba.h>
-
-#include <adwaita.h>
-#include <glib-object.h>
-
-namespace Adwaita
-{
- namespace
- {
- auto constinit _class = StyleManager_Class{};
- } // namespace
-
- auto StyleManager::get_default() -> StyleManager *
- {
- return Glib::wrap(adw_style_manager_get_default());
- }
-
- auto StyleManager::for_display(Gdk::Display & display) -> StyleManager *
- {
- return Glib::wrap(adw_style_manager_get_for_display(Glib::unwrap(&display)));
- }
-
- auto StyleManager::get_type() -> GType
- {
- return _class.init().get_type();
- }
-
- auto StyleManager::get_base_type() -> GType
- {
- return adw_style_manager_get_type();
- }
-
- StyleManager::StyleManager(Glib::ConstructParams const & params)
- : Glib::Object{params}
- {
- }
-
- StyleManager::StyleManager(BaseObjectType * gobj)
- : Glib::Object(G_OBJECT(gobj))
- {
- }
-
- StyleManager::StyleManager()
- : Glib::ObjectBase{nullptr}
- , Glib::Object{Glib::ConstructParams{_class.init()}}
- {
- adw_init();
- }
-
- auto StyleManager::get_accent_color() const -> AccentColor
- {
- return static_cast<AccentColor>(adw_style_manager_get_accent_color(const_cast<BaseObjectType *>(unwrap(this))));
- }
-
- auto StyleManager::get_accent_color_rgba() const -> Gdk::RGBA
- {
- return Glib::wrap(adw_style_manager_get_accent_color_rgba(const_cast<BaseObjectType *>(unwrap(this))));
- }
-
- auto StyleManager::get_color_scheme() const -> ColorScheme
- {
- return static_cast<ColorScheme>(adw_style_manager_get_color_scheme(const_cast<BaseObjectType *>(unwrap(this))));
- }
-
- auto StyleManager::get_dark() const -> bool
- {
- return adw_style_manager_get_dark(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::get_display() const -> Glib::RefPtr<Gdk::Display>
- {
- return Glib::wrap(adw_style_manager_get_display(const_cast<BaseObjectType *>(unwrap(this))));
- }
-
- auto StyleManager::get_document_font_name() const -> Glib::ustring
- {
- return adw_style_manager_get_document_font_name(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::get_high_contrast() const -> bool
- {
- return adw_style_manager_get_high_contrast(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::get_monospace_font_name() const -> Glib::ustring
- {
- return adw_style_manager_get_monospace_font_name(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::get_system_supports_accent_colors() const -> bool
- {
- return adw_style_manager_get_system_supports_accent_colors(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::get_system_supports_color_schemes() const -> bool
- {
- return adw_style_manager_get_system_supports_color_schemes(const_cast<BaseObjectType *>(unwrap(this)));
- }
-
- auto StyleManager::set_color_scheme(ColorScheme value) -> void
- {
- adw_style_manager_set_color_scheme(unwrap(this), static_cast<AdwColorScheme>(value));
- }
-
-} // namespace Adwaita
-
-namespace Glib
-{
- auto wrap(AdwStyleManager * object) -> Adwaita::StyleManager *
- {
- return dynamic_cast<Adwaita::StyleManager *>(Glib::wrap_auto(G_OBJECT(object)));
- }
-} // namespace Glib \ No newline at end of file