source: trunk/poppler/mypoppler/poppler/Movie.h @ 461

Last change on this file since 461 was 461, checked in by Silvan Scherrer, 11 years ago

poppler update to 0.14.2

File size: 3.2 KB
Line 
1//*********************************************************************************
2//                               Movie.h
3//---------------------------------------------------------------------------------
4//
5//---------------------------------------------------------------------------------
6// Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
7// Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010
8//
9// This program is free software; you can redistribute it and/or modify
10// it under the terms of the GNU General Public License as published by
11// the Free Software Foundation; either version 2 of the License, or
12// (at your option) any later version.
13//
14// This program is distributed in the hope that it will be useful,
15// but WITHOUT ANY WARRANTY; without even the implied warranty of
16// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17// GNU General Public License for more details.
18//
19// You should have received a copy of the GNU General Public License
20// along with this program; if not, write to the Free Software
21// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22//*********************************************************************************
23
24#ifndef _MOVIE_H_
25#define _MOVIE_H_
26
27#include "Object.h"
28
29struct MovieActivationParameters {
30
31  MovieActivationParameters();
32  ~MovieActivationParameters();
33
34  // parse from a "Movie Activation" dictionary
35  void parseMovieActivation(Object* actObj);
36
37  enum MovieRepeatMode {
38    repeatModeOnce,
39    repeatModeOpen,
40    repeatModeRepeat,
41    repeatModePalindrome
42  };
43
44  struct MovieTime {
45    MovieTime() { units_per_second = 0; }
46    Gulong units;
47    int units_per_second; // 0 : defined by movie
48  };
49
50  MovieTime start;                         // 0
51  MovieTime duration;                      // 0
52
53  double rate;                             // 1.0
54
55  int volume;                              // 100
56
57  GBool showControls;                      // false
58
59  GBool synchronousPlay;                   // false
60  MovieRepeatMode repeatMode;              // repeatModeOnce
61
62  // floating window position
63  GBool floatingWindow;
64  double xPosition;                        // 0.5
65  double yPosition;                        // 0.5
66  int znum;                                // 1
67  int zdenum;                              // 1
68};
69
70class Movie {
71 public:
72  Movie(Object *objMovie, Object *objAct);
73  Movie(Object *objMovie);
74  ~Movie();
75
76  GBool isOk() { return ok; }
77  MovieActivationParameters* getActivationParameters() { return &MA; }
78
79  GooString* getFileName() { return fileName; }
80
81  Gushort getRotationAngle() { return rotationAngle; }
82  void getAspect (int *widthA, int *heightA) { *widthA = width; *heightA = height; }
83
84  Object *getPoster(Object *obj) { return poster.copy(obj); }
85  GBool getShowPoster() { return showPoster; }
86
87  GBool getUseFloatingWindow() { return MA.floatingWindow; }
88  void  getFloatingWindowSize(int *width, int *height);
89
90  Movie* copy();
91
92 private:
93  void parseMovie (Object *movieDict);
94
95  GBool ok;
96
97  Gushort rotationAngle;                   // 0
98  int width;                               // Aspect
99  int height;                              // Aspect
100
101  Object poster;
102  GBool showPoster;
103
104  GooString* fileName;
105
106  MovieActivationParameters MA;
107};
108
109#endif
110
Note: See TracBrowser for help on using the repository browser.