Gnash 0.8.10dev
|
00001 // 00002 // Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. 00003 // 00004 // This program is free software; you can redistribute it and/or modify 00005 // it under the terms of the GNU General Public License as published by 00006 // the Free Software Foundation; either version 3 of the License, or 00007 // (at your option) any later version. 00008 // 00009 // This program is distributed in the hope that it will be useful, 00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 // GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program; if not, write to the Free Software 00016 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00017 00018 00019 #ifndef GNASH_BITMAP_MOVIE_H 00020 #define GNASH_BITMAP_MOVIE_H 00021 00022 #include <string> 00023 #include "BitmapMovieDefinition.h" 00024 #include "Movie.h" // for inheritance 00025 00026 // Forward declarations 00027 namespace gnash { 00028 class DisplayObject; 00029 } 00030 00031 namespace gnash 00032 { 00033 00034 00036 // 00039 class BitmapMovie : public Movie 00040 { 00041 00042 public: 00043 00044 BitmapMovie(as_object* object, const BitmapMovieDefinition* def, 00045 DisplayObject* parent); 00046 00047 virtual ~BitmapMovie() {} 00048 00050 // 00052 virtual void advance() { MovieClip::advance(); } 00053 00054 virtual float frameRate() const { 00055 return _def->get_frame_rate(); 00056 } 00057 00058 virtual size_t widthPixels() const { 00059 return _def->get_width_pixels(); 00060 } 00061 00062 virtual size_t heightPixels() const { 00063 return _def->get_height_pixels(); 00064 } 00065 00066 virtual const std::string& url() const { 00067 return _def->get_url(); 00068 } 00069 00070 virtual int version() const { 00071 return _def->get_version(); 00072 } 00073 00074 virtual const movie_definition* definition() const { 00075 return _def; 00076 } 00077 00078 private: 00079 00080 const BitmapMovieDefinition* const _def; 00081 00082 }; 00083 00084 } // end of namespace gnash 00085 00086 #endif // GNASH_BITMAPMOVIEINSTANCE_H