Add modules support

This commit is contained in:
Toyosatomimi no Miko
2025-03-25 18:49:18 -04:00
parent 5bf8ee819b
commit 69928b374e
40 changed files with 985 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
/**
* @file Box.cppm
* @brief Module file for the Box struct of the Screen module
*/
module;
#include <ftxui/screen/box.hpp>
export module ftxui.screen.Box;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::Box;
}

View File

@@ -0,0 +1,22 @@
/**
* @file Color.cppm
* @brief Module file for the Color class of the Screen module
*/
module;
#include <ftxui/screen/color.hpp>
export module ftxui.screen.Color;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::Color;
inline namespace literals {
using ftxui::literals::operator""_rgb;
}
}

View File

@@ -0,0 +1,20 @@
/**
* @file ColorInfo.cppm
* @brief Module file for the ColorInfo struct of the Screen module
*/
module;
#include <ftxui/screen/color_info.hpp>
export module ftxui.screen.ColorInfo;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::ColorInfo;
using ftxui::GetColorInfo;
}

View File

@@ -0,0 +1,19 @@
/**
* @file Box.cppm
* @brief Module file for the deprecated parts of the Screen module
*/
module;
#include <ftxui/screen/deprecated.hpp>
export module ftxui.screen.Deprecated;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::wchar_width;
using ftxui::wstring_width;
}

View File

@@ -0,0 +1,18 @@
/**
* @file Image.cppm
* @brief Module file for the Image class of the Screen module
*/
module;
#include <ftxui/screen/image.hpp>
export module ftxui.screen.Image;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::Image;
}

View File

@@ -0,0 +1,18 @@
/**
* @file Pixel.cppm
* @brief Module file for the Pixel struct of the Screen module
*/
module;
#include <ftxui/screen/pixel.hpp>
export module ftxui.screen.Pixel;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::Pixel;
}

View File

@@ -0,0 +1,24 @@
/**
* @file Screen.cppm
* @brief Module file for the Screen class of the Screen module
*/
module;
#include <ftxui/screen/screen.hpp>
export module ftxui.screen.Screen;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
namespace Dimension {
using ftxui::Dimension::Fixed;
using ftxui::Dimension::Full;
}
using ftxui::Image;
using ftxui::Screen;
}

View File

@@ -0,0 +1,22 @@
/**
* @file String.cppm
* @brief Module file for string functions of the Screen module
*/
module;
#include <ftxui/screen/string.hpp>
export module ftxui.screen.String;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::to_string;
using ftxui::to_wstring;
using ftxui::string_width;
using ftxui::Utf8ToGlyphs;
using ftxui::CellToGlyphIndex;
}

View File

@@ -0,0 +1,26 @@
/**
* @file Terminal.cppm
* @brief Module file for the Terminal namespace of the Screen module
*/
module;
#include <ftxui/screen/terminal.hpp>
export module ftxui.screen.Terminal;
/**
* @namespace ftxui
* @brief The FTXUI ftxui:: namespace
*/
export namespace ftxui {
using ftxui::Dimensions;
namespace Terminal {
using ftxui::Terminal::Size;
using ftxui::Terminal::SetFallbackSize;
using ftxui::Terminal::Color;
using ftxui::Terminal::ColorSupport;
using ftxui::Terminal::SetColorSupport;
}
}