aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-29 12:30:21 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-29 12:32:34 +0200
commit673e58ca36421bb560d4e04277b6b58ce6e0db6f (patch)
tree4688e5b25a4bceac10c38a9ef0dc966d8f5131c2
parent68b3389d282284a59329c9c6a6603c7045a2db72 (diff)
downloadlibadwaitamm-673e58ca36421bb560d4e04277b6b58ce6e0db6f.tar.xz
libadwaitamm-673e58ca36421bb560d4e04277b6b58ce6e0db6f.zip
adw: implement ToolbarView
-rw-r--r--.vscode/settings.json4
-rw-r--r--examples/hello-world/hello.cpp10
-rw-r--r--include/adwaitamm/adwaitamm.hpp1
-rw-r--r--include/adwaitamm/enums.hpp8
-rw-r--r--include/adwaitamm/private/toolbarview_p.hpp35
-rw-r--r--include/adwaitamm/private/windowtitle_p.hpp4
-rw-r--r--include/adwaitamm/toolbarview.hpp100
-rw-r--r--src/enums.cpp9
-rw-r--r--src/private/toolbarview_p.cpp42
-rw-r--r--src/toolbarview.cpp253
-rw-r--r--src/wrap_init.cpp16
11 files changed, 469 insertions, 13 deletions
diff --git a/.vscode/settings.json b/.vscode/settings.json
index f93cbd0..6e04fd8 100644
--- a/.vscode/settings.json
+++ b/.vscode/settings.json
@@ -3,9 +3,13 @@
"cSpell.words": [
"adwaita",
"adwaitamm",
+ "gclass",
"giomm",
"glibmm",
+ "gobj",
"gtkmm",
+ "gtype",
+ "klass",
"libadwaita",
"libadwaitamm",
"Werror",
diff --git a/examples/hello-world/hello.cpp b/examples/hello-world/hello.cpp
index dd8aa56..5351370 100644
--- a/examples/hello-world/hello.cpp
+++ b/examples/hello-world/hello.cpp
@@ -1,5 +1,7 @@
#include <adwaitamm/adwaitamm.hpp>
+#include <gtkmm.h>
+
auto main(int argc, char ** argv) -> int
{
auto app = Adwaita::Application::create("org.example.Hello");
@@ -8,6 +10,14 @@ auto main(int argc, char ** argv) -> int
auto window = new Adwaita::ApplicationWindow{app};
app->signal_shutdown().connect([window] { delete window; });
+ window->set_title("Hello");
+
+ auto toolbar_view = Adwaita::ToolbarView{};
+ auto label = Gtk::Label{"Hello World"};
+
+ toolbar_view.set_content(label);
+
+ window->set_content(toolbar_view);
window->present();
});
diff --git a/include/adwaitamm/adwaitamm.hpp b/include/adwaitamm/adwaitamm.hpp
index 9dd0adb..1bee898 100644
--- a/include/adwaitamm/adwaitamm.hpp
+++ b/include/adwaitamm/adwaitamm.hpp
@@ -19,6 +19,7 @@
#include <adwaitamm/switchrow.hpp> // IWYU pragma: export
#include <adwaitamm/toast.hpp> // IWYU pragma: export
#include <adwaitamm/toastoverlay.hpp> // IWYU pragma: export
+#include <adwaitamm/toolbarview.hpp> // IWYU pragma: export
#include <adwaitamm/windowtitle.hpp> // IWYU pragma: export
#include <adwaitamm/wrap_init.hpp> // IWYU pragma: export
diff --git a/include/adwaitamm/enums.hpp b/include/adwaitamm/enums.hpp
index 0d09833..159b20d 100644
--- a/include/adwaitamm/enums.hpp
+++ b/include/adwaitamm/enums.hpp
@@ -69,6 +69,13 @@ namespace Adwaita
High,
};
+ enum class ToolbarStyle
+ {
+ Flat,
+ Raised,
+ RaisedBorder,
+ };
+
} // namespace Adwaita
namespace Glib
@@ -89,6 +96,7 @@ namespace Glib
VALUE_SPECIALIZATION(RatioType);
VALUE_SPECIALIZATION(ResponseAppearance);
VALUE_SPECIALIZATION(ToastPriority);
+ VALUE_SPECIALIZATION(ToolbarStyle);
#undef VALUE_SPECIALIZATION
diff --git a/include/adwaitamm/private/toolbarview_p.hpp b/include/adwaitamm/private/toolbarview_p.hpp
new file mode 100644
index 0000000..cafc474
--- /dev/null
+++ b/include/adwaitamm/private/toolbarview_p.hpp
@@ -0,0 +1,35 @@
+/**
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @copyright Copyright (c) 2025
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef LIBADWAITAMM_PRIVATE_TOOLBAR_VIEW_P_HPP
+#define LIBADWAITAMM_PRIVATE_TOOLBAR_VIEW_P_HPP
+
+#include <glibmm/class.h>
+#include <glibmm/objectbase.h>
+
+#include <gtkmm/widget.h>
+
+#define _ADWAITA_INSIDE
+#include <adw-toolbar-view.h>
+#undef _ADWAITA_INSIDE
+
+namespace Adwaita
+{
+ struct ToolbarView_Class : Glib::Class
+ {
+ using BaseClassParent = GtkWidgetClass;
+ using BaseClassType = AdwToolbarViewClass;
+ using BaseObjectType = AdwToolbarView;
+ using CppClassParent = Gtk::Widget_Class;
+ using CppObjectType = struct ToolbarView;
+
+ auto init() -> Glib::Class const &;
+ auto static class_init_function(void * gclass, void * data) -> void;
+ auto static wrap_new(GObject * object) -> Glib::ObjectBase *;
+ };
+} // namespace Adwaita
+
+#endif \ No newline at end of file
diff --git a/include/adwaitamm/private/windowtitle_p.hpp b/include/adwaitamm/private/windowtitle_p.hpp
index 460505a..2728d8a 100644
--- a/include/adwaitamm/private/windowtitle_p.hpp
+++ b/include/adwaitamm/private/windowtitle_p.hpp
@@ -29,10 +29,6 @@ namespace Adwaita
auto init() -> Glib::Class const &;
auto static class_init_function(void * gclass, void * data) -> void;
auto static wrap_new(GObject * object) -> Glib::ObjectBase *;
-
- protected:
- auto static close_attempt(BaseObjectType * self) -> void;
- auto static closed(BaseObjectType * self) -> void;
};
} // namespace Adwaita
diff --git a/include/adwaitamm/toolbarview.hpp b/include/adwaitamm/toolbarview.hpp
new file mode 100644
index 0000000..d64ee44
--- /dev/null
+++ b/include/adwaitamm/toolbarview.hpp
@@ -0,0 +1,100 @@
+/**
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @copyright Copyright (c) 2025
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#ifndef LIBADWAITAMM_TOOLBAR_VIEW_HPP
+#define LIBADWAITAMM_TOOLBAR_VIEW_HPP
+
+#include "adwaitamm/enums.hpp"
+#include "helpers/gobj_mixin.hpp"
+
+#include <glibmm/object.h>
+#include <glibmm/propertyproxy.h>
+
+#include <gtkmm/widget.h>
+
+#include <glib-object.h>
+
+#define _ADWAITA_INSIDE
+#include <adw-toolbar-view.h>
+#undef _ADWAITA_INSIDE
+
+namespace Adwaita
+{
+ struct ToolbarView final : Gtk::Widget,
+ helpers::gobj_mixin<ToolbarView, AdwToolbarView>
+ {
+
+ using BaseObjectType = AdwToolbarView;
+ using BaseClassType = AdwToolbarViewClass;
+ using CppObjectType = ToolbarView;
+ using CppClassType = struct ToolbarView_Class;
+
+ using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
+ using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj_copy;
+
+ ToolbarView();
+ ToolbarView(ToolbarView const & other) = delete;
+ ToolbarView(ToolbarView && other) noexcept = default;
+
+ auto operator=(ToolbarView const & other) noexcept -> ToolbarView & = delete;
+ auto operator=(ToolbarView && other) noexcept -> ToolbarView & = default;
+
+ auto static get_type() -> GType;
+ auto static get_base_type() -> GType;
+
+ auto add_bottom_bar(Gtk::Widget & widget) -> void;
+ auto add_top_bar(Gtk::Widget & widget) -> void;
+ auto remove(Gtk::Widget & widget) -> void;
+
+ [[nodiscard]] auto get_bottom_bar_height() const -> int;
+ [[nodiscard]] auto get_bottom_bar_style() const -> ToolbarStyle;
+ [[nodiscard]] auto get_content() const -> Gtk::Widget *;
+ [[nodiscard]] auto get_extend_content_to_bottom_edge() const -> bool;
+ [[nodiscard]] auto get_extend_content_to_top_edge() const -> bool;
+ [[nodiscard]] auto get_reveal_bottom_bars() const -> bool;
+ [[nodiscard]] auto get_reveal_top_bars() const -> bool;
+ [[nodiscard]] auto get_top_bar_height() const -> int;
+ [[nodiscard]] auto get_top_bar_style() const -> ToolbarStyle;
+
+ auto set_bottom_bar_style(ToolbarStyle value) -> void;
+ auto set_content(Gtk::Widget & value) -> void;
+ auto set_extend_content_to_bottom_edge(bool value) -> void;
+ auto set_extend_content_to_top_edge(bool value) -> void;
+ auto set_reveal_bottom_bars(bool value) -> void;
+ auto set_reveal_top_bars(bool value) -> void;
+ auto set_top_bar_style(ToolbarStyle value) -> void;
+
+ [[nodiscard]] auto property_bottom_bar_height() const -> Glib::PropertyProxy_ReadOnly<int>;
+ [[nodiscard]] auto property_bottom_bar_style() -> Glib::PropertyProxy<ToolbarStyle>;
+ [[nodiscard]] auto property_bottom_bar_style() const -> Glib::PropertyProxy_ReadOnly<ToolbarStyle>;
+ [[nodiscard]] auto property_content() -> Glib::PropertyProxy<Gtk::Widget *>;
+ [[nodiscard]] auto property_content() const -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *>;
+ [[nodiscard]] auto property_extend_content_to_bottom_edge() -> Glib::PropertyProxy<bool>;
+ [[nodiscard]] auto property_extend_content_to_bottom_edge() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ [[nodiscard]] auto property_extend_content_to_top_edge() -> Glib::PropertyProxy<bool>;
+ [[nodiscard]] auto property_extend_content_to_top_edge() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ [[nodiscard]] auto property_reveal_bottom_bars() -> Glib::PropertyProxy<bool>;
+ [[nodiscard]] auto property_reveal_bottom_bars() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ [[nodiscard]] auto property_reveal_top_bars() -> Glib::PropertyProxy<bool>;
+ [[nodiscard]] auto property_reveal_top_bars() const -> Glib::PropertyProxy_ReadOnly<bool>;
+ [[nodiscard]] auto property_top_bar_height() const -> Glib::PropertyProxy_ReadOnly<int>;
+ [[nodiscard]] auto property_top_bar_style() -> Glib::PropertyProxy<ToolbarStyle>;
+ [[nodiscard]] auto property_top_bar_style() const -> Glib::PropertyProxy_ReadOnly<ToolbarStyle>;
+
+ protected:
+ friend ToolbarView_Class;
+
+ explicit ToolbarView(Glib::ConstructParams const & params);
+ explicit ToolbarView(BaseObjectType * gobj);
+ };
+} // namespace Adwaita
+
+namespace Glib
+{
+ auto wrap(AdwToolbarView * object, bool copy = false) -> Adwaita::ToolbarView *;
+} // namespace Glib
+
+#endif \ No newline at end of file
diff --git a/src/enums.cpp b/src/enums.cpp
index b93ac3d..57a6c32 100644
--- a/src/enums.cpp
+++ b/src/enums.cpp
@@ -6,8 +6,6 @@
#include "adwaitamm/enums.hpp"
-#include "adwaitamm/stylemanager.hpp"
-
#include <adwaita.h>
#include <glib-object.h>
@@ -58,6 +56,10 @@ namespace Adwaita
static_assert(matches<ToastPriority::Normal, ADW_TOAST_PRIORITY_NORMAL>);
static_assert(matches<ToastPriority::High, ADW_TOAST_PRIORITY_HIGH>);
+ static_assert(matches<ToolbarStyle::Flat, ADW_TOOLBAR_FLAT>);
+ static_assert(matches<ToolbarStyle::Raised, ADW_TOOLBAR_RAISED>);
+ static_assert(matches<ToolbarStyle::RaisedBorder, ADW_TOOLBAR_RAISED_BORDER>);
+
} // namespace Adwaita
namespace Glib
@@ -71,10 +73,11 @@ namespace Glib
VALUE_SPECIALIZATION(AccentColor, accent_color)
VALUE_SPECIALIZATION(ColorScheme, color_scheme)
VALUE_SPECIALIZATION(LengthType, breakpoint_condition)
- VALUE_SPECIALIZATION(PresentationMode, dialog_presentation_mode);
+ VALUE_SPECIALIZATION(PresentationMode, dialog_presentation_mode)
VALUE_SPECIALIZATION(RatioType, breakpoint_condition)
VALUE_SPECIALIZATION(ResponseAppearance, response_appearance)
VALUE_SPECIALIZATION(ToastPriority, toast_priority)
+ VALUE_SPECIALIZATION(ToolbarStyle, toolbar_style)
#undef VALUE_SPECIALIZATION
} // namespace Glib \ No newline at end of file
diff --git a/src/private/toolbarview_p.cpp b/src/private/toolbarview_p.cpp
new file mode 100644
index 0000000..271b0d7
--- /dev/null
+++ b/src/private/toolbarview_p.cpp
@@ -0,0 +1,42 @@
+/**
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @copyright Copyright (c) 2025
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#include "adwaitamm/private/toolbarview_p.hpp"
+
+#include "adwaitamm/toolbarview.hpp"
+
+#include <glibmm/class.h>
+#include <glibmm/object.h>
+#include <glibmm/objectbase.h>
+
+#include <gtkmm/object.h>
+#include <gtkmm/private/widget_p.h>
+
+namespace Adwaita
+{
+
+ auto ToolbarView_Class::init() -> Glib::Class const &
+ {
+ if (!gtype_)
+ {
+ class_init_func_ = &class_init_function;
+ gtype_ = adw_toolbar_view_get_type();
+ }
+ return *this;
+ }
+
+ auto ToolbarView_Class::class_init_function(void * gclass, void * data) -> void
+ {
+ auto const klass = static_cast<BaseClassType *>(gclass);
+ CppClassParent::class_init_function(klass, data);
+ }
+
+ auto ToolbarView_Class::wrap_new(GObject * object) -> Glib::ObjectBase *
+ {
+ return Gtk::manage(new ToolbarView(ADW_TOOLBAR_VIEW(object)));
+ }
+
+} // namespace Adwaita \ No newline at end of file
diff --git a/src/toolbarview.cpp b/src/toolbarview.cpp
new file mode 100644
index 0000000..b2a9de6
--- /dev/null
+++ b/src/toolbarview.cpp
@@ -0,0 +1,253 @@
+/**
+ * @author Felix Morgner (felix.morgner@gmail.com)
+ * @copyright Copyright (c) 2025
+ * SPDX-License-Identifier: LGPL-2.1-or-later
+ */
+
+#include "adwaitamm/toolbarview.hpp"
+
+#include "adwaitamm/enums.hpp"
+#include "adwaitamm/private/toolbarview_p.hpp"
+
+#include <glibmm/object.h>
+#include <glibmm/objectbase.h>
+#include <glibmm/propertyproxy.h>
+#include <glibmm/ustring.h>
+#include <glibmm/wrap.h>
+
+#include <gtkmm/widget.h>
+
+#include <glib-object.h>
+#include <gtk/gtk.h>
+
+namespace Adwaita
+{
+
+ namespace
+ {
+ auto constinit _class = ToolbarView_Class{};
+
+ namespace property_name
+ {
+ auto constexpr bottom_bar_height = "bottom-bar-height";
+ auto constexpr bottom_bar_style = "bottom-bar-style";
+ auto constexpr content = "content";
+ auto constexpr extend_content_to_bottom_edge = "extend-content-to-bottom-edge";
+ auto constexpr extend_content_to_top_edge = "extend-content-to-top-edge";
+ auto constexpr reveal_bottom_bars = "reveal-bottom-bars";
+ auto constexpr reveal_top_bars = "reveal-top-bars";
+ auto constexpr top_bar_height = "top-bar-height";
+ auto constexpr top_bar_style = "top-bar-style";
+ } // namespace property_name
+ } // namespace
+
+ ToolbarView::ToolbarView()
+ : Glib::ObjectBase{nullptr}
+ , Gtk::Widget{Glib::ConstructParams{_class.init()}}
+ {
+ }
+
+ auto ToolbarView::get_type() -> GType
+ {
+ return _class.init().get_type();
+ }
+
+ auto ToolbarView::get_base_type() -> GType
+ {
+ return adw_toolbar_view_get_type();
+ }
+
+ ToolbarView::ToolbarView(Glib::ConstructParams const & params)
+ : Gtk::Widget{params}
+ {
+ }
+
+ ToolbarView::ToolbarView(BaseObjectType * gobj)
+ : Gtk::Widget(GTK_WIDGET(gobj))
+ {
+ }
+
+ auto ToolbarView::add_bottom_bar(Gtk::Widget & widget) -> void
+ {
+ return adw_toolbar_view_add_bottom_bar(unwrap(this), unwrap(&widget));
+ }
+
+ auto ToolbarView::add_top_bar(Gtk::Widget & widget) -> void
+ {
+ return adw_toolbar_view_add_top_bar(unwrap(this), unwrap(&widget));
+ }
+
+ auto ToolbarView::remove(Gtk::Widget & widget) -> void
+ {
+ return adw_toolbar_view_remove(unwrap(this), unwrap(&widget));
+ }
+
+ auto ToolbarView::get_bottom_bar_height() const -> int
+ {
+ return adw_toolbar_view_get_bottom_bar_height(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_bottom_bar_style() const -> ToolbarStyle
+ {
+ return static_cast<ToolbarStyle>(adw_toolbar_view_get_bottom_bar_style(const_cast<BaseObjectType *>(unwrap(this))));
+ }
+
+ auto ToolbarView::get_content() const -> Gtk::Widget *
+ {
+ return Glib::wrap(adw_toolbar_view_get_content(const_cast<BaseObjectType *>(unwrap(this))));
+ }
+
+ auto ToolbarView::get_extend_content_to_bottom_edge() const -> bool
+ {
+ return adw_toolbar_view_get_extend_content_to_bottom_edge(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_extend_content_to_top_edge() const -> bool
+ {
+ return adw_toolbar_view_get_extend_content_to_top_edge(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_reveal_bottom_bars() const -> bool
+ {
+ return adw_toolbar_view_get_reveal_bottom_bars(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_reveal_top_bars() const -> bool
+ {
+ return adw_toolbar_view_get_reveal_top_bars(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_top_bar_height() const -> int
+ {
+ return adw_toolbar_view_get_top_bar_height(const_cast<BaseObjectType *>(unwrap(this)));
+ }
+
+ auto ToolbarView::get_top_bar_style() const -> ToolbarStyle
+ {
+ return static_cast<ToolbarStyle>(adw_toolbar_view_get_top_bar_style(const_cast<BaseObjectType *>(unwrap(this))));
+ }
+
+ auto ToolbarView::set_bottom_bar_style(ToolbarStyle value) -> void
+ {
+ return adw_toolbar_view_set_bottom_bar_style(unwrap(this), static_cast<AdwToolbarStyle>(value));
+ }
+
+ auto ToolbarView::set_content(Gtk::Widget & value) -> void
+ {
+ return adw_toolbar_view_set_content(unwrap(this), unwrap(&value));
+ }
+
+ auto ToolbarView::set_extend_content_to_bottom_edge(bool value) -> void
+ {
+ return adw_toolbar_view_set_extend_content_to_bottom_edge(unwrap(this), value);
+ }
+
+ auto ToolbarView::set_extend_content_to_top_edge(bool value) -> void
+ {
+ return adw_toolbar_view_set_extend_content_to_top_edge(unwrap(this), value);
+ }
+
+ auto ToolbarView::set_reveal_bottom_bars(bool value) -> void
+ {
+ return adw_toolbar_view_set_reveal_bottom_bars(unwrap(this), value);
+ }
+
+ auto ToolbarView::set_reveal_top_bars(bool value) -> void
+ {
+ return adw_toolbar_view_set_reveal_top_bars(unwrap(this), value);
+ }
+
+ auto ToolbarView::set_top_bar_style(ToolbarStyle value) -> void
+ {
+ return adw_toolbar_view_set_top_bar_style(unwrap(this), static_cast<AdwToolbarStyle>(value));
+ }
+
+ auto ToolbarView::property_bottom_bar_height() const -> Glib::PropertyProxy_ReadOnly<int>
+ {
+ return {this, property_name::bottom_bar_height};
+ }
+
+ auto ToolbarView::property_bottom_bar_style() -> Glib::PropertyProxy<ToolbarStyle>
+ {
+ return {this, property_name::bottom_bar_style};
+ }
+
+ auto ToolbarView::property_bottom_bar_style() const -> Glib::PropertyProxy_ReadOnly<ToolbarStyle>
+ {
+ return {this, property_name::bottom_bar_style};
+ }
+
+ auto ToolbarView::property_content() -> Glib::PropertyProxy<Gtk::Widget *>
+ {
+ return {this, property_name::content};
+ }
+
+ auto ToolbarView::property_content() const -> Glib::PropertyProxy_ReadOnly<Gtk::Widget *>
+ {
+ return {this, property_name::content};
+ }
+
+ auto ToolbarView::property_extend_content_to_bottom_edge() -> Glib::PropertyProxy<bool>
+ {
+ return {this, property_name::extend_content_to_bottom_edge};
+ }
+
+ auto ToolbarView::property_extend_content_to_bottom_edge() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return {this, property_name::extend_content_to_bottom_edge};
+ }
+
+ auto ToolbarView::property_extend_content_to_top_edge() -> Glib::PropertyProxy<bool>
+ {
+ return {this, property_name::extend_content_to_top_edge};
+ }
+
+ auto ToolbarView::property_extend_content_to_top_edge() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return {this, property_name::extend_content_to_top_edge};
+ }
+
+ auto ToolbarView::property_reveal_bottom_bars() -> Glib::PropertyProxy<bool>
+ {
+ return {this, property_name::reveal_bottom_bars};
+ }
+
+ auto ToolbarView::property_reveal_bottom_bars() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return {this, property_name::reveal_bottom_bars};
+ }
+
+ auto ToolbarView::property_reveal_top_bars() -> Glib::PropertyProxy<bool>
+ {
+ return {this, property_name::reveal_top_bars};
+ }
+
+ auto ToolbarView::property_reveal_top_bars() const -> Glib::PropertyProxy_ReadOnly<bool>
+ {
+ return {this, property_name::reveal_top_bars};
+ }
+
+ auto ToolbarView::property_top_bar_height() const -> Glib::PropertyProxy_ReadOnly<int>
+ {
+ return {this, property_name::top_bar_height};
+ }
+
+ auto ToolbarView::property_top_bar_style() -> Glib::PropertyProxy<ToolbarStyle>
+ {
+ return {this, property_name::top_bar_style};
+ }
+
+ auto ToolbarView::property_top_bar_style() const -> Glib::PropertyProxy_ReadOnly<ToolbarStyle>
+ {
+ return {this, property_name::top_bar_style};
+ }
+
+} // namespace Adwaita
+
+namespace Glib
+{
+ auto wrap(AdwToolbarView * object, bool copy) -> Adwaita::ToolbarView *
+ {
+ return dynamic_cast<Adwaita::ToolbarView *>(Glib::wrap_auto(G_OBJECT(object), copy));
+ }
+} // namespace Glib \ No newline at end of file
diff --git a/src/wrap_init.cpp b/src/wrap_init.cpp
index a609c48..1e3195c 100644
--- a/src/wrap_init.cpp
+++ b/src/wrap_init.cpp
@@ -30,17 +30,19 @@
#include "adwaitamm/private/preferencesdialog_p.hpp" // IWYU pragma: keep - required for gobj class definition.
#include "adwaitamm/private/preferencespage_p.hpp" // IWYU pragma: keep - required for gobj class definition.
#include "adwaitamm/private/preferencesrow_p.hpp" // IWYU pragma: keep - required for gobj class definition.
-#include "adwaitamm/private/spinrow_p.hpp"
-#include "adwaitamm/private/stylemanager_p.hpp"
-#include "adwaitamm/private/switchrow_p.hpp"
-#include "adwaitamm/private/toast_p.hpp"
-#include "adwaitamm/private/toastoverlay_p.hpp"
-#include "adwaitamm/private/windowtitle_p.hpp"
+#include "adwaitamm/private/spinrow_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/stylemanager_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/switchrow_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/toast_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/toastoverlay_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/toolbarview_p.hpp" // IWYU pragma: keep - required for gobj class definition.
+#include "adwaitamm/private/windowtitle_p.hpp" // IWYU pragma: keep - required for gobj class definition.
#include "adwaitamm/spinrow.hpp"
#include "adwaitamm/stylemanager.hpp"
#include "adwaitamm/switchrow.hpp"
#include "adwaitamm/toast.hpp"
#include "adwaitamm/toastoverlay.hpp"
+#include "adwaitamm/toolbarview.hpp"
#include "adwaitamm/windowtitle.hpp"
#include <glibmm/wrap.h>
@@ -72,6 +74,7 @@ namespace Adwaita
WRAP_CLASS(SwitchRow, switch_row);
WRAP_CLASS(Toast, toast);
WRAP_CLASS(ToastOverlay, toast_overlay);
+ WRAP_CLASS(ToolbarView, toolbar_view);
WRAP_CLASS(WindowTitle, window_title);
ENSURE_TYPE(AboutDialog);
@@ -91,6 +94,7 @@ namespace Adwaita
ENSURE_TYPE(SwitchRow);
ENSURE_TYPE(Toast);
ENSURE_TYPE(ToastOverlay);
+ ENSURE_TYPE(ToolbarView);
ENSURE_TYPE(WindowTitle);
}
} // namespace Adwaita \ No newline at end of file