Gnash
0.8.10
|
00001 // 00002 // Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 00003 // 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 00027 #include "MovieClip.h" // for inheritance 00028 00029 // Forward declarations 00030 namespace gnash { 00031 class DisplayObject; 00032 class movie_definition; 00033 } 00034 00035 namespace gnash 00036 { 00037 00039 // 00042 // 00046 class Movie : public MovieClip 00047 { 00048 00049 public: 00050 00051 Movie(as_object* object, const movie_definition* def, 00052 DisplayObject* parent) 00053 : 00054 MovieClip(object, def, this, parent) 00055 {} 00056 00057 virtual ~Movie() {} 00058 00059 virtual void advance() = 0; 00060 00061 virtual float frameRate() const = 0; 00062 00063 virtual size_t widthPixels() const = 0; 00064 00065 virtual size_t heightPixels() const = 0; 00066 00067 virtual bool ensureFrameLoaded(size_t /*frameNo*/) const { 00068 return true; 00069 } 00070 00072 virtual const std::string& url() const = 0; 00073 00075 // 00078 virtual int version() const = 0; 00079 00081 // 00084 // 00088 virtual SWF::DefinitionTag* exportedCharacter(const std::string& /*s*/) { 00089 return 0; 00090 } 00091 00093 // 00097 virtual void addCharacter(boost::uint16_t /*id*/) {} 00098 00100 // 00103 virtual bool initializeCharacter(boost::uint16_t /*id*/) { 00104 return false; 00105 } 00106 00107 virtual const movie_definition* definition() const = 0; 00108 00109 }; 00110 00111 00112 } // end of namespace gnash 00113 00114 #endif