mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2025-10-01 17:29:07 +08:00
Add modules support (#1015)
Add experimental C++20 module suppport. Co-authored-by: ArthurSonzogni <sonzogniarthur@gmail.com>
This commit is contained in:
18
src/ftxui/screen/box.cppm
Normal file
18
src/ftxui/screen/box.cppm
Normal 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;
|
||||
}
|
22
src/ftxui/screen/color.cppm
Normal file
22
src/ftxui/screen/color.cppm
Normal 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;
|
||||
}
|
||||
}
|
20
src/ftxui/screen/color_info.cppm
Normal file
20
src/ftxui/screen/color_info.cppm
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* @file color_info.cppm
|
||||
* @brief Module file for the ColorInfo struct of the Screen module
|
||||
*/
|
||||
|
||||
module;
|
||||
|
||||
#include <ftxui/screen/color_info.hpp>
|
||||
|
||||
export module ftxui.screen.color_info;
|
||||
|
||||
/**
|
||||
* @namespace ftxui
|
||||
* @brief The FTXUI ftxui:: namespace
|
||||
*/
|
||||
export namespace ftxui {
|
||||
using ftxui::ColorInfo;
|
||||
|
||||
using ftxui::GetColorInfo;
|
||||
}
|
19
src/ftxui/screen/deprecated.cppm
Normal file
19
src/ftxui/screen/deprecated.cppm
Normal 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;
|
||||
}
|
18
src/ftxui/screen/image.cppm
Normal file
18
src/ftxui/screen/image.cppm
Normal 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;
|
||||
}
|
18
src/ftxui/screen/pixel.cppm
Normal file
18
src/ftxui/screen/pixel.cppm
Normal 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;
|
||||
}
|
24
src/ftxui/screen/screen.cppm
Normal file
24
src/ftxui/screen/screen.cppm
Normal 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;
|
||||
}
|
22
src/ftxui/screen/string.cppm
Normal file
22
src/ftxui/screen/string.cppm
Normal 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;
|
||||
}
|
26
src/ftxui/screen/terminal.cppm
Normal file
26
src/ftxui/screen/terminal.cppm
Normal 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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user