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

#include <Vga.h>

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

Public Types

enum  VgaControl { LineGraphics = 2, Blink = 3 }
 

Public Member Functions

virtual void setControl (VgaControl which)=0
 
virtual void clearControl (VgaControl which)=0
 
virtual bool setMode (int mode)=0
 
virtual bool setLargestTextMode ()=0
 
virtual bool isMode (size_t nCols, size_t nRows, bool bIsText, size_t nBpp=0)=0
 
virtual bool isLargestTextMode ()=0
 
virtual size_t getNumCols ()=0
 
virtual size_t getNumRows ()=0
 
virtual void rememberMode ()=0
 
virtual void restoreMode ()=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 operator uint16_t * () const =0
 

Detailed Description

Vga device abstraction.

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

Member Function Documentation

virtual void Vga::clearControl ( VgaControl  which)
pure virtual

Clears the given attribute mode control.

Implemented in X86Vga, ArmBeagleVga, and HostedVga.

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

Implemented in PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by BootIO::initialise(), and LocalIO::LocalIO().

+ Here is the caller graph for this function:

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

Implemented in PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by BootIO::initialise(), and LocalIO::LocalIO().

+ Here is the caller graph for this function:

virtual bool Vga::isLargestTextMode ( )
pure virtual

Tests if the current video mode is the largest text mode.

Returns
True if the current video mode is equal to the largest text mode.

Implemented in X86Vga, PPCVga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

virtual bool Vga::isMode ( size_t  nCols,
size_t  nRows,
bool  bIsText,
size_t  nBpp = 0 
)
pure virtual

Tests the current video mode.

Returns
True if the current mode matches the given arguments.

Implemented in X86Vga, PPCVga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

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 PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by LocalIO::moveCursor().

+ Here is the caller graph for this function:

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 PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by LocalIO::LocalIO().

+ Here is the caller graph for this function:

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 PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by LocalIO::enableRefreshes(), BootIO::initialise(), and LocalIO::LocalIO().

+ Here is the caller graph for this function:

virtual void Vga::rememberMode ( )
pure virtual

Stores the current video mode.

Implemented in PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by FramebufferFile::command(), and LocalIO::LocalIO().

+ Here is the caller graph for this function:

virtual void Vga::restoreMode ( )
pure virtual

Restores the saved video mode from a rememberMode() call.

Implemented in PPCVga, X86Vga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

Referenced by FramebufferFile::command(), and LocalIO::LocalIO().

+ Here is the caller graph for this function:

virtual void Vga::setControl ( VgaControl  which)
pure virtual

Sets the given attribute mode control.

Implemented in X86Vga, ArmBeagleVga, and HostedVga.

virtual bool Vga::setLargestTextMode ( )
pure virtual

Sets the largest possible text mode.

Returns
True on success, false on failure.

Implemented in X86Vga, PPCVga, ArmBeagleVga, MaltaVga, ArmVersatileVga, and HostedVga.

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

+ Here is the caller graph for this function:

virtual bool Vga::setMode ( int  mode)
pure virtual

Changes the mode the VGA device is in.

Parameters
nColsThe number of columns required.
nRowsThe number of rows required.
bIsTextTrue if the caller requires a text mode, false if graphical.
nBppOnly applicable for graphics modes - the number of bits per pixel.
Returns
True on success, false on failure.

Implemented in X86Vga, PPCVga, ArmBeagleVga, ArmVersatileVga, and HostedVga.

Referenced by FramebufferFile::command(), VbeDisplay::setScreenMode(), and VmwareGraphics::setScreenMode().

+ Here is the caller graph for this function:


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