diff --git a/cmake/ContourThirdParties.cmake b/cmake/ContourThirdParties.cmake index ad659e92a3..c9b29517a2 100644 --- a/cmake/ContourThirdParties.cmake +++ b/cmake/ContourThirdParties.cmake @@ -150,7 +150,7 @@ else() set(THIRDPARTY_BUILTIN_termbench "(bench-headless disabled)") endif() -set(BOXED_CPP_MINIMAL_VERSION "1.2.2") +set(BOXED_CPP_MINIMAL_VERSION "1.3.0") if(COMMAND ContourThirdParties_Embed_boxed_cpp) ContourThirdParties_Embed_boxed_cpp() subproject_version(boxed-cpp boxed_cpp_version) diff --git a/scripts/install-deps.ps1 b/scripts/install-deps.ps1 index f4f308540e..c2622abb58 100644 --- a/scripts/install-deps.ps1 +++ b/scripts/install-deps.ps1 @@ -26,9 +26,9 @@ $ThirdParties = Macro = "termbench_pro" } [ThirdParty]@{ - Folder = "boxed-cpp-1.2.2"; - Archive = "boxed-cpp-1.2.2.zip"; - URI = "https://github.com/contour-terminal/boxed-cpp/archive/refs/tags/v1.2.2.zip"; + Folder = "boxed-cpp-1.3.0"; + Archive = "boxed-cpp-1.3.0.zip"; + URI = "https://github.com/contour-terminal/boxed-cpp/archive/refs/tags/v1.3.0.zip"; Macro = "boxed_cpp" } ) diff --git a/scripts/install-deps.sh b/scripts/install-deps.sh index 4c2bc453bc..ae3c176cb6 100755 --- a/scripts/install-deps.sh +++ b/scripts/install-deps.sh @@ -110,7 +110,7 @@ fetch_and_unpack_termbenchpro() fetch_and_unpack_boxed() { - local boxed_cpp_version="1.2.2" + local boxed_cpp_version="1.3.0" fetch_and_unpack \ boxed-cpp-$boxed_cpp_version \ boxed-cpp-$boxed_cpp_version.tar.gz \ diff --git a/src/vtbackend/Hyperlink.h b/src/vtbackend/Hyperlink.h index ac98e08b66..8306010c3a 100644 --- a/src/vtbackend/Hyperlink.h +++ b/src/vtbackend/Hyperlink.h @@ -60,13 +60,7 @@ struct HyperlinkInfo } }; -namespace detail -{ - struct HyperlinkTag - { - }; -} // namespace detail -using HyperlinkId = boxed::boxed; +using HyperlinkId = boxed::boxed; bool is_local(HyperlinkInfo const& hyperlink); diff --git a/src/vtbackend/Image.h b/src/vtbackend/Image.h index 6a3927a50e..6bea029ff8 100644 --- a/src/vtbackend/Image.h +++ b/src/vtbackend/Image.h @@ -29,10 +29,7 @@ enum class ImageFormat RGBA, }; -// clang-format off -namespace detail { struct ImageId {}; } -using ImageId = boxed::boxed; // unique numerical image identifier -// clang-format on +using ImageId = boxed::boxed; // unique numerical image identifier struct ImageStats { @@ -198,11 +195,7 @@ class ImageFragment CellLocation _offset; }; -namespace detail -{ - struct ImageFragmentId; -} -using ImageFragmentId = boxed::boxed; +using ImageFragmentId = boxed::boxed; inline bool operator==(ImageFragment const& a, ImageFragment const& b) noexcept { diff --git a/src/vtbackend/primitives.h b/src/vtbackend/primitives.h index 53b21fb618..bbfa52ea65 100644 --- a/src/vtbackend/primitives.h +++ b/src/vtbackend/primitives.h @@ -21,45 +21,15 @@ using LineCount = vtpty::LineCount; using ColumnCount = vtpty::ColumnCount; using PageSize = vtpty::PageSize; -namespace detail::tags // {{{ -{ - // clang-format off - // column types - struct ColumnOffset {}; - struct ColumnPosition {}; - - // line types - struct LineOffset {}; - struct ScrollOffset {}; - - // misc. - struct TabStopCount {}; - - // generic length - struct Length {}; - - // range - struct From {}; - struct To {}; - - // margin - struct Top {}; - struct Left {}; - struct Bottom {}; - struct Right {}; - // clang-format on -} // namespace detail::tags -// }}} - // {{{ Column types /// ColumnPosition represents the absolute column on the visibile screen area /// (usually the main page unless scrolled upwards). /// /// A column position starts at 1. -using ColumnPosition = boxed::boxed; +using ColumnPosition = boxed::boxed; -using ColumnOffset = boxed::boxed; +using ColumnOffset = boxed::boxed; // }}} // {{{ Line types @@ -75,7 +45,7 @@ using MaxHistoryLineCount = std::variant; /// /// * 0 is top-most line on main page /// * -1 is the bottom most line in scrollback -using LineOffset = boxed::boxed; +using LineOffset = boxed::boxed; /// Represents the number of lines the viewport has been scrolled up into /// the scrollback lines history. @@ -83,7 +53,7 @@ using LineOffset = boxed::boxed; /// A value of 0 means that it is not scrolled at all (bottom), and /// a value equal to the number of scrollback lines means it is scrolled /// to the top. -using ScrollOffset = boxed::boxed; +using ScrollOffset = boxed::boxed; constexpr int operator*(LineCount a, ColumnCount b) noexcept { @@ -222,10 +192,10 @@ struct ColumnRange // {{{ Range /// Represents the first value of a range. -using From = boxed::boxed; +using From = boxed::boxed; /// Represents the last value of a range (inclusive). -using To = boxed::boxed; +using To = boxed::boxed; // Range (e.g. a range of lines from X to Y). struct Range @@ -248,10 +218,10 @@ struct Range // Rectangular operations // -using Top = boxed::boxed; -using Left = boxed::boxed; -using Bottom = boxed::boxed; -using Right = boxed::boxed; +using Top = boxed::boxed; +using Left = boxed::boxed; +using Bottom = boxed::boxed; +using Right = boxed::boxed; // Rectangular screen operations // @@ -294,7 +264,7 @@ constexpr Range vertical(PageMargin m) noexcept // {{{ Length // Lengths and Ranges -using Length = boxed::boxed; +using Length = boxed::boxed; // }}} // {{{ Coordinate types @@ -380,7 +350,7 @@ constexpr GridSize::iterator end(GridSize const& s) noexcept // }}} // {{{ misc -using TabStopCount = boxed::boxed; +using TabStopCount = boxed::boxed; // }}} // {{{ convenience methods diff --git a/src/vtpty/ImageSize.h b/src/vtpty/ImageSize.h index c219a3522b..29f5843dac 100644 --- a/src/vtpty/ImageSize.h +++ b/src/vtpty/ImageSize.h @@ -7,20 +7,11 @@ namespace vtpty { - -// clang-format off -namespace detail::tags -{ - struct Width {}; - struct Height {}; -} -// clang-format on - /// Representsthe width in pixels of an image (see ImageSize). -using Width = boxed::boxed; +using Width = boxed::boxed; /// Representsthe height in pixels of an image (see ImageSize). -using Height = boxed::boxed; +using Height = boxed::boxed; /// ImageSize represents the 2-dimensional size of an image (pixmap). struct ImageSize diff --git a/src/vtpty/PageSize.h b/src/vtpty/PageSize.h index af90069cf9..bb0af17f5c 100644 --- a/src/vtpty/PageSize.h +++ b/src/vtpty/PageSize.h @@ -6,22 +6,11 @@ namespace vtpty { - -namespace detail::tags -{ - struct LineCount - { - }; - struct ColumnCount - { - }; -} // namespace detail::tags - /// ColumnCount simply represents a number of columns. -using ColumnCount = boxed::boxed; +using ColumnCount = boxed::boxed; /// LineCount represents a number of lines. -using LineCount = boxed::boxed; +using LineCount = boxed::boxed; struct PageSize { diff --git a/src/vtpty/Pty.h b/src/vtpty/Pty.h index d00fd9f9a9..f07fc530c9 100644 --- a/src/vtpty/Pty.h +++ b/src/vtpty/Pty.h @@ -16,16 +16,8 @@ namespace vtpty { -namespace detail -{ - // clang-format off - struct PtyMasterHandle {}; - struct PtySlaveHandle {}; - // clang-format on -} // namespace detail - -using PtyMasterHandle = boxed::boxed; -using PtySlaveHandle = boxed::boxed; +using PtyMasterHandle = boxed::boxed; +using PtySlaveHandle = boxed::boxed; using PtyHandle = std::uintptr_t; class PtySlave