mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 18:18:12 +00:00
Kernel/Graphics: Rename TextModeConsole => VGATextModeConsole
This change represents well the fact that the text mode console is based on VGA text mode.
This commit is contained in:
parent
97a769d2a9
commit
00dbd667d5
4 changed files with 19 additions and 19 deletions
47
Kernel/Graphics/Console/VGATextModeConsole.h
Normal file
47
Kernel/Graphics/Console/VGATextModeConsole.h
Normal file
|
@ -0,0 +1,47 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/RefCounted.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Graphics/Console/Console.h>
|
||||
#include <Kernel/Locking/Spinlock.h>
|
||||
|
||||
namespace Kernel::Graphics {
|
||||
class VGATextModeConsole final : public Console {
|
||||
public:
|
||||
static NonnullRefPtr<VGATextModeConsole> initialize();
|
||||
virtual size_t chars_per_line() const override { return width(); };
|
||||
|
||||
virtual bool has_hardware_cursor() const override { return true; }
|
||||
virtual bool is_hardware_paged_capable() const override { return true; }
|
||||
|
||||
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;
|
||||
virtual void write(char ch, bool critical = false) override;
|
||||
virtual void flush(size_t, size_t, size_t, size_t) override { }
|
||||
|
||||
virtual void enable() override { }
|
||||
virtual void disable() override { }
|
||||
|
||||
private:
|
||||
void clear_vga_row(u16 row);
|
||||
|
||||
VGATextModeConsole();
|
||||
|
||||
mutable Spinlock m_vga_lock;
|
||||
|
||||
NonnullOwnPtr<Memory::Region> m_vga_region;
|
||||
VirtualAddress m_current_vga_window;
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue