The Pedigree Project 0.1
Public Member Functions | List of all members
Vga Class Referenceabstract

#include <Vga.h>

+ Inheritance diagram for Vga:
+ Collaboration diagram for Vga:

Public Member Functions

virtual bool setLargestTextMode ()=0
 
virtual size_t getNumCols ()=0
 
virtual size_t getNumRows ()=0
 
virtual void pokeBuffer (uint8_t *pBuffer, size_t nBufLen)=0
 
virtual void peekBuffer (uint8_t *pBuffer, size_t nBufLen)=0
 
virtual void moveCursor (size_t nX, size_t nY)=0
 
virtual void flush ()
 
virtual void enterPanicMode ()
 
virtual bool setFramebuffer (Framebuffer *)
 
virtual operator uint16_t * () const =0
 

Detailed Description

Vga device abstraction.

Definition at line 30 of file include/pedigree/kernel/machine/Vga.h.

Member Function Documentation

◆ enterPanicMode()

virtual void Vga::enterPanicMode ( )
inlinevirtual

Definition at line 84 of file include/pedigree/kernel/machine/Vga.h.

◆ flush()

virtual void Vga::flush ( )
inlinevirtual

Definition at line 80 of file include/pedigree/kernel/machine/Vga.h.

◆ getNumCols()

virtual size_t Vga::getNumCols ( )
pure virtual
Returns
The number of columns in the current mode.

Implemented in HostedVga, and X86Vga.

Referenced by Machine::displayShutdownMessage(), TextIO::flip(), BootIO::initialise(), and TextIO::initialise().

+ Here is the caller graph for this function:

◆ getNumRows()

virtual size_t Vga::getNumRows ( )
pure virtual
Returns
The number of rows in the current mode.

Implemented in HostedVga, and X86Vga.

Referenced by Machine::displayShutdownMessage(), TextIO::flip(), BootIO::initialise(), and TextIO::initialise().

+ Here is the caller graph for this function:

◆ moveCursor()

virtual void Vga::moveCursor ( size_t  nX,
size_t  nY 
)
pure virtual

Moves the cursor to the position specified by the parameters.

Parameters
nXThe column to move to.
nYThe row to move to.

Implemented in HostedVga, and X86Vga.

Referenced by Machine::displayShutdownMessage(), TextIO::markPrimary(), LocalIO::moveCursor(), and TextIO::writeStr().

+ Here is the caller graph for this function:

◆ peekBuffer()

virtual void Vga::peekBuffer ( uint8_t *  pBuffer,
size_t  nBufLen 
)
pure 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).

Parameters
Apointer to the buffer.
Thelength of pBuffer.

Implemented in HostedVga, and X86Vga.

◆ pokeBuffer()

virtual void Vga::pokeBuffer ( uint8_t *  pBuffer,
size_t  nBufLen 
)
pure 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).

Parameters
Apointer to the buffer to swap into video memory.
Thelength of pBuffer.

Implemented in HostedVga, and X86Vga.

◆ setFramebuffer()

virtual bool Vga::setFramebuffer ( Framebuffer *  )
inlinevirtual

Definition at line 88 of file include/pedigree/kernel/machine/Vga.h.

◆ setLargestTextMode()

virtual bool Vga::setLargestTextMode ( )
pure virtual

Sets the largest possible text mode.

Returns
True on success, false on failure.

Implemented in HostedVga, and X86Vga.

Referenced by FramebufferFile::command(), Machine::displayShutdownMessage(), BootIO::initialise(), and TextIO::initialise().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: