Gnash  0.8.10
Public Member Functions | Protected Attributes
gnash::renderer::x11::X11Device Class Reference

#include <X11Device.h>

Inheritance diagram for gnash::renderer::x11::X11Device:
gnash::renderer::GnashDevice

List of all members.

Public Member Functions

 X11Device ()
 X11Device (int)
 X11Device (int argc, char *argv[])
virtual ~X11Device ()
dtype_t getType ()
size_t getStride ()
 Query the system for all supported configs.
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 isSingleBuffered ()
 Is this device single buffered.
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.
int getHandle ()
void createWindow (const char *name, int x, int y, int width, int height)
void eventLoop (size_t passes)

Protected Attributes

Display * _display
int _screennum
Window _root
Window _window
Colormap _colormap
Visual * _visual
Screen * _screen
int _depth
XVisualInfo * _vinfo
int _vid

Constructor & Destructor Documentation

gnash::renderer::x11::X11Device::X11Device ( )
gnash::renderer::x11::X11Device::X11Device ( int  vid)
gnash::renderer::x11::X11Device::X11Device ( int  argc,
char *  argv[] 
)
gnash::renderer::x11::X11Device::~X11Device ( ) [virtual]

Member Function Documentation

bool gnash::renderer::x11::X11Device::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, and _window.

void gnash::renderer::x11::X11Device::createWindow ( const char *  name,
int  x,
int  y,
int  width,
int  height 
)
void gnash::renderer::x11::X11Device::eventLoop ( size_t  passes)

Start an X11 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 width, height, and _display.

int gnash::renderer::x11::X11Device::getBlueSize ( ) [inline, virtual]

Get the size of the Blue pixel.

Implements gnash::renderer::GnashDevice.

References getRedSize().

int gnash::renderer::x11::X11Device::getDepth ( ) [inline, virtual]

Get the depth of the device.

Implements gnash::renderer::GnashDevice.

References _display, and _screennum.

const char * gnash::renderer::x11::X11Device::getErrorString ( int  error) [virtual]

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

Implements gnash::renderer::GnashDevice.

References _display, and _.

int gnash::renderer::x11::X11Device::getGreenSize ( ) [inline, virtual]

Get the size of the Green pixel.

Implements gnash::renderer::GnashDevice.

References getRedSize().

int gnash::renderer::x11::X11Device::getHandle ( ) [inline]

References _window.

size_t gnash::renderer::x11::X11Device::getHeight ( ) [inline, virtual]

Get the Height of the device.

Implements gnash::renderer::GnashDevice.

References _screen.

int gnash::renderer::x11::X11Device::getID ( ) [inline, virtual]

Get the window ID handle.

Implements gnash::renderer::GnashDevice.

References _window.

int gnash::renderer::x11::X11Device::getRedSize ( ) [inline, virtual]

Get the size of the Red pixel.

Implements gnash::renderer::GnashDevice.

References _vinfo.

Referenced by getGreenSize(), and getBlueSize().

size_t gnash::renderer::x11::X11Device::getStride ( ) [inline, virtual]

Query the system for all supported configs.

Get the stride of the device

Implements gnash::renderer::GnashDevice.

dtype_t gnash::renderer::x11::X11Device::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::X11.

size_t gnash::renderer::x11::X11Device::getWidth ( ) [inline, virtual]

Get the width of the device.

Implements gnash::renderer::GnashDevice.

References _screen.

bool gnash::renderer::x11::X11Device::initDevice ( int  argc,
char *  argv[] 
) [virtual]
Note:
: There are a few steps required to initialize an EGL Device. This uses threee methods to do so, two are defaults from the base class, one is an additional class that is EGL specific.

To start, initialize the device with the command line arguments. These are ignored by EGL, but passed through here to follow the way most other Devices need to be initialized.

Once initialized, EGL must be told which Client API to use, this is either OpenVG, OpenGLES1, or OpenGLES2. To do this, we bind the EGL device to the client API.

Once bound, the last step attaches the window surface of the desktop or framebuffer to EGL. This is what binds EGL to the desktop or framebuffer.

This is done by bindClient() later on

Implements gnash::renderer::GnashDevice.

References dbglogfile, GNASH_REPORT_FUNCTION, gnash::renderer::EGLDevice::_eglDisplay, _, gnash::renderer::EGLDevice::getErrorString(), gnash::renderer::EGLDevice::_quality, gnash::renderer::EGLDevice::LOW, gnash::renderer::EGLDevice::_eglConfig, gnash::renderer::EGLDevice::MEDIUM, gnash::renderer::EGLDevice::HIGH, gnash::renderer::EGLDevice::checkEGLConfig(), and gnash::renderer::EGLDevice::printEGLConfig().

Referenced by X11Device().

bool gnash::renderer::x11::X11Device::isBufferDestroyed ( ) [inline, virtual]

Are buffers destroyed ?

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::x11::X11Device::isNativeRender ( ) [inline, virtual]

Is this renderering natively.

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::x11::X11Device::isSingleBuffered ( ) [inline, virtual]

Is this device single buffered.

Implements gnash::renderer::GnashDevice.

bool gnash::renderer::x11::X11Device::supportsRenderer ( GnashDevice::rtype_t  rtype) [inline, virtual]

Is the specified renderer supported by this hardware ?

Implements gnash::renderer::GnashDevice.


Member Data Documentation

Referenced by ~X11Device(), and createWindow().

Referenced by getWidth(), and getHeight().

Referenced by getDepth().

XVisualInfo* gnash::renderer::x11::X11Device::_vinfo [protected]

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