Gnash  0.8.11dev
Public Member Functions | Protected Attributes | List of all members
gnash::renderer::x11::X11Device Class Reference

#include <X11Device.h>

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

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. More...
 
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. More...
 
int getDepth ()
 Get the depth of the device. More...
 
size_t getWidth ()
 Get the width of the device. More...
 
size_t getHeight ()
 Get the Height of the device. More...
 
bool isSingleBuffered ()
 Is this device single buffered. More...
 
bool supportsRenderer (GnashDevice::rtype_t)
 Is the specified renderer supported by this hardware ? More...
 
bool isBufferDestroyed ()
 Are buffers destroyed ? More...
 
int getID ()
 Get the window ID handle. More...
 
int getRedSize ()
 Get the size of the Red pixel. More...
 
int getGreenSize ()
 Get the size of the Green pixel. More...
 
int getBlueSize ()
 Get the size of the Blue pixel. More...
 
bool isNativeRender ()
 Is this renderering natively. More...
 
int getHandle ()
 
void createWindow (const char *name, int x, int y, int width, int height)
 
void eventLoop (size_t passes)
 
- Public Member Functions inherited from gnash::renderer::GnashDevice
 GnashDevice (int argc, char *argv[])
 
 GnashDevice ()
 
virtual ~GnashDevice ()
 
virtual std::uint8_t * getFBMemory ()
 Get the memory from the real framebuffer. More...
 
virtual std::uint8_t * getOffscreenBuffer ()
 Get the memory from an offscreen buffer to support Double Buffering. More...
 
virtual size_t getFBMemSize ()
 
virtual bool bindClient (GnashDevice::rtype_t)
 
virtual bool swapBuffers ()
 

Protected Attributes

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

Additional Inherited Members

- Public Types inherited from gnash::renderer::GnashDevice
enum  rtype_t {
  OPENVG, OPENGL, OPENGLES1, OPENGLES2,
  XORG, VAAPI
}
 The list of supported renders that use devices. More...
 
enum  dtype_t {
  GNASH_NODEV, EGL, DIRECTFB, X11,
  RAWFB
}
 The list of supported device types. More...
 
typedef long native_window_t
 

Constructor & Destructor Documentation

§ X11Device() [1/3]

gnash::renderer::x11::X11Device::X11Device ( )

§ X11Device() [2/3]

gnash::renderer::x11::X11Device::X11Device ( int  vid)

§ X11Device() [3/3]

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

§ ~X11Device()

gnash::renderer::x11::X11Device::~X11Device ( )
virtual

Member Function Documentation

§ attachWindow()

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 _window, and GNASH_REPORT_FUNCTION.

Referenced by getStride().

§ createWindow()

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

§ eventLoop()

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 height, and width.

Referenced by getHandle().

§ getBlueSize()

int gnash::renderer::x11::X11Device::getBlueSize ( )
inlinevirtual

Get the size of the Blue pixel.

Implements gnash::renderer::GnashDevice.

References getRedSize().

§ getDepth()

int gnash::renderer::x11::X11Device::getDepth ( )
inlinevirtual

Get the depth of the device.

Implements gnash::renderer::GnashDevice.

References _display, and _screennum.

§ getErrorString()

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 gnash::log_error().

Referenced by getStride().

§ getGreenSize()

int gnash::renderer::x11::X11Device::getGreenSize ( )
inlinevirtual

Get the size of the Green pixel.

Implements gnash::renderer::GnashDevice.

References getRedSize().

§ getHandle()

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

References _window, createWindow(), eventLoop(), height, name, width, x, and y.

Referenced by main().

§ getHeight()

size_t gnash::renderer::x11::X11Device::getHeight ( )
inlinevirtual

Get the Height of the device.

Implements gnash::renderer::GnashDevice.

References _screen.

§ getID()

int gnash::renderer::x11::X11Device::getID ( )
inlinevirtual

Get the window ID handle.

Implements gnash::renderer::GnashDevice.

References _window.

§ getRedSize()

int gnash::renderer::x11::X11Device::getRedSize ( )
inlinevirtual

Get the size of the Red pixel.

Implements gnash::renderer::GnashDevice.

References _vinfo.

Referenced by getBlueSize(), and getGreenSize().

§ getStride()

size_t gnash::renderer::x11::X11Device::getStride ( )
inlinevirtual

Query the system for all supported configs.

Get the stride of the device

Implements gnash::renderer::GnashDevice.

References attachWindow(), getErrorString(), and initDevice().

§ getType()

dtype_t gnash::renderer::x11::X11Device::getType ( )
inlinevirtual

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.

§ getWidth()

size_t gnash::renderer::x11::X11Device::getWidth ( )
inlinevirtual

Get the width of the device.

Implements gnash::renderer::GnashDevice.

References _screen.

§ initDevice()

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

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

Implements gnash::renderer::GnashDevice.

References _, _colormap, _depth, _display, _root, _screen, _screennum, _vid, _vinfo, GNASH_REPORT_FUNCTION, gnash::key::i, and gnash::log_error().

Referenced by getStride(), and X11Device().

§ isBufferDestroyed()

bool gnash::renderer::x11::X11Device::isBufferDestroyed ( )
inlinevirtual

Are buffers destroyed ?

Implements gnash::renderer::GnashDevice.

§ isNativeRender()

bool gnash::renderer::x11::X11Device::isNativeRender ( )
inlinevirtual

Is this renderering natively.

Implements gnash::renderer::GnashDevice.

§ isSingleBuffered()

bool gnash::renderer::x11::X11Device::isSingleBuffered ( )
inlinevirtual

Is this device single buffered.

Implements gnash::renderer::GnashDevice.

§ supportsRenderer()

bool gnash::renderer::x11::X11Device::supportsRenderer ( GnashDevice::rtype_t  rtype)
inlinevirtual

Is the specified renderer supported by this hardware ?

Implements gnash::renderer::GnashDevice.

Member Data Documentation

§ _colormap

Colormap gnash::renderer::x11::X11Device::_colormap
protected

Referenced by initDevice().

§ _depth

int gnash::renderer::x11::X11Device::_depth
protected

Referenced by initDevice().

§ _display

Display* gnash::renderer::x11::X11Device::_display
protected

§ _root

Window gnash::renderer::x11::X11Device::_root
protected

§ _screen

Screen* gnash::renderer::x11::X11Device::_screen
protected

Referenced by getHeight(), getWidth(), and initDevice().

§ _screennum

int gnash::renderer::x11::X11Device::_screennum
protected

Referenced by getDepth(), and initDevice().

§ _vid

int gnash::renderer::x11::X11Device::_vid
protected

Referenced by initDevice().

§ _vinfo

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

§ _visual

Visual* gnash::renderer::x11::X11Device::_visual
protected

§ _window

Window gnash::renderer::x11::X11Device::_window
protected

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