epoger@google.com | ec3ed6a | 2011-07-28 14:26:00 +0000 | [diff] [blame] | 1 | |
| 2 | /* |
| 3 | * Copyright 2006 The Android Open Source Project |
| 4 | * |
| 5 | * Use of this source code is governed by a BSD-style license that can be |
| 6 | * found in the LICENSE file. |
| 7 | */ |
| 8 | |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 9 | |
| 10 | #ifndef SkDisplayPost_DEFINED |
| 11 | #define SkDisplayPost_DEFINED |
| 12 | |
| 13 | #include "SkDisplayable.h" |
| 14 | #include "SkEvent.h" |
| 15 | #include "SkEventSink.h" |
| 16 | #include "SkMemberInfo.h" |
| 17 | #include "SkIntArray.h" |
| 18 | |
reed@google.com | 8d0b577 | 2011-06-24 13:07:31 +0000 | [diff] [blame] | 19 | class SkDataInput; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 20 | class SkAnimateMaker; |
| 21 | |
| 22 | class SkPost : public SkDisplayable { |
| 23 | DECLARE_MEMBER_INFO(Post); |
| 24 | enum Mode { |
| 25 | kDeferred, |
| 26 | kImmediate |
| 27 | }; |
| 28 | SkPost(); |
| 29 | virtual ~SkPost(); |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 30 | bool addChild(SkAnimateMaker& , SkDisplayable* child) override; |
| 31 | bool childrenNeedDisposing() const override; |
| 32 | void dirty() override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 33 | #ifdef SK_DUMP_ENABLED |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 34 | void dump(SkAnimateMaker* ) override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 35 | #endif |
mtklein | 36352bf | 2015-03-25 18:17:31 -0700 | [diff] [blame] | 36 | bool enable(SkAnimateMaker& ) override; |
| 37 | bool hasEnable() const override; |
| 38 | void onEndElement(SkAnimateMaker& ) override; |
| 39 | void setChildHasID() override; |
| 40 | bool setProperty(int index, SkScriptValue& ) override; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 41 | protected: |
| 42 | SkMSec delay; |
| 43 | SkString sink; |
| 44 | // SkBool initialized; |
| 45 | Mode mode; |
| 46 | SkEvent fEvent; |
| 47 | SkAnimateMaker* fMaker; |
| 48 | SkTDDataArray fParts; |
| 49 | SkEventSinkID fSinkID; |
| 50 | SkAnimateMaker* fTargetMaker; |
| 51 | SkBool8 fChildHasID; |
| 52 | SkBool8 fDirty; |
| 53 | private: |
| 54 | void findSinkID(); |
reed@google.com | 8d0b577 | 2011-06-24 13:07:31 +0000 | [diff] [blame] | 55 | friend class SkDataInput; |
reed@android.com | 8a1c16f | 2008-12-17 15:59:43 +0000 | [diff] [blame] | 56 | typedef SkDisplayable INHERITED; |
| 57 | }; |
| 58 | |
| 59 | #endif //SkDisplayPost_DEFINED |