Gnash  0.8.11dev
Public Member Functions | List of all members
gnash::DumpGui Class Reference

#include <dump.h>

Inheritance diagram for gnash::DumpGui:
gnash::Gui

Public Member Functions

 DumpGui (unsigned long xid, float scale, bool loop, RunResources &r)
 
 ~DumpGui ()
 
void beforeRendering ()
 
bool createMenu ()
 
bool createMenuBar ()
 
bool createWindow (int width, int height)
 
bool createWindow (const char *, int width, int height, int, int)
 Create and display our window. More...
 
bool init (int argc, char **argv[])
 / Initialise the gui and the associated renderer. More...
 
virtual void quitUI ()
 End main rendering loop calling GUI-specific exit functions. More...
 
void renderBuffer ()
 
void render ()
 
void render (int, int, int, int)
 
bool run ()
 Start main rendering loop. More...
 
void setInterval (unsigned int interval)
 Set main loop delay in milliseconds. More...
 
void setTimeout (unsigned int timeout)
 Set the time in milliseconds after which the programme should exit. More...
 
bool setupEvents ()
 
void setFullscreen ()
 
void setInvalidatedRegion (const SWFRect &)
 Gives the GUI a hint which region of the stage should be redrawn. More...
 
void setInvalidatedRegions (const InvalidatedRanges &)
 
void setCursor (gnash_cursor_type)
 Sets the current mouse cursor for the Gui window. More...
 
void setRenderHandlerSize (int width, int height)
 
void unsetFullscreen ()
 
bool want_multiple_regions ()
 
bool want_redraw ()
 Asks the GUI handler if the next frame should be redrawn completely. More...
 
void writeFrame ()
 
void writeSamples ()
 
virtual VirtualClockgetClock ()
 Return the clock provided by this Gui. More...
 
- Public Member Functions inherited from gnash::Gui
virtual ~Gui ()
 
void setScreenShotter (std::unique_ptr< ScreenShotter > ss)
 
virtual void resizeWindow (int width, int height)
 
void quit ()
 Always called on exit. 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 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...
 

Additional Inherited Members

- Public Types inherited from gnash::Gui
typedef std::map< std::string, std::string > VariableMap
 
- Static Public Member Functions inherited from gnash::Gui
static bool advance_movie (Gui *gui)
 Convenience static wrapper around advanceMovie for callbacks happiness. More...
 
- Protected Member Functions inherited from gnash::Gui
 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 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 inherited from gnash::Gui
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...
 

Constructor & Destructor Documentation

§ DumpGui()

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

References gnash::Gui::_xid.

§ ~DumpGui()

gnash::DumpGui::~DumpGui ( )

Member Function Documentation

§ beforeRendering()

void gnash::DumpGui::beforeRendering ( )
virtual

Reimplemented from gnash::Gui.

§ createMenu()

bool gnash::DumpGui::createMenu ( )
inline

§ createMenuBar()

bool gnash::DumpGui::createMenuBar ( )
inline

References height, and width.

§ createWindow() [1/2]

bool gnash::DumpGui::createWindow ( int  width,
int  height 
)

§ createWindow() [2/2]

bool gnash::DumpGui::createWindow ( const char *  title,
int  width,
int  height,
int  xPosition,
int  yPosition 
)
inlinevirtual

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.

§ getClock()

virtual VirtualClock& gnash::DumpGui::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 from gnash::Gui.

§ init()

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

/ Initialise the gui and the associated renderer.

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

Implements gnash::Gui.

References _, gnash::Gui::_renderer, gnash::Gui::_runResources, gnash::Gui::_xid, gnash::key::c, gnash::create_Renderer_agg(), getopt(), gnash::log_error(), gnash::RunResources::mediaHandler(), optarg, optind, gnash::RunResources::setRenderer(), gnash::RunResources::setSoundHandler(), gnash::RunResources::soundHandler(), and gnash::terminate_signal().

§ quitUI()

void gnash::DumpGui::quitUI ( )
virtual

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

§ render() [1/2]

void gnash::DumpGui::render ( )
inline

§ render() [2/2]

void gnash::DumpGui::render ( int  ,
int  ,
int  ,
int   
)
inline

§ renderBuffer()

void gnash::DumpGui::renderBuffer ( )
inlinevirtual

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

Implements gnash::Gui.

§ run()

bool gnash::DumpGui::run ( )
virtual

§ setCursor()

void gnash::DumpGui::setCursor ( gnash_cursor_type  newcursor)
inlinevirtual

Sets the current mouse cursor for the Gui window.

Reimplemented from gnash::Gui.

§ setFullscreen()

void gnash::DumpGui::setFullscreen ( )
inlinevirtual

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.

§ setInterval()

void gnash::DumpGui::setInterval ( unsigned int  interval)
virtual

Set main loop delay in milliseconds.

Reimplemented from gnash::Gui.

References gnash::Gui::_interval.

§ setInvalidatedRegion()

void gnash::DumpGui::setInvalidatedRegion ( const SWFRect bounds)
inlinevirtual

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.

§ setInvalidatedRegions()

void gnash::DumpGui::setInvalidatedRegions ( const InvalidatedRanges )
inlinevirtual

Reimplemented from gnash::Gui.

§ setRenderHandlerSize()

void gnash::DumpGui::setRenderHandlerSize ( int  width,
int  height 
)

§ setTimeout()

void gnash::DumpGui::setTimeout ( unsigned int  timeout)
virtual

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

Implements gnash::Gui.

§ setupEvents()

bool gnash::DumpGui::setupEvents ( )
inline

§ unsetFullscreen()

void gnash::DumpGui::unsetFullscreen ( )
inlinevirtual

Return from fullscreen to normal mode.

Reimplemented from gnash::Gui.

§ want_multiple_regions()

bool gnash::DumpGui::want_multiple_regions ( )
inlinevirtual

Reimplemented from gnash::Gui.

§ want_redraw()

bool gnash::DumpGui::want_redraw ( )
inlinevirtual

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

§ writeFrame()

void gnash::DumpGui::writeFrame ( )

References gnash::ManualClock::elapsed().

Referenced by run().

§ writeSamples()

void gnash::DumpGui::writeSamples ( )

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