summaryrefslogtreecommitdiff
path: root/adw/include/adwaitamm/stylemanager.hpp
blob: 8c6fd855dfe7b5e2b2c9423787b60695f867fd96 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
#ifndef LIBADWAITAMM_STYLE_MANAGER_HPP
#define LIBADWAITAMM_STYLE_MANAGER_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/application.h>

#include <gtkmm/application.h>

#include <gdkmm/display.h>
#include <glib-object.h>

#define _ADWAITA_INSIDE
#include <adw-style-manager.h>
#undef _ADWAITA_INSIDE

using AdwStyleManager = struct _AdwStyleManager;

namespace Adwaita
{
  enum struct AccentColor;
  enum struct ColorScheme;

  struct StyleManager : Glib::Object,
                        helpers::gobj_mixin<StyleManager, AdwStyleManager>
  {
    struct Class : Glib::Class
    {
      using BaseClassParent = GObjectClass;
      using BaseClassType = AdwStyleManagerClass;
      using BaseObjectType = AdwStyleManager;
      using CppClassParent = struct Glib::Object_Class;
      using CppObjectType = StyleManager;

      auto init() -> Glib::Class const &;
      auto static class_init_function(void * gclass, void * data) -> void;
      auto static wrap_new(GObject * object) -> Glib::ObjectBase *;
    };

    using BaseObjectType = Class::BaseObjectType;
    using BaseClassType = Class::BaseClassType;
    using CppObjectType = Class::CppObjectType;
    using CppClassType = Class;

    using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
    using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy;

    StyleManager(StyleManager const & other) = delete;
    StyleManager(StyleManager && other) noexcept = delete;

    auto operator=(StyleManager const & other) noexcept -> StyleManager & = delete;
    auto operator=(StyleManager && other) noexcept -> StyleManager & = delete;

    auto static get_default() -> StyleManager *;
    auto static for_display(Gdk::Display & display) -> StyleManager *;

    auto static get_type() -> GType;
    auto static get_base_type() -> GType;

    auto get_accent_color() const -> AccentColor;
    auto set_color_scheme(ColorScheme value) -> void;

  protected:
    explicit StyleManager(Glib::ConstructParams const & params);
    explicit StyleManager(BaseObjectType * gobj);
    explicit StyleManager();
  };
}  // namespace Adwaita

namespace Glib
{
  auto wrap(AdwStyleManager * object) -> Adwaita::StyleManager *;
}  // namespace Glib

#endif