michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef NS_SMILTIMEVALUESPECPARAMS_H_ michael@0: #define NS_SMILTIMEVALUESPECPARAMS_H_ michael@0: michael@0: #include "nsSMILTimeValue.h" michael@0: #include "nsAutoPtr.h" michael@0: #include "nsIAtom.h" michael@0: michael@0: //---------------------------------------------------------------------- michael@0: // nsSMILTimeValueSpecParams michael@0: // michael@0: // A simple data type for storing the result of parsing a single begin or end michael@0: // value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s"). michael@0: michael@0: class nsSMILTimeValueSpecParams michael@0: { michael@0: public: michael@0: nsSMILTimeValueSpecParams() michael@0: : michael@0: mType(INDEFINITE), michael@0: mSyncBegin(false), michael@0: mRepeatIterationOrAccessKey(0) michael@0: { } michael@0: michael@0: // The type of value this specification describes michael@0: enum { michael@0: OFFSET, michael@0: SYNCBASE, michael@0: EVENT, michael@0: REPEAT, michael@0: ACCESSKEY, michael@0: WALLCLOCK, michael@0: INDEFINITE michael@0: } mType; michael@0: michael@0: // A clock value that is added to: michael@0: // - type OFFSET: the document begin michael@0: // - type SYNCBASE: the timebase's begin or end time michael@0: // - type EVENT: the event time michael@0: // - type REPEAT: the repeat time michael@0: // - type ACCESSKEY: the keypress time michael@0: // It is not used for WALLCLOCK or INDEFINITE times michael@0: nsSMILTimeValue mOffset; michael@0: michael@0: // The base element that this specification refers to. michael@0: // For SYNCBASE types, this is the timebase michael@0: // For EVENT and REPEAT types, this is the eventbase michael@0: nsRefPtr mDependentElemID; michael@0: michael@0: // The event to respond to. michael@0: // Only used for EVENT types. michael@0: nsRefPtr mEventSymbol; michael@0: michael@0: // Indicates if this specification refers to the begin or end of the dependent michael@0: // element. michael@0: // Only used for SYNCBASE types. michael@0: bool mSyncBegin; michael@0: michael@0: // The repeat iteration (type=REPEAT) or access key (type=ACCESSKEY) to michael@0: // respond to. michael@0: uint32_t mRepeatIterationOrAccessKey; michael@0: }; michael@0: michael@0: #endif // NS_SMILTIMEVALUESPECPARAMS_H_