/platform/external/webkit/WebCore/css/CSSCursorImageValue.h

https://github.com/aharish/totoro-gb-opensource-update2 · C Header · 63 lines · 30 code · 14 blank · 19 comment · 0 complexity · 80070b88fc1801dafbbbbfe455426345 MD5 · raw file

  1. /*
  2. * Copyright (C) 2006 Rob Buis <buis@kde.org>
  3. * Copyright (C) 2008 Apple Inc. All right reserved.
  4. *
  5. * This library is free software; you can redistribute it and/or
  6. * modify it under the terms of the GNU Library General Public
  7. * License as published by the Free Software Foundation; either
  8. * version 2 of the License, or (at your option) any later version.
  9. *
  10. * This library is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  13. * Library General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Library General Public License
  16. * along with this library; see the file COPYING.LIB. If not, write to
  17. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  18. * Boston, MA 02110-1301, USA.
  19. */
  20. #ifndef CSSCursorImageValue_h
  21. #define CSSCursorImageValue_h
  22. #include "CSSImageValue.h"
  23. #include "IntPoint.h"
  24. #include <wtf/HashSet.h>
  25. namespace WebCore {
  26. class Element;
  27. class SVGElement;
  28. class CSSCursorImageValue : public CSSImageValue {
  29. public:
  30. static PassRefPtr<CSSCursorImageValue> create(const String& url, const IntPoint& hotspot)
  31. {
  32. return adoptRef(new CSSCursorImageValue(url, hotspot));
  33. }
  34. virtual ~CSSCursorImageValue();
  35. IntPoint hotspot() const { return m_hotspot; }
  36. bool updateIfSVGCursorIsUsed(Element*);
  37. virtual StyleCachedImage* cachedImage(DocLoader*);
  38. #if ENABLE(SVG)
  39. void removeReferencedElement(SVGElement*);
  40. #endif
  41. private:
  42. CSSCursorImageValue(const String& url, const IntPoint& hotspot);
  43. IntPoint m_hotspot;
  44. #if ENABLE(SVG)
  45. HashSet<SVGElement*> m_referencedElements;
  46. #endif
  47. };
  48. } // namespace WebCore
  49. #endif // CSSCursorImageValue_h