1 : /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* ***** BEGIN LICENSE BLOCK *****
3 : * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 : *
5 : * The contents of this file are subject to the Mozilla Public License Version
6 : * 1.1 (the "License"); you may not use this file except in compliance with
7 : * the License. You may obtain a copy of the License at
8 : * http://www.mozilla.org/MPL/
9 : *
10 : * Software distributed under the License is distributed on an "AS IS" basis,
11 : * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 : * for the specific language governing rights and limitations under the
13 : * License.
14 : *
15 : * The Original Code is the Mozilla SMIL module.
16 : *
17 : * The Initial Developer of the Original Code is Brian Birtles.
18 : * Portions created by the Initial Developer are Copyright (C) 2005
19 : * the Initial Developer. All Rights Reserved.
20 : *
21 : * Contributor(s):
22 : * Brian Birtles <birtles@gmail.com>
23 : *
24 : * Alternatively, the contents of this file may be used under the terms of
25 : * either of the GNU General Public License Version 2 or later (the "GPL"),
26 : * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 : * in which case the provisions of the GPL or the LGPL are applicable instead
28 : * of those above. If you wish to allow use of your version of this file only
29 : * under the terms of either the GPL or the LGPL, and not to allow others to
30 : * use your version of this file under the terms of the MPL, indicate your
31 : * decision by deleting the provisions above and replace them with the notice
32 : * and other provisions required by the GPL or the LGPL. If you do not delete
33 : * the provisions above, a recipient may use your version of this file under
34 : * the terms of any one of the MPL, the GPL or the LGPL.
35 : *
36 : * ***** END LICENSE BLOCK ***** */
37 :
38 : #ifndef NS_SMILTIMEVALUESPECPARAMS_H_
39 : #define NS_SMILTIMEVALUESPECPARAMS_H_
40 :
41 : #include "nsSMILTimeValue.h"
42 : #include "nsAutoPtr.h"
43 : #include "nsIAtom.h"
44 :
45 : //----------------------------------------------------------------------
46 : // nsSMILTimeValueSpecParams
47 : //
48 : // A simple data type for storing the result of parsing a single begin or end
49 : // value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s").
50 :
51 : class nsSMILTimeValueSpecParams
52 0 : {
53 : public:
54 0 : nsSMILTimeValueSpecParams()
55 : :
56 : mType(INDEFINITE),
57 : mSyncBegin(false),
58 0 : mRepeatIterationOrAccessKey(0)
59 0 : { }
60 :
61 : // The type of value this specification describes
62 : enum {
63 : OFFSET,
64 : SYNCBASE,
65 : EVENT,
66 : REPEAT,
67 : ACCESSKEY,
68 : WALLCLOCK,
69 : INDEFINITE
70 : } mType;
71 :
72 : // A clock value that is added to:
73 : // - type OFFSET: the document begin
74 : // - type SYNCBASE: the timebase's begin or end time
75 : // - type EVENT: the event time
76 : // - type REPEAT: the repeat time
77 : // - type ACCESSKEY: the keypress time
78 : // It is not used for WALLCLOCK or INDEFINITE times
79 : nsSMILTimeValue mOffset;
80 :
81 : // The base element that this specification refers to.
82 : // For SYNCBASE types, this is the timebase
83 : // For EVENT and REPEAT types, this is the eventbase
84 : nsRefPtr<nsIAtom> mDependentElemID;
85 :
86 : // The event to respond to.
87 : // Only used for EVENT types.
88 : nsRefPtr<nsIAtom> mEventSymbol;
89 :
90 : // Indicates if this specification refers to the begin or end of the dependent
91 : // element.
92 : // Only used for SYNCBASE types.
93 : bool mSyncBegin;
94 :
95 : // The repeat iteration (type=REPEAT) or access key (type=ACCESSKEY) to
96 : // respond to.
97 : PRUint32 mRepeatIterationOrAccessKey;
98 : };
99 :
100 : #endif // NS_SMILTIMEVALUESPECPARAMS_H_
|