Gnash  0.8.11dev
gui.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010,
3 // 2011 Free Software Foundation, Inc
4 //
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
18 
19 #ifndef GNASH_GUI_H
20 #define GNASH_GUI_H
21 
22 #ifdef HAVE_CONFIG_H
23 #include "gnashconfig.h"
24 #endif
25 
26 #include <boost/intrusive_ptr.hpp>
27 #include <memory>
28 #include <string>
29 #include <map>
30 #include <utility>
31 #include <functional>
32 
33 #include "snappingrange.h" // for InvalidatedRanges
34 #include "GnashKey.h"
35 #include "VirtualClock.h"
36 #include "SystemClock.h"
37 #include "GnashEnums.h"
38 #include "movie_root.h"
39 
40 #ifdef USE_SWFTREE
41 #include "tree.hh" // for tree
42 #endif
43 
44 // Define this to enable fps debugging without touching
45 // gnashconfig.h
46 //#define GNASH_FPS_DEBUG
47 
58 //#define DISABLE_REGION_UPDATES_DEBUGGING 1
59 
60 
62 #define ENABLE_KEYBOARD_MOUSE_MOVEMENTS 1
63 
64 // Forward declarations
65 namespace gnash {
66  class SWFRect;
67  class ScreenShotter;
68  class RunResources;
69  class movie_root;
70  class movie_definition;
71  class Renderer;
72  class SWFRect;
73 }
74 namespace boost {
75  template <typename Signature> class function;
76 }
77 
78 namespace gnash {
79 
85 };
86 
88 class Gui {
89 
90 public:
91 
92  virtual ~Gui();
93 
100  virtual bool init(int argc, char **argv[]) = 0;
101 
103  virtual void setInterval(unsigned int interval) {
104  _interval = interval;
105  }
106 
108  //
112  virtual VirtualClock& getClock() { return _virtualClock; }
113 
115  virtual void setTimeout(unsigned int timeout) = 0;
116 
117  void setScreenShotter(std::unique_ptr<ScreenShotter> ss);
118 
127  virtual bool createWindow(const char* title, int width, int height,
128  int xPosition = 0, int yPosition = 0) = 0;
129 
130  virtual void resizeWindow(int width, int height);
131 
133  virtual bool run() = 0;
134 
136  //
138  void quit();
139 
142  virtual void renderBuffer() = 0;
143 
145  //
159  // does not need to be implemented (optional feature),
160  // but still needs to be available.
161  //
162  virtual void setInvalidatedRegion(const SWFRect& bounds);
163  virtual void setInvalidatedRegions(const InvalidatedRanges& ranges);
164 
165  // Called right before rendering anything (after setInvalidatedRegion).
166  // Used by GTK-AGG.
167  virtual void beforeRendering() { /* nop */ };
168 
169  // Should return TRUE when the GUI/Renderer combination supports multiple
170  // invalidated bounds regions.
171  virtual bool want_multiple_regions() { return false; }
172 
174  //
178  virtual bool want_redraw();
179 
181  virtual void setCursor(gnash_cursor_type newcursor);
182 
183  virtual void setClipboard(const std::string& copy);
184 
185  // Information for System.capabilities to be reimplemented in
186  // each gui.
187  virtual double getPixelAspectRatio() const { return 0; }
188 
189  virtual std::pair<int, int> screenResolution() const {
190  return std::make_pair(0, 0);
191  }
192 
193  virtual double getScreenDPI() const { return 0; }
194 
196  //
200  virtual std::string getScreenColor() const {
201  return "color";
202  }
203 
205  bool loops() const { return _loop; }
206 
208  bool isFullscreen() const { return _fullscreen; }
209 
211  //
216  void notifyMouseMove(int x, int y);
217 
219  //
222  void notifyMouseClick(bool mouse_pressed);
223 
225  //
227  void notifyMouseWheel(int delta);
228 
230  //
238  void notify_key_event(gnash::key::code k, int modifier, bool pressed);
239 
241  //
244  void resize_view(int width, int height);
245 
248  //
252  void updateStageMatrix();
253 
256  //
265  bool advanceMovie(bool doDisplay = true);
266 
268  //
272  static bool advance_movie(Gui* gui) {
273  gui->advanceMovie();
274  return true;
275  }
276 
279  void refreshView();
280 
283  //
288  virtual void setFullscreen();
289 
292  virtual void unsetFullscreen();
293 
296  virtual void hideMenu();
297 
299  //
302  virtual bool showMouse(bool show);
303 
305  //
307  virtual void showMenu(bool show);
308 
310  //
312  virtual void allowScale(bool allow);
313 
314  // Toggle between fullscreen and normal mode
315  void toggleFullscreen();
316 
318  //
321  void stop();
322 
324  //
327  void play();
328 
330  //
333  void pause();
334 
336  //
340  void start();
341 
343  bool isStopped() const { return _stopped; }
344 
346  bool isPlugin() const { return ((_xid)); }
347 
349  void takeScreenShot();
350 
352  void setMaxAdvances(unsigned long ul) { if (ul) _maxAdvances = ul; }
353 
354  void showUpdatedRegions(bool x) { _showUpdatedRegions = x; }
355  bool showUpdatedRegions() const { return _showUpdatedRegions; }
356 
360  void restart();
361 
363  void setQuality(Quality q);
364 
366  Quality getQuality() const;
367 
370  void toggleSound();
371 
372 #ifdef GNASH_FPS_DEBUG
373  //
377  void setFpsTimerInterval(float interval)
378  {
379  assert(interval >= 0.0);
380  fps_timer_interval = interval;
381  }
382 #endif // def GNASH_FPS_DEBUG
383 
384 
385 #ifdef USE_SWFTREE
386  std::unique_ptr<movie_root::InfoTree> getMovieInfo() const;
388 #endif
389 
390  typedef std::map<std::string, std::string> VariableMap;
391 
393  void addFlashVars(VariableMap& vars);
394 
397 
399  void setStage(movie_root* stage);
400 
402  void setAudioDump(const std::string& fname) {
403  _audioDump = fname;
404  }
405 
407  movie_root* getStage() { return _stage; };
408 
410  //
413  virtual void error(const std::string& /*msg*/) {}
414 
416  //
425  virtual bool yesno(const std::string& question);
426 
428  float getXScale() const { return _xscale; };
429 
431  float getYScale() const { return _yscale; };
432 
434  float getFPS() const { return (_movieDef) ? _movieDef->get_frame_rate() : 0;
435  };
436 
437 protected:
438 
440  Gui(RunResources& r);
441 
456  Gui(unsigned long xid, float scale, bool loop, RunResources& r);
457 
459  //
461  //
464  virtual void quitUI() {
465  std::exit(EXIT_SUCCESS);
466  }
467 
469  //
475  virtual bool watchFD(int /* fd */)
476  {
477  log_unimpl("This GUI does not implement FD watching.");
478  return false;
479  }
480 
481 
483  bool _loop;
484 
486  unsigned long _xid;
487 
488  // This would be 0,0,_width,_height, so maybe
489  // we should not duplicate the info with those
490  // explicit values too..
492 
494  int _width;
495 
497  int _height;
498 
501 
503  unsigned int _interval;
504 
506  std::shared_ptr<Renderer> _renderer;
507 
511 
512  // True if Gnash is running in fullscreen
514 
515  // True if mouse pointer is showing
517 
518  // Maximum number of advances before exit; 0 for no limit.
519  unsigned long _maxAdvances;
520 
522  unsigned long _advances;
523 
525  std::string _audioDump;
526 
529  virtual void stopHook() {}
530 
532  virtual void playHook() {}
533 
535  virtual bool visible() { return true; }
536 private:
537 
538  struct Display;
539 
540  std::map<int /* fd */, std::function<void ()> > _fd_callbacks;
541 
543  float _xscale;
544 
546  float _yscale;
547 
549  std::int32_t _xoffset;
550 
552  std::int32_t _yoffset;
553 
554  bool display(movie_root* m);
555 
556 #ifdef GNASH_FPS_DEBUG
557  unsigned int fps_counter;
558 
559  float fps_rate_min, fps_rate_max;
560 
561  // Number of calls to fpsCounterTick, which is also
562  // the number of calls to movie_advance()
563  unsigned int fps_counter_total;
564 
565  std::uint64_t fps_timer, fps_start_timer;
566 
568  //
571  float fps_timer_interval;
572 
574  unsigned int frames_dropped;
575 
579  //
582  void fpsCounterTick();
583 
584 #endif // def GNASH_FPS_DEBUG
585 
586  VariableMap _flashVars;
587 
588  boost::intrusive_ptr<movie_definition> _movieDef;
589 
591  movie_root* _stage;
592 
594  bool _stopped;
595 
597  bool _started;
598 
600  bool _showUpdatedRegions;
601 
602  SystemClock _systemClock;
603  InterruptableVirtualClock _virtualClock;
604 
606  std::unique_ptr<ScreenShotter> _screenShotter;
607 
608 #ifdef ENABLE_KEYBOARD_MOUSE_MOVEMENTS
609  int _xpointer;
610  int _ypointer;
611  bool _keyboardMouseMovements;
612  int _keyboardMouseMovementsStep;
613 #endif // ENABLE_KEYBOARD_MOUSE_MOVEMENTS
614 };
615 
617 namespace gui {
618  std::unique_ptr<Gui> createFBGui(unsigned long xid, float scale, bool loop, RunResources& r);
619 }
620 std::unique_ptr<Gui> createGTKGui(unsigned long xid, float scale, bool loop, RunResources& r);
621 std::unique_ptr<Gui> createKDEGui(unsigned long xid, float scale, bool loop, RunResources& r);
622 std::unique_ptr<Gui> createQt4Gui(unsigned long xid, float scale, bool loop, RunResources& r);
623 std::unique_ptr<Gui> createSDLGui(unsigned long xid, float scale, bool loop, RunResources& r);
624 std::unique_ptr<Gui> createFLTKGui(unsigned long xid, float scale, bool loop, RunResources& r);
625 std::unique_ptr<Gui> createAQUAGui(unsigned long xid, float scale, bool loop, RunResources& r);
626 std::unique_ptr<Gui> createRISCOSGui(unsigned long xid, float scale, bool loop, RunResources& r);
627 std::unique_ptr<Gui> createAOS4Gui(unsigned long xid, float scale, bool loop, RunResources& r);
628 std::unique_ptr<Gui> createHaikuGui(unsigned long xid, float scale, bool loop, RunResources& r);
629 std::unique_ptr<Gui> createDumpGui(unsigned long xid, float scale, bool loop, RunResources& r);
630 
631 
632 } // end of gnash namespace
633 
634 // end of _GUI_H_
635 #endif
636 
637 // Local Variables:
638 // mode: C++
639 // indent-tabs-mode: nil
640 // End:
gnash::geometry::SnappingRanges2d< std::int32_t >
sound_handler.h
gnash::gnash_cursor_type
gnash_cursor_type
Enumerates mouse cursor types.
Definition: gui.h:81
gnash::key::GNASH_MOD_CONTROL
@ GNASH_MOD_CONTROL
Definition: GnashKey.h:37
gnash::MovieClip::get_frame_count
size_t get_frame_count() const
Definition: MovieClip.h:166
gnash::geometry::Range2d< int >
gnash::Gui::getScreenColor
virtual std::string getScreenColor() const
Get the screen color type.
Definition: gui.h:200
gnash::Gui::~Gui
virtual ~Gui()
Definition: gui.cpp:176
gnash::Gui::getPixelAspectRatio
virtual double getPixelAspectRatio() const
Definition: gui.h:187
gnash::key::R
@ R
Definition: GnashKey.h:130
gnash::Gui::getQuality
Quality getQuality() const
Get current rendering quality.
Definition: gui.cpp:1282
gnash::key::L
@ L
Definition: GnashKey.h:124
gnash::key::DOWN
@ DOWN
Definition: GnashKey.h:207
gnash::key::l
@ l
Definition: GnashKey.h:158
gnash::Gui::_renderer
std::shared_ptr< Renderer > _renderer
The handler which is called to update the client area of our window.
Definition: gui.h:506
gnash::Gui::hideMenu
virtual void hideMenu()
Definition: gui.cpp:227
gnash::Gui::init
virtual bool init(int argc, char **argv[])=0
/ Initialise the gui and the associated renderer.
SystemClock.h
Movie.h
movie_root.h
gnash::CURSOR_INPUT
@ CURSOR_INPUT
Definition: gui.h:84
gnash::Gui::_redraw_flag
bool _redraw_flag
Definition: gui.h:510
name
std::string name
Definition: LocalConnection_as.cpp:149
ScreenShotter.h
gnash::visible
bool visible(const Property &prop, int version)
Is this member supposed to be visible by a VM of given version ?
Definition: Property.h:423
height
@ height
Definition: klash_part.cpp:329
gnash::Gui::setTimeout
virtual void setTimeout(unsigned int timeout)=0
Set the time in milliseconds after which the programme should exit.
gnash::Gui::VariableMap
std::map< std::string, std::string > VariableMap
Definition: gui.h:390
gnash::geometry::SnappingRanges2d::combineRanges
void combineRanges() const
Definition: snappingrange.h:497
gnash::Gui::visible
virtual bool visible()
Determines whether the Gui is visible (not obscured).
Definition: gui.h:535
gnash::geometry::Range2d::getMaxY
T getMaxY() const
Get max Y ordinate.
Definition: Range2d.h:633
gnash::movie_root::getRootMovie
Movie & getRootMovie()
Access the originating root movie (not necessarily _level0)
Definition: movie_root.h:303
gnash::VirtualClock
A class used to virtualize time flow.
Definition: VirtualClock.h:34
gnash::movie_root::setDimensions
void setDimensions(size_t w, size_t h)
Change stage size.
Definition: movie_root.cpp:561
gnash::movie_root::getStageScaleMode
ScaleMode getStageScaleMode() const
Returns the Stage object's align mode.
Definition: movie_root.h:521
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
y
std::int32_t y
Definition: BitmapData_as.cpp:435
gnash::Gui::toggleSound
void toggleSound()
Definition: gui.cpp:453
gnash::Gui::showMouse
virtual bool showMouse(bool show)
Sets whether the gui should show the system mouse pointer.
Definition: gui.cpp:233
gnash::key::i
@ i
Definition: GnashKey.h:155
stop
@ stop
Definition: klash_part.cpp:330
VirtualClock.h
gnash::Gui::setMovieDefinition
void setMovieDefinition(movie_definition *md)
Set the definition of top-level movie.
Definition: gui.cpp:1249
LOG_ONCE
#define LOG_ONCE(x)
Definition: log.h:49
gnash::key::PLUS
@ PLUS
Definition: GnashKey.h:88
gnash::typeName
std::string typeName(const T &inst)
Definition: utility.h:93
gnash::Gui::setStage
void setStage(movie_root *stage)
Set the stage to advance/display.
Definition: gui.cpp:1256
gnash::Gui::notifyMouseWheel
void notifyMouseWheel(int delta)
Send a mouse wheel event to the stage.
Definition: gui.cpp:515
_
#define _(String)
Definition: log.h:44
Renderer.h
gnash::key::modifier
modifier
Definition: GnashKey.h:34
gnash::Gui::getXScale
float getXScale() const
Width of a window pixel, in stage pseudopixel units.
Definition: gui.h:428
gnash::Gui::want_redraw
virtual bool want_redraw()
Asks the GUI handler if the next frame should be redrawn completely.
Definition: gui.cpp:1033
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::Gui::quitUI
virtual void quitUI()
End main rendering loop calling GUI-specific exit functions.
Definition: gui.h:464
gnash::Gui
Parent class from which all GUI implementations will depend.
Definition: gui.h:88
gnash::Gui::setInvalidatedRegion
virtual void setInvalidatedRegion(const SWFRect &bounds)
Gives the GUI a hint which region of the stage should be redrawn.
Definition: gui.cpp:1039
gnash::Gui::setMaxAdvances
void setMaxAdvances(unsigned long ul)
Set the maximum number of frame advances before Gnash exits.
Definition: gui.h:352
gnash::geometry::Range2d::getMaxX
T getMaxX() const
Get max X ordinate.
Definition: Range2d.h:613
gnash::key::g
@ g
Definition: GnashKey.h:153
gnash::movie_root::STAGE_V_ALIGN_C
@ STAGE_V_ALIGN_C
Definition: movie_root.h:466
GNASH_REPORT_FUNCTION
#define GNASH_REPORT_FUNCTION
Definition: log.h:452
gnash::key::Q
@ Q
Definition: GnashKey.h:129
gnash::Gui::run
virtual bool run()=0
Start main rendering loop.
gnash::Gui::allowScale
virtual void allowScale(bool allow)
Sets whether scaling should be allowed (for fscommand)
Definition: gui.cpp:246
GnashKey.h
boost
Definition: gui.h:74
gnash::key::m
@ m
Definition: GnashKey.h:159
gnash::Gui::isPlugin
bool isPlugin() const
Whether gnash is is running as a plugin.
Definition: gui.h:346
gnash::key::s
@ s
Definition: GnashKey.h:165
gnash::movie_root::STAGE_H_ALIGN_R
@ STAGE_H_ALIGN_R
Definition: movie_root.h:461
gnash::geometry::SnappingRanges2d::isWorld
bool isWorld() const
Returns true, when the ranges equal world range.
Definition: snappingrange.h:310
start
@ start
Definition: klash_part.cpp:330
gnash::geometry::Range2d::getMinX
T getMinX() const
Get min X ordinate.
Definition: Range2d.h:603
gnash::Gui::showUpdatedRegions
void showUpdatedRegions(bool x)
Definition: gui.h:354
gnash::createFLTKGui
std::unique_ptr< Gui > createFLTKGui(unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
Definition: gui_fltk.cpp:40
gnash::Gui::pause
void pause()
Toggle between "stop" and "play" mode.
Definition: gui.cpp:875
gnash::createKDEGui
std::unique_ptr< Gui > createKDEGui(unsigned long xid, float scale, bool loop, RunResources &r)
gnash::MovieClip
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:84
gnash::Gui::setScreenShotter
void setScreenShotter(std::unique_ptr< ScreenShotter > ss)
Definition: gui.cpp:1004
gnash::geometry::SnappingRanges2d::isNull
bool isNull() const
Returns true, when there is no range.
Definition: snappingrange.h:315
gnash::movie_root::STAGE_H_ALIGN_L
@ STAGE_H_ALIGN_L
Definition: movie_root.h:460
gnash::Gui::takeScreenShot
void takeScreenShot()
Take a screenshot now!
Definition: gui.cpp:1010
GnashEnums.h
gnash::movie_definition
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::Gui::showUpdatedRegions
bool showUpdatedRegions() const
Definition: gui.h:355
gnash::movie_root::getStageAlignment
StageAlign getStageAlignment() const
Definition: movie_root.cpp:1251
ENABLE_KEYBOARD_MOUSE_MOVEMENTS
#define ENABLE_KEYBOARD_MOUSE_MOVEMENTS
Define this to support keyboard-based pointer movements.
Definition: gui.h:62
gnash::movie_root::setStageScaleMode
void setStageScaleMode(ScaleMode sm)
Sets the Stage object's align mode.
Definition: movie_root.cpp:1303
gnash::Gui::_runResources
RunResources & _runResources
Per-run resources.
Definition: gui.h:500
gnash::key::LEFT
@ LEFT
Definition: GnashKey.h:209
gnash::key::k
@ k
Definition: GnashKey.h:157
gnash::createSDLGui
std::unique_ptr< Gui > createSDLGui(unsigned long xid, float scale, bool loop, RunResources &r)
gnash::Gui::setCursor
virtual void setCursor(gnash_cursor_type newcursor)
Sets the current mouse cursor for the Gui window.
Definition: gui.cpp:1027
gnash::Gui::_fullscreen
bool _fullscreen
Definition: gui.h:513
gnash::key::RIGHT
@ RIGHT
Definition: GnashKey.h:208
gnash::DisplayObject::allowHandCursor
bool DSOEXPORT allowHandCursor() const
Return true if this DisplayObject allows turning the cursor into an hand shape when it happens to be ...
Definition: DisplayObject.cpp:713
gnash::Gui::notifyMouseClick
void notifyMouseClick(bool mouse_pressed)
Mouse notification callback to be called when the mouse is clicked.
Definition: gui.cpp:531
gnash::Gui::resizeWindow
virtual void resizeWindow(int width, int height)
Definition: gui.cpp:203
gnash::Gui::refreshView
void refreshView()
Definition: gui.cpp:547
gnash::SWFRect
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
gnash::key::H
@ H
Definition: GnashKey.h:120
gnash::clocktime::getTicks
DSOEXPORT std::uint64_t getTicks()
Wall clock timer, returns current POSIX time in milliseconds.
Definition: ClockTime.cpp:61
gnash::key::O
@ O
Definition: GnashKey.h:127
gnash::geometry::Range2d::isFinite
bool isFinite() const
Returns true if this is a finite Range2d.
Definition: Range2d.h:210
gnash::Gui::renderBuffer
virtual void renderBuffer()=0
ClockTime.h
gnash::key::r
@ r
Definition: GnashKey.h:164
gnash::geometry::Range2d::isWorld
bool isWorld() const
Returns true if this is the WORLD Range2d.
Definition: Range2d.h:200
gnash::Gui::setClipboard
virtual void setClipboard(const std::string &copy)
Definition: gui.cpp:191
gnash::URLAccessManager::allow
bool allow(const URL &url, const URL &baseurl)
Return true if access to given url is allowed, false otherwise.
Definition: URLAccessManager.cpp:273
gnash::Gui::watchFD
virtual bool watchFD(int)
Watch a file descriptor.
Definition: gui.h:475
gnash::Gui::_maxAdvances
unsigned long _maxAdvances
Definition: gui.h:519
gnash::Gui::getFPS
float getFPS() const
Height of a window pixel, in stage pseudopixel units.
Definition: gui.h:434
gnash::key::GNASH_MOD_SHIFT
@ GNASH_MOD_SHIFT
Definition: GnashKey.h:36
gnash::InvalidatedRanges
geometry::SnappingRanges2d< std::int32_t > InvalidatedRanges
Standard snapping 2d ranges type for invalidated bounds calculation
Definition: snappingrange.h:655
gnash::movie_root::setStageDisplayState
void setStageDisplayState(const DisplayState ds)
Definition: movie_root.cpp:1341
gnash::Gui::getScreenDPI
virtual double getScreenDPI() const
Definition: gui.h:193
gnash::geometry::SnappingRanges2d::setSnapFactor
void setSnapFactor(const float factor)
Definition: snappingrange.h:125
gnash::DisplayObject::isSelectableTextField
virtual bool isSelectableTextField() const
Return true if this DisplayObject is a selectable TextField.
Definition: DisplayObject.h:845
gnash::key::F
@ F
Definition: GnashKey.h:118
gnash::Gui::updateStageMatrix
void updateStageMatrix()
Definition: gui.cpp:277
gnash::Gui::playHook
virtual void playHook()
Called by Gui::play().
Definition: gui.h:532
gnash::movie_root::StageVerticalAlign
StageVerticalAlign
The possible vertical position of the Stage.
Definition: movie_root.h:465
gnash::geometry::SnappingRanges2d::setSingleMode
void setSingleMode(const bool mode)
if mode==true, then the snapping ranges will act like a normal Range2d
Definition: snappingrange.h:135
gnash::key::code
code
Definition: GnashKey.h:44
gnash::geometry::Range2d::getMinY
T getMinY() const
Get min Y ordinate.
Definition: Range2d.h:623
gnash::Gui::setAudioDump
void setAudioDump(const std::string &fname)
Set the name of a file to dump audio to.
Definition: gui.h:402
gnash::key::h
@ h
Definition: GnashKey.h:154
gnash::Gui::notifyMouseMove
void notifyMouseMove(int x, int y)
Mouse notification callback to be called when the mouse is moved.
Definition: gui.cpp:469
play
@ play
Definition: klash_part.cpp:330
gnash::Gui::setFullscreen
virtual void setFullscreen()
Definition: gui.cpp:197
gnash::Gui::_width
int _width
Desired window width.
Definition: gui.h:494
gnash::Gui::_loop
bool _loop
Determines if playback should restart after the movie ends.
Definition: gui.h:483
gnash::Gui::advance_movie
static bool advance_movie(Gui *gui)
Convenience static wrapper around advanceMovie for callbacks happiness.
Definition: gui.h:272
gnash::movie_root::reset
void reset()
Reset stage to its initial state.
Definition: movie_root.cpp:519
MovieClip.h
gnash::key::p
@ p
Definition: GnashKey.h:162
gnash::Gui::toggleFullscreen
void toggleFullscreen()
Definition: gui.cpp:258
gnash::movie_root::SCALEMODE_NOSCALE
@ SCALEMODE_NOSCALE
Definition: movie_root.h:452
gnash::Gui::start
void start()
Start the movie.
Definition: gui.cpp:899
gnash::key::q
@ q
Definition: GnashKey.h:163
gnash::key::UP
@ UP
Definition: GnashKey.h:206
gnash::ScreenShotter
Handles screen dumps.
Definition: ScreenShotter.h:37
gnash::key::w
@ w
Definition: GnashKey.h:169
gnash::Gui::loops
bool loops() const
Definition: gui.h:205
gnash::Gui::resize_view
void resize_view(int width, int height)
Resize the client area view and the window accordingly.
Definition: gui.cpp:429
gnash::RunResources
Class to group together per-run and external resources for Gnash.
Definition: RunResources.h:54
gnash::movie_root::DISPLAYSTATE_FULLSCREEN
@ DISPLAYSTATE_FULLSCREEN
Definition: movie_root.h:446
gnash::Gui::_mouseShown
bool _mouseShown
Definition: gui.h:516
gnash::geometry::SnappingRanges2d::getFullArea
RangeType getFullArea() const
Definition: snappingrange.h:334
gnash::Gui::Gui
Gui(RunResources &r)
Default constructor. Initialises members to safe defaults.
Definition: gui.cpp:90
gnash::createRISCOSGui
std::unique_ptr< Gui > createRISCOSGui(unsigned long xid, float scale, bool loop, RunResources &r)
gnash::Gui::play
void play()
Put the application in "play" mode.
Definition: gui.cpp:830
gnash::createAOS4Gui
std::unique_ptr< Gui > createAOS4Gui(unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
Definition: gui_aos4.cpp:40
VM.h
gnash::Gui::quit
void quit()
Always called on exit.
Definition: gui.cpp:215
gnash::CURSOR_HAND
@ CURSOR_HAND
Definition: gui.h:82
gnash::Gui::unsetFullscreen
virtual void unsetFullscreen()
Definition: gui.cpp:209
gnash::movie_root::STAGE_V_ALIGN_T
@ STAGE_V_ALIGN_T
Definition: movie_root.h:467
gnash::movie_root::SCALEMODE_SHOWALL
@ SCALEMODE_SHOWALL
Definition: movie_root.h:451
gnash::createGTKGui
std::unique_ptr< Gui > createGTKGui(unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
Definition: gui_gtk.cpp:41
gnash::movie_root::keyEvent
DSOEXPORT bool keyEvent(key::code k, bool down)
Tell the movie when the user pressed or released a key.
Definition: movie_root.cpp:593
gnash::Movie::frameRate
virtual float frameRate() const =0
gnash::createQt4Gui
std::unique_ptr< Gui > createQt4Gui(unsigned long xid, float scale, bool loop, RunResources &r)
gnash::Gui::screenResolution
virtual std::pair< int, int > screenResolution() const
Definition: gui.h:189
gnash::Gui::getClock
virtual VirtualClock & getClock()
Return the clock provided by this Gui.
Definition: gui.h:112
gnash::SWFRect::set_world
void set_world()
set the rectangle to the WORLD value
Definition: SWFRect.h:96
gnash::Gui::_advances
unsigned long _advances
Counter to keep track of frame advances.
Definition: gui.h:522
gnash::createAQUAGui
std::unique_ptr< Gui > createAQUAGui(unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
Definition: gui_aqua.cpp:40
DisplayObject.h
gnash::GNASH_FILETYPE_PNG
@ GNASH_FILETYPE_PNG
Definition: GnashEnums.h:27
gnash::QUALITY_HIGH
@ QUALITY_HIGH
Definition: GnashEnums.h:38
gnash::MovieClip::PLAYSTATE_PLAY
@ PLAYSTATE_PLAY
Definition: MovieClip.h:99
gnash::Gui::restart
void restart()
Definition: gui.cpp:269
gnash::Gui::setInterval
virtual void setInterval(unsigned int interval)
Set main loop delay in milliseconds.
Definition: gui.h:103
gnash::CURSOR_NORMAL
@ CURSOR_NORMAL
Definition: gui.h:83
boost::function
Definition: gui.h:75
gnash::Gui::want_multiple_regions
virtual bool want_multiple_regions()
Definition: gui.h:171
gnash::sound::sound_handler
Sound mixer.
Definition: sound_handler.h:88
url
std::string url
Definition: gnash.cpp:59
gnash::key::ESCAPE
@ ESCAPE
Definition: GnashKey.h:72
gnash::InterruptableVirtualClock
A VirtualClock wrapper adding pause/resume capabilities.
Definition: VirtualClock.h:55
gnash::key::f
@ f
Definition: GnashKey.h:152
gnashconfig.h
gnash::Gui::isStopped
bool isStopped() const
See stop(), play() and pause()
Definition: gui.h:343
gnash::Gui::setInvalidatedRegions
virtual void setInvalidatedRegions(const InvalidatedRanges &ranges)
Definition: gui.cpp:1045
gnash::movie_root
This class represents the 'Stage' and top-level movie.
Definition: movie_root.h:151
gnash::Gui::getStage
movie_root * getStage()
The root movie, or "Stage".
Definition: gui.h:407
gnash::geometry::SnappingRanges2d::growBy
void growBy(const T amount)
Grows all ranges by the specified amount.
Definition: snappingrange.h:280
RunResources.h
gnash::Gui::showMenu
virtual void showMenu(bool show)
Sets whether the menus should be shown (for fscommand)
Definition: gui.cpp:240
gnash::Gui::_xid
unsigned long _xid
The X Window ID to attach to. If zero, we create a new window.
Definition: gui.h:486
gnash::key::MINUS
@ MINUS
Definition: GnashKey.h:90
gnash::movie_root::STAGE_V_ALIGN_B
@ STAGE_V_ALIGN_B
Definition: movie_root.h:468
gnash::key::EQUALS
@ EQUALS
Definition: GnashKey.h:108
gnash::Gui::setQuality
void setQuality(Quality q)
Set rendering quality, if not locked by RC file..
Definition: gui.cpp:1272
gnash::movie_root::SCALEMODE_EXACTFIT
@ SCALEMODE_EXACTFIT
Definition: movie_root.h:453
gnash::geometry::Range2d::setTo
Range2d< T > & setTo(T x, T y)
Set ourself to bound the given point.
Definition: Range2d.h:339
gnash::Gui::_interval
unsigned int _interval
Main loop interval: the time between successive advance_movie calls.
Definition: gui.h:503
gnash::Gui::_validbounds
geometry::Range2d< int > _validbounds
Definition: gui.h:491
gnash::Gui::stopHook
virtual void stopHook()
Definition: gui.h:529
gnash::movie_root::StageAlign
std::pair< StageHorizontalAlign, StageVerticalAlign > StageAlign
Definition: movie_root.h:503
gnash::Quality
Quality
Definition: GnashEnums.h:35
gnash::DisplayObject
DisplayObject is the base class for all DisplayList objects.
Definition: DisplayObject.h:169
gnash::RunResources::soundHandler
sound::sound_handler * soundHandler() const
Get a pointer to a sound::sound_handler set by a hosting application.
Definition: RunResources.h:96
gui.h
IF_DEBUG_REGION_UPDATES
#define IF_DEBUG_REGION_UPDATES(...)
Definition: gui.cpp:63
gnash::SystemClock
A system-clock based virtual clock.
Definition: SystemClock.h:37
gnash::URL
Uniform Resource Locator.
Definition: URL.h:35
gnash::createDumpGui
std::unique_ptr< Gui > createDumpGui(unsigned long, float, bool, RunResourcesfloat, bool, unsigned int)
Definition: gui_dump.cpp:40
gnash::Gui::notify_key_event
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.
Definition: gui.cpp:560
StreamProvider.h
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::key::P
@ P
Definition: GnashKey.h:128
width
@ width
Definition: klash_part.cpp:329
gnash::Gui::error
virtual void error(const std::string &)
Handle error message from the core.
Definition: gui.h:413
gnash::movie_root::ScaleMode
ScaleMode
The possibile values of Stage.scaleMode.
Definition: movie_root.h:450
gnash::Gui::createWindow
virtual bool createWindow(const char *title, int width, int height, int xPosition=0, int yPosition=0)=0
Create and display our window.
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::gui::createFBGui
std::unique_ptr< Gui > createFBGui(unsigned long windowid, float scale, bool do_loop, RunResources &r)
Definition: fb.cpp:141
gnash::Gui::yesno
virtual bool yesno(const std::string &question)
Prompt user with a question she can answer with yes/no.
Definition: gui.cpp:1264
gnash::key::u
@ u
Definition: GnashKey.h:167
gnash::movie_root::DISPLAYSTATE_NORMAL
@ DISPLAYSTATE_NORMAL
Definition: movie_root.h:445
x
std::int32_t x
Definition: BitmapData_as.cpp:434
gnash::movie_root::StageHorizontalAlign
StageHorizontalAlign
The possible horizonal positions of the Stage.
Definition: movie_root.h:458
gnash::movie_root::runResources
const RunResources & runResources() const
Definition: movie_root.h:788
gnash::createHaikuGui
std::unique_ptr< Gui > createHaikuGui(unsigned long xid, float scale, bool loop, RunResources &r)
snappingrange.h
gnash::Gui::advanceMovie
bool advanceMovie(bool doDisplay=true)
Give movie an heart-beat.
Definition: gui.cpp:935
gnash::key::W
@ W
Definition: GnashKey.h:135
gnash::key::e
@ e
Definition: GnashKey.h:151
gnash::Gui::addFlashVars
void addFlashVars(VariableMap &vars)
Add variables to set into instances of the top-level movie definition.
Definition: gui.cpp:1241
gnash::Gui::_height
int _height
Desired window height.
Definition: gui.h:497
gnash::Gui::_audioDump
std::string _audioDump
Name of a file to dump audio to.
Definition: gui.h:525
gnash::movie_root::SCALEMODE_NOBORDER
@ SCALEMODE_NOBORDER
Definition: movie_root.h:454
gnash::geometry::SnappingRanges2d::setWorld
void setWorld()
Resets to one range with world flags.
Definition: snappingrange.h:303
gnash::Gui::stop
void stop()
Put the application in "stop" mode.
Definition: gui.cpp:853
gnash::Gui::beforeRendering
virtual void beforeRendering()
Definition: gui.h:167
gnash::Gui::getYScale
float getYScale() const
Height of a window pixel, in stage pseudopixel units.
Definition: gui.h:431
gnash::Gui::isFullscreen
bool isFullscreen() const
Definition: gui.h:208