Gnash
0.8.10
|
#include <fbsup.h>
Public Member Functions | |
FBGui (unsigned long xid, float scale, bool loop, RunResources &r) | |
virtual | ~FBGui () |
virtual bool | init (int argc, char ***argv) |
Initialize the framebuffer. | |
bool | createWindow (const char *title, int width, int height, int xPosition=0, int yPosition=0) |
Create and display our window. | |
void | renderBuffer () |
bool | run () |
Start main rendering loop. | |
bool | resize_view (int width, int height) |
Resize the client area view and the window accordingly. | |
void | setInvalidatedRegion (const SWFRect &bounds) |
Gives the GUI a *hint* which region of the stage should be redrawn. | |
void | setInvalidatedRegions (const InvalidatedRanges &ranges) |
bool | want_multiple_regions () |
double | getPixelAspectRatio () |
int | getScreenResX () |
int | getScreenResY () |
double | getScreenDPI () |
std::string | getScreenColor () |
void | setFullscreen () |
void | unsetFullscreen () |
bool | createMenu () |
bool | setupEvents () |
void | setInterval (unsigned int interval) |
Set main loop delay in milliseconds. | |
void | setTimeout (unsigned int timeout) |
Set the time in milliseconds after which the programme should exit. | |
void | showMenu (bool show) |
Sets whether the menus should be shown (for fscommand) | |
bool | showMouse (bool show) |
Sets whether the gui should show the system mouse pointer. | |
void | checkForData () |
A Framebuffer-based GUI for Gnash. ----------------------------------
This is a simple "GUI" that works with any framebuffer device (/dev/fb0). No window system is required, it will run straigt from a console.
The current version requires that your system boots in graphics mode (that is, with a framebuffer driver - like vesafb - and most probably the virtual console enabled). Which graphics mode Gnash runs in depends on the mode your machine boots in and can be choosen using the kernel command line. With other words: Gnash does not change the graphics mode. Refer to the framebuffer docs for more information.
The fb gui now also supports pointing devices like mice or touchscreens, but it is not required. It works with /dev/input/mice so any PS/2 compatible mouse should do. Your kernel can emulate the "mice" device for other devices (like touchscreens and tablets) so this method is very flexible.
There is currently no visible mouse pointer built in, which is fine for touchscreens but will make it difficult for standard mice. This will be fixed in near time. Resolution: any
Pixel formats: 8 bit: none yet 15 bit: R5/G5/B5 16 bit: R5/G6/B5 24 bit: R8/G8/B8, B8/G8/R8 32 bit: R8/G8/B8/A8, B8/G8/R8/A8
Supported input devices:
any PS/2 compatible mouse (may be emulated by the kernel) talking to /dev/input/mice
gnash::gui::FBGui::FBGui | ( | unsigned long | xid, |
float | scale, | ||
bool | loop, | ||
RunResources & | r | ||
) |
References gnash::gui::terminate_signal().
gnash::gui::FBGui::~FBGui | ( | ) | [virtual] |
void gnash::gui::FBGui::checkForData | ( | ) |
References gnash::InputDevice::convertAbsCoords(), gnash::Gui::getStage(), gnash::UinputDevice::moveTo(), gnash::Gui::notifyMouseMove(), gnash::Gui::notifyMouseClick(), x, and y.
Referenced by run().
bool gnash::gui::FBGui::createMenu | ( | ) |
bool gnash::gui::FBGui::createWindow | ( | const char * | title, |
int | width, | ||
int | height, | ||
int | xPosition = 0 , |
||
int | yPosition = 0 |
||
) | [virtual] |
Create and display our window.
title | The window title. |
width | The desired window width in pixels. |
height | The desired window height in pixels. |
xPosition | The desired window X position from the top left corner. |
yPosition | The desired window Y position from the top left corner. |
Implements gnash::Gui.
References gnash::Gui::_runResources, and gnash::RunResources::setRenderer().
double gnash::gui::FBGui::getPixelAspectRatio | ( | ) | [inline] |
std::string gnash::gui::FBGui::getScreenColor | ( | ) | [inline] |
double gnash::gui::FBGui::getScreenDPI | ( | ) | [inline] |
int gnash::gui::FBGui::getScreenResX | ( | ) | [inline] |
int gnash::gui::FBGui::getScreenResY | ( | ) | [inline] |
bool gnash::gui::FBGui::init | ( | int | argc, |
char *** | argv | ||
) | [virtual] |
Initialize the framebuffer.
This opens the framebuffer device,
References gnash::Gui::_runResources, gnash::RunResources::getRenderBackend(), gnash::Gui::_width, gnash::DeviceGlue::getWidth(), gnash::Gui::_height, gnash::DeviceGlue::getHeight(), gnash::renderer::openvg::create_handler(), gnash::renderer::openvg::Renderer_ovg::init(), gnash::gui::FBAggGlue::width(), gnash::gui::FBAggGlue::height(), gnash::gui::FBAggGlue::createRenderHandler(), _, gnash::UinputDevice::scanForDevice(), gnash::UinputDevice::init(), gnash::UinputDevice::moveTo(), gnash::InputDevice::scanForDevices(), optind, gnash::key::c, getopt(), optarg, gnash::Gui::_validbounds, and gnash::geometry::Range2d::setTo().
void gnash::gui::FBGui::renderBuffer | ( | ) | [virtual] |
Render the current buffer. For OpenGL, this means that the front and back buffers are swapped.
Implements gnash::Gui.
bool gnash::gui::FBGui::resize_view | ( | int | width, |
int | height | ||
) |
Resize the client area view and the window accordingly.
width | The desired width in pixels. |
height | The desired height in pixels. |
Reimplemented from gnash::Gui.
References GNASH_REPORT_FUNCTION.
Referenced by run().
bool gnash::gui::FBGui::run | ( | ) | [virtual] |
Start main rendering loop.
Implements gnash::Gui.
References gnash::Gui::getClock(), resize_view(), gnash::Gui::_validbounds, gnash::geometry::Range2d::width(), gnash::geometry::Range2d::height(), gnash::Gui::getFPS(), _, gnash::Gui::_interval, gnash::gui::terminate_request, gnash::gnashSleep(), checkForData(), gnash::Gui::advance_movie(), and gnash::VirtualClock::elapsed().
void gnash::gui::FBGui::setFullscreen | ( | ) | [virtual] |
Attempt to run in a fullscreen window both for plugin and standalone player. Use isFullscreen() to see if gnash thinks it's running in fullscreen or not. The switch to fullscreen may fail if, for instance, the window manager refuses to allow it, but the flag will be set anyway.
Reimplemented from gnash::Gui.
void gnash::gui::FBGui::setInterval | ( | unsigned int | interval | ) | [virtual] |
Set main loop delay in milliseconds.
Reimplemented from gnash::Gui.
References gnash::Gui::_interval.
void gnash::gui::FBGui::setInvalidatedRegion | ( | const SWFRect & | bounds | ) | [virtual] |
Gives the GUI a *hint* which region of the stage should be redrawn.
There is *no* restriction what the GUI might do with these coordinates. Normally the GUI forwards the information to the renderer so that it avoids rendering regions that did not change anyway. The GUI can also alter the bounds before passing them to the renderer and it's absolutely legal for the GUI to simply ignore the call.
Coordinates are in TWIPS!
Note this information is given to the GUI and not directly to the renderer because both of them need to support this feature for correct results. It is up to the GUI to forward this information to the renderer.
Reimplemented from gnash::Gui.
void gnash::gui::FBGui::setInvalidatedRegions | ( | const InvalidatedRanges & | ranges | ) | [virtual] |
Reimplemented from gnash::Gui.
void gnash::gui::FBGui::setTimeout | ( | unsigned int | timeout | ) | [virtual] |
Set the time in milliseconds after which the programme should exit.
Implements gnash::Gui.
bool gnash::gui::FBGui::setupEvents | ( | ) |
void gnash::gui::FBGui::showMenu | ( | bool | show | ) | [virtual] |
Sets whether the menus should be shown (for fscommand)
show | true if the menu bar should be shown. |
Reimplemented from gnash::Gui.
References _.
bool gnash::gui::FBGui::showMouse | ( | bool | show | ) | [virtual] |
Sets whether the gui should show the system mouse pointer.
show | true if the mouse should be shown. |
Reimplemented from gnash::Gui.
References _.
void gnash::gui::FBGui::unsetFullscreen | ( | ) | [virtual] |
Return from fullscreen to normal mode.
Reimplemented from gnash::Gui.
bool gnash::gui::FBGui::want_multiple_regions | ( | ) | [inline, virtual] |
Should return TRUE when the GUI/Renderer combination supports multiple invalidated bounds regions.
Reimplemented from gnash::Gui.