SMILTimeValueSpecParams.h (1902B)
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 DOM_SMIL_SMILTIMEVALUESPECPARAMS_H_ 8 #define DOM_SMIL_SMILTIMEVALUESPECPARAMS_H_ 9 10 #include "mozilla/SMILTimeValue.h" 11 #include "nsAtom.h" 12 13 namespace mozilla { 14 15 //---------------------------------------------------------------------- 16 // SMILTimeValueSpecParams 17 // 18 // A simple data type for storing the result of parsing a single begin or end 19 // value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s"). 20 21 class SMILTimeValueSpecParams { 22 public: 23 SMILTimeValueSpecParams() 24 : mType(INDEFINITE), mSyncBegin(false), mRepeatIteration(0) {} 25 26 // The type of value this specification describes 27 enum { OFFSET, SYNCBASE, EVENT, REPEAT, WALLCLOCK, INDEFINITE } mType; 28 29 // A clock value that is added to: 30 // - type OFFSET: the document begin 31 // - type SYNCBASE: the timebase's begin or end time 32 // - type EVENT: the event time 33 // - type REPEAT: the repeat time 34 // It is not used for WALLCLOCK or INDEFINITE times 35 SMILTimeValue mOffset; 36 37 // The base element that this specification refers to. 38 // For SYNCBASE types, this is the timebase 39 // For EVENT and REPEAT types, this is the eventbase 40 RefPtr<nsAtom> mDependentElemID; 41 42 // The event to respond to. 43 // Only used for EVENT types. 44 RefPtr<nsAtom> mEventSymbol; 45 46 // Indicates if this specification refers to the begin or end of the dependent 47 // element. 48 // Only used for SYNCBASE types. 49 bool mSyncBegin; 50 51 // The repeat iteration to respond to. 52 // Only used for mType=REPEAT. 53 uint32_t mRepeatIteration; 54 }; 55 56 } // namespace mozilla 57 58 #endif // DOM_SMIL_SMILTIMEVALUESPECPARAMS_H_