beta-0.89.2
[luatex.git] / source / libs / poppler / poppler-src / poppler / Movie.h
blob1a1626591798db1efb1d681cfc8d9f29e0c5ebf6
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.
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.
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 //*********************************************************************************
24 #ifndef _MOVIE_H_
25 #define _MOVIE_H_
27 #include "Object.h"
29 struct MovieActivationParameters {
31 MovieActivationParameters();
32 ~MovieActivationParameters();
34 // parse from a "Movie Activation" dictionary
35 void parseMovieActivation(Object* actObj);
37 enum MovieRepeatMode {
38 repeatModeOnce,
39 repeatModeOpen,
40 repeatModeRepeat,
41 repeatModePalindrome
44 struct MovieTime {
45 MovieTime() { units_per_second = 0; }
46 Gulong units;
47 int units_per_second; // 0 : defined by movie
50 MovieTime start; // 0
51 MovieTime duration; // 0
53 double rate; // 1.0
55 int volume; // 100
57 GBool showControls; // false
59 GBool synchronousPlay; // false
60 MovieRepeatMode repeatMode; // repeatModeOnce
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
70 class Movie {
71 public:
72 Movie(Object *objMovie, Object *objAct);
73 Movie(Object *objMovie);
74 ~Movie();
76 GBool isOk() { return ok; }
77 MovieActivationParameters* getActivationParameters() { return &MA; }
79 GooString* getFileName() { return fileName; }
81 Gushort getRotationAngle() { return rotationAngle; }
82 void getAspect (int *widthA, int *heightA) { *widthA = width; *heightA = height; }
84 Object *getPoster(Object *obj) { return poster.copy(obj); }
85 GBool getShowPoster() { return showPoster; }
87 GBool getUseFloatingWindow() { return MA.floatingWindow; }
88 void getFloatingWindowSize(int *width, int *height);
90 Movie* copy();
92 private:
93 void parseMovie (Object *movieDict);
95 GBool ok;
97 Gushort rotationAngle; // 0
98 int width; // Aspect
99 int height; // Aspect
101 Object poster;
102 GBool showPoster;
104 GooString* fileName;
106 MovieActivationParameters MA;
109 #endif