Gnash  0.8.10
Public Member Functions
gnash::gui::FBGui Class Reference

#include <fbsup.h>

Inheritance diagram for gnash::gui::FBGui:
gnash::Gui

List of all members.

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 ()

Detailed Description

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


Constructor & Destructor Documentation

gnash::gui::FBGui::FBGui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources r 
)
gnash::gui::FBGui::~FBGui ( ) [virtual]

Member Function Documentation

void gnash::gui::FBGui::checkForData ( )
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.

Parameters:
titleThe window title.
widthThe desired window width in pixels.
heightThe desired window height in pixels.
xPositionThe desired window X position from the top left corner.
yPositionThe 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]
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.

Parameters:
widthThe desired width in pixels.
heightThe desired height in pixels.

Reimplemented from gnash::Gui.

References GNASH_REPORT_FUNCTION.

Referenced by run().

bool gnash::gui::FBGui::run ( ) [virtual]
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)

Parameters:
showtrue 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.

Parameters:
showtrue if the mouse should be shown.
Returns:
true if the state changed.

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.


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