Gnash  0.8.11dev
BitmapMovie.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 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 
20 #ifndef GNASH_BITMAP_MOVIE_H
21 #define GNASH_BITMAP_MOVIE_H
22 
23 #include <string>
24 #include "BitmapMovieDefinition.h"
25 #include "Movie.h" // for inheritance
26 
27 // Forward declarations
28 namespace gnash {
29  class DisplayObject;
30 }
31 
32 namespace gnash
33 {
34 
35 
37 //
40 class BitmapMovie : public Movie
41 {
42 
43 public:
44 
45  BitmapMovie(as_object* object, const BitmapMovieDefinition* def,
47 
48  virtual ~BitmapMovie() {}
49 
51  //
53  virtual void advance() { MovieClip::advance(); }
54 
55  virtual float frameRate() const {
56  return _def->get_frame_rate();
57  }
58 
59  virtual size_t widthPixels() const {
60  return _def->get_width_pixels();
61  }
62 
63  virtual size_t heightPixels() const {
64  return _def->get_height_pixels();
65  }
66 
67  virtual const std::string& url() const {
68  return _def->get_url();
69  }
70 
71  virtual int version() const {
72  return _def->get_version();
73  }
74 
75  virtual const movie_definition* definition() const {
76  return _def;
77  }
78 
79 private:
80 
81  const BitmapMovieDefinition* const _def;
82 
83 };
84 
85 } // end of namespace gnash
86 
87 #endif // GNASH_BITMAPMOVIEINSTANCE_H