mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:37:35 +00:00
AK: Move Stream
and SeekableStream
from LibCore
`Stream` will be qualified as `AK::Stream` until we remove the `Core::Stream` namespace. `IODevice` now reuses the `SeekMode` that is defined by `SeekableStream`, since defining its own would require us to qualify it with `AK::SeekMode` everywhere.
This commit is contained in:
parent
5f2ea31816
commit
8464da1439
96 changed files with 620 additions and 586 deletions
|
@ -1574,7 +1574,7 @@ void Editor::strip_styles(bool strip_anchored)
|
|||
m_refresh_needed = true;
|
||||
}
|
||||
|
||||
ErrorOr<void> Editor::reposition_cursor(Core::Stream::Stream& stream, bool to_end)
|
||||
ErrorOr<void> Editor::reposition_cursor(AK::Stream& stream, bool to_end)
|
||||
{
|
||||
auto cursor = m_cursor;
|
||||
auto saved_cursor = m_cursor;
|
||||
|
@ -1596,12 +1596,12 @@ ErrorOr<void> Editor::reposition_cursor(Core::Stream::Stream& stream, bool to_en
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::move_absolute(u32 row, u32 col, Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::move_absolute(u32 row, u32 col, AK::Stream& stream)
|
||||
{
|
||||
return stream.write_entire_buffer(DeprecatedString::formatted("\033[{};{}H", row, col).bytes());
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::move_relative(int row, int col, Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::move_relative(int row, int col, AK::Stream& stream)
|
||||
{
|
||||
char x_op = 'A', y_op = 'D';
|
||||
|
||||
|
@ -1753,7 +1753,7 @@ DeprecatedString Style::to_deprecated_string() const
|
|||
return builder.to_deprecated_string();
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::apply_style(Style const& style, Core::Stream::Stream& stream, bool is_starting)
|
||||
ErrorOr<void> VT::apply_style(Style const& style, AK::Stream& stream, bool is_starting)
|
||||
{
|
||||
if (is_starting) {
|
||||
TRY(stream.write_entire_buffer(DeprecatedString::formatted("\033[{};{};{}m{}{}{}",
|
||||
|
@ -1771,7 +1771,7 @@ ErrorOr<void> VT::apply_style(Style const& style, Core::Stream::Stream& stream,
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::clear_lines(size_t count_above, size_t count_below, Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::clear_lines(size_t count_above, size_t count_below, AK::Stream& stream)
|
||||
{
|
||||
if (count_below + count_above == 0) {
|
||||
TRY(stream.write_entire_buffer("\033[2K"sv.bytes()));
|
||||
|
@ -1790,17 +1790,17 @@ ErrorOr<void> VT::clear_lines(size_t count_above, size_t count_below, Core::Stre
|
|||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::save_cursor(Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::save_cursor(AK::Stream& stream)
|
||||
{
|
||||
return stream.write_entire_buffer("\033[s"sv.bytes());
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::restore_cursor(Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::restore_cursor(AK::Stream& stream)
|
||||
{
|
||||
return stream.write_entire_buffer("\033[u"sv.bytes());
|
||||
}
|
||||
|
||||
ErrorOr<void> VT::clear_to_end_of_line(Core::Stream::Stream& stream)
|
||||
ErrorOr<void> VT::clear_to_end_of_line(AK::Stream& stream)
|
||||
{
|
||||
return stream.write_entire_buffer("\033[K"sv.bytes());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue