|
The Pedigree Project 0.1
|
#include <Vga.h>
Inheritance diagram for HostedVga:
Collaboration diagram for HostedVga:Public Member Functions | |
| virtual bool | setLargestTextMode () |
| virtual size_t | getNumCols () |
| virtual size_t | getNumRows () |
| virtual void | pokeBuffer (uint8_t *pBuffer, size_t nBufLen) |
| virtual void | peekBuffer (uint8_t *pBuffer, size_t nBufLen) |
| virtual void | moveCursor (size_t nX, size_t nY) |
| bool | initialise () |
| operator uint16_t * () const | |
Public Member Functions inherited from Vga | |
| virtual void | flush () |
| virtual void | enterPanicMode () |
| virtual bool | setFramebuffer (Framebuffer *) |
Private Member Functions | |
| HostedVga (const HostedVga &) | |
| HostedVga & | operator= (const HostedVga &) |
Static Private Member Functions | |
| static void | printAttrAsAnsi (uint8_t attr) |
| static uint8_t | ansiColourFixup (uint8_t colour) |
Private Attributes | |
| size_t | m_nWidth |
| size_t | m_nHeight |
| size_t | m_CursorX |
| size_t | m_CursorY |
| uint16_t * | m_pBackbuffer |
Vga device abstraction.
Definition at line 29 of file kernel/machine/hosted/Vga.h.
| HostedVga::HostedVga | ( | ) |
Definition at line 25 of file hosted/Vga.cc.
|
virtual |
Definition at line 28 of file hosted/Vga.cc.
|
staticprivate |
Fix up the given colour into a proper ANSI colour.
Definition at line 97 of file hosted/Vga.cc.
Referenced by printAttrAsAnsi().
Here is the caller graph for this function:
|
inlinevirtual |
Implements Vga.
Definition at line 43 of file kernel/machine/hosted/Vga.h.
References m_nWidth.
|
inlinevirtual |
Implements Vga.
Definition at line 50 of file kernel/machine/hosted/Vga.h.
References m_nHeight.
| bool HostedVga::initialise | ( | ) |
Definition at line 86 of file hosted/Vga.cc.
|
virtual |
Moves the cursor to the position specified by the parameters.
| nX | The column to move to. |
| nY | The row to move to. |
Implements Vga.
Definition at line 77 of file hosted/Vga.cc.
References m_CursorX, m_CursorY, and m_pBackbuffer.
Referenced by pokeBuffer().
Here is the caller graph for this function:
|
inlinevirtual |
Implements Vga.
Definition at line 86 of file kernel/machine/hosted/Vga.h.
|
virtual |
Copies the current framebuffer into the given buffer.
The buffer is assumed to be in the correct format for directly copying from video memory. This will obviously depend on the current mode (text/graphical) as well as resolution and bits per pixel (graphics mode only).
| pBuffer | A pointer to the buffer. |
| nBufLen | The length of pBuffer. |
Implements Vga.
Definition at line 67 of file hosted/Vga.cc.
References m_nWidth, and m_pBackbuffer.
|
virtual |
Copies the given buffer into video memory, replacing the current framebuffer.
The buffer is assumed to be in the correct format for directly copying into video memory. This will obviously depend on the current mode (text/graphical) as well as resolution and bits per pixel (graphics mode only).
| pBuffer | A pointer to the buffer to swap into video memory. |
| nBufLen | The length of pBuffer. |
Implements Vga.
Definition at line 36 of file hosted/Vga.cc.
References m_CursorX, m_CursorY, m_nHeight, m_nWidth, m_pBackbuffer, moveCursor(), and printAttrAsAnsi().
|
staticprivate |
Print the given VGA attribute as an ANSI escape sequence.
Definition at line 129 of file hosted/Vga.cc.
References ansiColourFixup().
Referenced by pokeBuffer().
Here is the caller graph for this function:
|
virtual |
Sets the largest possible text mode.
Implements Vga.
Definition at line 32 of file hosted/Vga.cc.
|
private |
Cursor X.
Definition at line 117 of file kernel/machine/hosted/Vga.h.
Referenced by moveCursor(), and pokeBuffer().
|
private |
Cursor Y.
Definition at line 122 of file kernel/machine/hosted/Vga.h.
Referenced by moveCursor(), and pokeBuffer().
|
private |
The height of the current mode.
Definition at line 112 of file kernel/machine/hosted/Vga.h.
Referenced by getNumRows(), and pokeBuffer().
|
private |
The width of the current mode.
Definition at line 107 of file kernel/machine/hosted/Vga.h.
Referenced by getNumCols(), peekBuffer(), and pokeBuffer().
|
private |
Backbuffer for text.
Definition at line 127 of file kernel/machine/hosted/Vga.h.
Referenced by moveCursor(), peekBuffer(), and pokeBuffer().