OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2011 Google Inc. | 3 * Copyright 2011 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 #ifndef SkScriptCallBack_DEFINED | 8 #ifndef SkScriptCallBack_DEFINED |
9 #define SkScriptCallBack_DEFINED | 9 #define SkScriptCallBack_DEFINED |
10 | 10 |
11 #include "SkOperand2.h" | 11 #include "SkOperand2.h" |
12 #include "SkTDArray_Experimental.h" | 12 #include "SkTDArray_Experimental.h" |
13 | 13 |
14 class SkScriptCallBack { | 14 class SkScriptCallBack { |
15 public: | 15 public: |
| 16 virtual ~SkScriptCallBack() { } |
| 17 |
16 enum Type { | 18 enum Type { |
17 kBox, | 19 kBox, |
18 kFunction, | 20 kFunction, |
19 kMember, | 21 kMember, |
20 kMemberFunction, | 22 kMemberFunction, |
21 kProperty, | 23 kProperty, |
22 kUnbox | 24 kUnbox |
23 }; | 25 }; |
24 | 26 |
25 virtual bool getReference(const char* , size_t len, SkScriptValue2* result)
{ return false; } | 27 virtual bool getReference(const char* , size_t len, SkScriptValue2* result)
{ return false; } |
(...skipping 30 matching lines...) Expand all Loading... |
56 }; | 58 }; |
57 | 59 |
58 class SkScriptCallBackProperty : public SkScriptCallBack { | 60 class SkScriptCallBackProperty : public SkScriptCallBack { |
59 public: | 61 public: |
60 virtual bool getConstValue(const char* name, size_t len, SkOperand2* value)
{ return false; } | 62 virtual bool getConstValue(const char* name, size_t len, SkOperand2* value)
{ return false; } |
61 virtual bool getResult(size_t ref, SkOperand2* answer) { return false; } | 63 virtual bool getResult(size_t ref, SkOperand2* answer) { return false; } |
62 virtual Type getType() const { return kProperty; } | 64 virtual Type getType() const { return kProperty; } |
63 }; | 65 }; |
64 | 66 |
65 #endif // SkScriptCallBack_DEFINED | 67 #endif // SkScriptCallBack_DEFINED |
OLD | NEW |