Gnash
0.8.10
|
#include <X11Device.h>
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 |
gnash::renderer::x11::X11Device::X11Device | ( | ) |
References GNASH_REPORT_FUNCTION, and dbglogfile.
gnash::renderer::x11::X11Device::X11Device | ( | int | vid | ) |
References GNASH_REPORT_FUNCTION, initDevice(), and _.
gnash::renderer::x11::X11Device::X11Device | ( | int | argc, |
char * | argv[] | ||
) |
References GNASH_REPORT_FUNCTION, initDevice(), and _.
gnash::renderer::x11::X11Device::~X11Device | ( | ) | [virtual] |
References GNASH_REPORT_FUNCTION, _display, _root, _window, and _vinfo.
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.
passes | the number of events to process before returning. |
int gnash::renderer::x11::X11Device::getBlueSize | ( | ) | [inline, virtual] |
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.
int gnash::renderer::x11::X11Device::getGreenSize | ( | ) | [inline, virtual] |
int gnash::renderer::x11::X11Device::getHandle | ( | ) | [inline] |
References _window.
size_t gnash::renderer::x11::X11Device::getHeight | ( | ) | [inline, virtual] |
int gnash::renderer::x11::X11Device::getID | ( | ) | [inline, virtual] |
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] |
bool gnash::renderer::x11::X11Device::initDevice | ( | int | argc, |
char * | argv[] | ||
) | [virtual] |
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.
Colormap gnash::renderer::x11::X11Device::_colormap [protected] |
int gnash::renderer::x11::X11Device::_depth [protected] |
Display* gnash::renderer::x11::X11Device::_display [protected] |
Referenced by ~X11Device(), getErrorString(), createWindow(), eventLoop(), and getDepth().
Window gnash::renderer::x11::X11Device::_root [protected] |
Referenced by ~X11Device(), and createWindow().
Screen* gnash::renderer::x11::X11Device::_screen [protected] |
Referenced by getWidth(), and getHeight().
int gnash::renderer::x11::X11Device::_screennum [protected] |
Referenced by getDepth().
int gnash::renderer::x11::X11Device::_vid [protected] |
XVisualInfo* gnash::renderer::x11::X11Device::_vinfo [protected] |
Referenced by ~X11Device(), createWindow(), and getRedSize().
Visual* gnash::renderer::x11::X11Device::_visual [protected] |
Window gnash::renderer::x11::X11Device::_window [protected] |
Referenced by ~X11Device(), attachWindow(), createWindow(), getID(), and getHandle().