Gnash 0.8.9
|
00001 // 00002 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 00003 // 2011 Free Software Foundation, Inc 00004 // 00005 // This program is free software; you can redistribute it and/or modify 00006 // it under the terms of the GNU General Public License as published by 00007 // the Free Software Foundation; either version 3 of the License, or 00008 // (at your option) any later version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 00019 // Stateful live Movie instance 00020 00021 00022 #ifndef GNASH_MOVIE_H 00023 #define GNASH_MOVIE_H 00024 00025 #include <string> 00026 #include <set> 00027 00028 #include "MovieClip.h" // for inheritance 00029 00030 // Forward declarations 00031 namespace gnash { 00032 class DisplayObject; 00033 class movie_definition; 00034 } 00035 00036 namespace gnash 00037 { 00038 00040 // 00043 // 00047 class Movie : public MovieClip 00048 { 00049 00050 public: 00051 00052 Movie(as_object* object, const movie_definition* def, 00053 DisplayObject* parent) 00054 : 00055 MovieClip(object, def, this, parent) 00056 {} 00057 00058 virtual ~Movie() {} 00059 00060 virtual void advance() = 0; 00061 00062 virtual float frameRate() const = 0; 00063 00064 virtual size_t widthPixels() const = 0; 00065 00066 virtual size_t heightPixels() const = 0; 00067 00068 virtual bool ensureFrameLoaded(size_t /*frameNo*/) const { 00069 return true; 00070 } 00071 00073 virtual const std::string& url() const = 0; 00074 00076 // 00079 virtual int version() const = 0; 00080 00082 // 00085 // 00089 virtual SWF::DefinitionTag* exportedCharacter(const std::string& /*s*/) { 00090 return 0; 00091 } 00092 00094 // 00098 virtual void addCharacter(boost::uint16_t /*id*/) {} 00099 00101 // 00104 virtual bool initializeCharacter(boost::uint16_t /*id*/) { 00105 return false; 00106 } 00107 00108 virtual const movie_definition* definition() const = 0; 00109 00110 }; 00111 00112 00113 } // end of namespace gnash 00114 00115 #endif