aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/include
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@ost.ch>2026-01-13 10:14:22 +0100
committerFelix Morgner <felix.morgner@ost.ch>2026-01-13 10:14:22 +0100
commit1cba17bf7b23c5b098af2301e5abce5f5761f061 (patch)
treea3a41a083a071203127e1c5d1c475f7fa291cbc2 /arch/x86_64/include
parentfb1c180c431e3ac07ca56f53299edea316883842 (diff)
downloadteachos-1cba17bf7b23c5b098af2301e5abce5f5761f061.tar.xz
teachos-1cba17bf7b23c5b098af2301e5abce5f5761f061.zip
x86_64/vga: extract special character handling
Diffstat (limited to 'arch/x86_64/include')
-rw-r--r--arch/x86_64/include/x86_64/vga/text.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/x86_64/include/x86_64/vga/text.hpp b/arch/x86_64/include/x86_64/vga/text.hpp
index fcda67f..64cb2b9 100644
--- a/arch/x86_64/include/x86_64/vga/text.hpp
+++ b/arch/x86_64/include/x86_64/vga/text.hpp
@@ -129,6 +129,25 @@ namespace teachos::vga::x86_64::text
[[nodiscard]] auto column() const noexcept -> std::ptrdiff_t;
[[nodiscard]] auto line() const noexcept -> std::ptrdiff_t;
+ //! Process the semantics of special code points, for example newlines and carriage returns.
+ //!
+ //! @param code_point The code point to process.
+ //! @param attribute The attribute to use when writing to the text buffer.
+ //! @return @p true iff. the code point was handled, @p false otherwise.
+ auto handle_special_code_point(char code_point, attribute attribute) -> bool;
+
+ //! Perform the actual output to the buffer.
+ //!
+ //! @param code_points The code points to output..
+ //! @param attribute The attribute to use when writing to the text buffer.
+ auto put(std::string_view code_points, attribute attribute) -> void;
+
+ //! Perform the actual output to the buffer.
+ //!
+ //! @param code_point The code point to output.
+ //! @param attribute The attribute to use when writing to the text buffer.
+ auto put(char code_point, attribute attribute) -> void;
+
/**
* @brief Move the cursor to a new line, scrolling the buffer if necessary.
*/