OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Nikolas Zimmermann <zimmermann@kde
.org> |
3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
4 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 4 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 { \ | 156 { \ |
157 ASSERT(maskedOwnerType); \ | 157 ASSERT(maskedOwnerType); \ |
158 UseOwnerType* ownerType = static_cast<UseOwnerType*>(maskedOwnerType); \ | 158 UseOwnerType* ownerType = static_cast<UseOwnerType*>(maskedOwnerType); \ |
159 ownerType->synchronize##UpperProperty(); \ | 159 ownerType->synchronize##UpperProperty(); \ |
160 } | 160 } |
161 | 161 |
162 // Property declaration helpers (used in SVG*.h files) | 162 // Property declaration helpers (used in SVG*.h files) |
163 #define BEGIN_DECLARE_ANIMATED_PROPERTIES(OwnerType) \ | 163 #define BEGIN_DECLARE_ANIMATED_PROPERTIES(OwnerType) \ |
164 public: \ | 164 public: \ |
165 static SVGAttributeToPropertyMap& attributeToPropertyMap(); \ | 165 static SVGAttributeToPropertyMap& attributeToPropertyMap(); \ |
166 virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const OVERR
IDE; \ | 166 virtual SVGAttributeToPropertyMap& localAttributeToPropertyMap() const; \ |
167 typedef OwnerType UseOwnerType; | 167 typedef OwnerType UseOwnerType; |
168 | 168 |
169 #define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, Lowe
rProperty) \ | 169 #define DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, Lowe
rProperty) \ |
170 public: \ | 170 public: \ |
171 static const SVGPropertyInfo* LowerProperty##PropertyInfo(); \ | 171 static const SVGPropertyInfo* LowerProperty##PropertyInfo(); \ |
172 PropertyType& LowerProperty##CurrentValue() const; \ | 172 PropertyType& LowerProperty##CurrentValue() const; \ |
173 PropertyType& LowerProperty##BaseValue() const; \ | 173 PropertyType& LowerProperty##BaseValue() const; \ |
174 void set##UpperProperty##BaseValue(const PropertyType& type, const bool = tr
ue); \ | 174 void set##UpperProperty##BaseValue(const PropertyType& type, const bool = tr
ue); \ |
175 PassRefPtr<TearOffType> LowerProperty(); \ | 175 PassRefPtr<TearOffType> LowerProperty(); \ |
176 bool LowerProperty##IsValid() const; \ | 176 bool LowerProperty##IsValid() const; \ |
(...skipping 12 matching lines...) Expand all Loading... |
189 DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerPropert
y) \ | 189 DECLARE_ANIMATED_PROPERTY(TearOffType, PropertyType, UpperProperty, LowerPropert
y) \ |
190 void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \ | 190 void detachAnimated##UpperProperty##ListWrappers(unsigned newListSize) \ |
191 { \ | 191 { \ |
192 if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType,
TearOffType>(this, LowerProperty##PropertyInfo())) \ | 192 if (TearOffType* wrapper = SVGAnimatedProperty::lookupWrapper<UseOwnerType,
TearOffType>(this, LowerProperty##PropertyInfo())) \ |
193 wrapper->detachListWrappers(newListSize); \ | 193 wrapper->detachListWrappers(newListSize); \ |
194 } | 194 } |
195 | 195 |
196 } | 196 } |
197 | 197 |
198 #endif // SVGAnimatedPropertyMacros_h | 198 #endif // SVGAnimatedPropertyMacros_h |
OLD | NEW |