Gnash  0.8.10
Public Member Functions | Protected Member Functions | Protected Attributes
gnash::renderer::rawfb::RawFBDevice Class Reference

#include <RawFBDevice.h>

Inheritance diagram for gnash::renderer::rawfb::RawFBDevice:
gnash::renderer::GnashDevice

List of all members.

Public Member Functions

 RawFBDevice ()
 RawFBDevice (int)
 RawFBDevice (int argc, char *argv[])
virtual ~RawFBDevice ()
dtype_t getType ()
bool initDevice (int argc, char *argv[])
bool attachWindow (GnashDevice::native_window_t window)
const char * getErrorString (int error)
 Return a string with the error code as text, instead of a numeric value.
int getDepth ()
 Get the depth of the device.
size_t getWidth ()
 Get the width of the device.
size_t getHeight ()
 Get the Height of the device.
bool supportsRenderer (GnashDevice::rtype_t)
 Is the specified renderer supported by this hardware ?
bool isBufferDestroyed ()
 Are buffers destroyed ?
int getID ()
 Get the window ID handle.
int getRedSize ()
 Get the size of the Red pixel.
int getGreenSize ()
 Get the size of the Green pixel.
int getBlueSize ()
 Get the size of the Blue pixel.
bool isNativeRender ()
 Is this renderering natively.
native_window_t getDrawableWindow ()
void createWindow (const char *name, int x, int y, int width, int height)
boost::uint8_t * getFBMemory ()
 Get the memory from the real framebuffer.
boost::uint8_t * getOffscreenBuffer ()
 Get the memory from an offscreen buffer to support Double Buffering.
size_t getStride ()
 Query the system for all supported configs.
size_t getFBMemSize ()
int getHandle ()
void eventLoop (size_t passes)
bool setGrayscaleLUT8 ()
bool isSingleBuffered ()
 Is this device single buffered.
bool swapBuffers ()

Protected Member Functions

void clear ()
 Clear the framebuffer memory.

Protected Attributes

int _fd
std::string _filespec
struct fb_fix_screeninfo _fixinfo
struct fb_var_screeninfo _varinfo
boost::uint8_t * _fbmem
boost::scoped_ptr< boost::uint8_t > _offscreen_buffer
struct fb_cmap _cmap

Constructor & Destructor Documentation

gnash::renderer::rawfb::RawFBDevice::RawFBDevice ( )
gnash::renderer::rawfb::RawFBDevice::RawFBDevice ( int  )

References _cmap, initDevice(), and _.

gnash::renderer::rawfb::RawFBDevice::RawFBDevice ( int  argc,
char *  argv[] 
)
gnash::renderer::rawfb::RawFBDevice::~RawFBDevice ( ) [virtual]

References _fbmem, _, _offscreen_buffer, and _fd.


Member Function Documentation

bool gnash::renderer::rawfb::RawFBDevice::attachWindow ( GnashDevice::native_window_t  window) [virtual]

Attach Native Window to device. This connects a Native Window to the device so surfaces can be created.

Implements gnash::renderer::GnashDevice.

References GNASH_REPORT_FUNCTION, _fbmem, _fixinfo, isSingleBuffered(), and _offscreen_buffer.

void gnash::renderer::rawfb::RawFBDevice::clear ( ) [protected]

Clear the framebuffer memory.

References GNASH_REPORT_FUNCTION, _fbmem, _fixinfo, and _offscreen_buffer.

void gnash::renderer::rawfb::RawFBDevice::createWindow ( const char *  name,
int  x,
int  y,
int  width,
int  height 
)

References GNASH_REPORT_FUNCTION.

void gnash::renderer::rawfb::RawFBDevice::eventLoop ( size_t  passes)

Start an RAWFB event loop. This is only used by testing. Note that calling this function blocks until the specified number of events have been handled. The first 5 are used up by creating the window.

Parameters:
passesthe number of events to process before returning.
Returns:
nothing

References GNASH_REPORT_FUNCTION.

int gnash::renderer::rawfb::RawFBDevice::getBlueSize ( ) [inline, virtual]

Get the size of the Blue pixel.

Implements gnash::renderer::GnashDevice.

References _varinfo.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

int gnash::renderer::rawfb::RawFBDevice::getDepth ( ) [inline, virtual]

Get the depth of the device.

Implements gnash::renderer::GnashDevice.

References _varinfo.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

native_window_t gnash::renderer::rawfb::RawFBDevice::getDrawableWindow ( ) [inline]
const char * gnash::renderer::rawfb::RawFBDevice::getErrorString ( int  error) [virtual]

Return a string with the error code as text, instead of a numeric value.

Implements gnash::renderer::GnashDevice.

boost::uint8_t* gnash::renderer::rawfb::RawFBDevice::getFBMemory ( ) [inline, virtual]

Get the memory from the real framebuffer.

Reimplemented from gnash::renderer::GnashDevice.

References _fbmem.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

size_t gnash::renderer::rawfb::RawFBDevice::getFBMemSize ( ) [inline, virtual]
int gnash::renderer::rawfb::RawFBDevice::getGreenSize ( ) [inline, virtual]

Get the size of the Green pixel.

Implements gnash::renderer::GnashDevice.

References _varinfo.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

int gnash::renderer::rawfb::RawFBDevice::getHandle ( ) [inline]

References _fd.

Referenced by gnash::gui::FBAggGlue::init().

size_t gnash::renderer::rawfb::RawFBDevice::getHeight ( ) [inline, virtual]

Get the Height of the device.

Implements gnash::renderer::GnashDevice.

References _varinfo.

int gnash::renderer::rawfb::RawFBDevice::getID ( ) [inline, virtual]

Get the window ID handle.

Implements gnash::renderer::GnashDevice.

boost::uint8_t* gnash::renderer::rawfb::RawFBDevice::getOffscreenBuffer ( ) [inline, virtual]

Get the memory from an offscreen buffer to support Double Buffering.

Reimplemented from gnash::renderer::GnashDevice.

References _offscreen_buffer.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

int gnash::renderer::rawfb::RawFBDevice::getRedSize ( ) [inline, virtual]

Get the size of the Red pixel.

Implements gnash::renderer::GnashDevice.

References _varinfo.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

size_t gnash::renderer::rawfb::RawFBDevice::getStride ( ) [inline, virtual]

Query the system for all supported configs.

Get the stride of the device

Implements gnash::renderer::GnashDevice.

References _fixinfo.

Referenced by gnash::gui::FBAggGlue::createRenderHandler().

dtype_t gnash::renderer::rawfb::RawFBDevice::getType ( ) [inline, virtual]

Get the type of the instatiated device. Since the renderer has a single value for the supported device, this is used to see which device has been loaded.

Implements gnash::renderer::GnashDevice.

References gnash::renderer::GnashDevice::RAWFB.

size_t gnash::renderer::rawfb::RawFBDevice::getWidth ( ) [inline, virtual]

Get the width of the device.

Implements gnash::renderer::GnashDevice.

References _varinfo.

bool gnash::renderer::rawfb::RawFBDevice::initDevice ( int  argc,
char *  argv[] 
) [virtual]

Initialize GNASH Device layer. This mostly just initializes all the private data.

Implements gnash::renderer::GnashDevice.

Referenced by RawFBDevice().

bool gnash::renderer::rawfb::RawFBDevice::isBufferDestroyed ( ) [inline, virtual]

Are buffers destroyed ?

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::rawfb::RawFBDevice::isNativeRender ( ) [inline, virtual]

Is this renderering natively.

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::rawfb::RawFBDevice::isSingleBuffered ( ) [inline, virtual]

Is this device single buffered.

Implements gnash::renderer::GnashDevice.

Referenced by gnash::gui::FBAggGlue::createRenderHandler(), and attachWindow().

bool gnash::renderer::rawfb::RawFBDevice::setGrayscaleLUT8 ( )

For 8 bit (palette / LUT) modes, sets a grayscale palette. This GUI currently does not support palette modes.

References GNASH_REPORT_FUNCTION, gnash::key::i, _, _cmap, malloc(), CMAP_SIZE, gnash::key::r, gnash::key::g, gnash::key::b, TO_16BIT, and _fd.

Referenced by gnash::gui::FBAggGlue::init().

bool gnash::renderer::rawfb::RawFBDevice::supportsRenderer ( GnashDevice::rtype_t  rtype) [inline, virtual]

Is the specified renderer supported by this hardware ?

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::rawfb::RawFBDevice::swapBuffers ( ) [virtual]

Reimplemented from gnash::renderer::GnashDevice.

References _fbmem, _offscreen_buffer, and _fixinfo.


Member Data Documentation

struct fb_cmap gnash::renderer::rawfb::RawFBDevice::_cmap [protected]

Referenced by RawFBDevice(), and setGrayscaleLUT8().

boost::uint8_t* gnash::renderer::rawfb::RawFBDevice::_fbmem [protected]
struct fb_fix_screeninfo gnash::renderer::rawfb::RawFBDevice::_fixinfo [protected]
boost::scoped_ptr<boost::uint8_t> gnash::renderer::rawfb::RawFBDevice::_offscreen_buffer [protected]
struct fb_var_screeninfo gnash::renderer::rawfb::RawFBDevice::_varinfo [protected]

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