2013-03-25 06:26:04 +00:00
|
|
|
/* a*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#ifndef mozilla_dom_SVGFESpotLightElement_h
|
|
|
|
#define mozilla_dom_SVGFESpotLightElement_h
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
#include "nsSVGFilters.h"
|
|
|
|
#include "nsSVGNumber2.h"
|
|
|
|
|
|
|
|
class nsSVGFELightingElement;
|
|
|
|
|
|
|
|
nsresult NS_NewSVGFESpotLightElement(nsIContent **aResult,
|
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo);
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
namespace mozilla {
|
|
|
|
namespace dom {
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
typedef SVGFEUnstyledElement SVGFESpotLightElementBase;
|
2013-03-25 06:26:04 +00:00
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
class SVGFESpotLightElement : public SVGFESpotLightElementBase,
|
|
|
|
public nsIDOMSVGElement
|
2013-03-25 06:26:04 +00:00
|
|
|
{
|
2013-03-25 06:26:04 +00:00
|
|
|
friend nsresult (::NS_NewSVGFESpotLightElement(nsIContent **aResult,
|
|
|
|
already_AddRefed<nsINodeInfo> aNodeInfo));
|
|
|
|
friend class ::nsSVGFELightingElement;
|
2013-03-25 06:26:04 +00:00
|
|
|
protected:
|
2013-03-25 06:26:04 +00:00
|
|
|
SVGFESpotLightElement(already_AddRefed<nsINodeInfo> aNodeInfo)
|
|
|
|
: SVGFESpotLightElementBase(aNodeInfo)
|
|
|
|
{
|
|
|
|
SetIsDOMBinding();
|
|
|
|
}
|
|
|
|
virtual JSObject* WrapNode(JSContext* aCx, JSObject* aScope) MOZ_OVERRIDE;
|
2013-03-25 06:26:04 +00:00
|
|
|
|
|
|
|
public:
|
|
|
|
// interfaces:
|
|
|
|
NS_DECL_ISUPPORTS_INHERITED
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
NS_FORWARD_NSIDOMSVGELEMENT(SVGFESpotLightElementBase::)
|
2013-03-25 06:26:04 +00:00
|
|
|
NS_FORWARD_NSIDOMNODE_TO_NSINODE
|
|
|
|
NS_FORWARD_NSIDOMELEMENT_TO_GENERIC
|
|
|
|
|
|
|
|
virtual bool AttributeAffectsRendering(
|
|
|
|
int32_t aNameSpaceID, nsIAtom* aAttribute) const;
|
|
|
|
|
|
|
|
virtual nsresult Clone(nsINodeInfo *aNodeInfo, nsINode **aResult) const;
|
|
|
|
|
|
|
|
virtual nsIDOMNode* AsDOMNode() { return this; }
|
2013-03-25 06:26:04 +00:00
|
|
|
|
|
|
|
// WebIDL
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> X();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> Y();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> Z();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtX();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtY();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> PointsAtZ();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> SpecularExponent();
|
|
|
|
already_AddRefed<nsIDOMSVGAnimatedNumber> LimitingConeAngle();
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
protected:
|
|
|
|
virtual NumberAttributesInfo GetNumberInfo();
|
|
|
|
|
2013-03-25 06:26:04 +00:00
|
|
|
enum { ATTR_X, ATTR_Y, ATTR_Z, POINTS_AT_X, POINTS_AT_Y, POINTS_AT_Z,
|
2013-03-25 06:26:04 +00:00
|
|
|
SPECULAR_EXPONENT, LIMITING_CONE_ANGLE };
|
|
|
|
nsSVGNumber2 mNumberAttributes[8];
|
|
|
|
static NumberInfo sNumberInfo[8];
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace dom
|
|
|
|
} // namespace mozilla
|
|
|
|
|
|
|
|
#endif // mozilla_dom_SVGFESpotLightElement_h
|