Gnash  0.8.11dev
movie_root.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
3 // 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 
62 
63 
64 #ifndef GNASH_MOVIE_ROOT_H
65 #define GNASH_MOVIE_ROOT_H
66 
67 #ifdef HAVE_CONFIG_H
68 #include "gnashconfig.h" //USE_SWFTREE
69 #endif
70 
71 #include <map>
72 #include <string>
73 #include <vector>
74 #include <forward_list>
75 #include <set>
76 #include <bitset>
77 #include <array>
78 #include <boost/ptr_container/ptr_deque.hpp>
79 #include <boost/noncopyable.hpp>
80 #include <boost/any.hpp>
81 #include <boost/optional.hpp>
82 
83 #include "dsodefs.h" // DSOEXPORT
84 #include "DragState.h"
85 #include "MouseButtonState.h" // for composition
86 #include "GnashKey.h" // key::code
87 #include "GnashEnums.h"
88 #include "MovieClip.h"
89 #include "SimpleBuffer.h" // for LoadCallback
90 #include "MovieLoader.h"
91 #include "ExternalInterface.h"
92 #include "GC.h"
93 #include "VM.h"
94 #include "HostInterface.h"
95 #include "log.h"
96 #include "IOChannel.h"
97 
98 #ifdef USE_SWFTREE
99 # include "tree.hh"
100 #endif
101 
102 // GNASH_PARANOIA_LEVEL:
103 // 0 : (not unimplemented)
104 // 1 : quick assertions
105 // 2 : add testInvariant
106 //
107 #ifndef GNASH_PARANOIA_LEVEL
108 # define GNASH_PARANOIA_LEVEL 1
109 #endif
110 
111 // Forward declarations
112 namespace gnash {
113  class ExecutableCode;
114  class URL;
115  class Timer;
116  class MovieClip;
117  class VirtualClock;
118  class RunResources;
119  class Button;
120  class VM;
121  class Movie;
122 }
123 
124 namespace gnash {
125 
127 {
129  bool operator()(const LevelMovie& d1, const LevelMovie& d2) const {
130  return d1->get_depth() < d2->get_depth();
131  }
132 };
133 
135 //
140 //
143 //
148 //
150 class DSOEXPORT movie_root : public GcRoot, boost::noncopyable
151 {
152 public:
153 
154  class LoadCallback {
155  public:
156  LoadCallback(std::unique_ptr<IOChannel> s, as_object* o)
157  :
158  _stream(std::move(s)),
159  _obj(o)
160  {}
161  bool processLoad();
162  void setReachable() const;
163  private:
164  std::unique_ptr<IOChannel> _stream;
165  SimpleBuffer _buf;
166  as_object* _obj;
167  };
168  typedef std::list<LoadCallback> LoadCallbacks;
169 
170  typedef std::bitset<key::KEYCOUNT> Keys;
171 
173  //
176  movie_root(VirtualClock& clock, const RunResources& runResources);
177 
178  ~movie_root();
179 
181  //
183  //
189  Movie* init(movie_definition* def,
190  const MovieClip::MovieVariables& variables);
191 
193  //
197  MovieClip* getLevel(unsigned int num) const;
198 
200  //
205  void setLevel(unsigned int num, Movie* movie);
206 
208  //
216  void replaceLevel(unsigned int num, Movie* external_movie);
217 
219  //
232  void swapLevels(MovieClip* sp, int depth);
233 
235  //
243  void dropLevel(int depth);
244 
246  //
249  //
252  void setDimensions(size_t w, size_t h);
253 
255  size_t getStageWidth() const;
256 
258  size_t getStageHeight() const;
259 
261  //
270  DSOEXPORT bool mouseMoved(std::int32_t x, std::int32_t y);
271 
273  //
276  DSOEXPORT bool mouseClick(bool press);
277 
279  //
284  DSOEXPORT bool mouseWheel(int delta);
285 
287  //
291  DSOEXPORT bool keyEvent(key::code k, bool down);
292 
294  //
296  std::pair<std::int32_t, std::int32_t> mousePosition() const;
297 
298  void setDragState(const DragState& st);
299 
301  //
304  return *_rootMovie;
305  }
306 
307  void stop_drag() {
308  _dragState.reset();
309  }
310 
312  //
322  std::uint32_t addIntervalTimer(std::unique_ptr<Timer> timer);
323 
325  //
329  //
331  //
334  //
337  //
340  void addLoadableObject(as_object* obj, std::unique_ptr<IOChannel> str);
341 
342  void addAdvanceCallback(ActiveRelay* obj);
343 
344  void removeAdvanceCallback(ActiveRelay* obj);
345 
347  //
349  bool clearIntervalTimer(std::uint32_t x);
350 
351  void set_background_color(const rgba& color);
352 
353  void set_background_alpha(float alpha);
354 
356  VM& getVM() { return _vm; }
357 
360  //
364  bool advance();
365 
369  //
372  int timeToNextFrame() const;
373 
375  //
385  void advanceMovie();
386 
387  void display();
388 
391  return ++_unnamedInstance;
392  }
393 
395  void registerButton(Button* listener);
396 
398  void removeButton(Button* listener);
399 
401  //
407  DisplayObject* getFocus();
408 
410  //
416  bool setFocus(DisplayObject* to);
417 
418  DSOEXPORT void add_invalidated_bounds(InvalidatedRanges& ranges,
419  bool force);
420 
422  //
429  DisplayObject* getActiveEntityUnderPointer() const;
430 
432  //
436  const DisplayObject* getEntityUnderPointer() const;
437 
439  DisplayObject* getDraggingCharacter() const;
440 
441  bool testInvariant() const;
442 
446  DISPLAYSTATE_FULLSCREEN
447  };
448 
450  enum ScaleMode {
454  SCALEMODE_NOBORDER
455  };
456 
461  STAGE_H_ALIGN_R
462  };
463 
468  STAGE_V_ALIGN_B
469  };
470 
472  enum AlignMode {
476  STAGE_ALIGN_B
477  };
478 
483  SCRIPT_ACCESS_ALWAYS
484  };
485 
487  void setQuality(Quality q);
488 
490  Quality getQuality() const { return _quality; }
491 
494  void setStageAlignment(short s);
495 
498  void setAllowScriptAccess(AllowScriptAccessMode mode);
499 
501  AllowScriptAccessMode getAllowScriptAccess();
502 
503  typedef std::pair<StageHorizontalAlign, StageVerticalAlign> StageAlign;
504 
507  StageAlign getStageAlignment() const;
508 
511  bool getShowMenuState() const;
512 
515  void setShowMenuState(bool state);
516 
518  void setStageScaleMode(ScaleMode sm);
519 
521  ScaleMode getStageScaleMode() const { return _scaleMode; }
522 
523  // The string representation of the current align mode.
524  std::string getStageAlignMode() const;
525 
527  DisplayState getStageDisplayState() const { return _displayState; }
528 
529  // The string representation of the current align mode.
530  void setStageDisplayState(const DisplayState ds);
531 
541  PRIORITY_SIZE
542  };
543 
545  //
549  typedef std::array<boost::ptr_deque<ExecutableCode>, PRIORITY_SIZE>
551 
553  void pushAction(std::unique_ptr<ExecutableCode> code, size_t lvl);
554 
556  void pushAction(const action_buffer& buf, DisplayObject* target);
557 
559  //
570  void markReachableResources() const;
571 
575  //
581  {
582  // Don't register the object in the list twice
583 #if GNASH_PARANOIA_LEVEL > 1
584  assert(std::find(_liveChars.begin(), _liveChars.end(), ch) ==
585  _liveChars.end());
586 #endif
587  _liveChars.push_front(ch);
588  }
589 
591  void reset();
592 
594  //
604  void disableScripts();
605 
607  bool scriptsDisabled() const { return _disableScripts; };
608 
611  //
617  void flushHigherPriorityActionQueues();
618 
619  DisplayObject* findCharacterByTarget(const std::string& tgtstr) const;
620 
622  //
626  //
638  void loadMovie(const std::string& url, const std::string& target,
639  const std::string& data, MovieClip::VariablesMethod method,
640  as_object* handler=nullptr)
641  {
642  _movieLoader.loadMovie(url, target, data, method, handler);
643  }
644 
646  //
650  //
658  void getURL(const std::string& urlstr, const std::string& target,
659  const std::string& data, MovieClip::VariablesMethod method);
660 
661 
663  return _lastKeyEvent;
664  }
665 
666  const Keys& unreleasedKeys() const {
667  return _unreleasedKeys;
668  }
669 
671  //
675  void registerClass(const SWF::DefinitionTag* sprite, as_function* cls);
676 
678  //
682  as_function* getRegisteredClass(const SWF::DefinitionTag* sprite) const;
683 
686  void setHostFD(int fd) {
687  assert(fd >= 0);
688  _hostfd = fd;
689  }
690 
693  void setControlFD(int fd) {
694  _controlfd = fd;
695  }
696 
701  int getHostFD() const {
702  return _hostfd;
703  }
704 
705  int getControlFD() const {
706  return _controlfd;
707  }
708 
719  _fsCommandHandler = handler;
720  }
721 
723  DSOEXPORT void handleFsCommand(const std::string& cmd,
724  const std::string& arg) const;
725 
733  _interfaceHandler = handler;
734  }
735 
737  //
739  void callInterface(const HostInterface::Message& e) const;
740 
742  //
747  //
750  template<typename T> T callInterface(const HostInterface::Message& e) const;
751 
756  //
767  void setScriptLimits(std::uint16_t recursion, std::uint16_t timeout);
768 
771  std::uint16_t getRecursionLimit() const {
772  return _recursionLimit;
773  }
774 
777  std::uint16_t getTimeoutLimit() const
778  {
779  return _timeoutLimit;
780  }
781 
782 #ifdef USE_SWFTREE
783  typedef tree<std::pair<std::string, std::string> > InfoTree;
784  void getMovieInfo(InfoTree& tr, InfoTree::iterator it);
785  void getCharacterTree(InfoTree& tr, InfoTree::iterator it);
786 #endif
787 
788  const RunResources& runResources() const { return _runResources; }
789 
790  typedef std::map<std::string, as_object*> ExternalCallbackMethods;
791  typedef std::map<std::string, as_object*> ExternalCallbackInstances;
794 
796  //
803  void addExternalCallback(const std::string& name, as_object* callback,
804  as_object* instance);
805 
806  bool processInvoke(ExternalInterface::invoke_t *);
807 
808  std::string callExternalCallback(const std::string &name,
809  const std::vector<as_value>& args);
810 
811  std::string callExternalJavascript(const std::string &name,
812  const std::vector<as_value>& args);
813 
815  //
820  void removeQueuedConstructor(MovieClip* target);
821 
822  GC& gc() {
823  return _gc;
824  }
825 
827  //
830  bool queryInterface(const std::string& what) const;
831 
833  //
837  //
843  void setStreamBlock(int id, int block);
844 
846  //
849  //
851  void stopStream(int id);
852 
853 private:
854 
856  //
878  void setRootMovie(Movie* movie);
879 
881  bool notify_mouse_listeners(const event_id& event);
882 
886  bool fire_mouse_event();
887 
889  void doMouseDrag();
890 
892  void executeAdvanceCallbacks();
893 
895  void executeTimers();
896 
898  void cleanupAndCollect();
899 
903  //
915  InteractiveObject* getTopmostMouseEntity(std::int32_t x,
916  std::int32_t y) const;
917 
920  void cleanupDisplayList();
921 
923  void advanceLiveChars();
924 
928  void setInvalidated() { _invalidated = true; }
929 
931  //
934  void clearInvalidated() { _invalidated = false; }
935 
937  //
944  bool isInvalidated() { return _invalidated; }
945 
947  //
950  size_t minPopulatedPriorityQueue() const;
951 
955  size_t processActionQueue(size_t lvl);
956 
957  bool processingActions() const {
958  return (_processingActionLevel < PRIORITY_SIZE);
959  }
960 
961  const DisplayObject* findDropTarget(std::int32_t x, std::int32_t y,
962  DisplayObject* dragging) const;
963 
964  void handleActionLimitHit(const std::string& ref);
965 
966  typedef std::forward_list<Button*> ButtonListeners;
967  ButtonListeners _buttonListeners;
968 
969  GC _gc;
970 
971  const RunResources& _runResources;
972 
975  VM _vm;
976 
978  HostInterface* _interfaceHandler;
979 
981  FsCallback* _fsCommandHandler;
982 
984  //
989  typedef std::forward_list<MovieClip*> LiveChars;
990 
992  LiveChars _liveChars;
993 
994  ActionQueue _actionQueue;
995 
997  void processActionQueue();
998 
1000  size_t _stageWidth;
1001  size_t _stageHeight;
1002 
1003  rgba m_background_color;
1004  bool m_background_color_set;
1005 
1006  std::int32_t _mouseX;
1007  std::int32_t _mouseY;
1008 
1009  MouseButtonState _mouseButtonState;
1010 
1012  typedef std::set<ActiveRelay*> ObjectCallbacks;
1013  ObjectCallbacks _objectCallbacks;
1014 
1015  LoadCallbacks _loadCallbacks;
1016 
1017  typedef std::map<std::uint32_t, std::unique_ptr<Timer>> TimerMap;
1018 
1019  TimerMap _intervalTimers;
1020 
1021  size_t _lastTimerId;
1022 
1024  Keys _unreleasedKeys;
1025 
1026  key::code _lastKeyEvent;
1027 
1029  DisplayObject* _currentFocus;
1030 
1032  boost::optional<DragState> _dragState;
1033 
1034  typedef std::map<int, MovieClip*> Levels;
1035 
1037  //
1041  Levels _movies;
1042 
1043  typedef std::map<const SWF::DefinitionTag*, as_function*> RegisteredClasses;
1044  RegisteredClasses _registeredClasses;
1045 
1049  Movie* _rootMovie;
1050 
1052  bool _invalidated;
1053 
1056  bool _disableScripts;
1057  int _processingActionLevel;
1058 
1060  //
1062  int _hostfd;
1063  int _controlfd;
1064 
1066  //
1069  Quality _quality;
1070 
1072  std::bitset<4u> _alignMode;
1073 
1074  AllowScriptAccessMode _allowScriptAccess;
1075 
1077  bool _showMenu;
1078 
1080  ScaleMode _scaleMode;
1081 
1083  DisplayState _displayState;
1084 
1085  // Maximum number of recursions set in the ScriptLimits tag.
1086  std::uint16_t _recursionLimit;
1087 
1088  // Timeout in seconds for script execution, set in the ScriptLimits tag.
1089  std::uint16_t _timeoutLimit;
1090 
1091  // delay between movie advancement, in milliseconds
1092  size_t _movieAdvancementDelay;
1093 
1094  // time of last movie advancement, in milliseconds
1095  size_t _lastMovieAdvancement;
1096 
1098  size_t _unnamedInstance;
1099 
1100  MovieLoader _movieLoader;
1101 
1102  struct SoundStream {
1103  SoundStream(int i, int b) : id(i), block(b) {}
1104  int id;
1105  int block;
1106  };
1107 
1108  boost::optional<SoundStream> _timelineSound;
1109 };
1110 
1112 //
1120 bool isLevelTarget(int version, const std::string& name, unsigned int& levelno);
1121 
1122 DSOEXPORT short stringToStageAlign(const std::string& s);
1123 
1124 template<typename T>
1125 T
1127 {
1128  if (!_interfaceHandler) {
1129  log_error("Hosting application registered no callback for "
1130  "messages, can't call %s(%s)");
1131  return T();
1132  }
1133 
1134  try {
1135  return boost::any_cast<T>(_interfaceHandler->call(e));
1136  }
1137  catch (const boost::bad_any_cast&) {
1138  log_error(_("Unexpected type from host interface when requesting "
1139  "%1%"), e);
1140  return T();
1141  }
1142 }
1143 
1144 } // namespace gnash
1145 
1146 #endif // GNASH_MOVIE_ROOT_H
1147 
1148 // Local Variables:
1149 // mode: C++
1150 // indent-tabs-mode: nil
1151 // End:
gnash::geometry::SnappingRanges2d< std::int32_t >
gnash::MovieClip::construct
virtual void construct(as_object *initObj=nullptr)
Handle placement event.
Definition: MovieClip.cpp:1711
sound_handler.h
gnash::key::KEY
@ KEY
Definition: GnashKey.h:332
gnash::FsCallback
Abstract base class for FS handlers.
Definition: HostInterface.h:200
gnash::isLevelTarget
bool isLevelTarget(int version, const std::string &name, unsigned int &levelno)
Return true if the given string can be interpreted as a _level name.
Definition: movie_root.cpp:2387
gnash::isNativeType
bool isNativeType(const as_object *obj, T *&relay)
Check whether the object is an instance of a known type.
Definition: as_object.h:875
gnash::VM::setConstantPool
void setConstantPool(const ConstantPool *pool)
Definition: VM.h:247
gnash::movie_root::removeAdvanceCallback
void removeAdvanceCallback(ActiveRelay *obj)
Definition: movie_root.cpp:1464
gnash::ExternalInterface::writeBrowser
static DSOEXPORT size_t writeBrowser(int fd, const std::string &xml)
Definition: ExternalInterface.cpp:326
gnash::movie_root::clearIntervalTimer
bool clearIntervalTimer(std::uint32_t x)
Remove timer identified by given integer.
Definition: movie_root.cpp:828
gnash::HostInterface::Message
boost::variant< HostMessage, CustomMessage > Message
Definition: HostInterface.h:213
gnash::movie_definition::isAS3
virtual bool isAS3() const
True if the SWFMovie should use AVM2.
Definition: movie_definition.h:410
gnash::key::l
@ l
Definition: GnashKey.h:158
gnash::DisplayObject::set_depth
void set_depth(int d)
Definition: DisplayObject.h:270
gnash::HostInterface::exit
virtual void exit()=0
Instruct the hosting application to exit.
gnash::movie_root::dropLevel
void dropLevel(int depth)
Drop level at given depth.
Definition: movie_root.cpp:462
SystemClock.h
gnash::movie_root::setDragState
void setDragState(const DragState &st)
Definition: movie_root.cpp:743
gnash::utf8::textEncodingName
const char * textEncodingName(TextEncoding enc)
Return name of a text encoding.
Definition: utf8.cpp:262
gnash::movie_root::registerFSCommandCallback
DSOEXPORT void registerFSCommandCallback(FsCallback *handler)
Definition: movie_root.h:718
Movie.h
movie_root.h
gnash::movie_root::display
void display()
Definition: movie_root.cpp:998
gnash::MouseButtonState
Helper to generate mouse events, given mouse state & history.
Definition: MouseButtonState.h:21
gnash::MovieClip::get_frame_size
const SWFRect & get_frame_size() const
Definition: MovieClip.h:195
gnash::NSV::PROP_ON_KILL_FOCUS
@ PROP_ON_KILL_FOCUS
Definition: namedStrings.h:159
name
std::string name
Definition: LocalConnection_as.cpp:149
gnash::VM::setSWFVersion
void setSWFVersion(int v)
Set SWF version of the currently executing code.
Definition: VM.cpp:74
gnash::movie_root::callExternalJavascript
std::string callExternalJavascript(const std::string &name, const std::vector< as_value > &args)
Definition: movie_root.cpp:1895
gnash::movie_root::addIntervalTimer
std::uint32_t addIntervalTimer(std::unique_ptr< Timer > timer)
Add an interval timer.
Definition: movie_root.cpp:813
ExecutableCode.h
gnash::image::begin
pixel_iterator< T > begin(GnashImage &im)
Definition: ImageIterators.h:191
gnash::HostMessage::EXTERNALINTERFACE_PAN
@ EXTERNALINTERFACE_PAN
Definition: HostInterface.h:176
gnash::movie_root::processInvoke
bool processInvoke(ExternalInterface::invoke_t *)
Definition: movie_root.cpp:1571
gnash::as_object
The base class for all ActionScript objects.
Definition: as_object.h:162
gnash::MovieClip::destroy
void destroy()
Mark this sprite as destroyed.
Definition: MovieClip.cpp:2041
gnash::NSV::PROP_uBYTES_TOTAL
@ PROP_uBYTES_TOTAL
Definition: namedStrings.h:141
gnash::MouseButtonState::isDown
bool isDown
current state of mouse button
Definition: MouseButtonState.h:35
SimpleBuffer.h
gnash::Renderer::External
Definition: Renderer.h:540
gnash::QUALITY_BEST
@ QUALITY_BEST
Definition: GnashEnums.h:39
gnash::movie_root::mousePosition
std::pair< std::int32_t, std::int32_t > mousePosition() const
Use this to retrieve the last state of the mouse.
Definition: movie_root.cpp:736
gnash::NSV::PROP_uBYTES_LOADED
@ PROP_uBYTES_LOADED
Definition: namedStrings.h:142
gnash::RunResources::renderer
Renderer * renderer() const
Definition: RunResources.h:112
gnash::Movie::widthPixels
virtual size_t widthPixels() const =0
gnash::movie_root::callInterface
void callInterface(const HostInterface::Message &e) const
Call the hosting application without expecting a reply.
Definition: movie_root.cpp:2516
gnash::MouseButtonState::topmostEntity
InteractiveObject * topmostEntity
what's underneath the mouse right now
Definition: MouseButtonState.h:29
gnash::toObject
as_object * toObject(const as_value &v, VM &vm)
Convert an as_value to an object.
Definition: VM.cpp:457
gnash::movie_root::getStageHeight
size_t getStageHeight() const
Notional height of the stage, actual value depending on scaleMode.
Definition: movie_root.cpp:1213
gnash::key::T
@ T
Definition: GnashKey.h:132
gnash::movie_root::getRootMovie
Movie & getRootMovie()
Access the originating root movie (not necessarily _level0)
Definition: movie_root.h:303
gnash::SWFRect::get_x_max
std::int32_t get_x_max() const
Get the x coordinate of the right-down corner.
Definition: SWFRect.h:122
gnash::movie_root::getHostFD
int getHostFD() const
Definition: movie_root.h:701
gnash::DisplayObject::staticDepthOffset
static const int staticDepthOffset
Definition: DisplayObject.h:205
gnash::ActionParserException
Definition: GnashException.h:182
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
dsodefs.h
gnash::SWF::DefinitionTag
Immutable data representing the definition of a movie display element.
Definition: DefinitionTag.h:48
Button.h
gnash::movie_root::getStageScaleMode
ScaleMode getStageScaleMode() const
Returns the Stage object's align mode.
Definition: movie_root.h:521
gnash::movie_root::mouseMoved
DSOEXPORT bool mouseMoved(std::int32_t x, std::int32_t y)
Inform the Stage that the mouse has moved.
Definition: movie_root.cpp:582
gnash::RcInitFile::getScriptsRecursionLimit
int getScriptsRecursionLimit() const
Definition: rc.h:353
gnash::NSV::PROP_BROADCAST_MESSAGE
@ PROP_BROADCAST_MESSAGE
Definition: namedStrings.h:139
gnash::log_debug
void log_debug(StringType msg, Args... args)
Definition: log.h:301
gnash::ExternalInterface::makeInvoke
static DSOEXPORT std::string makeInvoke(const std::string &method, const std::vector< as_value > &args)
Definition: ExternalInterface.cpp:302
gnash::event_id::MOUSE_UP
@ MOUSE_UP
Definition: event_id.h:77
HostInterface.h
y
std::int32_t y
Definition: BitmapData_as.cpp:435
gnash::key::i
@ i
Definition: GnashKey.h:155
gnash::getPathElement
as_object * getPathElement(as_object &o, const ObjectURI &uri)
Resolve the given relative path component.
Definition: as_object.cpp:1089
gnash::movie_root::mouseWheel
DSOEXPORT bool mouseWheel(int delta)
Inform the Stage that a mouse wheel has moved.
Definition: movie_root.cpp:659
LOG_ONCE
#define LOG_ONCE(x)
Definition: log.h:49
gnash::rgba
A basic RGBA type.
Definition: RGBA.h:36
gnash::movie_root::STAGE_ALIGN_L
@ STAGE_ALIGN_L
Definition: movie_root.h:473
gnash::movie_definition::get_url
virtual const std::string & get_url() const =0
Return the URL of the SWF stream this definition has been read from.
gnash::movie_root::getAllowScriptAccess
AllowScriptAccessMode getAllowScriptAccess()
Gets the current Access Mode for ExternalInterface.
Definition: movie_root.cpp:1243
gnash::InteractiveObject::mouseEvent
virtual void mouseEvent(const event_id &id)=0
Called whenever a mouse event affects this InteractiveObject.
gnash::DepthComparator::operator()
bool operator()(const LevelMovie &d1, const LevelMovie &d2) const
Definition: movie_root.h:129
gnash::pixelsToTwips
std::int32_t pixelsToTwips(double a)
Definition: GnashNumeric.h:144
gnash::getVariable
as_value getVariable(const as_environment &env, const std::string &varname, const as_environment::ScopeStack &scope, as_object **retTarget)
Return the (possibly undefined) value of the named var.
Definition: as_environment.cpp:289
_
#define _(String)
Definition: log.h:44
Renderer.h
gnash::ActiveRelay::owner
as_object & owner() const
Return the as_object that this Relay is attached to.
Definition: Relay.h:108
gnash::as_environment
Provides information about timeline context.
Definition: as_environment.h:51
gnash::DragState
What is being dragged and how.
Definition: DragState.h:36
gnash::event_id
A class to identify 'static' SWF events (system events).
Definition: event_id.h:53
gnash::MovieClip::get_loaded_frames
size_t get_loaded_frames() const
Return number of completely loaded frames of this sprite/movie.
Definition: MovieClip.h:176
gnash::VM
The AVM1 virtual machine.
Definition: VM.h:72
gnash::DepthComparator::LevelMovie
MovieClip * LevelMovie
Definition: movie_root.h:128
gnash::MovieClip::display
virtual void display(Renderer &renderer, const Transform &xform)
Render this MovieClip.
Definition: MovieClip.cpp:1205
DragState.h
Transform.h
gnash
Anonymous namespace for callbacks, local functions, event handlers etc.
Definition: dbus_ext.cpp:41
gnash::VM::getGlobal
Global_as * getGlobal() const
Get a pointer to this VM's _global Object.
Definition: VM.cpp:149
gnash::movie_root::~movie_root
~movie_root()
Definition: movie_root.cpp:190
gnash::SWFRect::is_null
bool is_null() const
returns true if this is a NULL rectangle
Definition: SWFRect.h:75
gnash::MovieClip::setVariables
DSOEXPORT void setVariables(const MovieVariables &vars)
Set all variables in the given map with their corresponding values.
Definition: MovieClip.cpp:1936
gnash::HostInterface
Abstract base class for hosting app handler.
Definition: HostInterface.h:208
gnash::SWFRect::get_y_max
std::int32_t get_y_max() const
Get the y coordinate of the right-down corner.
Definition: SWFRect.h:136
gnash::getWorldMatrix
SWFMatrix getWorldMatrix(const DisplayObject &d, bool includeRoot=true)
Get concatenated SWFMatrix (all ancestor transforms and our SWFMatrix)
Definition: DisplayObject.h:1131
gnash::movie_root::getFocus
DisplayObject * getFocus()
Get the DisplayObject having focus.
Definition: movie_root.cpp:1084
gnash::movie_root::PRIORITY_DOACTION
@ PRIORITY_DOACTION
Frame actions, load handlers, unload handlers.
Definition: movie_root.h:539
gnash::movie_root::getStageWidth
size_t getStageWidth() const
Notional width of the stage, actual value depending on scaleMode.
Definition: movie_root.cpp:1197
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::utf8::encUNSPECIFIED
@ encUNSPECIFIED
Definition: utf8.h:115
gnash::DepthComparator
Definition: movie_root.h:127
gnash::movie_root::registerButton
void registerButton(Button *listener)
Push a new DisplayObject listener for key events.
Definition: movie_root.cpp:1992
gnash::movie_root::setAllowScriptAccess
void setAllowScriptAccess(AllowScriptAccessMode mode)
The mode is one of never, always, with sameDomain the default.
Definition: movie_root.cpp:1237
gnash::Renderer
Base class for render handlers.
Definition: Renderer.h:189
GnashKey.h
gnash::MovieLoader::setReachable
void setReachable() const
Definition: MovieLoader.cpp:461
gnash::frnd
int frnd(float f)
Definition: GnashNumeric.h:91
gnash::GC
Garbage collector singleton.
Definition: GC.h:165
gnash::key::s
@ s
Definition: GnashKey.h:165
gnash::movie_root::SCRIPT_ACCESS_NEVER
@ SCRIPT_ACCESS_NEVER
Definition: movie_root.h:481
gnash::movie_root::STAGE_H_ALIGN_R
@ STAGE_H_ALIGN_R
Definition: movie_root.h:461
gnash::DisplayObject::setMatrix
void setMatrix(const SWFMatrix &m, bool updateCache=false)
Set local transform SWFMatrix for this DisplayObject.
Definition: DisplayObject.cpp:395
Global_as.h
gnash::MovieClip::get_bytes_loaded
size_t get_bytes_loaded() const
Definition: MovieClip.h:190
gnash::movie_root::markReachableResources
void markReachableResources() const
Mark all reachable resources (for GC)
Definition: movie_root.cpp:1753
gnash::HostMessage::EXTERNALINTERFACE_STOPPLAY
@ EXTERNALINTERFACE_STOPPLAY
Definition: HostInterface.h:180
gnash::movie_root::mouseClick
DSOEXPORT bool mouseClick(bool press)
Inform the Stage that a mouse click has occurred.
Definition: movie_root.cpp:678
gnash::movie_root::PRIORITY_CONSTRUCT
@ PRIORITY_CONSTRUCT
Construct event handlers.
Definition: movie_root.h:537
gnash::MovieLoader::clear
void clear()
Drop all requests and kill the thread.
Definition: MovieLoader.cpp:152
gnash::DisplayObject::getTarget
std::string DSOEXPORT getTarget() const
Return full path to this object, in dot notation.
Definition: DisplayObject.cpp:621
gnash::HostMessage::EXTERNALINTERFACE_ZOOM
@ EXTERNALINTERFACE_ZOOM
Definition: HostInterface.h:181
gnash::ExternalInterface::toXML
static std::string toXML(const as_value &obj)
Convert an AS object to an XML string.
Definition: ExternalInterface.h:51
__FUNCTION__
#define __FUNCTION__
Definition: log.h:437
gnash::getGlobal
Global_as & getGlobal(const as_environment &env)
Definition: as_environment.cpp:651
gnash::log_network
void log_network(StringType msg, Args... args)
Definition: log.h:277
gnash::movie_root::pushAction
void pushAction(std::unique_ptr< ExecutableCode > code, size_t lvl)
Push an executable code to the ActionQueue.
Definition: movie_root.cpp:1496
gnash::movie_definition::createMovie
virtual Movie * createMovie(Global_as &, DisplayObject *=nullptr)
Create a movie instance from a def.
Definition: movie_definition.h:143
gnash::MovieClip
A MovieClip is a container for DisplayObjects.
Definition: MovieClip.h:84
gnash::movie_root::STAGE_ALIGN_R
@ STAGE_ALIGN_R
Definition: movie_root.h:475
gnash::movie_root::gc
GC & gc()
Definition: movie_root.h:822
gnash::movie_root::STAGE_H_ALIGN_L
@ STAGE_H_ALIGN_L
Definition: movie_root.h:460
GnashEnums.h
as_function.h
gnash::movie_definition::get_version
virtual int get_version() const =0
gnash::movie_definition
Client program's interface to the definition of a movie or sprite.
Definition: movie_definition.h:96
gnash::NSV::CLASS_STAGE
@ CLASS_STAGE
Definition: namedStrings.h:241
gnash::log_error
void log_error(StringType msg, Args... args)
Definition: log.h:283
gnash::movie_root::AllowScriptAccessMode
AllowScriptAccessMode
The possibile values of AllowScriptAccess.
Definition: movie_root.h:480
gnash::movie_root::getStageAlignment
StageAlign getStageAlignment() const
Definition: movie_root.cpp:1251
gnash::MouseButtonState::wasInsideActiveEntity
bool wasInsideActiveEntity
whether mouse was inside the active_entity last frame
Definition: MouseButtonState.h:38
gnash::movie_root::setStageScaleMode
void setStageScaleMode(ScaleMode sm)
Sets the Stage object's align mode.
Definition: movie_root.cpp:1303
gnash::key::k
@ k
Definition: GnashKey.h:157
gnash::movie_root::SCRIPT_ACCESS_SAME_DOMAIN
@ SCRIPT_ACCESS_SAME_DOMAIN
Definition: movie_root.h:482
gnash::InteractiveObject
The base class for interactive objects.
Definition: InteractiveObject.h:45
gnash::movie_root::init
Movie * init(movie_definition *def, const MovieClip::MovieVariables &variables)
Initialize movie_root with a parsed movie definition.
Definition: movie_root.cpp:200
gnash::utf8::encUTF8
@ encUTF8
Definition: utf8.h:116
gnash::SWFRect
Rectangle class, see swf defined rectangle record.
Definition: SWFRect.h:45
gnash::MovieClip::setDropTarget
void setDropTarget(const std::string &tgt)
Definition: MovieClip.h:230
gnash::movie_root::setLevel
void setLevel(unsigned int num, Movie *movie)
Put the given movie at the given level.
Definition: movie_root.cpp:316
color
const VGfloat color[4]
Definition: testr_gtk.cpp:82
gnash::GcRoot
Abstract class to allow the GC to store "roots" into a container.
Definition: GC.h:56
gnash::callMethod
as_value callMethod(fn_call::Args &args, as_object *obj, const ObjectURI &uri)
Call a member function of this object in an AS-compatible way.
Definition: Global_as.h:219
gnash::amf::write
void write(SimpleBuffer &buf, const std::string &str)
Write a string to an AMF buffer.
Definition: AMF.cpp:161
gnash::movie_root::LoadCallback::setReachable
void setReachable() const
Definition: movie_root.cpp:2433
gnash::movie_root::queryInterface
bool queryInterface(const std::string &what) const
Ask the host interface a question.
Definition: movie_root.cpp:246
gnash::movie_root::_externalCallbackInstances
ExternalCallbackInstances _externalCallbackInstances
Definition: movie_root.h:793
gnash::renderer::opengl::for_each
void for_each(C &container, R(T::*pmf)(const A &), const A &arg)
Definition: Renderer_ogl.cpp:690
gnash::DisplayObject::handleFocus
virtual bool handleFocus()
Set the current focus to this DisplayObject.
Definition: DisplayObject.h:910
gnash::movie_root::getControlFD
int getControlFD() const
Definition: movie_root.h:705
gnash::key::a
@ a
Definition: GnashKey.h:147
gnash::VM::markReachableResources
void markReachableResources() const
Mark all reachable resources (for GC)
Definition: VM.cpp:161
gnash::HostMessage::SHOW_MENU
@ SHOW_MENU
Definition: HostInterface.h:117
gnash::geometry::Point2d::x
std::int32_t x
The x coordinate.
Definition: Point2d.h:43
gnash::DisplayObject::get_depth
int get_depth() const
Definition: DisplayObject.h:268
gnash::SWFRect::get_x_min
std::int32_t get_x_min() const
Get the x coordinate of the left-up corner.
Definition: SWFRect.h:115
gnash::movie_root::advance
bool advance()
Definition: movie_root.cpp:848
gnash::movie_root::STAGE_ALIGN_T
@ STAGE_ALIGN_T
Definition: movie_root.h:474
gnash::movie_root::removeButton
void removeButton(Button *listener)
Remove a DisplayObject listener for key events.
Definition: movie_root.cpp:1986
gnash::movie_root::setStageDisplayState
void setStageDisplayState(const DisplayState ds)
Definition: movie_root.cpp:1341
gnash::Movie::heightPixels
virtual size_t heightPixels() const =0
gnash::key::codeMap
const unsigned char codeMap[KEYCOUNT][TYPES]
Definition: GnashKey.h:337
gnash::Movie::definition
virtual const movie_definition * definition() const =0
gnash::HostMessage::SET_DISPLAYSTATE
@ SET_DISPLAYSTATE
Definition: HostInterface.h:124
gnash::movie_root::DisplayState
DisplayState
The possible values of Stage.displayState.
Definition: movie_root.h:444
gnash::invoke
DSOEXPORT as_value invoke(const as_value &method, const as_environment &env, as_object *this_ptr, fn_call::Args &args, as_object *super=nullptr, const movie_definition *callerDef=nullptr)
Call an as_value on an as_object.
Definition: Global_as.h:166
gnash::HostMessage::EXTERNALINTERFACE_ISPLAYING
@ EXTERNALINTERFACE_ISPLAYING
Definition: HostInterface.h:175
ExternalInterface.h
gnash::as_value::to_string
DSOTEXPORT std::string to_string(int version=7) const
Get a std::string representation for this value.
Definition: as_value.cpp:205
GnashAlgorithm.h
gnash::FunctionArgs
A class to contain transferable arguments for a fn_call.
Definition: fn_call.h:57
gnash::DisplayObject::to_movie
virtual MovieClip * to_movie()
Definition: DisplayObject.h:266
gnash::HostMessage::EXTERNALINTERFACE_PLAY
@ EXTERNALINTERFACE_PLAY
Definition: HostInterface.h:177
gnash::Timer::executeAndReset
void executeAndReset()
Execute associated function and reset state.
Definition: Timers.cpp:93
gnash::movie_root::LoadCallback::processLoad
bool processLoad()
Definition: movie_root.cpp:2439
gnash::movie_root::StageVerticalAlign
StageVerticalAlign
The possible vertical position of the Stage.
Definition: movie_root.h:465
IF_VERBOSE_ASCODING_ERRORS
#define IF_VERBOSE_ASCODING_ERRORS(x)
Definition: log.h:397
gnash::key::code
code
Definition: GnashKey.h:44
MouseButtonState.h
gnash::SWFMatrix::transform
void transform(geometry::Point2d &p) const
Transform a given point by our SWFMatrix.
Definition: SWFMatrix.cpp:99
gnash::GC::fuzzyCollect
void fuzzyCollect()
Run the collector, if worth it.
Definition: GC.h:210
gnash::ActiveRelay
A native type that requires periodic updates from the core (movie_root).
Definition: Relay.h:80
gnash::movie_root::ExternalCallbackInstances
std::map< std::string, as_object * > ExternalCallbackInstances
Definition: movie_root.h:791
gnash::movie_root::getRecursionLimit
std::uint16_t getRecursionLimit() const
Definition: movie_root.h:771
gnash::key::h
@ h
Definition: GnashKey.h:154
gnash::StringNoCaseEqual
A case-insensitive string equality operator.
Definition: StringPredicates.h:42
gnash::utf8::stripBOM
const char * stripBOM(const char *in, size_t &size, TextEncoding &encoding)
Interpret (and skip) Byte Order Mark in input stream.
Definition: utf8.cpp:208
gnash::movie_root::getVM
VM & getVM()
Return the VM used by this movie_root.
Definition: movie_root.h:356
gnash::movie_root::PRIORITY_SIZE
@ PRIORITY_SIZE
Last element used to easy computation of size...
Definition: movie_root.h:541
gnash::as_environment::ScopeStack
std::vector< as_object * > ScopeStack
A stack of objects used for variables/members lookup.
Definition: as_environment.h:55
gnash::as_value::set_undefined
void set_undefined()
Set to undefined.
Definition: as_value.cpp:519
gnash::movie_root::setFocus
bool setFocus(DisplayObject *to)
Set the DisplayObject having focus.
Definition: movie_root.cpp:1090
gnash::movie_root::Keys
std::bitset< key::KEYCOUNT > Keys
Definition: movie_root.h:170
gnash::movie_root::getTimeoutLimit
std::uint16_t getTimeoutLimit() const
Definition: movie_root.h:777
gnash::stringToStageAlign
short stringToStageAlign(const std::string &str)
Definition: movie_root.cpp:2406
gnash::movie_root::setStreamBlock
void setStreamBlock(int id, int block)
Set the current stream block for the driving streaming sound.
Definition: movie_root.cpp:259
gnash::movie_root::ActionPriorityLevel
ActionPriorityLevel
Action priority levels.
Definition: movie_root.h:533
URL.h
gnash::movie_root::reset
void reset()
Reset stage to its initial state.
Definition: movie_root.cpp:519
gnash::MovieClip::cleanupDisplayList
void cleanupDisplayList()
Definition: MovieClip.cpp:2010
MovieClip.h
gnash::key::INVALID
@ INVALID
Definition: GnashKey.h:45
gnash::RcInitFile::getURLOpenerFormat
const std::string & getURLOpenerFormat() const
Get the URL opener command format.
Definition: rc.h:239
gnash::movie_root::addLoadableObject
void addLoadableObject(as_object *obj, std::unique_ptr< IOChannel > str)
Register an object for loading data to.
Definition: movie_root.cpp:1452
gnash::key::p
@ p
Definition: GnashKey.h:162
gnash::MovieLoader::processCompletedRequests
void processCompletedRequests()
Process all completed movie load requests.
Definition: MovieLoader.cpp:329
Timers.h
test.w
w
Definition: test.py:8
gnash::ExternalInterface::invoke_t
Definition: ExternalInterface.h:44
gnash::movie_root::registerEventCallback
DSOEXPORT void registerEventCallback(HostInterface *handler)
Definition: movie_root.h:732
gnash::movie_root::SCALEMODE_NOSCALE
@ SCALEMODE_NOSCALE
Definition: movie_root.h:452
gnash::key::q
@ q
Definition: GnashKey.h:163
gnash::VM::getSWFVersion
int getSWFVersion() const
Get SWF version context for the currently running actions.
Definition: VM.h:106
gnash::RcInitFile::qualityLevel
int qualityLevel() const
Definition: rc.h:109
gnash::as_value::to_object
as_object * to_object(VM &vm) const
Return value as an object, converting primitive values as needed.
Definition: as_value.cpp:453
GnashSystemIOHeaders.h
gnash::point
geometry::Point2d point
Definition: Point2d.h:143
gnash::movie_root::STAGE_H_ALIGN_C
@ STAGE_H_ALIGN_C
Definition: movie_root.h:459
gnash::key::_1
@ _1
Definition: GnashKey.h:95
gnash::key::KEYCOUNT
@ KEYCOUNT
Definition: GnashKey.h:326
gnash::movie_root::setStageAlignment
void setStageAlignment(short s)
Definition: movie_root.cpp:1229
GnashNumeric.h
gnash::DisplayObject::set_invalidated
void set_invalidated()
This function marks the DisplayObject as being modified in aspect and keeps track of current invalida...
Definition: DisplayObject.cpp:183
gnash::SystemClock::elapsed
unsigned long int elapsed() const
Return number of milliseconds elapsed since start.
Definition: SystemClock.cpp:47
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::SWFMatrix
Definition: SWFMatrix.h:54
gnash::as_value
ActionScript value type.
Definition: as_value.h:95
gnash::geometry::Point2d
2D Point class
Definition: Point2d.h:39
gnash::sound::sound_handler::reset
virtual void reset()
Discard all sound inputs (slots and aux streamers) and clear scheduling.
Definition: sound_handler.cpp:812
gnash::movie_root::registerClass
void registerClass(const SWF::DefinitionTag *sprite, as_function *cls)
Register an actionscript class for construction of a MovieClip.
Definition: movie_root.cpp:280
gnash::Movie
A top-level, standalone Movie that can be loaded and played.
Definition: Movie.h:47
gnash::movie_root::nextUnnamedInstance
size_t nextUnnamedInstance()
Get a unique number for unnamed instances.
Definition: movie_root.h:390
gnash::DisplayObject::unloaded
bool unloaded() const
Return true if this DisplayObject was unloaded from the stage.
Definition: DisplayObject.h:785
VM.h
gnash::movie_root::getActiveEntityUnderPointer
DisplayObject * getActiveEntityUnderPointer() const
Return the topmost active entity under the pointer.
Definition: movie_root.cpp:1143
gnash::MovieClip::VariablesMethod
VariablesMethod
The various methods for sending data in requests.
Definition: MovieClip.h:419
gnash::movie_root::STAGE_V_ALIGN_T
@ STAGE_V_ALIGN_T
Definition: movie_root.h:467
gnash::movie_root::swapLevels
void swapLevels(MovieClip *sp, int depth)
Swap depth of a level (or two)
Definition: movie_root.cpp:382
gnash::movie_root::SCALEMODE_SHOWALL
@ SCALEMODE_SHOWALL
Definition: movie_root.h:451
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_root::AlignMode
AlignMode
The possible elements of a Stage.alignMode.
Definition: movie_root.h:472
gnash::DisplayObject::killFocus
virtual void killFocus()
Some DisplayObjects require actions on losing focus.
Definition: DisplayObject.h:917
gnash::Button
Button implements Flash buttons.
Definition: Button.h:45
gnash::movie_root::replaceLevel
void replaceLevel(unsigned int num, Movie *external_movie)
Replace an existing level with a new movie.
Definition: movie_root.cpp:494
gnash::movie_root::setShowMenuState
void setShowMenuState(bool state)
Definition: movie_root.cpp:1277
gnash::movie_root::addExternalCallback
void addExternalCallback(const std::string &name, as_object *callback, as_object *instance)
Add an ExternalInterface callback object with an associated name.
Definition: movie_root.cpp:1849
gnash::GlobalCode
Global code (out of any function)
Definition: ExecutableCode.h:63
gnash::DisplayObject::getTargetPath
std::string getTargetPath() const
Return full path to this object, in slash notation.
Definition: DisplayObject.cpp:567
gnash::movie_root::disableScripts
void disableScripts()
Call this method for disabling run of actions.
Definition: movie_root.cpp:180
gnash::log_aserror
void log_aserror(StringType msg, Args... args)
Definition: log.h:331
gnash::movie_root::timeToNextFrame
int timeToNextFrame() const
Return the number of milliseconds available before it's time to advance the timeline again.
Definition: movie_root.cpp:990
gnash::rgba::m_a
std::uint8_t m_a
Definition: RGBA.h:113
gnash::QUALITY_HIGH
@ QUALITY_HIGH
Definition: GnashEnums.h:38
log.h
gnash::DisplayObject::clear_invalidated
void clear_invalidated()
Definition: DisplayObject.h:720
gnash::DisplayObject::parent
DisplayObject * parent() const
Return the parent of this DisplayObject, or NULL if the DisplayObject has no parent.
Definition: DisplayObject.h:252
utf8.h
gnash::movie_root::getShowMenuState
bool getShowMenuState() const
Definition: movie_root.cpp:1269
gnash::movie_root::addLiveChar
void addLiveChar(MovieClip *ch)
Register a newly born advanceable DisplayObject to the list of DisplayObjects to be advanced on next ...
Definition: movie_root.h:580
gnash::ActionLimitException
An ActionScript limit exception.
Definition: GnashException.h:136
gnash::NSV::CLASS_SELECTION
@ CLASS_SELECTION
Definition: namedStrings.h:235
gnash::MovieClip::get_bytes_total
size_t get_bytes_total() const
Definition: MovieClip.h:183
gnash::NSV::PROP_ON_DATA
@ PROP_ON_DATA
Definition: namedStrings.h:150
gnash::event_id::MOUSE_DOWN
@ MOUSE_DOWN
Definition: event_id.h:76
gnash::sound::sound_handler
Sound mixer.
Definition: sound_handler.h:88
url
std::string url
Definition: gnash.cpp:59
gnash::movie_root::getEntityUnderPointer
const DisplayObject * getEntityUnderPointer() const
Return the topmost non-dragging entity under the pointer.
Definition: movie_root.cpp:1155
gnash::MouseButtonState::activeEntity
InteractiveObject * activeEntity
entity that currently owns the mouse pointer
Definition: MouseButtonState.h:26
gnash::event_id::KEY_DOWN
@ KEY_DOWN
Definition: event_id.h:79
gnash::movie_root::LoadCallbacks
std::list< LoadCallback > LoadCallbacks
Definition: movie_root.h:168
gnash::getObject
as_object * getObject(const DisplayObject *d)
Return the as_object associated with a DisplayObject if it exists.
Definition: DisplayObject.h:1160
gnash::key::f
@ f
Definition: GnashKey.h:152
gnash::utf8::TextEncoding
TextEncoding
Definition: utf8.h:114
gnash::VM::getTime
unsigned long int getTime() const
Get the number of milliseconds since VM was started.
Definition: VM.cpp:155
TextField.h
gnash::HostMessage::UPDATE_STAGE
@ UPDATE_STAGE
Definition: HostInterface.h:110
gnash::movie_root::STAGE_ALIGN_B
@ STAGE_ALIGN_B
Definition: movie_root.h:476
gnashconfig.h
gnash::image::end
pixel_iterator< T > end(GnashImage &im)
Definition: ImageIterators.h:198
gnash::movie_root::setHostFD
void setHostFD(int fd)
Definition: movie_root.h:686
gnash::RcInitFile::getDefaultInstance
static RcInitFile & getDefaultInstance()
Return the default instance of RC file.
Definition: rc.cpp:61
gnash::TextField
An instance of a DefineEditTextTag.
Definition: TextField.h:57
gnash::ExecutableCode::markReachableResources
void markReachableResources() const
Mark reachable resources (for the GC)
Definition: ExecutableCode.h:47
gnash::movie_root
This class represents the 'Stage' and top-level movie.
Definition: movie_root.h:151
gnash::movie_root::getStageAlignMode
std::string getStageAlignMode() const
Definition: movie_root.cpp:1291
gnash::MouseButtonState::wasDown
bool wasDown
previous state of mouse button
Definition: MouseButtonState.h:32
namedStrings.h
gnash::as_object::set_member
virtual bool set_member(const ObjectURI &uri, const as_value &val, bool ifFound=false)
Set a member value.
Definition: as_object.cpp:583
gnash::HostMessage
Built-in forms of communication with the host application.
Definition: HostInterface.h:86
gnash::movie_root::loadMovie
void loadMovie(const std::string &url, const std::string &target, const std::string &data, MovieClip::VariablesMethod method, as_object *handler=nullptr)
Queue a request for loading a movie.
Definition: movie_root.h:638
gnash::HostMessage::RESIZE_STAGE
@ RESIZE_STAGE
Definition: HostInterface.h:104
RunResources.h
test.uri
uri
Definition: test.py:12
gnash::movie_root::stopStream
void stopStream(int id)
Notify the stage that a sound stream has stopped.
Definition: movie_root.cpp:273
gnash::key::c
@ c
Definition: GnashKey.h:149
gnash::Renderer::setQuality
void setQuality(Quality q)
Definition: Renderer.h:211
gnash::movie_root::PRIORITY_INIT
@ PRIORITY_INIT
Init actions, Init event handlers.
Definition: movie_root.h:535
gnash::movie_root::STAGE_V_ALIGN_B
@ STAGE_V_ALIGN_B
Definition: movie_root.h:468
gnash::movie_root::flushHigherPriorityActionQueues
void flushHigherPriorityActionQueues()
Definition: movie_root.cpp:1428
gnash::movie_root::LoadCallback
Definition: movie_root.h:154
gnash::movie_definition::get_width_pixels
virtual size_t get_width_pixels() const =0
Frame width in pixels.
gnash::HostMessage::EXTERNALINTERFACE_SETZOOMRECT
@ EXTERNALINTERFACE_SETZOOMRECT
Definition: HostInterface.h:179
gnash::movie_root::stop_drag
void stop_drag()
Definition: movie_root.h:307
gnash::movie_root::SCALEMODE_EXACTFIT
@ SCALEMODE_EXACTFIT
Definition: movie_root.h:453
gnash::ActiveRelay::setReachable
virtual void setReachable()
Mark any other reachable resources, and finally mark our owner.
Definition: Relay.cpp:36
DSOEXPORT
#define DSOEXPORT
Definition: dsodefs.h:55
gnash::TextField::keyInput
void keyInput(key::code k)
Handle user input from a key press.
Definition: TextField.cpp:527
gnash::movie_root::unreleasedKeys
const Keys & unreleasedKeys() const
Definition: movie_root.h:666
gnash::foreachSecond
void foreachSecond(T begin, T end, U op)
Call a functor on the second element of each element in a range.
Definition: GnashAlgorithm.h:73
gnash::getURI
ObjectURI getURI(const VM &vm, const std::string &str, bool lowerCaseHint=false)
Definition: VM.h:290
gnash::NSV::CLASS_MOUSE
@ CLASS_MOUSE
Definition: namedStrings.h:226
gnash::movie_root::ExternalCallbackMethods
std::map< std::string, as_object * > ExternalCallbackMethods
Definition: movie_root.h:790
gnash::geometry::Point2d::y
std::int32_t y
The y coordinate.
Definition: Point2d.h:46
gnash::movie_root::StageAlign
std::pair< StageHorizontalAlign, StageVerticalAlign > StageAlign
Definition: movie_root.h:503
gnash::movie_root::callExternalCallback
std::string callExternalCallback(const std::string &name, const std::vector< as_value > &args)
Definition: movie_root.cpp:1921
gnash::Quality
Quality
Definition: GnashEnums.h:35
GC.h
MovieLoader.h
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
gnash::movie_root::ActionQueue
std::array< boost::ptr_deque< ExecutableCode >, PRIORITY_SIZE > ActionQueue
A number of queues of code to execute.
Definition: movie_root.h:550
gnash::movie_root::advanceMovie
void advanceMovie()
Entry point for movie advancement.
Definition: movie_root.cpp:960
gnash::action_buffer
A code segment.
Definition: action_buffer.h:50
gnash::movie_root::_externalCallbackMethods
ExternalCallbackMethods _externalCallbackMethods
Definition: movie_root.h:792
gnash::movie_root::getStageDisplayState
DisplayState getStageDisplayState() const
Returns the Stage object's align mode.
Definition: movie_root.h:527
gnash::DisplayObject::unload
bool unload()
Unload this instance from the stage.
Definition: DisplayObject.cpp:448
gnash::movie_root::getQuality
Quality getQuality() const
Get the current display quality.
Definition: movie_root.h:490
gnash::HostMessage::EXTERNALINTERFACE_REWIND
@ EXTERNALINTERFACE_REWIND
Definition: HostInterface.h:178
gnash::movie_root::setQuality
void setQuality(Quality q)
Set the current display quality of the entire SWF.
Definition: movie_root.cpp:1164
gnash::SystemClock
A system-clock based virtual clock.
Definition: SystemClock.h:37
gnash::MovieClip::get_environment
virtual as_environment & get_environment()
Return a reference to the variable scope of this DisplayObject.
Definition: MovieClip.h:509
gnash::movie_root::add_invalidated_bounds
DSOEXPORT void add_invalidated_bounds(InvalidatedRanges &ranges, bool force)
Definition: movie_root.cpp:1358
gnash::ExternalInterface::ExternalEventCheck
static DSOEXPORT std::unique_ptr< invoke_t > ExternalEventCheck(int fd)
Definition: ExternalInterface.cpp:142
gnash::MouseButtonState::markReachableResources
void markReachableResources() const
Mark reachable objects (active and topmost entities)
Definition: MouseButtonState.h:51
gnash::URL
Uniform Resource Locator.
Definition: URL.h:35
gnash::HostInterface::call
virtual boost::any call(const Message &e)=0
Pass a message to the hosting application with an optional return.
gnash::movie_root::LoadCallback::LoadCallback
LoadCallback(std::unique_ptr< IOChannel > s, as_object *o)
Definition: movie_root.h:156
gnash::movie_definition::get_frame_rate
virtual float get_frame_rate() const =0
gnash::Transform
The Transform class expresses a stage in a cumulative transformation.
Definition: Transform.h:34
StreamProvider.h
gnash::key::o
@ o
Definition: GnashKey.h:161
gnash::getMatrix
const SWFMatrix & getMatrix(const DisplayObject &o)
Get local transform SWFMatrix for this DisplayObject.
Definition: DisplayObject.h:1119
gnash::movie_root::testInvariant
bool testInvariant() const
Definition: movie_root.cpp:2527
gnash::NSV::PROP_ON_SET_FOCUS
@ PROP_ON_SET_FOCUS
Definition: namedStrings.h:177
gnash::movie_root::ScaleMode
ScaleMode
The possibile values of Stage.scaleMode.
Definition: movie_root.h:450
gnash::movie_root::setControlFD
void setControlFD(int fd)
Definition: movie_root.h:693
gnash::log_unimpl
void log_unimpl(StringType msg, Args... args)
Definition: log.h:289
gnash::movie_root::removeQueuedConstructor
void removeQueuedConstructor(MovieClip *target)
Removes a queued constructor from the execution queue.
Definition: movie_root.cpp:1489
gnash::ObjectURI
A URI for describing as_objects.
Definition: ObjectURI.h:45
gnash::event_id::KEY_UP
@ KEY_UP
Definition: event_id.h:80
gnash::movie_root::getLevel
MovieClip * getLevel(unsigned int num) const
Return the movie at the given level (0 if unloaded level).
Definition: movie_root.cpp:508
GnashException.h
gnash::movie_root::DISPLAYSTATE_NORMAL
@ DISPLAYSTATE_NORMAL
Definition: movie_root.h:445
x
std::int32_t x
Definition: BitmapData_as.cpp:434
gnash::isReferenceable
bool isReferenceable(const DisplayObject &d)
Returns true if the DisplayObject is referenceable in ActionScript.
Definition: DisplayObject.h:1149
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::event_id::MOUSE_MOVE
@ MOUSE_MOVE
Definition: event_id.h:78
gnash::MovieClip::MovieVariables
std::map< std::string, std::string > MovieVariables
Definition: MovieClip.h:93
gnash::NSV::CLASS_KEY
@ CLASS_KEY
Definition: namedStrings.h:220
gnash::event_id::functionName
const std::string & functionName() const
Definition: event_id.cpp:36
gnash::key::b
@ b
Definition: GnashKey.h:148
data
SimpleBuffer data
Definition: LocalConnection_as.cpp:151
IOChannel.h
gnash::VM::getStack
SafeStack< as_value > & getStack()
Accessor for the VM's stack.
Definition: VM.h:88
gnash::key::e
@ e
Definition: GnashKey.h:151
gnash::event_id::KEY_PRESS
@ KEY_PRESS
Definition: event_id.h:69
gnash::movie_root::getRegisteredClass
as_function * getRegisteredClass(const SWF::DefinitionTag *sprite) const
Get the actionscript class for constructing a MovieClip.
Definition: movie_root.cpp:286
gnash::HostMessage::QUERY
@ QUERY
Definition: HostInterface.h:172
gnash::movie_definition::get_height_pixels
virtual size_t get_height_pixels() const =0
Frame height in pixels.
gnash::movie_root::addAdvanceCallback
void addAdvanceCallback(ActiveRelay *obj)
Definition: movie_root.cpp:1458
gnash::SWFRect::get_y_min
std::int32_t get_y_min() const
Get the y coordinate of the left-up corner.
Definition: SWFRect.h:129
gnash::fontlib::clear
void clear()
Clean up the font library.
Definition: fontlib.cpp:36
gnash::RcInitFile
Definition: rc.h:44
gnash::geometry::SnappingRanges2d::setWorld
void setWorld()
Resets to one range with world flags.
Definition: snappingrange.h:303
gnash::ExternalInterface::readBrowser
static DSOEXPORT std::string readBrowser(int fd)
Definition: ExternalInterface.cpp:336
gnash::SimpleBuffer
A simple buffer of bytes.
Definition: SimpleBuffer.h:38
gnash::DisplayObject::visible
bool visible() const
Definition: DisplayObject.h:623
gnash::RcInitFile::getScriptsTimeout
int getScriptsTimeout() const
Definition: rc.h:349
gnash::as_function
ActionScript Function, either builtin or SWF-defined.
Definition: as_function.h:63
gnash::Timer::markReachableResources
void markReachableResources() const
Mark all reachable resources (for GC)
Definition: Timers.cpp:124
gnash::GcResource::setReachable
void setReachable() const
Mark this resource as being reachable.
Definition: GC.h:92
gnash::movie_root::scriptsDisabled
bool scriptsDisabled() const
Return true if scripts execution is disabled.
Definition: movie_root.h:607
gnash::movie_root::lastKeyEvent
key::code lastKeyEvent() const
Definition: movie_root.h:662
gnash::CreatePointer
Return a pointer to a type.
Definition: GnashAlgorithm.h:32
gnash::movie_root::getDraggingCharacter
DisplayObject * getDraggingCharacter() const
Return the DisplayObject currently being dragged, if any.
Definition: movie_root.cpp:1149
gnash::movie_root::movie_root
movie_root(VirtualClock &clock, const RunResources &runResources)
Default constructor.
Definition: movie_root.cpp:135