1 /* 2 Copyright (C) 2008 Alex Mathews <possessedpenguinbob@gmail.com> 3 2004, 2005, 2006, 2007 Nikolas Zimmermann <zimmermann@kde.org> 4 2004, 2005 Rob Buis <buis@kde.org> 5 2005 Eric Seidel <eric@webkit.org> 6 7 This library is free software; you can redistribute it and/or 8 modify it under the terms of the GNU Library General Public 9 License as published by the Free Software Foundation; either 10 version 2 of the License, or (at your option) any later version. 11 12 This library is distributed in the hope that it will be useful, 13 but WITHOUT ANY WARRANTY; without even the implied warranty of 14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 Library General Public License for more details. 16 17 You should have received a copy of the GNU Library General Public License 18 aint with this library; see the file COPYING.LIB. If not, write to 19 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 Boston, MA 02110-1301, USA. 21 */ 22 23 #ifndef SVGLightSource_h 24 #define SVGLightSource_h 25 26 #if ENABLE(SVG) && ENABLE(FILTERS) 27 #include <wtf/PassRefPtr.h> 28 #include <wtf/RefCounted.h> 29 30 namespace WebCore { 31 32 enum LightType { 33 LS_DISTANT, 34 LS_POINT, 35 LS_SPOT 36 }; 37 38 class TextStream; 39 40 class LightSource : public RefCounted<LightSource> { 41 public: LightSource(LightType type)42 LightSource(LightType type) 43 : m_type(type) 44 { } 45 ~LightSource()46 virtual ~LightSource() { } 47 type()48 LightType type() const { return m_type; } 49 virtual TextStream& externalRepresentation(TextStream&) const = 0; 50 51 private: 52 LightType m_type; 53 }; 54 55 } // namespace WebCore 56 57 #endif // ENABLE(SVG) && ENABLE(FILTERS) 58 59 #endif // SVGLightSource_h 60