Line data Source code
1 : /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 : /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 : /* This Source Code Form is subject to the terms of the Mozilla Public
4 : * License, v. 2.0. If a copy of the MPL was not distributed with this
5 : * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6 :
7 : #ifndef NS_SMILTIMEVALUESPECPARAMS_H_
8 : #define NS_SMILTIMEVALUESPECPARAMS_H_
9 :
10 : #include "nsSMILTimeValue.h"
11 : #include "nsIAtom.h"
12 :
13 : //----------------------------------------------------------------------
14 : // nsSMILTimeValueSpecParams
15 : //
16 : // A simple data type for storing the result of parsing a single begin or end
17 : // value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s").
18 :
19 0 : class nsSMILTimeValueSpecParams
20 : {
21 : public:
22 0 : nsSMILTimeValueSpecParams()
23 0 : :
24 : mType(INDEFINITE),
25 : mSyncBegin(false),
26 0 : mRepeatIterationOrAccessKey(0)
27 0 : { }
28 :
29 : // The type of value this specification describes
30 : enum {
31 : OFFSET,
32 : SYNCBASE,
33 : EVENT,
34 : REPEAT,
35 : ACCESSKEY,
36 : WALLCLOCK,
37 : INDEFINITE
38 : } mType;
39 :
40 : // A clock value that is added to:
41 : // - type OFFSET: the document begin
42 : // - type SYNCBASE: the timebase's begin or end time
43 : // - type EVENT: the event time
44 : // - type REPEAT: the repeat time
45 : // - type ACCESSKEY: the keypress time
46 : // It is not used for WALLCLOCK or INDEFINITE times
47 : nsSMILTimeValue mOffset;
48 :
49 : // The base element that this specification refers to.
50 : // For SYNCBASE types, this is the timebase
51 : // For EVENT and REPEAT types, this is the eventbase
52 : RefPtr<nsIAtom> mDependentElemID;
53 :
54 : // The event to respond to.
55 : // Only used for EVENT types.
56 : RefPtr<nsIAtom> mEventSymbol;
57 :
58 : // Indicates if this specification refers to the begin or end of the dependent
59 : // element.
60 : // Only used for SYNCBASE types.
61 : bool mSyncBegin;
62 :
63 : // The repeat iteration (type=REPEAT) or access key (type=ACCESSKEY) to
64 : // respond to.
65 : uint32_t mRepeatIterationOrAccessKey;
66 : };
67 :
68 : #endif // NS_SMILTIMEVALUESPECPARAMS_H_
|