Gnash  0.8.11dev
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
gnash::Gui Class Referenceabstract

Parent class from which all GUI implementations will depend. More...

#include <gui.h>

Inheritance diagram for gnash::Gui:
gnash::AOS4Gui gnash::AquaGui gnash::DumpGui gnash::FltkGui gnash::GtkGui gnash::gui::FBGui gnash::HaikuGui gnash::KdeGui gnash::NullGui gnash::Qt4Gui gnash::SDLGui

Public Types

typedef std::map< std::string, std::string > VariableMap
 

Public Member Functions

virtual ~Gui ()
 
virtual bool init (int argc, char **argv[])=0
 / Initialise the gui and the associated renderer. More...
 
virtual void setInterval (unsigned int interval)
 Set main loop delay in milliseconds. More...
 
virtual VirtualClockgetClock ()
 Return the clock provided by this Gui. More...
 
virtual void setTimeout (unsigned int timeout)=0
 Set the time in milliseconds after which the programme should exit. More...
 
void setScreenShotter (std::unique_ptr< ScreenShotter > ss)
 
virtual bool createWindow (const char *title, int width, int height, int xPosition=0, int yPosition=0)=0
 Create and display our window. More...
 
virtual void resizeWindow (int width, int height)
 
virtual bool run ()=0
 Start main rendering loop. More...
 
void quit ()
 Always called on exit. More...
 
virtual void renderBuffer ()=0
 
virtual void setInvalidatedRegion (const SWFRect &bounds)
 Gives the GUI a hint which region of the stage should be redrawn. More...
 
virtual void setInvalidatedRegions (const InvalidatedRanges &ranges)
 
virtual void beforeRendering ()
 
virtual bool want_multiple_regions ()
 
virtual bool want_redraw ()
 Asks the GUI handler if the next frame should be redrawn completely. More...
 
virtual void setCursor (gnash_cursor_type newcursor)
 Sets the current mouse cursor for the Gui window. More...
 
virtual void setClipboard (const std::string &copy)
 
virtual double getPixelAspectRatio () const
 
virtual std::pair< int, int > screenResolution () const
 
virtual double getScreenDPI () const
 
virtual std::string getScreenColor () const
 Get the screen color type. More...
 
bool loops () const
 
bool isFullscreen () const
 
void notifyMouseMove (int x, int y)
 Mouse notification callback to be called when the mouse is moved. More...
 
void notifyMouseClick (bool mouse_pressed)
 Mouse notification callback to be called when the mouse is clicked. More...
 
void notifyMouseWheel (int delta)
 Send a mouse wheel event to the stage. More...
 
void notify_key_event (gnash::key::code k, int modifier, bool pressed)
 Key event notification to be called when a key is pressed or depressed. More...
 
void resize_view (int width, int height)
 Resize the client area view and the window accordingly. More...
 
void updateStageMatrix ()
 
bool advanceMovie (bool doDisplay=true)
 Give movie an heart-beat. More...
 
void refreshView ()
 
virtual void setFullscreen ()
 
virtual void unsetFullscreen ()
 
virtual void hideMenu ()
 
virtual bool showMouse (bool show)
 Sets whether the gui should show the system mouse pointer. More...
 
virtual void showMenu (bool show)
 Sets whether the menus should be shown (for fscommand) More...
 
virtual void allowScale (bool allow)
 Sets whether scaling should be allowed (for fscommand) More...
 
void toggleFullscreen ()
 
void stop ()
 Put the application in "stop" mode. More...
 
void play ()
 Put the application in "play" mode. More...
 
void pause ()
 Toggle between "stop" and "play" mode. More...
 
void start ()
 Start the movie. More...
 
bool isStopped () const
 See stop(), play() and pause() More...
 
bool isPlugin () const
 Whether gnash is is running as a plugin. More...
 
void takeScreenShot ()
 Take a screenshot now! More...
 
void setMaxAdvances (unsigned long ul)
 Set the maximum number of frame advances before Gnash exits. More...
 
void showUpdatedRegions (bool x)
 
bool showUpdatedRegions () const
 
void restart ()
 
void setQuality (Quality q)
 Set rendering quality, if not locked by RC file.. More...
 
Quality getQuality () const
 Get current rendering quality. More...
 
void toggleSound ()
 
void addFlashVars (VariableMap &vars)
 Add variables to set into instances of the top-level movie definition. More...
 
void setMovieDefinition (movie_definition *md)
 Set the definition of top-level movie. More...
 
void setStage (movie_root *stage)
 Set the stage to advance/display. More...
 
void setAudioDump (const std::string &fname)
 Set the name of a file to dump audio to. More...
 
movie_rootgetStage ()
 The root movie, or "Stage". More...
 
virtual void error (const std::string &)
 Handle error message from the core. More...
 
virtual bool yesno (const std::string &question)
 Prompt user with a question she can answer with yes/no. More...
 
float getXScale () const
 Width of a window pixel, in stage pseudopixel units. More...
 
float getYScale () const
 Height of a window pixel, in stage pseudopixel units. More...
 
float getFPS () const
 Height of a window pixel, in stage pseudopixel units. More...
 

Static Public Member Functions

static bool advance_movie (Gui *gui)
 Convenience static wrapper around advanceMovie for callbacks happiness. More...
 

Protected Member Functions

 Gui (RunResources &r)
 Default constructor. Initialises members to safe defaults. More...
 
 Gui (unsigned long xid, float scale, bool loop, RunResources &r)
 Expanded constructor for more control over member values. More...
 
virtual void quitUI ()
 End main rendering loop calling GUI-specific exit functions. More...
 
virtual bool watchFD (int)
 Watch a file descriptor. More...
 
virtual void stopHook ()
 
virtual void playHook ()
 Called by Gui::play(). More...
 
virtual bool visible ()
 Determines whether the Gui is visible (not obscured). More...
 

Protected Attributes

bool _loop
 Determines if playback should restart after the movie ends. More...
 
unsigned long _xid
 The X Window ID to attach to. If zero, we create a new window. More...
 
geometry::Range2d< int > _validbounds
 
int _width
 Desired window width. More...
 
int _height
 Desired window height. More...
 
RunResources_runResources
 Per-run resources. More...
 
unsigned int _interval
 Main loop interval: the time between successive advance_movie calls. More...
 
std::shared_ptr< Renderer_renderer
 The handler which is called to update the client area of our window. More...
 
bool _redraw_flag
 
bool _fullscreen
 
bool _mouseShown
 
unsigned long _maxAdvances
 
unsigned long _advances
 Counter to keep track of frame advances. More...
 
std::string _audioDump
 Name of a file to dump audio to. More...
 

Detailed Description

Parent class from which all GUI implementations will depend.

Member Typedef Documentation

§ VariableMap

typedef std::map<std::string, std::string> gnash::Gui::VariableMap

Constructor & Destructor Documentation

§ ~Gui()

gnash::Gui::~Gui ( )
virtual

References gnash::log_debug().

§ Gui() [1/2]

gnash::Gui::Gui ( RunResources r)
protected

Default constructor. Initialises members to safe defaults.

§ Gui() [2/2]

gnash::Gui::Gui ( unsigned long  xid,
float  scale,
bool  loop,
RunResources r 
)
protected

Expanded constructor for more control over member values.

Parameters
xidThe X11 Window ID to attach to. If this is argument is zero, a new window is created.
scaleThe scale used to resize the window size, which has been established by extracting information from the SWF file.
loopDefines whether or not the movie should be played once or looped indefinitely.
depthColour depth to be used in the client area of our window.

Member Function Documentation

§ addFlashVars()

void gnash::Gui::addFlashVars ( Gui::VariableMap from)

Add variables to set into instances of the top-level movie definition.

§ advance_movie()

static bool gnash::Gui::advance_movie ( Gui gui)
inlinestatic

Convenience static wrapper around advanceMovie for callbacks happiness.

NOTE: this function always return TRUE, for historical reasons. TODO: bring code up-to-date to drop this legacy return code..

References advanceMovie(), gnash::URLAccessManager::allow(), play, start, and stop.

Referenced by gnash::HaikuGui::GnashPulse(), gnash::FltkGui::handle(), gnash::GtkGui::quitUI(), gnash::GtkGui::run(), gnash::DrawingWidget::timerEvent(), and gnash::qwidget::timerEvent().

§ advanceMovie()

bool gnash::Gui::advanceMovie ( bool  doDisplay = true)

Give movie an heart-beat.

This is to take place after the interval specified in the call to setInterval().

Wheter or not this beat advanced the movie to the next frame depends on elapsed time since last advancement.

Returns
true if this beat resulted in actual frame advancement.

Quit if we've reached the frame advance limit.

References _advances, _maxAdvances, _renderer, gnash::movie_root::advance(), gnash::Movie::ensureFrameLoaded(), gnash::MovieClip::get_current_frame(), gnash::MovieClip::get_frame_count(), gnash::movie_root::getRootMovie(), isStopped(), loops(), gnash::MovieClip::PLAYSTATE_PLAY, quit(), gnash::MovieClip::setPlayState(), start(), and visible().

Referenced by advance_movie(), gnash::NullGui::run(), and gnash::DumpGui::run().

§ allowScale()

void gnash::Gui::allowScale ( bool  allow)
virtual

Sets whether scaling should be allowed (for fscommand)

Parameters
allowtrue if stage scaling should be allowed

References gnash::log_error(), gnash::movie_root::SCALEMODE_NOSCALE, gnash::movie_root::SCALEMODE_SHOWALL, and gnash::movie_root::setStageScaleMode().

§ beforeRendering()

virtual void gnash::Gui::beforeRendering ( )
inlinevirtual

Reimplemented in gnash::GtkGui, and gnash::DumpGui.

Referenced by notify_key_event().

§ createWindow()

virtual bool gnash::Gui::createWindow ( const char *  title,
int  width,
int  height,
int  xPosition = 0,
int  yPosition = 0 
)
pure 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.

Implemented in gnash::gui::FBGui, gnash::KdeGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::AquaGui, gnash::HaikuGui, gnash::NullGui, gnash::SDLGui, gnash::FltkGui, gnash::DumpGui, and gnash::GtkGui.

§ error()

virtual void gnash::Gui::error ( const std::string &  )
inlinevirtual

Handle error message from the core.

Parameters
msgThe error message recieved

Reimplemented in gnash::GtkGui, and gnash::HaikuGui.

§ getClock()

virtual VirtualClock& gnash::Gui::getClock ( )
inlinevirtual

Return the clock provided by this Gui.

The Gui clock will be paused when the gui is put in pause mode and resumed when gui playback is resumed.

Reimplemented in gnash::DumpGui.

References height, and width.

Referenced by gnash::gui::FBGui::run().

§ getFPS()

float gnash::Gui::getFPS ( ) const
inline

Height of a window pixel, in stage pseudopixel units.

References gnash::key::r.

§ getPixelAspectRatio()

virtual double gnash::Gui::getPixelAspectRatio ( ) const
inlinevirtual

Reimplemented in gnash::gui::FBGui, and gnash::GtkGui.

§ getQuality()

Quality gnash::Gui::getQuality ( ) const

Get current rendering quality.

References _, gnash::movie_root::getQuality(), gnash::log_error(), and gnash::QUALITY_HIGH.

§ getScreenColor()

virtual std::string gnash::Gui::getScreenColor ( ) const
inlinevirtual

Get the screen color type.

The choice is between "color" and something designating monochrome (not sure what). If this isn't implemented in the gui we return "color".

Reimplemented in gnash::gui::FBGui.

§ getScreenDPI()

virtual double gnash::Gui::getScreenDPI ( ) const
inlinevirtual

§ getStage()

movie_root* gnash::Gui::getStage ( )
inline

§ getXScale()

float gnash::Gui::getXScale ( ) const
inline

Width of a window pixel, in stage pseudopixel units.

§ getYScale()

float gnash::Gui::getYScale ( ) const
inline

Height of a window pixel, in stage pseudopixel units.

§ hideMenu()

void gnash::Gui::hideMenu ( )
virtual

Hide the menu bar when using standalone player

Reimplemented in gnash::GtkGui.

References _, LOG_ONCE, and gnash::log_unimpl().

§ init()

virtual bool gnash::Gui::init ( int  argc,
char **  argv[] 
)
pure virtual

/ Initialise the gui and the associated renderer.

Parameters
argcThe commandline argument count.
argvThe commandline arguments.
Returns
True on success; false on failure.

Implemented in gnash::KdeGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::AquaGui, gnash::HaikuGui, gnash::DumpGui, gnash::SDLGui, gnash::FltkGui, and gnash::GtkGui.

§ isFullscreen()

bool gnash::Gui::isFullscreen ( ) const
inline
Returns
Whether the movie is running fullscreen or not.

References gnash::key::k, x, and y.

Referenced by notify_key_event(), and stop().

§ isPlugin()

bool gnash::Gui::isPlugin ( ) const
inline

Whether gnash is is running as a plugin.

§ isStopped()

bool gnash::Gui::isStopped ( ) const
inline

§ loops()

bool gnash::Gui::loops ( ) const
inline
Returns
Whether or not the movie should be looped indefinitely.

Referenced by advanceMovie().

§ notify_key_event()

void gnash::Gui::notify_key_event ( gnash::key::code  k,
int  modifier,
bool  pressed 
)

Key event notification to be called when a key is pressed or depressed.

Parameters
kThe key code.
modifierModifier key identifiers from gnash::key::modifier ORed together
pressedDetermines whether the key is being pressed (true) or being released (false)

References _height, _interval, _redraw_flag, _renderer, _width, gnash::movie_root::add_invalidated_bounds(), beforeRendering(), gnash::geometry::SnappingRanges2d< T >::combineRanges(), gnash::movie_root::display(), gnash::movie_root::DISPLAYSTATE_NORMAL, gnash::key::DOWN, gnash::key::e, gnash::key::EQUALS, gnash::key::ESCAPE, gnash::key::F, gnash::key::f, gnash::Movie::frameRate(), gnash::geometry::Range2d< T >::getMaxX(), gnash::geometry::Range2d< T >::getMaxY(), gnash::geometry::Range2d< T >::getMinX(), gnash::geometry::Range2d< T >::getMinY(), gnash::geometry::SnappingRanges2d< T >::getRange(), gnash::movie_root::getRootMovie(), gnash::key::GNASH_MOD_CONTROL, gnash::key::GNASH_MOD_SHIFT, gnash::geometry::SnappingRanges2d< T >::growBy(), gnash::key::H, gnash::key::h, gnash::key::i, IF_DEBUG_REGION_UPDATES, isFullscreen(), gnash::geometry::SnappingRanges2d< T >::isNull(), gnash::geometry::SnappingRanges2d< T >::isWorld(), gnash::movie_root::keyEvent(), gnash::key::L, gnash::key::l, gnash::key::LEFT, gnash::log_debug(), gnash::key::m, gnash::key::MINUS, notifyMouseMove(), gnash::key::O, gnash::key::o, gnash::key::P, gnash::key::p, pause(), gnash::key::PLUS, gnash::key::Q, gnash::key::q, quit(), gnash::key::R, gnash::key::r, refreshView(), renderBuffer(), restart(), gnash::key::RIGHT, setInterval(), setInvalidatedRegions(), gnash::geometry::SnappingRanges2d< T >::setSingleMode(), gnash::geometry::SnappingRanges2d< T >::setSnapFactor(), gnash::movie_root::setStageDisplayState(), gnash::geometry::SnappingRanges2d< T >::setWorld(), showUpdatedRegions(), gnash::geometry::SnappingRanges2d< T >::size(), takeScreenShot(), toggleFullscreen(), gnash::key::u, gnash::key::UP, gnash::key::W, gnash::key::w, want_multiple_regions(), and want_redraw().

Referenced by gnash::FltkGui::handle(), gnash::Qt4Gui::handleKeyEvent(), gnash::KdeGui::handleKeyEvent(), gnash::SDLGui::key_event(), and gnash::AOS4Gui::key_event().

§ notifyMouseClick()

void gnash::Gui::notifyMouseClick ( bool  mouse_pressed)

Mouse notification callback to be called when the mouse is clicked.

Parameters
mouse_pressedDetermines whether the mouse button is being pressed (true) or being released (false)

References gnash::key::m, and gnash::movie_root::mouseClick().

Referenced by gnash::gui::FBGui::checkForData(), gnash::FltkGui::handle(), gnash::DrawingWidget::mousePressEvent(), gnash::DrawingWidget::mouseReleaseEvent(), and gnash::SDLGui::run().

§ notifyMouseMove()

void gnash::Gui::notifyMouseMove ( int  x,
int  y 
)

Mouse notification callback to be called when the mouse is moved.

Parameters
xThe mouse coordinate X component in user/window coordinate space (pixels).
yThe mouse coordinate Y component in user/window coordinate space (pixels).

References gnash::DisplayObject::allowHandCursor(), gnash::CURSOR_HAND, gnash::CURSOR_INPUT, gnash::CURSOR_NORMAL, gnash::movie_root::getActiveEntityUnderPointer(), gnash::DisplayObject::isSelectableTextField(), gnash::log_debug(), gnash::key::m, gnash::movie_root::mouseMoved(), setCursor(), x, and y.

Referenced by gnash::gui::FBGui::checkForData(), gnash::FltkGui::handle(), gnash::DrawingWidget::mouseMoveEvent(), notify_key_event(), and gnash::SDLGui::run().

§ notifyMouseWheel()

void gnash::Gui::notifyMouseWheel ( int  delta)

Send a mouse wheel event to the stage.

Parameters
deltaA number expressing the extent of the wheel scroll.

References gnash::key::m, and gnash::movie_root::mouseWheel().

Referenced by gnash::DrawingWidget::wheelEvent().

§ pause()

void gnash::Gui::pause ( )

§ play()

void gnash::Gui::play ( )

§ playHook()

virtual void gnash::Gui::playHook ( )
inlineprotectedvirtual

Called by Gui::play().

Referenced by play().

§ quit()

void gnash::Gui::quit ( )

§ quitUI()

virtual void gnash::Gui::quitUI ( )
inlineprotectedvirtual

End main rendering loop calling GUI-specific exit functions.

Do not call this directly. Call quit() instead. The default implementation calls exit(EXIT_SUCCESS), which isn't nice. Please implement the proper main loop quitter in the subclasses.

Reimplemented in gnash::gui::FBGui, gnash::Qt4Gui, gnash::KdeGui, gnash::NullGui, gnash::DumpGui, and gnash::GtkGui.

Referenced by quit().

§ refreshView()

void gnash::Gui::refreshView ( )

Force immediate redraw

References _redraw_flag, and gnash::key::m.

Referenced by notify_key_event(), and gnash::DrawingWidget::refresh().

§ renderBuffer()

virtual void gnash::Gui::renderBuffer ( )
pure virtual

Render the current buffer. For OpenGL, this means that the front and back buffers are swapped.

Implemented in gnash::gui::FBGui, gnash::KdeGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::HaikuGui, gnash::AquaGui, gnash::GtkGui, gnash::NullGui, gnash::SDLGui, gnash::DumpGui, and gnash::FltkGui.

Referenced by notify_key_event().

§ resize_view()

void gnash::Gui::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.

References _height, _validbounds, _width, GNASH_REPORT_FUNCTION, height, gnash::movie_root::setDimensions(), gnash::geometry::Range2d< T >::setTo(), updateStageMatrix(), and width.

Referenced by gnash::FltkGui::layout(), gnash::KdeGui::resize(), gnash::Qt4Gui::resize(), gnash::HaikuGui::resize_view(), gnash::gui::FBGui::resize_view(), and start().

§ resizeWindow()

void gnash::Gui::resizeWindow ( int  width,
int  height 
)
virtual

Reimplemented in gnash::Qt4Gui, and gnash::GtkGui.

References _, and gnash::log_unimpl().

§ restart()

void gnash::Gui::restart ( )

Instruct the core to restart the movie and set state to play(). This does not change pause state.

References gnash::movie_root::reset(), and start().

Referenced by gnash::GtkGui::createControlMenu(), gnash::FltkGui::createWindow(), notify_key_event(), gnash::Qt4Gui::quitUI(), and gnash::DrawingWidget::restart().

§ run()

virtual bool gnash::Gui::run ( )
pure virtual

§ screenResolution()

virtual std::pair<int, int> gnash::Gui::screenResolution ( ) const
inlinevirtual

Reimplemented in gnash::Qt4Gui, and gnash::GtkGui.

§ setAudioDump()

void gnash::Gui::setAudioDump ( const std::string &  fname)
inline

Set the name of a file to dump audio to.

§ setClipboard()

void gnash::Gui::setClipboard ( const std::string &  copy)
virtual

Reimplemented in gnash::Qt4Gui, and gnash::GtkGui.

References _, LOG_ONCE, and gnash::log_unimpl().

§ setCursor()

void gnash::Gui::setCursor ( gnash_cursor_type  newcursor)
virtual

Sets the current mouse cursor for the Gui window.

Reimplemented in gnash::GtkGui, gnash::KdeGui, gnash::Qt4Gui, gnash::DumpGui, gnash::AquaGui, and gnash::FltkGui.

Referenced by notifyMouseMove().

§ setFullscreen()

void gnash::Gui::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 in gnash::gui::FBGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::GtkGui, gnash::HaikuGui, and gnash::DumpGui.

References _, and gnash::log_unimpl().

§ setInterval()

virtual void gnash::Gui::setInterval ( unsigned int  interval)
inlinevirtual

§ setInvalidatedRegion()

void gnash::Gui::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 in gnash::gui::FBGui, and gnash::DumpGui.

Referenced by setInvalidatedRegions().

§ setInvalidatedRegions()

void gnash::Gui::setInvalidatedRegions ( const InvalidatedRanges ranges)
virtual

§ setMaxAdvances()

void gnash::Gui::setMaxAdvances ( unsigned long  ul)
inline

Set the maximum number of frame advances before Gnash exits.

§ setMovieDefinition()

void gnash::Gui::setMovieDefinition ( movie_definition md)

Set the definition of top-level movie.

§ setQuality()

void gnash::Gui::setQuality ( Quality  q)

Set rendering quality, if not locked by RC file..

References _, gnash::log_error(), and gnash::movie_root::setQuality().

§ setScreenShotter()

void gnash::Gui::setScreenShotter ( std::unique_ptr< ScreenShotter ss)

§ setStage()

void gnash::Gui::setStage ( movie_root stage)

Set the stage to advance/display.

§ setTimeout()

virtual void gnash::Gui::setTimeout ( unsigned int  timeout)
pure virtual

Set the time in milliseconds after which the programme should exit.

Implemented in gnash::gui::FBGui, gnash::KdeGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::HaikuGui, gnash::GtkGui, gnash::AquaGui, gnash::DumpGui, gnash::SDLGui, gnash::FltkGui, and gnash::NullGui.

§ showMenu()

void gnash::Gui::showMenu ( bool  show)
virtual

Sets whether the menus should be shown (for fscommand)

Parameters
showtrue if the menu bar should be shown.

Reimplemented in gnash::gui::FBGui, and gnash::GtkGui.

References _, LOG_ONCE, and gnash::log_unimpl().

§ showMouse()

bool gnash::Gui::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 in gnash::gui::FBGui, gnash::GtkGui, gnash::Qt4Gui, and gnash::AOS4Gui.

References _, LOG_ONCE, and gnash::log_unimpl().

§ showUpdatedRegions() [1/2]

void gnash::Gui::showUpdatedRegions ( bool  x)
inline

References x.

§ showUpdatedRegions() [2/2]

bool gnash::Gui::showUpdatedRegions ( ) const
inline

§ start()

void gnash::Gui::start ( )

§ stop()

void gnash::Gui::stop ( )

§ stopHook()

virtual void gnash::Gui::stopHook ( )
inlineprotectedvirtual

Called by Gui::stop(). This can be used by GUIs to implement pause widgets (so that resuming a stopped animation is more user-friendly)

Referenced by pause(), and stop().

§ takeScreenShot()

void gnash::Gui::takeScreenShot ( )

§ toggleFullscreen()

void gnash::Gui::toggleFullscreen ( )

§ toggleSound()

void gnash::Gui::toggleSound ( )

§ unsetFullscreen()

void gnash::Gui::unsetFullscreen ( )
virtual

Return from fullscreen to normal mode.

Reimplemented in gnash::gui::FBGui, gnash::Qt4Gui, gnash::AOS4Gui, gnash::GtkGui, gnash::DumpGui, and gnash::HaikuGui.

References _, and gnash::log_unimpl().

Referenced by stop().

§ updateStageMatrix()

void gnash::Gui::updateStageMatrix ( )

§ visible()

virtual bool gnash::Gui::visible ( )
inlineprotectedvirtual

§ want_multiple_regions()

virtual bool gnash::Gui::want_multiple_regions ( )
inlinevirtual

§ want_redraw()

bool gnash::Gui::want_redraw ( )
virtual

Asks the GUI handler if the next frame should be redrawn completely.

For example, when the contents of the player window have been destroyed, then want_redraw() should return true so that setInvalidatedRegion() is called with the coordinates of the complete screen.

Reimplemented in gnash::DumpGui.

Referenced by notify_key_event().

§ watchFD()

virtual bool gnash::Gui::watchFD ( int  )
inlineprotectedvirtual

Watch a file descriptor.

An implementing Gui should monitor the file descriptor in its main loop. When the file descriptor is triggered, the implementation should call callCallback().

Parameters
fdThe file descriptor to be watched

References gnash::log_unimpl().

§ yesno()

bool gnash::Gui::yesno ( const std::string &  question)
virtual

Prompt user with a question she can answer with yes/no.

Parameters
questionThe question to ask user
Returns
true for YES, false for NO

The default implementation always returns true.

Reimplemented in gnash::Qt4Gui, gnash::GtkGui, and gnash::HaikuGui.

References _, and gnash::log_error().

Member Data Documentation

§ _advances

unsigned long gnash::Gui::_advances
protected

Counter to keep track of frame advances.

Referenced by advanceMovie().

§ _audioDump

std::string gnash::Gui::_audioDump
protected

Name of a file to dump audio to.

Referenced by start().

§ _fullscreen

bool gnash::Gui::_fullscreen
protected

§ _height

int gnash::Gui::_height
protected

§ _interval

unsigned int gnash::Gui::_interval
protected

§ _loop

bool gnash::Gui::_loop
protected

Determines if playback should restart after the movie ends.

§ _maxAdvances

unsigned long gnash::Gui::_maxAdvances
protected

Referenced by advanceMovie().

§ _mouseShown

bool gnash::Gui::_mouseShown
protected

§ _redraw_flag

bool gnash::Gui::_redraw_flag
protected

Signals that the next frame must be re-rendered completely because the window size did change.

Referenced by notify_key_event(), refreshView(), and updateStageMatrix().

§ _renderer

std::shared_ptr<Renderer> gnash::Gui::_renderer
protected

§ _runResources

RunResources& gnash::Gui::_runResources
protected

§ _validbounds

geometry::Range2d<int> gnash::Gui::_validbounds
protected

§ _width

int gnash::Gui::_width
protected

§ _xid

unsigned long gnash::Gui::_xid
protected

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