3 * Copyright 2006 The Android Open Source Project
5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file.
10 #ifndef SkDisplayApply_DEFINED
11 #define SkDisplayApply_DEFINED
13 #include "SkAnimateBase.h"
14 #include "SkADrawable.h"
15 #include "SkIntArray.h"
19 class SkApply : public SkADrawable {
20 DECLARE_MEMBER_INFO(Apply);
36 void activate(SkAnimateMaker& );
37 void append(SkApply* apply);
38 void appendActive(SkActive* );
39 void applyValues(int animatorIndex, SkOperand* values, int count,
40 SkDisplayTypes , SkMSec time);
41 bool contains(SkDisplayable*) override;
42 // void createActive(SkAnimateMaker& );
43 SkDisplayable* deepCopy(SkAnimateMaker* ) override;
45 bool draw(SkAnimateMaker& ) override;
46 #ifdef SK_DUMP_ENABLED
47 void dump(SkAnimateMaker* ) override;
49 bool enable(SkAnimateMaker& ) override;
50 void enableCreate(SkAnimateMaker& );
51 void enableDynamic(SkAnimateMaker& );
52 void endSave(int index);
53 Mode getMode() { return mode; }
54 bool getProperty(int index, SkScriptValue* value) const override;
55 SkADrawable* getScope() { return scope; }
56 void getStep(SkScriptValue* );
57 SkADrawable* getTarget(SkAnimateBase* );
58 bool hasDelayedAnimator() const;
59 bool hasEnable() const override;
60 bool inactivate(SkAnimateMaker& maker);
61 void initialize() override;
62 bool interpolate(SkAnimateMaker& , SkMSec time);
63 void onEndElement(SkAnimateMaker& ) override;
64 const SkMemberInfo* preferredChild(SkDisplayTypes type) override;
65 void refresh(SkAnimateMaker& );
67 bool resolveIDs(SkAnimateMaker& maker, SkDisplayable* original, SkApply* ) override;
68 bool resolveField(SkAnimateMaker& , SkDisplayable* parent, SkString* str);
70 void setEmbedded() { fEmbedded = true; }
71 bool setProperty(int index, SkScriptValue& ) override;
72 void setSteps(int _steps) override;
73 // virtual void setTime(SkMSec time);
75 void validate() override;
80 SkString dynamicScope;
89 Transition transition;
91 SkTDAnimateArray fAnimators;
92 // SkADrawable* fCurrentScope;
93 SkMSec fLastTime; // used only to return script property time
94 SkTDDrawableArray fScopes;
96 SkBool fContainsScope : 1;
97 SkBool fDeleteScope : 1;
100 SkBool fEnabling : 1; // set if calling interpolate from enable
101 friend class SkActive;
102 friend class SkDisplayList;
103 typedef SkADrawable INHERITED;
106 #endif // SkDisplayApply_DEFINED