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 
9 
10 #ifndef SkAnimatorView_DEFINED
11 #define SkAnimatorView_DEFINED
12 
13 #include "SkView.h"
14 #include "SkAnimator.h"
15 
16 class SkAnimatorView : public SkView {
17 public:
18             SkAnimatorView();
19     virtual ~SkAnimatorView();
20 
getAnimator()21     SkAnimator* getAnimator() const { return fAnimator; }
22 
23     bool    decodeFile(const char path[]);
24     bool    decodeMemory(const void* buffer, size_t size);
25     bool    decodeStream(SkStream* stream);
26 
27 protected:
28     // overrides
29     virtual bool onEvent(const SkEvent&);
30     virtual void onDraw(SkCanvas*);
31     virtual void onInflate(const SkDOM&, const SkDOM::Node*);
32 
33 private:
34     SkAnimator* fAnimator;
35 
36     typedef SkView INHERITED;
37 };
38 
39 #endif
40