From 29eb802f09da07421099238eceaee9e3b1d61ff2 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Mon, 28 Apr 2025 14:01:30 +0200 Subject: adw: extract libadwaitamm --- adw/src/aboutdialog.cpp | 607 -------------------------------- adw/src/actionrow.cpp | 246 ------------- adw/src/alertdialog.cpp | 108 ------ adw/src/application.cpp | 89 ----- adw/src/applicationwindow.cpp | 62 ---- adw/src/breakpoint.cpp | 146 -------- adw/src/comborow.cpp | 273 -------------- adw/src/dialog.cpp | 338 ------------------ adw/src/entryrow.cpp | 282 --------------- adw/src/enums.cpp | 80 ----- adw/src/helpers/async_callback.cpp | 34 -- adw/src/preferencesdialog.cpp | 70 ---- adw/src/preferencespage.cpp | 61 ---- adw/src/preferencesrow.cpp | 147 -------- adw/src/private/aboutdialog_p.cpp | 40 --- adw/src/private/actionrow_p.cpp | 84 ----- adw/src/private/alertdialog_p.cpp | 40 --- adw/src/private/application_p.cpp | 40 --- adw/src/private/applicationwindow_p.cpp | 40 --- adw/src/private/breakpoint_p.cpp | 42 --- adw/src/private/comborow_p.cpp | 41 --- adw/src/private/dialog_p.cpp | 101 ------ adw/src/private/entryrow_p.cpp | 44 --- adw/src/private/preferencesdialog_p.cpp | 40 --- adw/src/private/preferencespage_p.cpp | 41 --- adw/src/private/preferencesrow_p.cpp | 41 --- adw/src/private/spinrow_p.cpp | 41 --- adw/src/private/stylemanager_p.cpp | 39 -- adw/src/private/switchrow_p.cpp | 41 --- adw/src/private/toast_p.cpp | 39 -- adw/src/private/toastoverlay_p.cpp | 42 --- adw/src/private/windowtitle_p.cpp | 42 --- adw/src/spinrow.cpp | 383 -------------------- adw/src/stylemanager.cpp | 131 ------- adw/src/switchrow.cpp | 80 ----- adw/src/toast.cpp | 262 -------------- adw/src/toastoverlay.cpp | 93 ----- adw/src/windowtitle.cpp | 110 ------ adw/src/wrap_init.cpp | 96 ----- 39 files changed, 4536 deletions(-) delete mode 100644 adw/src/aboutdialog.cpp delete mode 100644 adw/src/actionrow.cpp delete mode 100644 adw/src/alertdialog.cpp delete mode 100644 adw/src/application.cpp delete mode 100644 adw/src/applicationwindow.cpp delete mode 100644 adw/src/breakpoint.cpp delete mode 100644 adw/src/comborow.cpp delete mode 100644 adw/src/dialog.cpp delete mode 100644 adw/src/entryrow.cpp delete mode 100644 adw/src/enums.cpp delete mode 100644 adw/src/helpers/async_callback.cpp delete mode 100644 adw/src/preferencesdialog.cpp delete mode 100644 adw/src/preferencespage.cpp delete mode 100644 adw/src/preferencesrow.cpp delete mode 100644 adw/src/private/aboutdialog_p.cpp delete mode 100644 adw/src/private/actionrow_p.cpp delete mode 100644 adw/src/private/alertdialog_p.cpp delete mode 100644 adw/src/private/application_p.cpp delete mode 100644 adw/src/private/applicationwindow_p.cpp delete mode 100644 adw/src/private/breakpoint_p.cpp delete mode 100644 adw/src/private/comborow_p.cpp delete mode 100644 adw/src/private/dialog_p.cpp delete mode 100644 adw/src/private/entryrow_p.cpp delete mode 100644 adw/src/private/preferencesdialog_p.cpp delete mode 100644 adw/src/private/preferencespage_p.cpp delete mode 100644 adw/src/private/preferencesrow_p.cpp delete mode 100644 adw/src/private/spinrow_p.cpp delete mode 100644 adw/src/private/stylemanager_p.cpp delete mode 100644 adw/src/private/switchrow_p.cpp delete mode 100644 adw/src/private/toast_p.cpp delete mode 100644 adw/src/private/toastoverlay_p.cpp delete mode 100644 adw/src/private/windowtitle_p.cpp delete mode 100644 adw/src/spinrow.cpp delete mode 100644 adw/src/stylemanager.cpp delete mode 100644 adw/src/switchrow.cpp delete mode 100644 adw/src/toast.cpp delete mode 100644 adw/src/toastoverlay.cpp delete mode 100644 adw/src/windowtitle.cpp delete mode 100644 adw/src/wrap_init.cpp (limited to 'adw/src') diff --git a/adw/src/aboutdialog.cpp b/adw/src/aboutdialog.cpp deleted file mode 100644 index a30758a..0000000 --- a/adw/src/aboutdialog.cpp +++ /dev/null @@ -1,607 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/aboutdialog.hpp" - -#include "adwaitamm/dialog.hpp" -#include "adwaitamm/private/aboutdialog_p.hpp" - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include -#include - -namespace Adwaita -{ - - namespace - { - auto constinit _class = AboutDialog_Class{}; ///< The static instance of this types class - - extern "C" auto AdwAboutDialog_signal_activate_link_connect_callback(AdwAboutDialog * self, char const * uri, void * user_data) -> gboolean - try - { - auto object = Glib::wrap(self); - if (object) - { - auto slot = Glib::SignalProxyNormal::data_to_slot(user_data); - if (slot) - { - return static_cast( - (*static_cast *>(slot))(Glib::convert_const_gchar_ptr_to_ustring(uri))); - } - } - return {}; - } - catch (...) - { - Glib::exception_handlers_invoke(); - return {}; - } - - extern "C" auto AdwAboutDialog_signal_activate_link_notify_callback(AdwAboutDialog * self, char const * uri, void * user_data) -> gboolean - try - { - auto object = Glib::wrap(self); - if (object) - { - auto slot = Glib::SignalProxyNormal::data_to_slot(user_data); - if (slot) - { - (*static_cast *>(slot))(Glib::convert_const_gchar_ptr_to_ustring(uri)); - } - } - return {}; - } - catch (...) - { - Glib::exception_handlers_invoke(); - return {}; - } - - namespace property_name - { - auto constexpr application_icon = "application-icon"; - auto constexpr application_name = "application-name"; - auto constexpr artists = "artists"; - auto constexpr comments = "comments"; - auto constexpr copyright = "copyright"; - auto constexpr debug_info = "debug-info"; - auto constexpr debug_info_filename = "debug-info-filename"; - auto constexpr designers = "designers"; - auto constexpr developer_name = "developer-name"; - auto constexpr developers = "developers"; - auto constexpr documenters = "documenters"; - auto constexpr issue_url = "issue-url"; - auto constexpr license_type = "license-type"; - auto constexpr license = "license"; - auto constexpr release_notes = "release-notes"; - auto constexpr release_notes_version = "release-notes-version"; - auto constexpr support_url = "support-url"; - auto constexpr translator_credits = "translator-credits"; - auto constexpr version = "version"; - auto constexpr website = "website"; - } // namespace property_name - - namespace signal_info - { - static const Glib::SignalProxyInfo activate_link = {"activate_link", - (GCallback)&AdwAboutDialog_signal_activate_link_connect_callback, - (GCallback)&AdwAboutDialog_signal_activate_link_notify_callback}; - } // namespace signal_info - - } // namespace - - AboutDialog::AboutDialog() - : Glib::ObjectBase{nullptr} - , Dialog{Glib::ConstructParams{_class.init()}} - { - } - - AboutDialog::AboutDialog(std::string resource_path, std::string release_notes_version) - : Glib::ObjectBase{nullptr} - , Dialog{adw_about_dialog_new_from_appdata(resource_path.c_str(), Glib::c_str_or_nullptr(release_notes_version))} - { - } - - auto AboutDialog::get_type() -> GType - { - return _class.init().get_type(); - } - - auto AboutDialog::get_base_type() -> GType - { - return adw_about_dialog_get_type(); - } - - auto AboutDialog::add_acknowledgement_section(Glib::ustring const & name, std::vector const & people) -> void - { - return adw_about_dialog_add_acknowledgement_section(unwrap(this), - Glib::c_str_or_nullptr(name), - Glib::ArrayHandler::vector_to_array(people).data()); - } - - auto AboutDialog::add_credit_section(Glib::ustring const & name, std::vector const & people) -> void - { - - return adw_about_dialog_add_credit_section(unwrap(this), - Glib::c_str_or_nullptr(name), - Glib::ArrayHandler::vector_to_array(people).data()); - } - - auto AboutDialog::add_legal_section(Glib::ustring const & title, - Glib::ustring const & copyright, - Gtk::License license_type, - Glib::ustring const & license) -> void - { - return adw_about_dialog_add_legal_section(Glib::unwrap(this), - title.c_str(), - c_str_or_nullptr(copyright), - static_cast(license_type), - c_str_or_nullptr(license)); - } - - auto AboutDialog::add_link(Glib::ustring const & title, Glib::ustring const & url) -> void - { - return adw_about_dialog_add_link(unwrap(this), title.c_str(), url.c_str()); - } - - auto AboutDialog::add_other_app(Glib::ustring const & id, Glib::ustring const & name, Glib::ustring const & summary) -> void - { - return adw_about_dialog_add_other_app(unwrap(this), id.c_str(), name.c_str(), summary.c_str()); - } - - auto AboutDialog::get_application_icon() const -> Glib::ustring - { - return adw_about_dialog_get_application_icon(const_cast(unwrap(this))); - } - - auto AboutDialog::get_application_name() const -> Glib::ustring - { - return adw_about_dialog_get_application_name(const_cast(unwrap(this))); - } - - auto AboutDialog::get_artists() const -> std::vector - { - return Glib::ArrayHandler::array_to_vector(adw_about_dialog_get_artists(const_cast(unwrap(this))), - Glib::OWNERSHIP_NONE); - } - - auto AboutDialog::get_comments() const -> Glib::ustring - { - return adw_about_dialog_get_comments(const_cast(unwrap(this))); - } - - auto AboutDialog::get_copyright() const -> Glib::ustring - { - return adw_about_dialog_get_copyright(const_cast(unwrap(this))); - } - - auto AboutDialog::get_debug_info() const -> Glib::ustring - { - return adw_about_dialog_get_debug_info(const_cast(unwrap(this))); - } - - auto AboutDialog::get_debug_info_filename() const -> Glib::ustring - { - return adw_about_dialog_get_debug_info_filename(const_cast(unwrap(this))); - } - - auto AboutDialog::get_designers() const -> std::vector - { - return Glib::ArrayHandler::array_to_vector(adw_about_dialog_get_designers(const_cast(unwrap(this))), - Glib::OWNERSHIP_NONE); - } - - auto AboutDialog::get_developer_name() const -> Glib::ustring - { - return adw_about_dialog_get_developer_name(const_cast(unwrap(this))); - } - - auto AboutDialog::get_developers() const -> std::vector - { - return Glib::ArrayHandler::array_to_vector(adw_about_dialog_get_developers(const_cast(unwrap(this))), - Glib::OWNERSHIP_NONE); - } - - auto AboutDialog::get_documenters() const -> std::vector - { - return Glib::ArrayHandler::array_to_vector(adw_about_dialog_get_documenters(const_cast(unwrap(this))), - Glib::OWNERSHIP_NONE); - } - - auto AboutDialog::get_issue_url() const -> Glib::ustring - { - return adw_about_dialog_get_issue_url(const_cast(unwrap(this))); - } - - auto AboutDialog::get_license() const -> Glib::ustring - { - return adw_about_dialog_get_license(const_cast(unwrap(this))); - } - - auto AboutDialog::get_license_type() const -> Gtk::License - { - return static_cast(adw_about_dialog_get_license_type(const_cast(unwrap(this)))); - } - - auto AboutDialog::get_release_notes() const -> Glib::ustring - { - return adw_about_dialog_get_release_notes(const_cast(unwrap(this))); - } - - auto AboutDialog::get_release_notes_version() const -> Glib::ustring - { - return adw_about_dialog_get_release_notes_version(const_cast(unwrap(this))); - } - - auto AboutDialog::get_support_url() const -> Glib::ustring - { - return adw_about_dialog_get_support_url(const_cast(unwrap(this))); - } - - auto AboutDialog::get_translator_credits() const -> Glib::ustring - { - return adw_about_dialog_get_translator_credits(const_cast(unwrap(this))); - } - - auto AboutDialog::get_version() const -> Glib::ustring - { - return adw_about_dialog_get_version(const_cast(unwrap(this))); - } - - auto AboutDialog::get_website() const -> Glib::ustring - { - return adw_about_dialog_get_website(const_cast(unwrap(this))); - } - - auto AboutDialog::set_application_icon(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_application_icon(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_application_name(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_application_name(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_artists(std::vector const & value) -> void - { - return adw_about_dialog_set_artists(unwrap(this), Glib::ArrayHandler::vector_to_array(value).data()); - } - - auto AboutDialog::set_comments(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_comments(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_copyright(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_copyright(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_debug_info(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_debug_info(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_debug_info_filename(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_debug_info_filename(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_designers(std::vector const & value) -> void - { - return adw_about_dialog_set_designers(unwrap(this), Glib::ArrayHandler::vector_to_array(value).data()); - } - - auto AboutDialog::set_developer_name(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_developer_name(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_developers(std::vector const & value) -> void - { - return adw_about_dialog_set_developers(unwrap(this), Glib::ArrayHandler::vector_to_array(value).data()); - } - - auto AboutDialog::set_documenters(std::vector const & value) -> void - { - return adw_about_dialog_set_documenters(unwrap(this), Glib::ArrayHandler::vector_to_array(value).data()); - } - - auto AboutDialog::set_issue_url(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_issue_url(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_license(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_license(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_license_type(Gtk::License const & value) -> void - { - return adw_about_dialog_set_license_type(unwrap(this), static_cast(value)); - } - - auto AboutDialog::set_release_notes(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_release_notes(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_release_notes_version(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_release_notes_version(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_support_url(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_support_url(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_translator_credits(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_translator_credits(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_version(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_version(unwrap(this), value.c_str()); - } - - auto AboutDialog::set_website(Glib::ustring const & value) -> void - { - return adw_about_dialog_set_website(unwrap(this), value.c_str()); - } - - auto AboutDialog::property_application_icon() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::application_icon}; - } - - auto AboutDialog::property_application_icon() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::application_icon}; - } - - auto AboutDialog::property_application_name() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::application_name}; - } - - auto AboutDialog::property_application_name() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::application_name}; - } - - auto AboutDialog::property_artists() -> Glib::PropertyProxy> - { - return Glib::PropertyProxy>{this, property_name::artists}; - } - - auto AboutDialog::property_artists() const -> Glib::PropertyProxy_ReadOnly> - { - return Glib::PropertyProxy_ReadOnly>{this, property_name::artists}; - } - - auto AboutDialog::property_comments() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::comments}; - } - - auto AboutDialog::property_comments() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::comments}; - } - - auto AboutDialog::property_copyright() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::copyright}; - } - - auto AboutDialog::property_copyright() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::copyright}; - } - - auto AboutDialog::property_debug_info() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::debug_info}; - } - - auto AboutDialog::property_debug_info() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::debug_info}; - } - - auto AboutDialog::property_debug_info_filename() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::debug_info_filename}; - } - - auto AboutDialog::property_debug_info_filename() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::debug_info_filename}; - } - - auto AboutDialog::property_designers() -> Glib::PropertyProxy> - { - return Glib::PropertyProxy>{this, property_name::designers}; - } - - auto AboutDialog::property_designers() const -> Glib::PropertyProxy_ReadOnly> - { - return Glib::PropertyProxy_ReadOnly>{this, property_name::designers}; - } - - auto AboutDialog::property_developer_name() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::developer_name}; - } - - auto AboutDialog::property_developer_name() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::developer_name}; - } - - auto AboutDialog::property_developers() -> Glib::PropertyProxy> - { - return Glib::PropertyProxy>{this, property_name::developers}; - } - - auto AboutDialog::property_developers() const -> Glib::PropertyProxy_ReadOnly> - { - return Glib::PropertyProxy_ReadOnly>{this, property_name::developers}; - } - - auto AboutDialog::property_documenters() -> Glib::PropertyProxy> - { - return Glib::PropertyProxy>{this, property_name::documenters}; - } - - auto AboutDialog::property_documenters() const -> Glib::PropertyProxy_ReadOnly> - { - return Glib::PropertyProxy_ReadOnly>{this, property_name::documenters}; - } - - auto AboutDialog::property_issue_url() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::issue_url}; - } - - auto AboutDialog::property_issue_url() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::issue_url}; - } - - auto AboutDialog::property_license_type() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::license_type}; - } - - auto AboutDialog::property_license_type() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::license_type}; - } - - auto AboutDialog::property_license() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::license}; - } - - auto AboutDialog::property_license() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::license}; - } - - auto AboutDialog::property_release_notes() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::release_notes}; - } - - auto AboutDialog::property_release_notes() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::release_notes}; - } - - auto AboutDialog::property_release_notes_version() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::release_notes_version}; - } - - auto AboutDialog::property_release_notes_version() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::release_notes_version}; - } - - auto AboutDialog::property_support_url() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::support_url}; - } - - auto AboutDialog::property_support_url() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::support_url}; - } - - auto AboutDialog::property_translator_credits() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::translator_credits}; - } - - auto AboutDialog::property_translator_credits() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::translator_credits}; - } - - auto AboutDialog::property_version() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::version}; - } - - auto AboutDialog::property_version() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::version}; - } - - auto AboutDialog::property_website() -> Glib::PropertyProxy - { - return Glib::PropertyProxy{this, property_name::website}; - } - - auto AboutDialog::property_website() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly{this, property_name::website}; - } - - auto AboutDialog::signal_activate_link() -> Glib::SignalProxy - { - return Glib::SignalProxy{this, &signal_info::activate_link}; - } - - AboutDialog::AboutDialog(Glib::ConstructParams const & params) - : Dialog{params} - { - } - - AboutDialog::AboutDialog(BaseObjectType * gobj) - : Dialog(ADW_DIALOG(gobj)) - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwAboutDialog * object, bool copy) -> Adwaita::AboutDialog * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/actionrow.cpp b/adw/src/actionrow.cpp deleted file mode 100644 index f17eef3..0000000 --- a/adw/src/actionrow.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/actionrow.hpp" - -#include "adwaitamm/preferencesrow.hpp" -#include "adwaitamm/private/actionrow_p.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace Adwaita - -{ - namespace - { - auto constinit _class = ActionRow_Class{}; - - namespace property_name - { - auto constexpr activatable_widget = "activatable-widget"; - auto constexpr icon_name = "icon-name"; - auto constexpr subtitle = "subtitle"; - auto constexpr subtitle_lines = "subtitle-lines"; - auto constexpr subtitle_selectable = "subtitle-selectable"; - auto constexpr title_lines = "title-lines"; - } // namespace property_name - - namespace signal_info - { - auto const static activated = Glib::SignalProxyInfo{ - "activated", - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - }; - } // namespace signal_info - } // namespace - - ActionRow::ActionRow() - : Glib::ObjectBase{nullptr} - , PreferencesRow{Glib::ConstructParams{_class.init()}} - { - } - - auto ActionRow::get_type() -> GType - { - return _class.init().get_type(); - } - - auto ActionRow::get_base_type() -> GType - { - return adw_action_row_get_type(); - } - - auto ActionRow::activate() -> void - { - return adw_action_row_activate(unwrap(this)); - } - - auto ActionRow::add_prefix(Gtk::Widget & widget) -> void - { - return adw_action_row_add_prefix(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::add_suffix(Gtk::Widget & widget) -> void - { - return adw_action_row_add_suffix(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::remove(Gtk::Widget & widget) -> void - { - return adw_action_row_remove(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::get_activatable_widget() const noexcept -> Gtk::Widget * - { - return Glib::wrap(adw_action_row_get_activatable_widget(const_cast(unwrap(this)))); - } - - auto ActionRow::get_icon_name() const -> Glib::ustring - { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - return adw_action_row_get_icon_name(const_cast(unwrap(this))); -#pragma GCC diagnostic pop - } - - auto ActionRow::get_subtitle() const -> Glib::ustring - { - return adw_action_row_get_subtitle(const_cast(unwrap(this))); - } - - auto ActionRow::get_subtitle_lines() const noexcept -> int - { - return adw_action_row_get_subtitle_lines(const_cast(unwrap(this))); - } - - auto ActionRow::get_subtitle_selectable() const noexcept -> bool - { - return adw_action_row_get_subtitle_selectable(const_cast(unwrap(this))); - } - - auto ActionRow::get_title_lines() const noexcept -> int - { - return adw_action_row_get_title_lines(const_cast(unwrap(this))); - } - - auto ActionRow::set_activatable_widget(Gtk::Widget & widget) noexcept -> void - { - adw_action_row_set_activatable_widget(unwrap(this), unwrap(&widget)); - } - - auto ActionRow::set_icon_name(Glib::ustring const & name) -> void - { -#pragma GCC diagnostic push -#pragma GCC diagnostic ignored "-Wdeprecated-declarations" - adw_action_row_set_icon_name(unwrap(this), name.c_str()); -#pragma GCC diagnostic pop - } - - auto ActionRow::set_subtitle(Glib::ustring const & subtitle) -> void - { - adw_action_row_set_subtitle(unwrap(this), subtitle.c_str()); - } - - auto ActionRow::set_subtitle_lines(int subtitle_lines) noexcept -> void - { - adw_action_row_set_subtitle_lines(unwrap(this), subtitle_lines); - } - - auto ActionRow::set_subtitle_selectable(bool subtitle_selectable) noexcept -> void - { - adw_action_row_set_subtitle_selectable(unwrap(this), static_cast(subtitle_selectable)); - } - - auto ActionRow::set_title_lines(int title_lines) noexcept -> void - { - adw_action_row_set_title_lines(unwrap(this), title_lines); - } - - auto ActionRow::property_activatable_widget() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::activatable_widget); - } - - auto ActionRow::property_activatable_widget() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::activatable_widget); - } - - auto ActionRow::property_icon_name() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::icon_name); - } - - auto ActionRow::property_icon_name() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::icon_name); - } - - auto ActionRow::property_subtitle() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::subtitle); - } - - auto ActionRow::property_subtitle() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle); - } - - auto ActionRow::property_subtitle_lines() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::subtitle_lines); - } - - auto ActionRow::property_subtitle_lines() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle_lines); - } - - auto ActionRow::property_subtitle_selectable() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::subtitle_selectable); - } - - auto ActionRow::property_subtitle_selectable() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::subtitle_selectable); - } - - auto ActionRow::property_title_lines() noexcept -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, property_name::title_lines); - } - - auto ActionRow::property_title_lines() const noexcept -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, property_name::title_lines); - } - - auto ActionRow::signal_activated() -> Glib::SignalProxy - { - return Glib::SignalProxy{this, &signal_info::activated}; - } - - auto ActionRow::activate_vfunc() -> void - { - auto base_object = static_cast(g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))); - if (base_object && base_object->activate) - { - (base_object->activate)(unwrap(this)); - } - } - - ActionRow::ActionRow(Glib::ConstructParams const & params) - : PreferencesRow{params} - { - } - - ActionRow::ActionRow(BaseObjectType * gobj) - : PreferencesRow(ADW_PREFERENCES_ROW(gobj)) - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwActionRow * object, bool copy) -> Adwaita::ActionRow * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/alertdialog.cpp b/adw/src/alertdialog.cpp deleted file mode 100644 index 0e91e68..0000000 --- a/adw/src/alertdialog.cpp +++ /dev/null @@ -1,108 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/alertdialog.hpp" - -#include "adwaitamm/dialog.hpp" -#include "adwaitamm/helpers/async_callback.hpp" -#include "adwaitamm/private/alertdialog_p.hpp" - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include - -namespace Adwaita -{ - - namespace - { - auto constinit _class = AlertDialog_Class{}; - } // namespace - - auto AlertDialog::create(Glib::ustring heading, Glib::ustring body) -> Glib::RefPtr - { - return Glib::RefPtr{new AlertDialog(heading, body)}; - } - - auto AlertDialog::get_type() -> GType - { - return _class.init().get_type(); - } - - auto AlertDialog::get_base_type() -> GType - { - return adw_alert_dialog_get_type(); - } - - AlertDialog::AlertDialog(Glib::ConstructParams const & params) - : Dialog{params} - { - } - - AlertDialog::AlertDialog(BaseObjectType * gobj) - : Dialog(ADW_DIALOG(gobj)) - { - } - - AlertDialog::AlertDialog(Glib::ustring heading, Glib::ustring body) - : Glib::ObjectBase{nullptr} - , Dialog{Glib::ConstructParams{_class.init(), "heading", heading.c_str(), "body", Glib::c_str_or_nullptr(body), nullptr}} - { - } - - auto AlertDialog::add_response(Glib::ustring id, Glib::ustring label) -> void - { - adw_alert_dialog_add_response(Glib::unwrap(this), id.c_str(), label.c_str()); - } - - auto AlertDialog::choose(Gtk::Widget & parent, Glib::RefPtr const & cancellable, Gio::SlotAsyncReady const & slot) -> void - { - adw_alert_dialog_choose(unwrap(this), - parent.gobj(), - const_cast(unwrap(cancellable)), - &helpers::async_callback, - new Gio::SlotAsyncReady(slot)); - } - - auto AlertDialog::choose_finish(Glib::RefPtr const & result) -> Glib::ustring - { - return adw_alert_dialog_choose_finish(Glib::unwrap(this), Glib::unwrap(result)); - } - - auto AlertDialog::set_close_response(Glib::ustring id) -> void - { - adw_alert_dialog_set_close_response(unwrap(this), id.c_str()); - } - - auto AlertDialog::set_default_response(Glib::ustring id) -> void - { - adw_alert_dialog_set_default_response(unwrap(this), id.c_str()); - } - - auto AlertDialog::set_response_appearance(Glib::ustring id, ResponseAppearance value) -> void - { - adw_alert_dialog_set_response_appearance(unwrap(this), id.c_str(), static_cast(static_cast(value))); - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwAlertDialog * object, bool copy) -> Adwaita::AlertDialog * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/application.cpp b/adw/src/application.cpp deleted file mode 100644 index a50d133..0000000 --- a/adw/src/application.cpp +++ /dev/null @@ -1,89 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/application.hpp" - -#include "adwaitamm/private/application_p.hpp" -#include "adwaitamm/wrap_init.hpp" - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#include -#include -#include - -namespace Adwaita -{ - namespace - { - auto constinit _class = Application_Class{}; - } // namespace - - auto Application::get_type() -> GType - { - return _class.init().get_type(); - } - - auto Application::get_base_type() -> GType - { - return adw_application_get_type(); - } - - auto Application::create(Glib::ustring const & id, Gio::Application::Flags flags) -> Glib::RefPtr - { - return Glib::RefPtr(new Application(id, flags)); - } - - Glib::Class const & Application::custom_class_init() - { - - auto static did_init{false}; - if (!did_init) - { - Gtk::init_gtkmm_internals(); - wrap_init(); - } - - return _class.init(); - } - - Application::Application(Glib::ConstructParams const & params) - : Gtk::Application{params} - { - } - - Application::Application(AdwApplication * gobj) - : Gtk::Application((GtkApplication *)gobj) - { - } - - Application::Application(Glib::ustring const & id, Gio::Application::Flags flags) - : Glib::ObjectBase{nullptr} - , Gtk::Application{Glib::ConstructParams{custom_class_init(), "application_id", Glib::c_str_or_nullptr(id), "flags", static_cast(flags), nullptr}} - { - adw_init(); - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwApplication * object, bool copy) -> Glib::RefPtr - { - return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/applicationwindow.cpp b/adw/src/applicationwindow.cpp deleted file mode 100644 index 5b01cfb..0000000 --- a/adw/src/applicationwindow.cpp +++ /dev/null @@ -1,62 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/applicationwindow.hpp" - -#include "adwaitamm/private/applicationwindow_p.hpp" - -#include -#include -#include - -#include -#include - -#include -#include - -namespace Adwaita -{ - namespace - { - auto constinit _class = ApplicationWindow_Class{}; - } // namespace - - auto ApplicationWindow::get_type() -> GType - { - return _class.init().get_type(); - } - - auto ApplicationWindow::get_base_type() -> GType - { - return adw_application_window_get_type(); - } - - ApplicationWindow::ApplicationWindow(Gtk::Application & app) - : Glib::ObjectBase{nullptr} - , Gtk::ApplicationWindow{Glib::ConstructParams{_class.init(), "app", &app, nullptr}} - { - } - - ApplicationWindow::ApplicationWindow(Glib::ConstructParams const & params) - : Gtk::ApplicationWindow{params} - { - } - - ApplicationWindow::ApplicationWindow(BaseObjectType * gobj) - : Gtk::ApplicationWindow(GTK_APPLICATION_WINDOW(gobj)) - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwApplicationWindow * object, bool copy) -> Adwaita::ApplicationWindow * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/breakpoint.cpp b/adw/src/breakpoint.cpp deleted file mode 100644 index be275e1..0000000 --- a/adw/src/breakpoint.cpp +++ /dev/null @@ -1,146 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/breakpoint.hpp" - -#include "adwaitamm/enums.hpp" -#include "adwaitamm/private/breakpoint_p.hpp" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -namespace Adwaita -{ - - BreakpointCondition::BreakpointCondition(BreakpointCondition const & other) - : BreakpointCondition{adw_breakpoint_condition_copy(other.m_object)} - { - } - - BreakpointCondition::BreakpointCondition(BreakpointCondition && other) - : BreakpointCondition{std::exchange(other.m_object, nullptr)} - { - } - - BreakpointCondition::BreakpointCondition(LengthType type, double value, int unit) - : BreakpointCondition{adw_breakpoint_condition_new_length(static_cast(static_cast(type)), - value, - static_cast(unit))} - { - } - - BreakpointCondition::BreakpointCondition(RatioType type, int width, int height) - : BreakpointCondition{ - adw_breakpoint_condition_new_ratio(static_cast(static_cast(type)), width, height)} - { - } - - BreakpointCondition::BreakpointCondition(AdwBreakpointCondition * object) - : m_object{object} - { - } - - BreakpointCondition::~BreakpointCondition() noexcept - { - if (m_object) - { - adw_breakpoint_condition_free(m_object); - m_object = nullptr; - } - } - - auto BreakpointCondition::operator&&(BreakpointCondition & rhs) & -> BreakpointCondition - { - return BreakpointCondition{adw_breakpoint_condition_new_and(m_object, rhs.m_object)}; - } - - auto BreakpointCondition::operator||(BreakpointCondition & rhs) & -> BreakpointCondition - { - return BreakpointCondition{adw_breakpoint_condition_new_or(m_object, rhs.m_object)}; - } - - BreakpointCondition::operator Glib::ustring() const - { - return adw_breakpoint_condition_to_string(const_cast(m_object)); - } - - auto BreakpointCondition::parse(Glib::ustring str) -> std::optional - { - if (auto object = adw_breakpoint_condition_parse(str.c_str())) - { - return BreakpointCondition{object}; - } - return std::nullopt; - } - -} // namespace Adwaita - -namespace Adwaita -{ - namespace - { - auto constinit _class = Breakpoint_Class{}; - } // namespace - - Breakpoint::Breakpoint(BreakpointCondition & condition) - : Glib::ObjectBase{nullptr} - , Glib::Object{Glib::ConstructParams{_class.init(), "condition", condition.m_object, nullptr}} - { - } - - Breakpoint::Breakpoint(Glib::ConstructParams const & params) - : Glib::Object{params} - { - } - - Breakpoint::Breakpoint(BaseObjectType * gobj) - : Glib::Object{G_OBJECT(gobj)} - { - } - - auto Breakpoint::create(BreakpointCondition & condition) -> Glib::RefPtr - { - return Glib::make_refptr_for_instance(new Breakpoint(condition)); - } - - auto Breakpoint::get_type() -> GType - { - return _class.init().get_type(); - } - - auto Breakpoint::get_base_type() -> GType - { - return adw_breakpoint_get_type(); - } - - auto Breakpoint::property_condition() -> Glib::PropertyProxy - { - return Glib::PropertyProxy(this, "condition"); - } - - auto Breakpoint::property_condition() const -> Glib::PropertyProxy_ReadOnly - { - return Glib::PropertyProxy_ReadOnly(this, "condition"); - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwBreakpoint * object, bool copy) -> Glib::RefPtr - { - return Glib::make_refptr_for_instance(dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy))); - } -} // namespace Glib diff --git a/adw/src/comborow.cpp b/adw/src/comborow.cpp deleted file mode 100644 index 27e97fe..0000000 --- a/adw/src/comborow.cpp +++ /dev/null @@ -1,273 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/comborow.hpp" - -#include "adwaitamm/actionrow.hpp" -#include "adwaitamm/private/comborow_p.hpp" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include -#include - -namespace Adwaita -{ - namespace - { - auto constinit _class = ComboRow_Class{}; - - namespace property_name - { - auto constexpr enable_search = "enable_search"; - auto constexpr expression = "expression"; - auto constexpr factory = "factory"; - auto constexpr header_factory = "header-factory"; - auto constexpr list_factory = "list-factory"; - auto constexpr model = "model"; - auto constexpr search_match_mode = "search-match-mode"; - auto constexpr selected = "selected"; - auto constexpr selected_item = "selected-item"; - auto constexpr use_subtitle = "use-subtitle"; - } // namespace property_name - } // namespace - - ComboRow::ComboRow() - : Glib::ObjectBase{nullptr} - , ActionRow{Glib::ConstructParams{_class.init()}} - { - } - - auto ComboRow::get_type() -> GType - { - return _class.init().get_type(); - } - - auto ComboRow::get_base_type() -> GType - { - return adw_combo_row_get_type(); - } - - auto ComboRow::get_enable_search() const -> bool - { - return adw_combo_row_get_enable_search(const_cast(unwrap(this))); - } - - auto ComboRow::get_expression() const -> Glib::RefPtr> - { - return Glib::wrap(adw_combo_row_get_expression(const_cast(unwrap(this))), true); - } - - auto ComboRow::get_factory() const -> Glib::RefPtr - { - return Glib::wrap(adw_combo_row_get_factory(const_cast(unwrap(this))), true); - } - - auto ComboRow::get_header_factory() const -> Glib::RefPtr - { - return Glib::wrap(adw_combo_row_get_header_factory(const_cast(unwrap(this))), true); - } - - auto ComboRow::get_list_factory() const -> Glib::RefPtr - { - return Glib::wrap(adw_combo_row_get_list_factory(const_cast(unwrap(this))), true); - } - - auto ComboRow::get_model() const -> Glib::RefPtr - { - return Glib::wrap(adw_combo_row_get_model(const_cast(unwrap(this))), true); - } - - auto ComboRow::get_search_match_mode() const -> Gtk::StringFilter::MatchMode - { - return static_cast(adw_combo_row_get_search_match_mode(const_cast(unwrap(this)))); - } - - auto ComboRow::get_selected() const -> unsigned int - { - return adw_combo_row_get_selected(const_cast(unwrap(this))); - } - - auto ComboRow::get_selected_item() const -> Glib::RefPtr - { - return Glib::wrap(G_OBJECT(adw_combo_row_get_selected_item(const_cast(unwrap(this))))); - } - - auto ComboRow::get_use_subtitle() const -> bool - { - return adw_combo_row_get_use_subtitle(const_cast(unwrap(this))); - } - - auto ComboRow::set_enable_search(bool value) -> void - { - return adw_combo_row_set_enable_search(unwrap(this), value); - } - - auto ComboRow::set_expression(Glib::RefPtr> const & value) -> void - { - return adw_combo_row_set_expression(unwrap(this), value ? value->gobj() : nullptr); - } - - auto ComboRow::set_factory(Glib::RefPtr const & value) -> void - { - return adw_combo_row_set_factory(unwrap(this), value ? value->gobj() : nullptr); - } - - auto ComboRow::set_header_factory(Glib::RefPtr const & value) -> void - { - return adw_combo_row_set_header_factory(unwrap(this), value ? value->gobj() : nullptr); - } - - auto ComboRow::set_list_factory(Glib::RefPtr const & value) -> void - { - return adw_combo_row_set_list_factory(unwrap(this), value ? value->gobj() : nullptr); - } - - auto ComboRow::set_model(Glib::RefPtr const & value) -> void - { - return adw_combo_row_set_model(unwrap(this), value ? value->gobj() : nullptr); - } - - auto ComboRow::set_search_match_mode(Gtk::StringFilter::MatchMode value) -> void - { - return adw_combo_row_set_search_match_mode(unwrap(this), static_cast(value)); - } - - auto ComboRow::set_selected(unsigned int value) -> void - { - return adw_combo_row_set_selected(unwrap(this), value); - } - - auto ComboRow::set_use_subtitle(bool value) -> void - { - return adw_combo_row_set_use_subtitle(unwrap(this), value); - } - - auto ComboRow::property_enable_search() -> Glib::PropertyProxy - { - return {this, property_name::enable_search}; - } - - auto ComboRow::property_enable_search() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::enable_search}; - } - - auto ComboRow::property_expression() -> Glib::PropertyProxy>> - { - return {this, property_name::expression}; - } - - auto ComboRow::property_expression() const -> Glib::PropertyProxy_ReadOnly>> - { - return {this, property_name::expression}; - } - - auto ComboRow::property_factory() -> Glib::PropertyProxy> - { - return {this, property_name::factory}; - } - - auto ComboRow::property_factory() const -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::factory}; - } - - auto ComboRow::property_header_factory() -> Glib::PropertyProxy> - { - return {this, property_name::header_factory}; - } - - auto ComboRow::property_header_factory() const -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::header_factory}; - } - - auto ComboRow::property_list_factory() -> Glib::PropertyProxy> - { - return {this, property_name::list_factory}; - } - - auto ComboRow::property_list_factory() const -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::list_factory}; - } - - auto ComboRow::property_model() -> Glib::PropertyProxy> - { - return {this, property_name::model}; - } - - auto ComboRow::property_model() const -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::model}; - } - - auto ComboRow::property_search_match_mode() -> Glib::PropertyProxy - { - return {this, property_name::search_match_mode}; - } - - auto ComboRow::property_search_match_mode() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::search_match_mode}; - } - - auto ComboRow::property_selected() -> Glib::PropertyProxy - { - return {this, property_name::selected}; - } - - auto ComboRow::property_selected() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::selected}; - } - - auto ComboRow::property_selected_item() -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::selected_item}; - } - - auto ComboRow::property_use_subtitle() -> Glib::PropertyProxy - { - return {this, property_name::use_subtitle}; - } - - auto ComboRow::property_use_subtitle() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::use_subtitle}; - } - - ComboRow::ComboRow(Glib::ConstructParams const & params) - : ActionRow{params} - { - } - - ComboRow::ComboRow(BaseObjectType * gobj) - : ActionRow(ADW_ACTION_ROW(gobj)) - { - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwComboRow * object, bool copy) -> Adwaita::ComboRow * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/dialog.cpp b/adw/src/dialog.cpp deleted file mode 100644 index 65da6a2..0000000 --- a/adw/src/dialog.cpp +++ /dev/null @@ -1,338 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/dialog.hpp" - -#include "adwaitamm/breakpoint.hpp" -#include "adwaitamm/enums.hpp" -#include "adwaitamm/private/dialog_p.hpp" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include - -namespace Adwaita -{ - - namespace - { - auto constinit _class = Dialog_Class{}; - - namespace property_name - { - auto constexpr can_close = "can-close"; - auto constexpr child = "child"; - auto constexpr content_height = "content-height"; - auto constexpr content_width = "content-width"; - auto constexpr current_breakpoint = "current-breakpoint"; - auto constexpr default_widget = "default-widget"; - auto constexpr focus_widget = "focus-widget"; - auto constexpr follows_content_size = "follows_content_size"; - auto constexpr presentation_mode = "presentation_mode"; - auto constexpr title = "title"; - } // namespace property_name - - namespace signal_info - { - auto const close_attempt = Glib::SignalProxyInfo{ - "close-attempt", - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - }; - - auto const closed = Glib::SignalProxyInfo{ - "closed", - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - reinterpret_cast(&Glib::SignalProxyNormal::slot0_void_callback), - }; - } // namespace signal_info - } // namespace - - auto Dialog::get_type() -> GType - { - return _class.init().get_type(); - } - - auto Dialog::get_base_type() -> GType - { - return adw_dialog_get_type(); - } - - Dialog::Dialog(Glib::ConstructParams const & params) - : Gtk::Widget{params} - { - } - - Dialog::Dialog(AdwDialog * gobj) - : Gtk::Widget(GTK_WIDGET(gobj)) - { - } - - Dialog::Dialog() - : Glib::ObjectBase{nullptr} - , Gtk::Widget{Glib::ConstructParams{_class.init()}} - { - } - - auto Dialog::add_breakpoint(Glib::RefPtr const & breakpoint) -> void - { - // Take a copy because the dialog will take ownership of the breakpoint. - adw_dialog_add_breakpoint(unwrap(this), Glib::unwrap_copy(breakpoint)); - } - - auto Dialog::close() -> void - { - adw_dialog_close(unwrap(this)); - } - - auto Dialog::force_close() -> void - { - adw_dialog_force_close(unwrap(this)); - } - - auto Dialog::present(Gtk::Widget * parent) -> void - { - adw_dialog_present(unwrap(this), Glib::unwrap(parent)); - } - - auto Dialog::get_can_close() const -> bool - { - return adw_dialog_get_can_close(const_cast(unwrap(this))); - } - - auto Dialog::get_child() const -> Gtk::Widget * - { - return Glib::wrap(adw_dialog_get_child(const_cast(unwrap(this))), true); - } - - auto Dialog::get_content_height() const -> int - { - return adw_dialog_get_content_height(const_cast(unwrap(this))); - } - - auto Dialog::get_content_width() const -> int - { - return adw_dialog_get_content_width(const_cast(unwrap(this))); - } - - auto Dialog::get_current_breakpoint() const -> Glib::RefPtr - { - return Glib::wrap(adw_dialog_get_current_breakpoint(const_cast(unwrap(this))), true); - } - - auto Dialog::get_default_widget() const -> Gtk::Widget * - { - return Glib::wrap(adw_dialog_get_default_widget(const_cast(unwrap(this)))); - } - - auto Dialog::get_focus() const -> Gtk::Widget * - { - return Glib::wrap(adw_dialog_get_focus(const_cast(unwrap(this)))); - } - - auto Dialog::get_follows_content_size() const -> bool - { - return adw_dialog_get_follows_content_size(const_cast(unwrap(this))); - } - - auto Dialog::get_presentation_mode() const -> PresentationMode - { - return static_cast(adw_dialog_get_presentation_mode(const_cast(unwrap(this)))); - } - - auto Dialog::get_title() const -> Glib::ustring - { - return adw_dialog_get_title(const_cast(unwrap(this))); - } - - auto Dialog::set_can_close(bool value) -> void - { - return adw_dialog_set_can_close(unwrap(this), static_cast(value)); - } - - auto Dialog::set_child(Gtk::Widget & value) -> void - { - return adw_dialog_set_child(unwrap(this), unwrap(&value)); - } - - auto Dialog::set_content_height(int value) -> void - { - return adw_dialog_set_content_height(unwrap(this), value); - } - - auto Dialog::set_content_width(int value) -> void - { - return adw_dialog_set_content_width(unwrap(this), value); - } - - auto Dialog::set_default_widget(Gtk::Widget & value) -> void - { - return adw_dialog_set_default_widget(unwrap(this), unwrap(&value)); - } - - auto Dialog::set_focus(Gtk::Widget & value) -> void - { - return adw_dialog_set_focus(unwrap(this), unwrap(&value)); - } - - auto Dialog::set_follows_content_size(bool value) -> void - { - return adw_dialog_set_follows_content_size(unwrap(this), value); - } - - auto Dialog::set_presentation_mode(PresentationMode value) -> void - { - return adw_dialog_set_presentation_mode(unwrap(this), static_cast(value)); - } - - auto Dialog::set_title(Glib::ustring const & str) -> void - { - return adw_dialog_set_title(unwrap(this), Glib::c_str_or_nullptr(str)); - } - - auto Dialog::property_can_close() -> Glib::PropertyProxy - { - return {this, property_name::can_close}; - } - - auto Dialog::property_can_close() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::can_close}; - } - - auto Dialog::property_child() -> Glib::PropertyProxy - { - return {this, property_name::child}; - } - - auto Dialog::property_child() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::child}; - } - - auto Dialog::property_content_height() -> Glib::PropertyProxy - { - return {this, property_name::content_height}; - } - - auto Dialog::property_content_height() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::content_height}; - } - - auto Dialog::property_content_width() -> Glib::PropertyProxy - { - return {this, property_name::content_width}; - } - - auto Dialog::property_content_width() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::content_width}; - } - - auto Dialog::property_current_breakpoint() const -> Glib::PropertyProxy_ReadOnly> - { - return {this, property_name::current_breakpoint}; - } - - auto Dialog::property_default_widget() -> Glib::PropertyProxy - { - return {this, property_name::default_widget}; - } - - auto Dialog::property_default_widget() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::default_widget}; - } - - auto Dialog::property_focus_widget() -> Glib::PropertyProxy - { - return {this, property_name::focus_widget}; - } - - auto Dialog::property_focus_widget() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::focus_widget}; - } - - auto Dialog::property_follows_content_size() -> Glib::PropertyProxy - { - return {this, property_name::follows_content_size}; - } - - auto Dialog::property_follows_content_size() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::follows_content_size}; - } - - auto Dialog::property_presentation_mode() -> Glib::PropertyProxy - { - return {this, property_name::presentation_mode}; - } - - auto Dialog::property_presentation_mode() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::presentation_mode}; - } - - auto Dialog::property_title() -> Glib::PropertyProxy - { - return {this, property_name::title}; - } - - auto Dialog::property_title() const -> Glib::PropertyProxy_ReadOnly - { - return {this, property_name::title}; - } - - auto Dialog::signal_close_attempt() -> Glib::SignalProxy - { - return {this, &signal_info::close_attempt}; - } - - auto Dialog::signal_closed() -> Glib::SignalProxy - { - return {this, &signal_info::closed}; - } - - auto Dialog::on_close_attempt() -> void - { - auto base_class = static_cast(g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))); - if (base_class && base_class->close_attempt) - { - return (base_class->close_attempt)(unwrap(this)); - } - } - - auto Dialog::on_closed() -> void - { - auto base_class = static_cast(g_type_class_peek_parent(G_OBJECT_GET_CLASS(gobject_))); - if (base_class && base_class->closed) - { - return (base_class->closed)(unwrap(this)); - } - } - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwDialog * object, bool copy) -> Adwaita::Dialog * - { - return dynamic_cast(Glib::wrap_auto(G_OBJECT(object), copy)); - } -} // namespace Glib \ No newline at end of file diff --git a/adw/src/entryrow.cpp b/adw/src/entryrow.cpp deleted file mode 100644 index b6053fd..0000000 --- a/adw/src/entryrow.cpp +++ /dev/null @@ -1,282 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#include "adwaitamm/entryrow.hpp" - -#include "adwaitam