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 --- .gitmodules | 3 + CMakeLists.txt | 7 +- adw/CMakeLists.txt | 65 --- adw/include/adwaitamm/aboutdialog.hpp | 170 ------ adw/include/adwaitamm/actionrow.hpp | 109 ---- adw/include/adwaitamm/alertdialog.hpp | 76 --- adw/include/adwaitamm/application.hpp | 68 --- adw/include/adwaitamm/applicationwindow.hpp | 62 --- adw/include/adwaitamm/breakpoint.hpp | 96 ---- adw/include/adwaitamm/comborow.hpp | 116 ---- adw/include/adwaitamm/dialog.hpp | 128 ----- adw/include/adwaitamm/entryrow.hpp | 122 ----- adw/include/adwaitamm/enums.hpp | 97 ---- adw/include/adwaitamm/helpers/async_callback.hpp | 15 - adw/include/adwaitamm/helpers/gobj_mixin.hpp | 45 -- adw/include/adwaitamm/preferencesdialog.hpp | 61 --- adw/include/adwaitamm/preferencespage.hpp | 59 -- adw/include/adwaitamm/preferencesrow.hpp | 80 --- adw/include/adwaitamm/private/aboutdialog_p.hpp | 35 -- adw/include/adwaitamm/private/actionrow_p.hpp | 38 -- adw/include/adwaitamm/private/alertdialog_p.hpp | 35 -- adw/include/adwaitamm/private/application_p.hpp | 35 -- .../adwaitamm/private/applicationwindow_p.hpp | 35 -- adw/include/adwaitamm/private/breakpoint_p.hpp | 36 -- adw/include/adwaitamm/private/comborow_p.hpp | 35 -- adw/include/adwaitamm/private/dialog_p.hpp | 39 -- adw/include/adwaitamm/private/entryrow_p.hpp | 35 -- .../adwaitamm/private/preferencesdialog_p.hpp | 35 -- .../adwaitamm/private/preferencespage_p.hpp | 35 -- adw/include/adwaitamm/private/preferencesrow_p.hpp | 35 -- adw/include/adwaitamm/private/spinrow_p.hpp | 35 -- adw/include/adwaitamm/private/stylemanager_p.hpp | 36 -- adw/include/adwaitamm/private/switchrow_p.hpp | 35 -- adw/include/adwaitamm/private/toast_p.hpp | 36 -- adw/include/adwaitamm/private/toastoverlay_p.hpp | 35 -- adw/include/adwaitamm/private/windowtitle_p.hpp | 39 -- adw/include/adwaitamm/spinrow.hpp | 117 ---- adw/include/adwaitamm/stylemanager.hpp | 79 --- adw/include/adwaitamm/switchrow.hpp | 67 --- adw/include/adwaitamm/toast.hpp | 119 ---- adw/include/adwaitamm/toastoverlay.hpp | 68 --- adw/include/adwaitamm/windowtitle.hpp | 78 --- adw/include/adwaitamm/wrap_init.hpp | 15 - 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 ---- deps/libadwaitamm | 1 + 83 files changed, 8 insertions(+), 7095 deletions(-) create mode 100644 .gitmodules delete mode 100644 adw/CMakeLists.txt delete mode 100644 adw/include/adwaitamm/aboutdialog.hpp delete mode 100644 adw/include/adwaitamm/actionrow.hpp delete mode 100644 adw/include/adwaitamm/alertdialog.hpp delete mode 100644 adw/include/adwaitamm/application.hpp delete mode 100644 adw/include/adwaitamm/applicationwindow.hpp delete mode 100644 adw/include/adwaitamm/breakpoint.hpp delete mode 100644 adw/include/adwaitamm/comborow.hpp delete mode 100644 adw/include/adwaitamm/dialog.hpp delete mode 100644 adw/include/adwaitamm/entryrow.hpp delete mode 100644 adw/include/adwaitamm/enums.hpp delete mode 100644 adw/include/adwaitamm/helpers/async_callback.hpp delete mode 100644 adw/include/adwaitamm/helpers/gobj_mixin.hpp delete mode 100644 adw/include/adwaitamm/preferencesdialog.hpp delete mode 100644 adw/include/adwaitamm/preferencespage.hpp delete mode 100644 adw/include/adwaitamm/preferencesrow.hpp delete mode 100644 adw/include/adwaitamm/private/aboutdialog_p.hpp delete mode 100644 adw/include/adwaitamm/private/actionrow_p.hpp delete mode 100644 adw/include/adwaitamm/private/alertdialog_p.hpp delete mode 100644 adw/include/adwaitamm/private/application_p.hpp delete mode 100644 adw/include/adwaitamm/private/applicationwindow_p.hpp delete mode 100644 adw/include/adwaitamm/private/breakpoint_p.hpp delete mode 100644 adw/include/adwaitamm/private/comborow_p.hpp delete mode 100644 adw/include/adwaitamm/private/dialog_p.hpp delete mode 100644 adw/include/adwaitamm/private/entryrow_p.hpp delete mode 100644 adw/include/adwaitamm/private/preferencesdialog_p.hpp delete mode 100644 adw/include/adwaitamm/private/preferencespage_p.hpp delete mode 100644 adw/include/adwaitamm/private/preferencesrow_p.hpp delete mode 100644 adw/include/adwaitamm/private/spinrow_p.hpp delete mode 100644 adw/include/adwaitamm/private/stylemanager_p.hpp delete mode 100644 adw/include/adwaitamm/private/switchrow_p.hpp delete mode 100644 adw/include/adwaitamm/private/toast_p.hpp delete mode 100644 adw/include/adwaitamm/private/toastoverlay_p.hpp delete mode 100644 adw/include/adwaitamm/private/windowtitle_p.hpp delete mode 100644 adw/include/adwaitamm/spinrow.hpp delete mode 100644 adw/include/adwaitamm/stylemanager.hpp delete mode 100644 adw/include/adwaitamm/switchrow.hpp delete mode 100644 adw/include/adwaitamm/toast.hpp delete mode 100644 adw/include/adwaitamm/toastoverlay.hpp delete mode 100644 adw/include/adwaitamm/windowtitle.hpp delete mode 100644 adw/include/adwaitamm/wrap_init.hpp 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 create mode 160000 deps/libadwaitamm diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..c151109 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "deps/libadwaitamm"] + path = deps/libadwaitamm + url = ../libadwaitamm.git diff --git a/CMakeLists.txt b/CMakeLists.txt index ba4b133..39423a9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,8 +32,8 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/lib") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/bin") -set(GLIB_MINIMUM_VERSION "2.80") -set(GTK4_MINIMUM_VERSION "4.14") +set(GLIB_MINIMUM_VERSION "2.84") +set(GTK4_MINIMUM_VERSION "4.16") # Build options @@ -68,11 +68,12 @@ pkg_check_modules("giomm" IMPORTED_TARGET REQUIRED "giomm-2.68>=${GLIB_MINIMUM_V pkg_check_modules("glibmm" IMPORTED_TARGET REQUIRED "glibmm-2.68>=${GLIB_MINIMUM_VERSION}") pkg_check_modules("gtkmm" IMPORTED_TARGET REQUIRED "gtkmm-4.0>=${GTK4_MINIMUM_VERSION}") +add_subdirectory("deps/libadwaitamm" EXCLUDE_FROM_ALL SYSTEM) + include("Catch") # Targets -add_subdirectory("adw") add_subdirectory("app") add_subdirectory("core") add_subdirectory("lang") diff --git a/adw/CMakeLists.txt b/adw/CMakeLists.txt deleted file mode 100644 index 6b08199..0000000 --- a/adw/CMakeLists.txt +++ /dev/null @@ -1,65 +0,0 @@ -cmake_minimum_required(VERSION "3.30.0") - -project("adwaitamm" - LANGUAGES CXX - VERSION "1.7.0" - DESCRIPTION "C++ wrapper for libadwaita" -) - -include("GNUInstallDirs") - -find_package("PkgConfig" REQUIRED) - -pkg_check_modules("adwaita" IMPORTED_TARGET REQUIRED "libadwaita-1>=1.7.0") -pkg_check_modules("giomm" IMPORTED_TARGET REQUIRED "giomm-2.68>=2.80") -pkg_check_modules("glibmm" IMPORTED_TARGET REQUIRED "glibmm-2.68>=2.80") - -add_library("adwaitamm") - -file(GLOB_RECURSE ADWAITAMM_SOURCES RELATIVE "${PROJECT_SOURCE_DIR}" CONFIGURE_DEPENDS "src/**.cpp") - -target_sources("adwaitamm" PRIVATE - ${ADWAITAMM_SOURCES} -) - -file(GLOB_RECURSE ADWAITAMM_HEADERS RELATIVE "${PROJECT_SOURCE_DIR}" CONFIGURE_DEPENDS "include/**/*.hpp") - -target_sources("adwaitamm" PUBLIC - FILE_SET HEADERS - FILES ${ADWAITAMM_HEADERS} - BASE_DIRS "include" -) - -target_include_directories("adwaitamm" SYSTEM PUBLIC - "$" - "$" -) - -target_compile_features("adwaitamm" PUBLIC - "cxx_std_20" -) - -target_compile_options("adwaitamm" PRIVATE - "$<$:-Wall>" - "$<$:-Wextra>" - "$<$:-Werror>" - "$<$:-pedantic-errors>" -) - -target_link_libraries("adwaitamm" PUBLIC - "PkgConfig::adwaita" - "PkgConfig::gtkmm" -) - -set_target_properties("adwaitamm" PROPERTIES - CXX_EXTENSIONS NO - CXX_STANDARD_REQUIRED YES -) - -add_library("adwaitamm::adwaitamm" ALIAS "adwaitamm") - -install(TARGETS "adwaitamm" - FILE_SET HEADERS - ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" - LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}" -) \ No newline at end of file diff --git a/adw/include/adwaitamm/aboutdialog.hpp b/adw/include/adwaitamm/aboutdialog.hpp deleted file mode 100644 index 86f6751..0000000 --- a/adw/include/adwaitamm/aboutdialog.hpp +++ /dev/null @@ -1,170 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_ABOUT_DIALOG_HPP -#define LIBADWAITAMM_ABOUT_DIALOG_HPP - -#include "adwaitamm/dialog.hpp" -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include -#include - -#include - -#include - -#include -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - enum struct ResponseAppearance; - - struct AboutDialog final : Dialog, - helpers::gobj_mixin - { - using BaseObjectType = AdwAboutDialog; - using BaseClassType = AdwAboutDialogClass; - using CppObjectType = AboutDialog; - using CppClassType = struct AboutDialog_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - AboutDialog(); - AboutDialog(std::string resource_path, std::string release_notes_version); - AboutDialog(AboutDialog const & other) = delete; - AboutDialog(AboutDialog && other) noexcept = default; - - auto operator=(AboutDialog const & other) noexcept -> AboutDialog & = delete; - auto operator=(AboutDialog && other) noexcept -> AboutDialog & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto add_acknowledgement_section(Glib::ustring const & name, std::vector const & people) -> void; - auto add_credit_section(Glib::ustring const & name, std::vector const & people) -> void; - auto - add_legal_section(Glib::ustring const & title, Glib::ustring const & copyright, Gtk::License license_type, Glib::ustring const & license) - -> void; - auto add_link(Glib::ustring const & title, Glib::ustring const & url) -> void; - auto add_other_app(Glib::ustring const & id, Glib::ustring const & name, Glib::ustring const & summary) -> void; - -#pragma mark - Getters - [[nodiscard]] auto get_application_icon() const -> Glib::ustring; - [[nodiscard]] auto get_application_name() const -> Glib::ustring; - [[nodiscard]] auto get_artists() const -> std::vector; - [[nodiscard]] auto get_comments() const -> Glib::ustring; - [[nodiscard]] auto get_copyright() const -> Glib::ustring; - [[nodiscard]] auto get_debug_info() const -> Glib::ustring; - [[nodiscard]] auto get_debug_info_filename() const -> Glib::ustring; - [[nodiscard]] auto get_designers() const -> std::vector; - [[nodiscard]] auto get_developer_name() const -> Glib::ustring; - [[nodiscard]] auto get_developers() const -> std::vector; - [[nodiscard]] auto get_documenters() const -> std::vector; - [[nodiscard]] auto get_issue_url() const -> Glib::ustring; - [[nodiscard]] auto get_license() const -> Glib::ustring; - [[nodiscard]] auto get_license_type() const -> Gtk::License; - [[nodiscard]] auto get_release_notes() const -> Glib::ustring; - [[nodiscard]] auto get_release_notes_version() const -> Glib::ustring; - [[nodiscard]] auto get_support_url() const -> Glib::ustring; - [[nodiscard]] auto get_translator_credits() const -> Glib::ustring; - [[nodiscard]] auto get_version() const -> Glib::ustring; - [[nodiscard]] auto get_website() const -> Glib::ustring; - -#pragma mark - Setters - auto set_application_icon(Glib::ustring const & value) -> void; - auto set_application_name(Glib::ustring const & value) -> void; - auto set_artists(std::vector const & value) -> void; - auto set_comments(Glib::ustring const & value) -> void; - auto set_copyright(Glib::ustring const & value) -> void; - auto set_debug_info(Glib::ustring const & value) -> void; - auto set_debug_info_filename(Glib::ustring const & value) -> void; - auto set_designers(std::vector const & value) -> void; - auto set_developer_name(Glib::ustring const & value) -> void; - auto set_developers(std::vector const & value) -> void; - auto set_documenters(std::vector const & value) -> void; - auto set_issue_url(Glib::ustring const & value) -> void; - auto set_license(Glib::ustring const & value) -> void; - auto set_license_type(Gtk::License const & value) -> void; - auto set_release_notes(Glib::ustring const & value) -> void; - auto set_release_notes_version(Glib::ustring const & value) -> void; - auto set_support_url(Glib::ustring const & value) -> void; - auto set_translator_credits(Glib::ustring const & value) -> void; - auto set_version(Glib::ustring const & value) -> void; - auto set_website(Glib::ustring const & value) -> void; - -#pragma mark - Properties - auto property_application_icon() -> Glib::PropertyProxy; - auto property_application_icon() const -> Glib::PropertyProxy_ReadOnly; - auto property_application_name() -> Glib::PropertyProxy; - auto property_application_name() const -> Glib::PropertyProxy_ReadOnly; - auto property_artists() -> Glib::PropertyProxy>; - auto property_artists() const -> Glib::PropertyProxy_ReadOnly>; - auto property_comments() -> Glib::PropertyProxy; - auto property_comments() const -> Glib::PropertyProxy_ReadOnly; - auto property_copyright() -> Glib::PropertyProxy; - auto property_copyright() const -> Glib::PropertyProxy_ReadOnly; - auto property_debug_info() -> Glib::PropertyProxy; - auto property_debug_info() const -> Glib::PropertyProxy_ReadOnly; - auto property_debug_info_filename() -> Glib::PropertyProxy; - auto property_debug_info_filename() const -> Glib::PropertyProxy_ReadOnly; - auto property_designers() -> Glib::PropertyProxy>; - auto property_designers() const -> Glib::PropertyProxy_ReadOnly>; - auto property_developer_name() -> Glib::PropertyProxy; - auto property_developer_name() const -> Glib::PropertyProxy_ReadOnly; - auto property_developers() -> Glib::PropertyProxy>; - auto property_developers() const -> Glib::PropertyProxy_ReadOnly>; - auto property_documenters() -> Glib::PropertyProxy>; - auto property_documenters() const -> Glib::PropertyProxy_ReadOnly>; - auto property_issue_url() -> Glib::PropertyProxy; - auto property_issue_url() const -> Glib::PropertyProxy_ReadOnly; - auto property_license_type() -> Glib::PropertyProxy; - auto property_license_type() const -> Glib::PropertyProxy_ReadOnly; - auto property_license() -> Glib::PropertyProxy; - auto property_license() const -> Glib::PropertyProxy_ReadOnly; - auto property_release_notes() -> Glib::PropertyProxy; - auto property_release_notes() const -> Glib::PropertyProxy_ReadOnly; - auto property_release_notes_version() -> Glib::PropertyProxy; - auto property_release_notes_version() const -> Glib::PropertyProxy_ReadOnly; - auto property_support_url() -> Glib::PropertyProxy; - auto property_support_url() const -> Glib::PropertyProxy_ReadOnly; - auto property_translator_credits() -> Glib::PropertyProxy; - auto property_translator_credits() const -> Glib::PropertyProxy_ReadOnly; - auto property_version() -> Glib::PropertyProxy; - auto property_version() const -> Glib::PropertyProxy_ReadOnly; - auto property_website() -> Glib::PropertyProxy; - auto property_website() const -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - auto signal_activate_link() -> Glib::SignalProxy; - - protected: - friend AboutDialog_Class; - -#pragma mark - Internal Constructors - explicit AboutDialog(Glib::ConstructParams const & params); - explicit AboutDialog(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwAboutDialog * object, bool copy = false) -> Adwaita::AboutDialog *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/actionrow.hpp b/adw/include/adwaitamm/actionrow.hpp deleted file mode 100644 index 8b5db03..0000000 --- a/adw/include/adwaitamm/actionrow.hpp +++ /dev/null @@ -1,109 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_ACTION_ROW_HPP -#define LIBADWAITAMM_ACTION_ROW_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" -#include "adwaitamm/preferencesrow.hpp" - -#include -#include -#include -#include -#include -#include - -#include - -#include -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct ActionRow : PreferencesRow, - helpers::gobj_mixin - { - using BaseObjectType = AdwActionRow; - using BaseClassType = AdwActionRowClass; - using CppObjectType = ActionRow; - using CppClassType = struct ActionRow_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - explicit ActionRow(); - ActionRow(ActionRow const & other) = delete; - ActionRow(ActionRow && other) noexcept = default; - - auto operator=(ActionRow const & other) noexcept -> ActionRow & = delete; - auto operator=(ActionRow && other) noexcept -> ActionRow & = default; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto activate() -> void; - auto add_prefix(Gtk::Widget & widget) -> void; - auto add_suffix(Gtk::Widget & widget) -> void; - auto remove(Gtk::Widget & widget) -> void; - -#pragma mark - Getters - auto get_activatable_widget() const noexcept -> Gtk::Widget *; - [[deprecated("replaced by add_prefix")]] auto get_icon_name() const -> Glib::ustring; - auto get_subtitle() const -> Glib::ustring; - auto get_subtitle_lines() const noexcept -> int; - auto get_subtitle_selectable() const noexcept -> bool; - auto get_title_lines() const noexcept -> int; - -#pragma mark - Setters - auto set_activatable_widget(Gtk::Widget & widget) noexcept -> void; - [[deprecated("replaced by add_prefix")]] auto set_icon_name(Glib::ustring const & name) -> void; - auto set_subtitle(Glib::ustring const & subtitle) -> void; - auto set_subtitle_lines(int subtitle_lines) noexcept -> void; - auto set_subtitle_selectable(bool subtitle_selectable) noexcept -> void; - auto set_title_lines(int title_lines) noexcept -> void; - -#pragma mark - Properties - auto property_activatable_widget() noexcept -> Glib::PropertyProxy; - auto property_activatable_widget() const noexcept -> Glib::PropertyProxy_ReadOnly; - [[deprecated("replaced by add_prefix")]] auto property_icon_name() noexcept -> Glib::PropertyProxy; - [[deprecated("replaced by add_prefix")]] auto property_icon_name() const noexcept -> Glib::PropertyProxy_ReadOnly; - auto property_subtitle() noexcept -> Glib::PropertyProxy; - auto property_subtitle() const noexcept -> Glib::PropertyProxy_ReadOnly; - auto property_subtitle_lines() noexcept -> Glib::PropertyProxy; - auto property_subtitle_lines() const noexcept -> Glib::PropertyProxy_ReadOnly; - auto property_subtitle_selectable() noexcept -> Glib::PropertyProxy; - auto property_subtitle_selectable() const noexcept -> Glib::PropertyProxy_ReadOnly; - auto property_title_lines() noexcept -> Glib::PropertyProxy; - auto property_title_lines() const noexcept -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - auto signal_activated() -> Glib::SignalProxy; - - protected: - friend struct ActionRow_Class; - -#pragma mark - GTK Virtual Functions - auto virtual activate_vfunc() -> void; - -#pragma mark - Internal Constructors - explicit ActionRow(Glib::ConstructParams const & params); - explicit ActionRow(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwActionRow * object, bool copy = false) -> Adwaita::ActionRow *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/alertdialog.hpp b/adw/include/adwaitamm/alertdialog.hpp deleted file mode 100644 index 367512d..0000000 --- a/adw/include/adwaitamm/alertdialog.hpp +++ /dev/null @@ -1,76 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_ALERT_DIALOG_HPP -#define LIBADWAITAMM_ALERT_DIALOG_HPP - -#include "adwaitamm/dialog.hpp" -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - enum struct ResponseAppearance; - - struct AlertDialog : Dialog, - helpers::gobj_mixin - { - using BaseObjectType = AdwAlertDialog; - using BaseClassType = AdwAlertDialogClass; - using CppObjectType = AlertDialog; - using CppClassType = struct AlertDialog_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - AlertDialog(Glib::ustring heading, Glib::ustring body); - AlertDialog(AlertDialog const & other) = delete; - AlertDialog(AlertDialog && other) noexcept = default; - - auto operator=(AlertDialog const & other) noexcept -> AlertDialog & = delete; - auto operator=(AlertDialog && other) noexcept -> AlertDialog & = default; - - auto static create(Glib::ustring heading, Glib::ustring body) -> Glib::RefPtr; - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - auto add_response(Glib::ustring id, Glib::ustring label) -> void; - auto choose(Gtk::Widget & parent, Glib::RefPtr const & cancellable, Gio::SlotAsyncReady const & slot) -> void; - auto choose_finish(Glib::RefPtr const & result) -> Glib::ustring; - auto set_close_response(Glib::ustring id) -> void; - auto set_default_response(Glib::ustring id) -> void; - auto set_response_appearance(Glib::ustring id, ResponseAppearance value) -> void; - - protected: - friend AlertDialog_Class; - - explicit AlertDialog(Glib::ConstructParams const & params); - explicit AlertDialog(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwAlertDialog * object, bool copy = false) -> Adwaita::AlertDialog *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/application.hpp b/adw/include/adwaitamm/application.hpp deleted file mode 100644 index 0da9427..0000000 --- a/adw/include/adwaitamm/application.hpp +++ /dev/null @@ -1,68 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_APPLICATION_HPP -#define LIBADWAITAMM_APPLICATION_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include - -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct Application : Gtk::Application, - helpers::gobj_mixin - { - using BaseObjectType = AdwApplication; - using BaseClassType = AdwApplicationClass; - using CppObjectType = Application; - using CppClassType = struct Application_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - Application(Application const & other) = delete; - Application(Application && other) noexcept = default; - - auto operator=(Application const & other) noexcept -> Application & = delete; - auto operator=(Application && other) noexcept -> Application & = default; - - auto static create(Glib::ustring const & id = {}, Gio::Application::Flags flags = Gio::Application::Flags::NONE) - -> Glib::RefPtr; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - protected: - friend Application_Class; - - explicit Application(Glib::ConstructParams const & params); - explicit Application(BaseObjectType * gobj); - explicit Application(Glib::ustring const & id = {}, Gio::Application::Flags flags = Gio::Application::Flags::NONE); - - private: - Glib::Class const & custom_class_init(); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwApplication * object, bool copy = false) -> Glib::RefPtr; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/applicationwindow.hpp b/adw/include/adwaitamm/applicationwindow.hpp deleted file mode 100644 index c2fa0d1..0000000 --- a/adw/include/adwaitamm/applicationwindow.hpp +++ /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 - */ - -#ifndef LIBADWAITAMM_APPLICATION_WINDOW_HPP -#define LIBADWAITAMM_APPLICATION_WINDOW_HPP - -#include "helpers/gobj_mixin.hpp" - -#include -#include -#include -#include - -#include -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct ApplicationWindow : Gtk::ApplicationWindow, - helpers::gobj_mixin - { - using BaseObjectType = AdwApplicationWindow; - using BaseClassType = AdwApplicationWindowClass; - using CppObjectType = ApplicationWindow; - using CppClassType = struct ApplicationWindow_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - explicit ApplicationWindow(Gtk::Application & app); - ApplicationWindow(ApplicationWindow const & other) = delete; - ApplicationWindow(ApplicationWindow && other) noexcept = default; - - auto operator=(ApplicationWindow const & other) noexcept -> ApplicationWindow & = delete; - auto operator=(ApplicationWindow && other) noexcept -> ApplicationWindow & = default; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - protected: - friend ApplicationWindow_Class; - - explicit ApplicationWindow(Glib::ConstructParams const & params); - explicit ApplicationWindow(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwApplicationWindow * object, bool copy = false) -> Adwaita::ApplicationWindow *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/breakpoint.hpp b/adw/include/adwaitamm/breakpoint.hpp deleted file mode 100644 index 4b40574..0000000 --- a/adw/include/adwaitamm/breakpoint.hpp +++ /dev/null @@ -1,96 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_BREAKPOINT_HPP -#define LIBADWAITAMM_BREAKPOINT_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include - -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - enum struct LengthType; - enum struct RatioType; - - struct BreakpointCondition - { - BreakpointCondition(BreakpointCondition const & other); - BreakpointCondition(BreakpointCondition && other); - BreakpointCondition(LengthType type, double value, int unit); // FIXME: replace unit type with actual enum. - BreakpointCondition(RatioType type, int width, int height); - - ~BreakpointCondition() noexcept; - - auto operator&&(BreakpointCondition & rhs) & -> BreakpointCondition; - auto operator||(BreakpointCondition & lhs) & -> BreakpointCondition; - - explicit operator Glib::ustring() const; - - auto static parse(Glib::ustring str) -> std::optional; - - private: - friend struct Breakpoint; - - explicit BreakpointCondition(AdwBreakpointCondition * object); - - AdwBreakpointCondition * m_object{nullptr}; - }; - - struct Breakpoint final : Glib::Object, - Gtk::Buildable, - helpers::gobj_mixin - { - using BaseObjectType = AdwBreakpoint; - using BaseClassType = AdwBreakpointClass; - using CppObjectType = Breakpoint; - using CppClassType = struct Breakpoint_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - Breakpoint(Breakpoint const & other) = delete; - Breakpoint(Breakpoint && other) noexcept = default; - - auto operator=(Breakpoint const & other) noexcept -> Breakpoint & = delete; - auto operator=(Breakpoint && other) noexcept -> Breakpoint & = default; - - auto static create(BreakpointCondition & condition) -> Glib::RefPtr; - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - auto property_condition() -> Glib::PropertyProxy; - auto property_condition() const -> Glib::PropertyProxy_ReadOnly; - - protected: - friend Breakpoint_Class; - - explicit Breakpoint(BreakpointCondition & condition); - explicit Breakpoint(Glib::ConstructParams const & params); - explicit Breakpoint(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwBreakpoint * object, bool copy = false) -> Glib::RefPtr; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/comborow.hpp b/adw/include/adwaitamm/comborow.hpp deleted file mode 100644 index 416c693..0000000 --- a/adw/include/adwaitamm/comborow.hpp +++ /dev/null @@ -1,116 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_COMBO_ROW_HPP -#define LIBADWAITAMM_COMBO_ROW_HPP - -#include "adwaitamm/actionrow.hpp" -#include "adwaitamm/helpers/gobj_mixin.hpp" - -#include -#include -#include -#include - -#include - -#include -#include -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -using AdwComboRow = struct _AdwComboRow; - -namespace Adwaita -{ - struct ComboRow : ActionRow, - helpers::gobj_mixin - { - using BaseObjectType = AdwComboRow; - using BaseClassType = AdwComboRowClass; - using CppObjectType = struct ComboRow; - using CppClassType = struct ComboRow_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - explicit ComboRow(); - ComboRow(ComboRow const & other) = delete; - ComboRow(ComboRow && other) noexcept = default; - - auto operator=(ComboRow const & other) noexcept -> ComboRow & = delete; - auto operator=(ComboRow && other) noexcept -> ComboRow & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Getters - auto get_enable_search() const -> bool; - auto get_expression() const -> Glib::RefPtr>; - auto get_factory() const -> Glib::RefPtr; - auto get_header_factory() const -> Glib::RefPtr; - auto get_list_factory() const -> Glib::RefPtr; - auto get_model() const -> Glib::RefPtr; - auto get_search_match_mode() const -> Gtk::StringFilter::MatchMode; - auto get_selected() const -> unsigned int; - auto get_selected_item() const -> Glib::RefPtr; - auto get_use_subtitle() const -> bool; - -#pragma mark - Setters - auto set_enable_search(bool value) -> void; - auto set_expression(Glib::RefPtr> const & value) -> void; - auto set_factory(Glib::RefPtr const & value) -> void; - auto set_header_factory(Glib::RefPtr const & value) -> void; - auto set_list_factory(Glib::RefPtr const & value) -> void; - auto set_model(Glib::RefPtr const & value) -> void; - auto set_search_match_mode(Gtk::StringFilter::MatchMode value) -> void; - auto set_selected(unsigned int value) -> void; - auto set_use_subtitle(bool value) -> void; - -#pragma mark - Properties - auto property_enable_search() -> Glib::PropertyProxy; - auto property_enable_search() const -> Glib::PropertyProxy_ReadOnly; - auto property_expression() -> Glib::PropertyProxy>>; - auto property_expression() const -> Glib::PropertyProxy_ReadOnly>>; - auto property_factory() -> Glib::PropertyProxy>; - auto property_factory() const -> Glib::PropertyProxy_ReadOnly>; - auto property_header_factory() -> Glib::PropertyProxy>; - auto property_header_factory() const -> Glib::PropertyProxy_ReadOnly>; - auto property_list_factory() -> Glib::PropertyProxy>; - auto property_list_factory() const -> Glib::PropertyProxy_ReadOnly>; - auto property_model() -> Glib::PropertyProxy>; - auto property_model() const -> Glib::PropertyProxy_ReadOnly>; - auto property_search_match_mode() -> Glib::PropertyProxy; - auto property_search_match_mode() const -> Glib::PropertyProxy_ReadOnly; - auto property_selected() -> Glib::PropertyProxy; - auto property_selected() const -> Glib::PropertyProxy_ReadOnly; - auto property_selected_item() -> Glib::PropertyProxy_ReadOnly>; - auto property_use_subtitle() -> Glib::PropertyProxy; - auto property_use_subtitle() const -> Glib::PropertyProxy_ReadOnly; - - protected: - friend ComboRow_Class; - -#pragma mark - Internal Constructors - explicit ComboRow(Glib::ConstructParams const & params); - explicit ComboRow(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwComboRow * object, bool copy = false) -> Adwaita::ComboRow *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/dialog.hpp b/adw/include/adwaitamm/dialog.hpp deleted file mode 100644 index 82e1cd1..0000000 --- a/adw/include/adwaitamm/dialog.hpp +++ /dev/null @@ -1,128 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_DIALOG_HPP -#define LIBADWAITAMM_DIALOG_HPP - -#include "adwaitamm/breakpoint.hpp" -#include "adwaitamm/enums.hpp" -#include "helpers/gobj_mixin.hpp" - -#include -#include -#include -#include -#include - -#include -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct Dialog : Gtk::Widget, - Gtk::ShortcutManager, - helpers::gobj_mixin - { - - using BaseObjectType = AdwDialog; - using BaseClassType = AdwDialogClass; - using CppObjectType = Dialog; - using CppClassType = struct Dialog_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - explicit Dialog(); - Dialog(Dialog const & other) = delete; - Dialog(Dialog && other) noexcept = default; - - auto operator=(Dialog const & other) noexcept -> Dialog & = delete; - auto operator=(Dialog && other) noexcept -> Dialog & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto add_breakpoint(Glib::RefPtr const & breakpoint) -> void; - auto close() -> void; - auto force_close() -> void; - auto present(Gtk::Widget * parent) -> void; - -#pragma mark - Getters - [[nodiscard]] auto get_can_close() const -> bool; - [[nodiscard]] auto get_child() const -> Gtk::Widget *; - [[nodiscard]] auto get_content_height() const -> int; - [[nodiscard]] auto get_content_width() const -> int; - [[nodiscard]] auto get_current_breakpoint() const -> Glib::RefPtr; - [[nodiscard]] auto get_default_widget() const -> Gtk::Widget *; - [[nodiscard]] auto get_focus() const -> Gtk::Widget *; - [[nodiscard]] auto get_follows_content_size() const -> bool; - [[nodiscard]] auto get_presentation_mode() const -> PresentationMode; - [[nodiscard]] auto get_title() const -> Glib::ustring; - -#pragma mark - Setters - auto set_can_close(bool value) -> void; - auto set_child(Gtk::Widget & value) -> void; - auto set_content_height(int value) -> void; - auto set_content_width(int value) -> void; - auto set_default_widget(Gtk::Widget & value) -> void; - auto set_focus(Gtk::Widget & value) -> void; - auto set_follows_content_size(bool value) -> void; - auto set_presentation_mode(PresentationMode value) -> void; - auto set_title(Glib::ustring const & str) -> void; - -#pragma mark - Properties - [[nodiscard]] auto property_can_close() -> Glib::PropertyProxy; - [[nodiscard]] auto property_can_close() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_child() -> Glib::PropertyProxy; - [[nodiscard]] auto property_child() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_content_height() -> Glib::PropertyProxy; - [[nodiscard]] auto property_content_height() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_content_width() -> Glib::PropertyProxy; - [[nodiscard]] auto property_content_width() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_current_breakpoint() const -> Glib::PropertyProxy_ReadOnly>; - [[nodiscard]] auto property_default_widget() -> Glib::PropertyProxy; - [[nodiscard]] auto property_default_widget() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_focus_widget() -> Glib::PropertyProxy; - [[nodiscard]] auto property_focus_widget() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_follows_content_size() -> Glib::PropertyProxy; - [[nodiscard]] auto property_follows_content_size() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_presentation_mode() -> Glib::PropertyProxy; - [[nodiscard]] auto property_presentation_mode() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_title() -> Glib::PropertyProxy; - [[nodiscard]] auto property_title() const -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - [[nodiscard]] auto signal_close_attempt() -> Glib::SignalProxy; - [[nodiscard]] auto signal_closed() -> Glib::SignalProxy; - - protected: - friend Dialog_Class; - -#pragma mark - Default Signal Handlers - auto virtual on_close_attempt() -> void; - auto virtual on_closed() -> void; - -#pragma mark - Internal Constructors - explicit Dialog(Glib::ConstructParams const & params); - explicit Dialog(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwDialog * object, bool copy = false) -> Adwaita::Dialog *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/entryrow.hpp b/adw/include/adwaitamm/entryrow.hpp deleted file mode 100644 index 16f0f3b..0000000 --- a/adw/include/adwaitamm/entryrow.hpp +++ /dev/null @@ -1,122 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_ENTRY_ROW_HPP -#define LIBADWAITAMM_ENTRY_ROW_HPP - -#include "adwaitamm/helpers/gobj_mixin.hpp" -#include "adwaitamm/preferencesrow.hpp" - -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct EntryRow : PreferencesRow, - Gtk::Editable, - helpers::gobj_mixin - { - using BaseObjectType = AdwEntryRow; - using BaseClassType = AdwEntryRowClass; - using CppObjectType = struct EntryRow; - using CppClassType = struct EntryRow_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - -#pragma mark - Special Member Functions - explicit EntryRow(); - EntryRow(EntryRow const & other) = delete; - EntryRow(EntryRow && other) noexcept = default; - - auto operator=(EntryRow const & other) noexcept -> EntryRow & = delete; - auto operator=(EntryRow && other) noexcept -> EntryRow & = default; - -#pragma mark - GObject Support - auto static get_type() -> GType; - auto static get_base_type() -> GType; - -#pragma mark - Functions - auto add_prefix(Gtk::Widget & widget) -> void; - auto add_suffix(Gtk::Widget & widget) -> void; - auto grab_focus_without_selecting() -> bool; - auto remove(Gtk::Widget & widget) -> void; - -#pragma mark - Getters - [[nodiscard]] auto get_activates_default() const -> bool; - [[nodiscard]] auto get_attributes() const -> Pango::AttrList; - [[nodiscard]] auto get_enable_emoji_completion() const -> bool; - [[nodiscard]] auto get_input_hints() const -> Gtk::InputHints; - [[nodiscard]] auto get_input_purpose() const -> Gtk::InputPurpose; - [[nodiscard]] auto get_max_length() const -> int; - [[nodiscard]] auto get_show_apply_button() const -> bool; - [[nodiscard]] auto get_text_length() const -> unsigned int; - -#pragma mark - Setters - auto set_activates_default(bool value) -> void; - auto set_attributes(Pango::AttrList & value) -> void; - auto set_enable_emoji_completion(bool value) -> void; - auto set_input_hints(Gtk::InputHints value) -> void; - auto set_input_purpose(Gtk::InputPurpose value) -> void; - auto set_max_length(int value) -> void; - auto set_show_apply_button(bool value) -> void; - -#pragma mark - Properties - [[nodiscard]] auto property_activates_default() -> Glib::PropertyProxy; - [[nodiscard]] auto property_activates_default() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_attributes() -> Glib::PropertyProxy; - [[nodiscard]] auto property_attributes() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_enable_emoji_completion() -> Glib::PropertyProxy; - [[nodiscard]] auto property_enable_emoji_completion() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_input_hints() -> Glib::PropertyProxy; - [[nodiscard]] auto property_input_hints() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_input_purpose() -> Glib::PropertyProxy; - [[nodiscard]] auto property_input_purpose() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_max_length() -> Glib::PropertyProxy; - [[nodiscard]] auto property_max_length() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_show_apply_button() -> Glib::PropertyProxy; - [[nodiscard]] auto property_show_apply_button() const -> Glib::PropertyProxy_ReadOnly; - [[nodiscard]] auto property_text_length() -> Glib::PropertyProxy_ReadOnly; - -#pragma mark - Signals - auto signal_apply() -> Glib::SignalProxy; - auto signal_entry_activated() -> Glib::SignalProxy; - - protected: - friend EntryRow_Class; - -#pragma mark - Internal Constructors - explicit EntryRow(Glib::ConstructParams const & params); - explicit EntryRow(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwEntryRow * object, bool copy = false) -> Adwaita::EntryRow *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/enums.hpp b/adw/include/adwaitamm/enums.hpp deleted file mode 100644 index 0d09833..0000000 --- a/adw/include/adwaitamm/enums.hpp +++ /dev/null @@ -1,97 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_ENUMS_HPP -#define LIBADWAITAMM_ENUMS_HPP - -#include - -#include - -namespace Adwaita -{ - enum struct AccentColor - { - Blue, - Teal, - Green, - Yellow, - Orange, - Red, - Pink, - Purple, - Slate, - }; - - enum struct ColorScheme - { - Default, - ForceLight, - PreferLight, - PreferDark, - ForceDark, - }; - - enum struct LengthType - { - MinWidth, - MaxWidth, - MinHeight, - MaxHeight, - }; - - enum struct PresentationMode - { - Auto, - Floating, - BottomSheet, - }; - - enum struct RatioType - { - MinAspectRatio, - MaxAspectRatio - }; - - enum struct ResponseAppearance - { - Default, - Suggested, - Destructive, - }; - - enum class ToastPriority - { - Normal, - High, - }; - -} // namespace Adwaita - -namespace Glib -{ - -#define VALUE_SPECIALIZATION(Enum) \ - template<> \ - class Value : public Glib::Value_Enum \ - { \ - public: \ - auto static value_type() -> GType; \ - } - - VALUE_SPECIALIZATION(AccentColor); - VALUE_SPECIALIZATION(ColorScheme); - VALUE_SPECIALIZATION(LengthType); - VALUE_SPECIALIZATION(PresentationMode); - VALUE_SPECIALIZATION(RatioType); - VALUE_SPECIALIZATION(ResponseAppearance); - VALUE_SPECIALIZATION(ToastPriority); - -#undef VALUE_SPECIALIZATION - -} // namespace Glib - -#endif \ No newline at end of file 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 - -#include - -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 - -#include - -namespace Adwaita::helpers -{ - - template - struct copy_const - { - using type = TargetType; - }; - - template - struct copy_const - { - using type = std::add_const_t; - }; - - template - using copy_const_t = typename copy_const::type; - - template - struct gobj_mixin - { - template - auto gobj(this Self && self) noexcept - { - using base_type = copy_const_t, BaseType>; - return reinterpret_cast(self.::Glib::Object::gobj()); - } - - template - auto gobj_copy(this Self && self) noexcept - { - return reinterpret_cast(self.::Glib::Object::gobj_copy()); - } - }; - -} // namespace Adwaita::helpers - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencesdialog.hpp b/adw/include/adwaitamm/preferencesdialog.hpp deleted file mode 100644 index cdc1444..0000000 --- a/adw/include/adwaitamm/preferencesdialog.hpp +++ /dev/null @@ -1,61 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_PREFERENCES_DIALOG_HPP -#define LIBADWAITAMM_PREFERENCES_DIALOG_HPP - -#include "adwaitamm/dialog.hpp" -#include "adwaitamm/preferencespage.hpp" -#include "helpers/gobj_mixin.hpp" - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct PreferencesDialog : Dialog, - helpers::gobj_mixin - { - using BaseObjectType = AdwPreferencesDialog; - using BaseClassType = AdwPreferencesDialogClass; - using CppObjectType = PreferencesDialog; - using CppClassType = struct PreferencesDialog_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - explicit PreferencesDialog(); - PreferencesDialog(PreferencesDialog const & other) = delete; - PreferencesDialog(PreferencesDialog && other) noexcept = default; - - auto operator=(PreferencesDialog const & other) noexcept -> PreferencesDialog & = delete; - auto operator=(PreferencesDialog && other) noexcept -> PreferencesDialog & = default; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - auto add(PreferencesPage & page) -> void; - auto set_visible_page(PreferencesPage & page) -> void; - - protected: - friend PreferencesDialog_Class; - - explicit PreferencesDialog(Glib::ConstructParams const & params); - explicit PreferencesDialog(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwPreferencesDialog * object, bool copy = false) -> Adwaita::PreferencesDialog *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencespage.hpp b/adw/include/adwaitamm/preferencespage.hpp deleted file mode 100644 index 16ef88a..0000000 --- a/adw/include/adwaitamm/preferencespage.hpp +++ /dev/null @@ -1,59 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_PREFERENCES_PAGE_HPP -#define LIBADWAITAMM_PREFERENCES_PAGE_HPP - -#include "helpers/gobj_mixin.hpp" - -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct PreferencesPage : Gtk::Widget, - helpers::gobj_mixin - { - - using BaseObjectType = AdwPreferencesPage; - using BaseClassType = AdwPreferencesPageClass; - using CppObjectType = PreferencesPage; - using CppClassType = struct PreferencesPage_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - explicit PreferencesPage(); - PreferencesPage(PreferencesPage const & other) = delete; - PreferencesPage(PreferencesPage && other) noexcept = default; - - auto operator=(PreferencesPage const & other) noexcept -> PreferencesPage & = delete; - auto operator=(PreferencesPage && other) noexcept -> PreferencesPage & = default; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - protected: - friend PreferencesPage_Class; - - explicit PreferencesPage(Glib::ConstructParams const & params); - explicit PreferencesPage(BaseObjectType * gobj); - }; -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwPreferencesPage * object, bool copy = false) -> Adwaita::PreferencesPage *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/preferencesrow.hpp b/adw/include/adwaitamm/preferencesrow.hpp deleted file mode 100644 index 523d3ae..0000000 --- a/adw/include/adwaitamm/preferencesrow.hpp +++ /dev/null @@ -1,80 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef LIBADWAITAMM_PREFERENCES_ROW_HPP -#define LIBADWAITAMM_PREFERENCES_ROW_HPP - -#include "helpers/gobj_mixin.hpp" - -#include -#include -#include - -#include - -#include - -#define _ADWAITA_INSIDE -#include -#undef _ADWAITA_INSIDE - -namespace Adwaita -{ - struct PreferencesRow : Gtk::ListBoxRow, - helpers::gobj_mixin - { - using BaseObjectType = AdwPreferencesRow; - using BaseClassType = AdwPreferencesRowClass; - using CppObjectType = PreferencesRow; - using CppClassType = struct PreferencesRow_Class; - - using helpers::gobj_mixin::gobj; - using helpers::gobj_mixin::gobj_copy; - - explicit PreferencesRow(); - PreferencesRow(PreferencesRow const & other) = delete; - PreferencesRow(PreferencesRow && other) noexcept = default; - - auto operator=(PreferencesRow const & other) noexcept -> PreferencesRow & = delete; - auto operator=(PreferencesRow && other) noexcept -> PreferencesRow & = default; - - auto static get_type() -> GType; - auto static get_base_type() -> GType; - - auto get_title() const -> Glib::ustring; - auto get_title_selectable() const noexcept -> bool; - auto get_use_markup() const noexcept -> bool; - auto get_use_underline() const noexcept -> bool; - - auto set_title(Glib::ustring const & title) -> CppObjectType &; - auto set_title_selectable(bool selectable) noexcept -> CppObjectType &; - auto set_use_markup(bool use) noexcept -> CppObjectType &; - auto set_use_underline(bool use) noexcept -> CppObjectType &; - - auto property_title_selectable() -> Glib::PropertyProxy; - auto property_title_selectable() const -> Glib::PropertyProxy_ReadOnly; - auto property_title() -> Glib::PropertyProxy; - auto property_title() const -> Glib::PropertyProxy_ReadOnly; - auto property_use_markup() -> Glib::PropertyProxy; - auto property_use_markup() const -> Glib::PropertyProxy_ReadOnly; - auto property_use_underline() -> Glib::PropertyProxy; - auto property_use_underline() const -> Glib::PropertyProxy_ReadOnly; - - protected: - friend PreferencesRow_Class; - - explicit PreferencesRow(Glib::ConstructParams const & params); - explicit PreferencesRow(BaseObjectType * gobj); - }; - -} // namespace Adwaita - -namespace Glib -{ - auto wrap(AdwPreferencesRow * object, bool copy = false) -> Adwaita::PreferencesRow *; -} // namespace Glib - -#endif \ No newline at end of file diff --git a/adw/include/adwaitamm/private/aboutdialog_p.hpp b/adw/include/adwaitamm/private/aboutdialog_p.hpp deleted file mode 100644 index 556bfcc..0000000 --- a/adw/include/adwaitamm/private/aboutdialog_p.hpp +++ /dev/null @@ -1,35 +0,0 @@ -/** - * @author Felix Morgner (felix.morgner@gmail.com) - * @copyright Copyright (c) 2025 - * SPDX-License-Identifier: LGPL-2.1-or-later - */ - -#ifndef L