dom/smil/nsSMILTimeValueSpecParams.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/smil/nsSMILTimeValueSpecParams.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,68 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef NS_SMILTIMEVALUESPECPARAMS_H_
    1.10 +#define NS_SMILTIMEVALUESPECPARAMS_H_
    1.11 +
    1.12 +#include "nsSMILTimeValue.h"
    1.13 +#include "nsAutoPtr.h"
    1.14 +#include "nsIAtom.h"
    1.15 +
    1.16 +//----------------------------------------------------------------------
    1.17 +// nsSMILTimeValueSpecParams
    1.18 +//
    1.19 +// A simple data type for storing the result of parsing a single begin or end
    1.20 +// value (e.g. the '5s' in begin="5s; indefinite; a.begin+2s").
    1.21 +
    1.22 +class nsSMILTimeValueSpecParams
    1.23 +{
    1.24 +public:
    1.25 +  nsSMILTimeValueSpecParams()
    1.26 +  :
    1.27 +    mType(INDEFINITE),
    1.28 +    mSyncBegin(false),
    1.29 +    mRepeatIterationOrAccessKey(0)
    1.30 +  { }
    1.31 +
    1.32 +  // The type of value this specification describes
    1.33 +  enum {
    1.34 +    OFFSET,
    1.35 +    SYNCBASE,
    1.36 +    EVENT,
    1.37 +    REPEAT,
    1.38 +    ACCESSKEY,
    1.39 +    WALLCLOCK,
    1.40 +    INDEFINITE
    1.41 +  } mType;
    1.42 +
    1.43 +  // A clock value that is added to:
    1.44 +  // - type OFFSET: the document begin
    1.45 +  // - type SYNCBASE: the timebase's begin or end time
    1.46 +  // - type EVENT: the event time
    1.47 +  // - type REPEAT: the repeat time
    1.48 +  // - type ACCESSKEY: the keypress time
    1.49 +  // It is not used for WALLCLOCK or INDEFINITE times
    1.50 +  nsSMILTimeValue   mOffset;
    1.51 +
    1.52 +  // The base element that this specification refers to.
    1.53 +  // For SYNCBASE types, this is the timebase
    1.54 +  // For EVENT and REPEAT types, this is the eventbase
    1.55 +  nsRefPtr<nsIAtom> mDependentElemID;
    1.56 +
    1.57 +  // The event to respond to.
    1.58 +  // Only used for EVENT types.
    1.59 +  nsRefPtr<nsIAtom> mEventSymbol;
    1.60 +
    1.61 +  // Indicates if this specification refers to the begin or end of the dependent
    1.62 +  // element.
    1.63 +  // Only used for SYNCBASE types.
    1.64 +  bool              mSyncBegin;
    1.65 +
    1.66 +  // The repeat iteration (type=REPEAT) or access key (type=ACCESSKEY) to
    1.67 +  // respond to.
    1.68 +  uint32_t          mRepeatIterationOrAccessKey;
    1.69 +};
    1.70 +
    1.71 +#endif // NS_SMILTIMEVALUESPECPARAMS_H_

mercurial