Commit ce5ff2a9 authored by weinig's avatar weinig
Browse files

Reviewed by Darin.

        Patch for http://bugs.webkit.org/show_bug.cgi?id=11102
        Add more SVG Objective-C DOM bindings

        - Auto-generate Objective-C DOM bindings for DOMSVGAElement,
          DOMSVGAnimateColorElement, DOMSVGAnimateElement, DOMSVGAnimateTransformElement,
          DOMSVGAnimatedPathData, DOMSVGAnimatedPoints, DOMSVGAnimatedPreserveAspectRatio,
          DOMSVGAnimationElement, DOMSVGCircleElement, DOMSVGClipPathElement, DOMSVGColor,
          DOMSVGCursorElement, DOMSVGDefsElement, DOMSVGDescElement, DOMSVGDocument, 
          DOMSVGEllipseElement, DOMSVGPreserveAspectRatio, and DOMSVGURIReference.

        * DerivedSources.make:
        * WebCore.xcodeproj/project.pbxproj:
        * bindings/objc/DOMInternal.h:
        * bindings/objc/DOMSVG.h:
        * bindings/scripts/CodeGeneratorObjC.pm:
        * ksvg2/svg/SVGAElement.idl:
        * ksvg2/svg/SVGAnimateColorElement.idl:
        * ksvg2/svg/SVGAnimateElement.idl:
        * ksvg2/svg/SVGAnimateTransformElement.idl:
        * ksvg2/svg/SVGAnimatedPathData.idl:
        * ksvg2/svg/SVGAnimatedPoints.idl:
        * ksvg2/svg/SVGAnimatedPreserveAspectRatio.idl:
        * ksvg2/svg/SVGAnimationElement.idl:
        * ksvg2/svg/SVGCircleElement.idl:
        * ksvg2/svg/SVGClipPathElement.idl:
        * ksvg2/svg/SVGColor.idl:
        * ksvg2/svg/SVGCursorElement.idl:
        * ksvg2/svg/SVGDefsElement.idl:
        * ksvg2/svg/SVGDescElement.idl:
        * ksvg2/svg/SVGDocument.idl:
        * ksvg2/svg/SVGEllipseElement.idl:
        * ksvg2/svg/SVGPointList.idl:
        * ksvg2/svg/SVGPreserveAspectRatio.idl:
        * ksvg2/svg/SVGRect.idl:
        * ksvg2/svg/SVGSVGElement.idl:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 97b567ff
2006-09-30 Sam Weinig <sam.weinig@gmail.com>
Reviewed by Darin.
Patch for http://bugs.webkit.org/show_bug.cgi?id=11102
Add more SVG Objective-C DOM bindings
- Auto-generate Objective-C DOM bindings for DOMSVGAElement,
DOMSVGAnimateColorElement, DOMSVGAnimateElement, DOMSVGAnimateTransformElement,
DOMSVGAnimatedPathData, DOMSVGAnimatedPoints, DOMSVGAnimatedPreserveAspectRatio,
DOMSVGAnimationElement, DOMSVGCircleElement, DOMSVGClipPathElement, DOMSVGColor,
DOMSVGCursorElement, DOMSVGDefsElement, DOMSVGDescElement, DOMSVGDocument,
DOMSVGEllipseElement, DOMSVGPreserveAspectRatio, and DOMSVGURIReference.
* DerivedSources.make:
* WebCore.xcodeproj/project.pbxproj:
* bindings/objc/DOMInternal.h:
* bindings/objc/DOMSVG.h:
* bindings/scripts/CodeGeneratorObjC.pm:
* ksvg2/svg/SVGAElement.idl:
* ksvg2/svg/SVGAnimateColorElement.idl:
* ksvg2/svg/SVGAnimateElement.idl:
* ksvg2/svg/SVGAnimateTransformElement.idl:
* ksvg2/svg/SVGAnimatedPathData.idl:
* ksvg2/svg/SVGAnimatedPoints.idl:
* ksvg2/svg/SVGAnimatedPreserveAspectRatio.idl:
* ksvg2/svg/SVGAnimationElement.idl:
* ksvg2/svg/SVGCircleElement.idl:
* ksvg2/svg/SVGClipPathElement.idl:
* ksvg2/svg/SVGColor.idl:
* ksvg2/svg/SVGCursorElement.idl:
* ksvg2/svg/SVGDefsElement.idl:
* ksvg2/svg/SVGDescElement.idl:
* ksvg2/svg/SVGDocument.idl:
* ksvg2/svg/SVGEllipseElement.idl:
* ksvg2/svg/SVGPointList.idl:
* ksvg2/svg/SVGPreserveAspectRatio.idl:
* ksvg2/svg/SVGRect.idl:
* ksvg2/svg/SVGSVGElement.idl:
2006-09-30 Maciej Stachowiak <mjs@apple.com>
 
Reviewed by Adele.
......@@ -42,7 +42,6 @@ VPATH = \
ifeq ($(OS),MACOS)
all : \
DOMSVGRectElement.h \
DOMAttr.h \
DOMCDATASection.h \
DOMCSSCharsetRule.h \
......@@ -137,7 +136,11 @@ all : \
DOMOverflowEvent.h \
DOMProcessingInstruction.h \
DOMRect.h \
DOMSVGAElement.h \
DOMSVGAngle.h \
DOMSVGAnimateColorElement.h \
DOMSVGAnimateElement.h \
DOMSVGAnimateTransformElement.h \
DOMSVGAnimatedAngle.h \
DOMSVGAnimatedBoolean.h \
DOMSVGAnimatedEnumeration.h \
......@@ -145,9 +148,21 @@ all : \
DOMSVGAnimatedLength.h \
DOMSVGAnimatedLengthList.h \
DOMSVGAnimatedNumber.h \
DOMSVGAnimatedPathData.h \
DOMSVGAnimatedPoints.h \
DOMSVGAnimatedPreserveAspectRatio.h \
DOMSVGAnimatedString.h \
DOMSVGAnimatedTransformList.h \
DOMSVGAnimationElement.h \
DOMSVGCircleElement.h \
DOMSVGClipPathElement.h \
DOMSVGColor.h \
DOMSVGCursorElement.h \
DOMSVGDefsElement.h \
DOMSVGDescElement.h \
DOMSVGDocument.h \
DOMSVGElement.h \
DOMSVGEllipseElement.h \
DOMSVGExternalResourcesRequired.h \
DOMSVGLangSpace.h \
DOMSVGLength.h \
......@@ -157,6 +172,8 @@ all : \
DOMSVGMetadataElement.h \
DOMSVGPathSeg.h \
DOMSVGPathSegList.h \
DOMSVGPreserveAspectRatio.h \
DOMSVGRectElement.h \
DOMSVGStringList.h \
DOMSVGStylable.h \
DOMSVGStyleElement.h \
......@@ -164,6 +181,7 @@ all : \
DOMSVGTransform.h \
DOMSVGTransformList.h \
DOMSVGTransformable.h \
DOMSVGURIReference.h \
DOMStyleSheet.h \
DOMStyleSheetList.h \
DOMText.h \
......
This diff is collapsed.
......@@ -137,7 +137,11 @@
#import "DOMWheelEventInternal.h"
#ifdef SVG_SUPPORT
#import "DOMSVGAElementInternal.h"
#import "DOMSVGAngleInternal.h"
#import "DOMSVGAnimateColorElementInternal.h"
#import "DOMSVGAnimateElementInternal.h"
#import "DOMSVGAnimateTransformElementInternal.h"
#import "DOMSVGAnimatedAngleInternal.h"
#import "DOMSVGAnimatedBooleanInternal.h"
#import "DOMSVGAnimatedEnumerationInternal.h"
......@@ -145,15 +149,26 @@
#import "DOMSVGAnimatedLengthInternal.h"
#import "DOMSVGAnimatedLengthListInternal.h"
#import "DOMSVGAnimatedNumberInternal.h"
#import "DOMSVGAnimatedPreserveAspectRatioInternal.h"
#import "DOMSVGAnimatedStringInternal.h"
#import "DOMSVGAnimatedTransformListInternal.h"
#import "DOMSVGAnimationElementInternal.h"
#import "DOMSVGCircleElementInternal.h"
#import "DOMSVGClipPathElementInternal.h"
#import "DOMSVGColorInternal.h"
#import "DOMSVGCursorElementInternal.h"
#import "DOMSVGDefsElementInternal.h"
#import "DOMSVGDescElementInternal.h"
#import "DOMSVGDocumentInternal.h"
#import "DOMSVGElementInternal.h"
#import "DOMSVGEllipseElementInternal.h"
#import "DOMSVGLengthInternal.h"
#import "DOMSVGLengthListInternal.h"
#import "DOMSVGMatrixInternal.h"
#import "DOMSVGMetadataElementInternal.h"
#import "DOMSVGPathSegInternal.h"
#import "DOMSVGPathSegListInternal.h"
#import "DOMSVGPreserveAspectRatioInternal.h"
#import "DOMSVGRectElementInternal.h"
#import "DOMSVGStringListInternal.h"
#import "DOMSVGStyleElementInternal.h"
......
......@@ -24,7 +24,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#import <WebCore/DOMSVGAElement.h>
#import <WebCore/DOMSVGAngle.h>
#import <WebCore/DOMSVGAnimateColorElement.h>
#import <WebCore/DOMSVGAnimateElement.h>
#import <WebCore/DOMSVGAnimateTransformElement.h>
#import <WebCore/DOMSVGAnimatedAngle.h>
#import <WebCore/DOMSVGAnimatedBoolean.h>
#import <WebCore/DOMSVGAnimatedEnumeration.h>
......@@ -32,9 +36,21 @@
#import <WebCore/DOMSVGAnimatedLength.h>
#import <WebCore/DOMSVGAnimatedLengthList.h>
#import <WebCore/DOMSVGAnimatedNumber.h>
#import <WebCore/DOMSVGAnimatedPathData.h>
#import <WebCore/DOMSVGAnimatedPoints.h>
#import <WebCore/DOMSVGAnimatedPreserveAspectRatio.h>
#import <WebCore/DOMSVGAnimatedString.h>
#import <WebCore/DOMSVGAnimatedTransformList.h>
#import <WebCore/DOMSVGAnimationElement.h>
#import <WebCore/DOMSVGCircleElement.h>
#import <WebCore/DOMSVGClipPathElement.h>
#import <WebCore/DOMSVGColor.h>
#import <WebCore/DOMSVGCursorElement.h>
#import <WebCore/DOMSVGDefsElement.h>
#import <WebCore/DOMSVGDescElement.h>
#import <WebCore/DOMSVGDocument.h>
#import <WebCore/DOMSVGElement.h>
#import <WebCore/DOMSVGEllipseElement.h>
#import <WebCore/DOMSVGException.h>
#import <WebCore/DOMSVGExternalResourcesRequired.h>
#import <WebCore/DOMSVGLangSpace.h>
......@@ -45,6 +61,7 @@
#import <WebCore/DOMSVGMetadataElement.h>
#import <WebCore/DOMSVGPathSeg.h>
#import <WebCore/DOMSVGPathSegList.h>
#import <WebCore/DOMSVGPreserveAspectRatio.h>
#import <WebCore/DOMSVGRectElement.h>
#import <WebCore/DOMSVGStringList.h>
#import <WebCore/DOMSVGStylable.h>
......@@ -53,3 +70,4 @@
#import <WebCore/DOMSVGTransform.h>
#import <WebCore/DOMSVGTransformList.h>
#import <WebCore/DOMSVGTransformable.h>
#import <WebCore/DOMSVGURIReference.h>
......@@ -52,9 +52,15 @@ my %implIncludes = ();
my %protocolTypeHash = ("XPathNSResolver" => 1, "EventListener" => 1, "EventTarget" => 1, "NodeFilter" => 1,
"SVGLocatable" => 1, "SVGTransformable" => 1, "SVGStylable" => 1, "SVGFilterPrimitiveStandardAttributes" => 1,
"SVGTests" => 1, "SVGLangSpace" => 1, "SVGExternalResourcesRequired" => 1, "SVGURIReference" => 1,
"SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1);
"SVGZoomAndPan" => 1, "SVGFitToViewBox" => 1, "SVGAnimatedPathData" => 1, "SVGAnimatedPoints" => 1);
my %stringTypeHash = ("DOMString" => 1, "AtomicString" => 1);
# FIXME: need to add the SVG base types to this hash.
my %baseTypeHash = ("Node" => 1, "NodeList" => 1, "NamedNodeMap" => 1, "DOMImplementation" => 1,
"Event" => 1, "CSSRule" => 1, "CSSValue" => 1, "StyleSheet" => 1, "MediaList" => 1,
"Counter" => 1, "Rect" => 1, "RGBColor" => 1, "XPathExpression" => 1, "XPathResult" => 1,
"NodeIterator" => 1, "TreeWalker" => 1, "AbstractView" => 1);
# Constants
my $buildingForTigerOrEarlier = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} <= 10.4;
my $buildingForLeopardOrLater = 1 if $ENV{"MACOSX_DEPLOYMENT_TARGET"} and $ENV{"MACOSX_DEPLOYMENT_TARGET"} >= 10.5;
......@@ -894,6 +900,9 @@ sub GenerateImplementation
push(@customGetterContent, " // This node iterator was created from the C++ side.\n");
$getterContentHead = "[$attributeClassName $typeMaker:WTF::getPtr(" . $getterContentHead;
$getterContentTail .= ")]";
} elsif ($idlType eq "RGBColor") {
$getterContentHead = "[$attributeTypeSansPtr $typeMaker:" . $getterContentHead;
$getterContentTail .= "]";
} elsif ($typeMaker ne "") {
# Surround getter with TypeMaker
$getterContentHead = "[$attributeTypeSansPtr $typeMaker:WTF::getPtr(" . $getterContentHead;
......
......@@ -23,16 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAElement :
SVGElement,
SVGURIReference,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
readonly attribute SVGAnimatedString target;
};
};
module svg {
interface [Conditional=SVG] SVGAElement : SVGElement,
SVGURIReference,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
readonly attribute SVGAnimatedString target;
};
}
......@@ -23,7 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimateColorElement : SVGAnimationElement {};
module svg {
interface [Conditional=SVG] SVGAnimateColorElement : SVGAnimationElement {
}
};
......@@ -23,7 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimateElement : SVGAnimationElement {};
module svg {
interface [Conditional=SVG] SVGAnimateElement : SVGAnimationElement {
}
};
......@@ -23,7 +23,9 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimateTransformElement : SVGAnimationElement {};
module svg {
interface [Conditional=SVG] SVGAnimateTransformElement : SVGAnimationElement {
}
};
......@@ -25,7 +25,7 @@
module svg {
interface [Conditional=SVG] SVGAnimatedPathData {
interface [Conditional=SVG, ObjCProtocol] SVGAnimatedPathData {
readonly attribute SVGPathSegList pathSegList;
readonly attribute SVGPathSegList normalizedPathSegList;
readonly attribute SVGPathSegList animatedPathSegList;
......
......@@ -23,10 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimatedPoints {
readonly attribute SVGPointList points;
readonly attribute SVGPointList animatedPoints;
};
};
module svg {
interface [Conditional=SVG, ObjCProtocol] SVGAnimatedPoints {
readonly attribute SVGPointList points;
readonly attribute SVGPointList animatedPoints;
};
}
......@@ -23,10 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimatedPreserveAspectRatio {
readonly attribute SVGPreserveAspectRatio baseVal;
readonly attribute SVGPreserveAspectRatio animVal;
};
};
module svg {
interface [Conditional=SVG] SVGAnimatedPreserveAspectRatio {
readonly attribute SVGPreserveAspectRatio baseVal;
readonly attribute SVGPreserveAspectRatio animVal;
};
}
......@@ -23,16 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGAnimationElement :
SVGElement,
SVGTests,
SVGExternalResourcesRequired {
readonly attribute SVGElement targetElement;
float getStartTime ( );
float getCurrentTime ( );
float getSimpleDuration ( )
raises( DOMException );
};
};
module svg {
interface [Conditional=SVG] SVGAnimationElement : SVGElement,
SVGTests,
SVGExternalResourcesRequired {
readonly attribute SVGElement targetElement;
float getStartTime();
float getCurrentTime();
float getSimpleDuration()
raises(DOMException);
};
}
......@@ -23,17 +23,17 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGCircleElement :
SVGElement,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
readonly attribute SVGAnimatedLength cx;
readonly attribute SVGAnimatedLength cy;
readonly attribute SVGAnimatedLength r;
};
};
module svg {
interface [Conditional=SVG] SVGCircleElement : SVGElement
, SVGTests
, SVGLangSpace
, SVGExternalResourcesRequired
, SVGStylable
, SVGTransformable {
readonly attribute SVGAnimatedLength cx;
readonly attribute SVGAnimatedLength cy;
readonly attribute SVGAnimatedLength r;
};
}
......@@ -23,16 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGClipPathElement :
SVGElement,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
// SVGUnitTypes {
readonly attribute SVGAnimatedEnumeration clipPathUnits;
};
};
module svg {
interface [Conditional=SVG] SVGClipPathElement : SVGElement
, SVGTests
, SVGLangSpace
, SVGExternalResourcesRequired
, SVGStylable
, SVGTransformable
/*, SVGUnitTypes*/ {
readonly attribute SVGAnimatedEnumeration clipPathUnits;
};
}
......@@ -22,22 +22,27 @@
*/
module svg {
interface [Conditional=SVG, GenerateConstructor] SVGColor : css::CSSValue {
interface [Conditional=SVG, GenerateConstructor] SVGColor : css::CSSValue {
// Color Types
const unsigned short SVG_COLORTYPE_UNKNOWN = 0;
const unsigned short SVG_COLORTYPE_RGBCOLOR = 1;
const unsigned short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2;
const unsigned short SVG_COLORTYPE_CURRENTCOLOR = 3;
readonly attribute unsigned short colorType;
readonly attribute css::RGBColor rgbColor;
//readonly attribute SVGICCColor iccColor;
void setRGBColor( in core::DOMString rgbColor )
raises( SVGException );
void setRGBColorICCColor( in core::DOMString rgbColor, in core::DOMString iccColor )
raises( SVGException );
void setColor( in unsigned short colorType, in core::DOMString rgbColor, in core::DOMString iccColor )
raises( SVGException );
/*readonly attribute SVGICCColor iccColor;*/
void setRGBColor(in core::DOMString rgbColor)
raises(SVGException);
void setRGBColorICCColor(in core::DOMString rgbColor,
in core::DOMString iccColor)
raises(SVGException);
void setColor(in unsigned short colorType,
in core::DOMString rgbColor,
in core::DOMString iccColor)
raises(SVGException);
};
};
}
......@@ -23,14 +23,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGCursorElement :
SVGElement,
SVGURIReference,
SVGTests,
SVGExternalResourcesRequired {
readonly attribute SVGAnimatedLength x;
readonly attribute SVGAnimatedLength y;
};
module svg {
interface [Conditional=SVG] SVGCursorElement : SVGElement,
SVGURIReference,
SVGTests,
SVGExternalResourcesRequired {
readonly attribute SVGAnimatedLength x;
readonly attribute SVGAnimatedLength y;
}
};
......@@ -23,14 +23,14 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGDefsElement :
SVGElement,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
module svg {
interface [Conditional=SVG] SVGDefsElement : SVGElement,
SVGTests,
SVGLangSpace,
SVGExternalResourcesRequired,
SVGStylable,
SVGTransformable {
};
};
}
......@@ -23,11 +23,11 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
module svg
{
interface [Conditional=SVG] SVGDescElement :
SVGElement,
SVGLangSpace,
SVGStylable {
module svg {
interface [Conditional=SVG] SVGDescElement : SVGElement,
SVGLangSpace,
SVGStylable {
};
};
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment