1 //*********************************************************************************
3 //---------------------------------------------------------------------------------
5 //---------------------------------------------------------------------------------
6 // Hugo Mercier <hmercier31[at]gmail.com> (c) 2008
7 // Carlos Garcia Campos <carlosgc@gnome.org> (c) 2010
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 //*********************************************************************************
29 struct MovieActivationParameters
{
31 MovieActivationParameters();
32 ~MovieActivationParameters();
34 // parse from a "Movie Activation" dictionary
35 void parseMovieActivation(Object
* actObj
);
37 enum MovieRepeatMode
{
45 MovieTime() { units_per_second
= 0; }
47 int units_per_second
; // 0 : defined by movie
51 MovieTime duration
; // 0
57 GBool showControls
; // false
59 GBool synchronousPlay
; // false
60 MovieRepeatMode repeatMode
; // repeatModeOnce
62 // floating window position
64 double xPosition
; // 0.5
65 double yPosition
; // 0.5
72 Movie(Object
*objMovie
, Object
*objAct
);
73 Movie(Object
*objMovie
);
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
);
93 void parseMovie (Object
*movieDict
);
97 Gushort rotationAngle
; // 0
106 MovieActivationParameters MA
;