summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
committerFelix Morgner <felix.morgner@gmail.com>2025-04-28 14:01:30 +0200
commit29eb802f09da07421099238eceaee9e3b1d61ff2 (patch)
treed07784be13475237d58f65033959c1e27e6245c0
parentdff2f80ddc8f742b8181409d6feeca33e856112e (diff)
downloadturns-29eb802f09da07421099238eceaee9e3b1d61ff2.tar.xz
turns-29eb802f09da07421099238eceaee9e3b1d61ff2.zip
adw: extract libadwaitamm
-rw-r--r--.gitmodules3
-rw-r--r--CMakeLists.txt7
-rw-r--r--adw/CMakeLists.txt65
-rw-r--r--adw/include/adwaitamm/aboutdialog.hpp170
-rw-r--r--adw/include/adwaitamm/actionrow.hpp109
-rw-r--r--adw/include/adwaitamm/alertdialog.hpp76
-rw-r--r--adw/include/adwaitamm/application.hpp68
-rw-r--r--adw/include/adwaitamm/applicationwindow.hpp62
-rw-r--r--adw/include/adwaitamm/breakpoint.hpp96
-rw-r--r--adw/include/adwaitamm/comborow.hpp116
-rw-r--r--adw/include/adwaitamm/dialog.hpp128
-rw-r--r--adw/include/adwaitamm/entryrow.hpp122
-rw-r--r--adw/include/adwaitamm/enums.hpp97
-rw-r--r--adw/include/adwaitamm/helpers/async_callback.hpp15
-rw-r--r--adw/include/adwaitamm/helpers/gobj_mixin.hpp45
-rw-r--r--adw/include/adwaitamm/preferencesdialog.hpp61
-rw-r--r--adw/include/adwaitamm/preferencespage.hpp59
-rw-r--r--adw/include/adwaitamm/preferencesrow.hpp80
-rw-r--r--adw/include/adwaitamm/private/aboutdialog_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/actionrow_p.hpp38
-rw-r--r--adw/include/adwaitamm/private/alertdialog_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/application_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/applicationwindow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/breakpoint_p.hpp36
-rw-r--r--adw/include/adwaitamm/private/comborow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/dialog_p.hpp39
-rw-r--r--adw/include/adwaitamm/private/entryrow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/preferencesdialog_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/preferencespage_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/preferencesrow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/spinrow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/stylemanager_p.hpp36
-rw-r--r--adw/include/adwaitamm/private/switchrow_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/toast_p.hpp36
-rw-r--r--adw/include/adwaitamm/private/toastoverlay_p.hpp35
-rw-r--r--adw/include/adwaitamm/private/windowtitle_p.hpp39
-rw-r--r--adw/include/adwaitamm/spinrow.hpp117
-rw-r--r--adw/include/adwaitamm/stylemanager.hpp79
-rw-r--r--adw/include/adwaitamm/switchrow.hpp67
-rw-r--r--adw/include/adwaitamm/toast.hpp119
-rw-r--r--adw/include/adwaitamm/toastoverlay.hpp68
-rw-r--r--adw/include/adwaitamm/windowtitle.hpp78
-rw-r--r--adw/include/adwaitamm/wrap_init.hpp15
-rw-r--r--adw/src/aboutdialog.cpp607
-rw-r--r--adw/src/actionrow.cpp246
-rw-r--r--adw/src/alertdialog.cpp108
-rw-r--r--adw/src/application.cpp89
-rw-r--r--adw/src/applicationwindow.cpp62
-rw-r--r--adw/src/breakpoint.cpp146
-rw-r--r--adw/src/comborow.cpp273
-rw-r--r--adw/src/dialog.cpp338
-rw-r--r--adw/src/entryrow.cpp282
-rw-r--r--adw/src/enums.cpp80
-rw-r--r--adw/src/helpers/async_callback.cpp34
-rw-r--r--adw/src/preferencesdialog.cpp70
-rw-r--r--adw/src/preferencespage.cpp61
-rw-r--r--adw/src/preferencesrow.cpp147
-rw-r--r--adw/src/private/aboutdialog_p.cpp40
-rw-r--r--adw/src/private/actionrow_p.cpp84
-rw-r--r--adw/src/private/alertdialog_p.cpp40
-rw-r--r--adw/src/private/application_p.cpp40
-rw-r--r--adw/src/private/applicationwindow_p.cpp40
-rw-r--r--adw/src/private/breakpoint_p.cpp42
-rw-r--r--adw/src/private/comborow_p.cpp41
-rw-r--r--adw/src/private/dialog_p.cpp101
-rw-r--r--adw/src/private/entryrow_p.cpp44
-rw-r--r--adw/src/private/preferencesdialog_p.cpp40
-rw-r--r--adw/src/private/preferencespage_p.cpp41
-rw-r--r--adw/src/private/preferencesrow_p.cpp41
-rw-r--r--adw/src/private/spinrow_p.cpp41
-rw-r--r--adw/src/private/stylemanager_p.cpp39
-rw-r--r--adw/src/private/switchrow_p.cpp41
-rw-r--r--adw/src/private/toast_p.cpp39
-rw-r--r--adw/src/private/toastoverlay_p.cpp42
-rw-r--r--adw/src/private/windowtitle_p.cpp42
-rw-r--r--adw/src/spinrow.cpp383
-rw-r--r--adw/src/stylemanager.cpp131
-rw-r--r--adw/src/switchrow.cpp80
-rw-r--r--adw/src/toast.cpp262
-rw-r--r--adw/src/toastoverlay.cpp93
-rw-r--r--adw/src/windowtitle.cpp110
-rw-r--r--adw/src/wrap_init.cpp96
m---------deps/libadwaitamm0
83 files changed, 7 insertions, 7095 deletions
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
- "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
- "$<INSTALL_INTERFACE:include>"
-)
-
-target_compile_features("adwaitamm" PUBLIC
- "cxx_std_20"
-)
-
-target_compile_options("adwaitamm" PRIVATE
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wall>"
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-Wextra>"
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-Werror>"
- "$<$<CXX_COMPILER_ID:GNU,Clang>:-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 <glibmm/object.h>
-#include <glibmm/propertyproxy.h>
-#include <glibmm/refptr.h>
-#include <glibmm/signalproxy.h>
-#include <glibmm/ustring.h>
-
-#include <gtkmm/aboutdialog.h>
-
-#include <glib-object.h>
-
-#include <string>
-#include <vector>
-
-#define _ADWAITA_INSIDE
-#include <adw-about-dialog.h>
-#undef _ADWAITA_INSIDE
-
-namespace Adwaita
-{
- enum struct ResponseAppearance;
-
- struct AboutDialog final : Dialog,
- helpers::gobj_mixin<AboutDialog, AdwAboutDialog>
- {
- using BaseObjectType = AdwAboutDialog;
- using BaseClassType = AdwAboutDialogClass;
- using CppObjectType = AboutDialog;
- using CppClassType = struct AboutDialog_Class;
-
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::gobj;
- using helpers::gobj_mixin<CppObjectType, BaseObjectType>::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<Glib::ustring> const & people) -> void;
- auto add_credit_section(Glib::ustring const & name, std::vector<Glib::ustring> 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<Glib::ustring>;
- [[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<Glib::ustring>;
- [[nodiscard]] auto get_developer_name() const -> Glib::ustring;
- [[nodiscard]] auto get_developers() const -> std::vector<Glib::ustring>;
- [[nodiscard]] auto get_documenters() const -> std::vector<Glib::ustring>;
- [[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<Glib::ustring> 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<Glib::ustring> const & value) -> void;
- auto set_developer_name(Glib::ustring const & value) -> void;
- auto set_developers(std::vector<Glib::ustring> const & value) -> void;
- auto set_documenters(std::vector<Glib::ustring> 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<Glib::ustring>;
- auto property_application_icon() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_application_name() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_application_name() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_artists() -> Glib::PropertyProxy<std::vector<Glib::ustring>>;
- auto property_artists() const -> Glib::PropertyProxy_ReadOnly<std::vector<Glib::ustring>>;
- auto property_comments() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_comments() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_copyright() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_copyright() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_debug_info() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_debug_info() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_debug_info_filename() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_debug_info_filename() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_designers() -> Glib::PropertyProxy<std::vector<Glib::ustring>>;
- auto property_designers() const -> Glib::PropertyProxy_ReadOnly<std::vector<Glib::ustring>>;
- auto property_developer_name() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_developer_name() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_developers() -> Glib::PropertyProxy<std::vector<Glib::ustring>>;
- auto property_developers() const -> Glib::PropertyProxy_ReadOnly<std::vector<Glib::ustring>>;
- auto property_documenters() -> Glib::PropertyProxy<std::vector<Glib::ustring>>;
- auto property_documenters() const -> Glib::PropertyProxy_ReadOnly<std::vector<Glib::ustring>>;
- auto property_issue_url() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_issue_url() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_license_type() -> Glib::PropertyProxy<Gtk::License>;
- auto property_license_type() const -> Glib::PropertyProxy_ReadOnly<Gtk::License>;
- auto property_license() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_license() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_release_notes() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_release_notes() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_release_notes_version() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_release_notes_version() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_support_url() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_support_url() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_translator_credits() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_translator_credits() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_version() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_version() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
- auto property_website() -> Glib::PropertyProxy<Glib::ustring>;
- auto property_website() const -> Glib::PropertyProxy_ReadOnly<Glib::ustring>;
-
-#pragma mark - Signals
- auto signal_activate_link() -> Glib::SignalProxy<bool(Glib::ustring const &)>;
-
- 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 <glibmm/class.h>
-#include <glibmm/object.h>
-#include <glibmm/objectbase.h>
-#include <glibmm/propertyproxy.h>
-#include <glibmm/signalproxy.h>
-#include <glibmm/ustring.h>
-
-#include <gtkmm/widget.h>
-
-#include <glib-object.h>
-#include <glib.h>
-
-#define _ADWAITA_INSIDE
-#include <adw-action-row.h>
-#undef _ADWAITA_INSIDE
-
-namespace Adwaita
-{
- struct ActionRow : PreferencesRow,
- helpers::gobj_mixin<ActionRow, AdwActionRow>
- {
- using BaseObjectType = AdwActionRow;
- using BaseCl