diff options
author | Liav A <liavalb@gmail.com> | 2022-09-20 22:44:48 +0300 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-09-20 20:51:03 +0100 |
commit | 0a5416a87ac12a45e682346d0e6ec1a2eff6178f (patch) | |
tree | 752e69c95ee0a3840c6ebd9e22189301c218171d /Kernel | |
parent | a40f289ee5512b70cd9633b3f0f07bcfdcdb0f8f (diff) | |
download | serenity-0a5416a87ac12a45e682346d0e6ec1a2eff6178f.zip |
Kernel: Mark Console::{hide,show}_cursor methods protected
Only the Console code in the Graphics directory should be able to call
on these methods. The set_cursor method stays public as VirtualConsole
uses that method to change the cursor position.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/Graphics/Console/Console.h | 5 | ||||
-rw-r--r-- | Kernel/Graphics/Console/GenericFramebufferConsole.h | 5 | ||||
-rw-r--r-- | Kernel/Graphics/Console/VGATextModeConsole.h | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/Kernel/Graphics/Console/Console.h b/Kernel/Graphics/Console/Console.h index afaef18e55..d55896101a 100644 --- a/Kernel/Graphics/Console/Console.h +++ b/Kernel/Graphics/Console/Console.h @@ -50,8 +50,6 @@ public: virtual bool has_hardware_cursor() const = 0; virtual void set_cursor(size_t x, size_t y) = 0; - virtual void hide_cursor() = 0; - virtual void show_cursor() = 0; virtual void clear(size_t x, size_t y, size_t length) = 0; virtual void write(size_t x, size_t y, char ch, Color background, Color foreground, bool critical = false) = 0; @@ -62,6 +60,9 @@ public: virtual ~Console() = default; protected: + virtual void hide_cursor() = 0; + virtual void show_cursor() = 0; + Console(size_t width, size_t height) : m_width(width) , m_height(height) diff --git a/Kernel/Graphics/Console/GenericFramebufferConsole.h b/Kernel/Graphics/Console/GenericFramebufferConsole.h index 953f694b67..0b38e43097 100644 --- a/Kernel/Graphics/Console/GenericFramebufferConsole.h +++ b/Kernel/Graphics/Console/GenericFramebufferConsole.h @@ -24,8 +24,6 @@ public: virtual bool has_hardware_cursor() const override { return false; } virtual void set_cursor(size_t x, size_t y) override; - virtual void hide_cursor() override; - virtual void show_cursor() override; virtual void clear(size_t x, size_t y, size_t length) override; virtual void write(size_t x, size_t y, char ch, Color background, Color foreground, bool critical = false) override; @@ -38,6 +36,9 @@ public: virtual void set_resolution(size_t width, size_t height, size_t pitch) = 0; protected: + virtual void hide_cursor() override; + virtual void show_cursor() override; + GenericFramebufferConsoleImpl(size_t width, size_t height, size_t pitch) : Console(width, height) , m_pitch(pitch) diff --git a/Kernel/Graphics/Console/VGATextModeConsole.h b/Kernel/Graphics/Console/VGATextModeConsole.h index 75a669771a..e67125b2dc 100644 --- a/Kernel/Graphics/Console/VGATextModeConsole.h +++ b/Kernel/Graphics/Console/VGATextModeConsole.h @@ -21,8 +21,6 @@ public: virtual size_t bytes_per_base_glyph() const override { return 2; } virtual void set_cursor(size_t x, size_t y) override; - virtual void hide_cursor() override; - virtual void show_cursor() override; virtual void clear(size_t x, size_t y, size_t length) override; virtual void write(size_t x, size_t y, char ch, bool critical = false) override; virtual void write(size_t x, size_t y, char ch, Color background, Color foreground, bool critical = false) override; @@ -33,6 +31,9 @@ public: virtual void disable() override { } private: + virtual void hide_cursor() override; + virtual void show_cursor() override; + void clear_vga_row(u16 row); explicit VGATextModeConsole(NonnullOwnPtr<Memory::Region>); |