summaryrefslogtreecommitdiffstats
path: root/ksvg/scripts
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit47d455dd55be855e4cc691c32f687f723d9247ee (patch)
tree52e236aaa2576bdb3840ebede26619692fed6d7d /ksvg/scripts
downloadtdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.tar.gz
tdegraphics-47d455dd55be855e4cc691c32f687f723d9247ee.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'ksvg/scripts')
-rw-r--r--ksvg/scripts/COPYRIGHTS19
-rwxr-xr-xksvg/scripts/ECMACHECK25
-rwxr-xr-xksvg/scripts/OPENREF9
-rw-r--r--ksvg/scripts/README16
-rw-r--r--ksvg/scripts/add_static.pl42
-rwxr-xr-xksvg/scripts/check_hashtablesize.pl224
-rwxr-xr-xksvg/scripts/gen.sh51
-rwxr-xr-xksvg/scripts/generate.pl69
-rwxr-xr-xksvg/scripts/genimpl.sh49
-rwxr-xr-xksvg/scripts/getjs.php390
-rw-r--r--ksvg/scripts/idl/svg.idl1756
-rw-r--r--ksvg/scripts/makecc211
-rw-r--r--ksvg/scripts/makeheader164
-rw-r--r--ksvg/scripts/makeimpl440
14 files changed, 3465 insertions, 0 deletions
diff --git a/ksvg/scripts/COPYRIGHTS b/ksvg/scripts/COPYRIGHTS
new file mode 100644
index 00000000..bcb24052
--- /dev/null
+++ b/ksvg/scripts/COPYRIGHTS
@@ -0,0 +1,19 @@
+/*
+ Copyright (C) 2001-2003 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
diff --git a/ksvg/scripts/ECMACHECK b/ksvg/scripts/ECMACHECK
new file mode 100755
index 00000000..955ea81d
--- /dev/null
+++ b/ksvg/scripts/ECMACHECK
@@ -0,0 +1,25 @@
+#!/bin/bash
+TESTSUITE=test/official/1.0 # Nikos setting
+ECMATESTS=test/ecma
+konqueror $TESTSUITE/script-eventDom-BE-01.svg
+konqueror $TESTSUITE/script-uiEvents-BE-02.svg
+konqueror $TESTSUITE/dom-core-BE-01.svg
+konqueror $TESTSUITE/dom-eventListener-BE-04.svg
+konqueror $TESTSUITE/dom-featureString-BE-03.svg
+konqueror $TESTSUITE/dom-svg-BE-02.svg
+konqueror $TESTSUITE/extend-multiNS-BE-01.svg
+konqueror $TESTSUITE/interact-onload-BE-07.svg
+konqueror $TESTSUITE/interact-bubble-BE-04.svg
+konqueror $TESTSUITE/interact-pEvents-BE-05.svg
+konqueror $TESTSUITE/interact-pEvents-BE-06.svg
+konqueror $ECMATESTS/broken.svg
+konqueror $ECMATESTS/circle.svg
+konqueror $ECMATESTS/clock.svg
+konqueror $ECMATESTS/bbox/bbox-circle.svg
+konqueror $ECMATESTS/bbox/bbox-ellipse.svg
+konqueror $ECMATESTS/bbox/bbox-line.svg
+konqueror $ECMATESTS/bbox/bbox-path.svg
+konqueror $ECMATESTS/bbox/bbox-path2.svg
+konqueror $ECMATESTS/bbox/bbox-polygon.svg
+konqueror $ECMATESTS/bbox/bbox-polyline.svg
+konqueror $ECMATESTS/bbox/bbox-rect.svg
diff --git a/ksvg/scripts/OPENREF b/ksvg/scripts/OPENREF
new file mode 100755
index 00000000..f8fbecb0
--- /dev/null
+++ b/ksvg/scripts/OPENREF
@@ -0,0 +1,9 @@
+#!/bin/bash
+pid=`dcopstart konqueror --profile filemanagement`
+loc=`pwd`/$1
+sleep 1
+dcop $pid konqueror-mainwindow#1 openURL ${loc}svg
+sleep 1
+dcop $pid qt/KXMLGUILClient-KActionCollection/splitviewh activate
+sleep 1
+dcop $pid konqueror-mainwindow#1 openURL ${loc}png
diff --git a/ksvg/scripts/README b/ksvg/scripts/README
new file mode 100644
index 00000000..17130216
--- /dev/null
+++ b/ksvg/scripts/README
@@ -0,0 +1,16 @@
+This document explains how to generate a SVG C++ header/sourcefile pair :
+
+1. go to dir idl
+2. copy the svg.idl file to the classname you want to generate, for example SVGRect
+3. edit the newly created file to only include the class info, delete the rest
+4. run ../gen.sh classname (without extension) to generate the pair
+
+Caveats:
+1. all inheritance specification must be on the same line
+2. no support yet for exceptions, comments
+3. this works for mawk 1.3.3, with slight adjustments it should run for
+ other awk implementations
+
+07-07-2001
+Rob Buis.
+
diff --git a/ksvg/scripts/add_static.pl b/ksvg/scripts/add_static.pl
new file mode 100644
index 00000000..9a88c00f
--- /dev/null
+++ b/ksvg/scripts/add_static.pl
@@ -0,0 +1,42 @@
+# Add #include "ksvg_lookup.h", GENERATEDDATA and ELEMENTDATA to all headers passed as argument
+# Usage: perl -w -i.bak add_static.pl *.h
+my $added_ksvg_lookup = 0;
+#my $added_staticdata = 0;
+my $inclass=0;
+my $bracelevel=0;
+my $class_bracelevel;
+my $has_staticdata=0;
+while (<>) {
+ $added_ksvg_lookup=0 if (/\#ifndef/); # this while loop runs over multiple files...
+ $added_ksvg_lookup=1 if (/\#include \"ksvg_lookup.h\"/); # already there
+ if (!$added_ksvg_lookup) {
+ if (/^\s*\#\s*include/ || /^namespace/ || /^class/) {
+ $added_ksvg_lookup = 1;
+ print '#include "ksvg_lookup.h"' . "\n";
+ }
+ }
+ if ( /^class/ && !/;/ ) {
+ die if $inclass;
+ $inclass=1;
+ $class_bracelevel=$bracelevel;
+ $has_staticdata=0;
+ }
+ if ( /{/ ) {
+ $bracelevel++;
+ die if /{.*{/; # not handled currently
+ }
+ if ( /}/ ) {
+ $bracelevel--;
+ die if /}.*}/; # not handled currently
+ }
+ $has_staticdata = 1 if ( $inclass && /GENERATEDDATA/ );
+ if ( $inclass && ($class_bracelevel == $bracelevel) && /};/ ) {
+ print "public:\n\tGENERATEDDATA\n" if ( !$has_staticdata );
+ $inclass=0;
+ # $added_staticdata=1;
+ }
+ print;
+}
+die "still in class!" if ($inclass);
+die "bracelevel != 0!" if ($bracelevel);
+#die "found no class where to add GENERATEDDATA!" if (!$added_staticdata);
diff --git a/ksvg/scripts/check_hashtablesize.pl b/ksvg/scripts/check_hashtablesize.pl
new file mode 100755
index 00000000..d22e3f30
--- /dev/null
+++ b/ksvg/scripts/check_hashtablesize.pl
@@ -0,0 +1,224 @@
+# Script to check hashtable sizes.
+# Copyright 2002 Nikolas Zimmermann <wildfox@kde.org>
+
+my $input = shift;
+my $calcMode = 0;
+
+# Check incoming arguments
+if(length($input) > 0) {
+ $calcMode = $input;
+} else {
+ print "Usage:\n";
+ print "perl check_hashtablesize.pl [0/1/2]\n\n";
+ print "Show...\n";
+ print "0) all hashtables of prototype definitions\n";
+ print "1) all hashtables of non-prototype definitions\n";
+ print "2) all hashtables of svg*constructor definitions\n";
+ exit(-1);
+}
+
+# Test if a number is prime or not
+sub calcPrime
+{
+ my $start = shift;
+ my $dividecount = 0;
+
+ for(my $i = $start - 1; $i > 0; --$i)
+ {
+ my $result = $start / $i;
+
+ if($result == int($result)) {
+ $dividecount++;
+ }
+ }
+
+ if($dividecount == 1) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
+# Find the next prime number
+sub findNextPrime
+{
+ my $start = shift;
+ my $i = $start + 1;
+ my $found = 0;
+
+ while($found == 0)
+ {
+ if(calcPrime($i)) {
+ $found = 1;
+ } else {
+ $i++;
+ }
+ }
+
+ return $i;
+}
+
+# Common routine for calculating hashtable sizes
+sub calcSize
+{
+ my $calc = shift;
+ my $save = shift;
+ my $minus = shift;
+
+ my @temp = split(/\n/, $calc);
+
+ foreach(@temp) {
+ my $process = $_;
+ $process =~ s/\s+/ /g;
+
+ my @line = split(/ /, $process);
+ my $class = substr($line[1], 0, index($line[1], ":") - $minus);
+
+ $$save{$class} = $line[2];
+ }
+}
+
+# Go to impl dir
+chdir "../impl";
+
+# Global counters
+my %counterwork;
+my %counter1;
+my %counter2;
+my %counter3;
+
+# Read hashtable size
+my $readSize1 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep Function`;
+my $readSize2 = `find -type f | xargs grep -I DontDelete | grep -v KSVG:: | grep -v Function`;
+my $readSize3 = `find -type f | xargs grep -I DontDelete | grep KSVG::`;
+
+my @result1 = split(/.\//, $readSize1);
+my @result2 = split(/.\//, $readSize2);
+my @result3 = split(/.\//, $readSize3);
+
+# Calculate hashtable size
+# calcSize1 = print out all prototype hashtables
+# calcSize2 = print out all non-prototype hashtables
+# calcSize3 = print out all svg*constructors hashtables
+my $calcSize1 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Impl:: | grep -v Bridge::`;
+my $calcSize2 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep -v Constructor | grep -v Proto::`;
+my $calcSize3 = `find -type f | xargs grep -I s_hashTable | grep \@begin | grep -v generateddata | grep Constructor`;
+
+# Bring in suitable form
+calcSize($calcSize1, \%counter1, 5);
+calcSize($calcSize2, \%counter2, 0);
+calcSize($calcSize3, \%counter3, 11);
+
+# Helper
+my $lastclass = "";
+
+print "Classname\t\t\t\t'H.S. File'\t\t'H.S. Calculated'\tIs 'H.S. File' prime?\tDo they differ?\n";
+print "-------------------------------------------------------------------------------------------------------------------------------\n";
+
+my @useresult;
+if($calcMode == 0) {
+ @useresult = @result1;
+} elsif($calcMode == 1) {
+ @useresult = @result2;
+} else {
+ @useresult = @result3;
+}
+
+foreach(@useresult) {
+ my $line = $_;
+ $line =~ s/\s+/ /g;
+
+ if($line ne "") {
+ my @middle = split(/ /, $line);
+ my $class = substr($middle[2], 0, index($middle[2], ":"));
+
+ # Special case for lists and svg*constructors
+ if($class eq "SVGListDefs" || $calcMode == 2)
+ {
+ my $temp = $middle[0];
+
+ if($calcMode != 2) {
+ $temp =~ s/.cc://;
+ $class = $temp;
+ } else {
+ $temp =~ s/.cc//;
+ $class = substr($temp, 0, index($temp, ":"));
+ }
+ }
+
+ if($class eq $lastclass) {
+ $counterwork{$class}++;
+ }
+ else {
+ $counterwork{$class} = 1;
+
+ if($lastclass ne "") {
+ my $len = length($lastclass);
+
+ my $string = $lastclass;
+
+ # Ugly hack with those numbers, anyone
+ # got a better idea?
+ if($len < 11) {
+ $string .= "\t\t\t\t\t";
+ } elsif($len < 16) {
+ $string .= "\t\t\t\t";
+ } elsif($len < 24) {
+ $string .= "\t\t\t";
+ } elsif($len < 32) {
+ $string .= "\t\t";
+ } else {
+ $string .= "\t";
+ }
+
+ my $combine;
+
+ if($calcMode == 0) {
+ $combine = $counter1{$lastclass};
+ } elsif($calcMode == 1) {
+ $combine = $counter2{$lastclass};
+ } else {
+ $combine = $counter3{$lastclass};
+ }
+
+ if($combine eq 0 || $combine eq "") {
+ $combine = "-";
+ }
+
+ $string .= $combine;
+ $string .= "\t\t\t";
+
+ # Find next prime
+ my $next = findNextPrime($counterwork{$lastclass});
+
+ $string .= $next;
+ $string .= "\t\t\t";
+
+ # Is 'H.S. File' a prime?
+ my $calc = calcPrime($combine);
+ if($calc == 0) {
+ $string .= "NO!";
+ } else {
+ $string .= "Yes";
+ }
+
+ $string .= "\t\t\t";
+
+ if($combine != $next) {
+ $string .= "YES!";
+ } else {
+ $string .= "No";
+ }
+
+ $string .= "\n";
+
+ print $string;
+ }
+ }
+
+ $lastclass = $class;
+ }
+}
+
+# Go back! :)
+chdir "../scripts";
diff --git a/ksvg/scripts/gen.sh b/ksvg/scripts/gen.sh
new file mode 100755
index 00000000..d608385b
--- /dev/null
+++ b/ksvg/scripts/gen.sh
@@ -0,0 +1,51 @@
+# try to find an appropriate awk interpreter
+if which mawk > /dev/null 2>&1; then
+ cmd_awk=`which mawk`;
+else
+ if which awk > /dev/null 2>&1; then
+ cmd_awk=`which awk`;
+ else
+ echo "No suitable AWK interpreter found. Aborting."
+ exit 1
+ fi
+fi
+
+# make them
+touch $1.h
+touch $1.cc
+
+#start with copyright notices
+cat ../COPYRIGHTS > $1.h
+cat ../COPYRIGHTS > $1.cc
+
+# add define for multiple include problem
+echo "" >> $1.h
+echo "#ifndef $1_H" >> $1.h
+echo "#define $1_H" >> $1.h
+echo "" >> $1.h
+echo "namespace KSVG" >> $1.h
+echo "{" >> $1.h
+echo "" >> $1.h
+
+#include in .cc + namespace
+echo "" >> $1.cc
+echo "#include \"$1.h\"" >> $1.cc
+echo "#include \"$1Impl.h\"" >> $1.cc
+echo "" >> $1.cc
+echo "using namespace KSVG;" >> $1.cc
+echo "" >> $1.cc
+
+#go go go
+$cmd_awk -f ../makeheader $1
+$cmd_awk -f ../makecc $1
+
+#add end of define
+echo "};" >> $1.h
+echo "" >> $1.h
+echo "#endif" >> $1.h
+echo "" >> $1.h
+
+echo "// vim:ts=4:noet" >> $1.h
+echo "// vim:ts=4:noet" >> $1.cc
+
+#done I hope
diff --git a/ksvg/scripts/generate.pl b/ksvg/scripts/generate.pl
new file mode 100755
index 00000000..a9419dcc
--- /dev/null
+++ b/ksvg/scripts/generate.pl
@@ -0,0 +1,69 @@
+#!/usr/bin/perl -w
+
+my $kalyptusdir = "../../../kdebindings/kalyptus";
+
+use File::Basename;
+
+my $here = `pwd`;
+chomp $here;
+my $outdir = $here . "/generate.pl.tmpdir";
+my $finaloutdir = $here;
+
+## Note: outdir and finaloutdir should NOT be the same dir!
+
+if (! -d $outdir) { mkdir $outdir; }
+
+mkdir $finaloutdir unless (-d $finaloutdir);
+
+
+# Need to cd to kalyptus's directory so that perl finds Ast.pm etc.
+chdir "$kalyptusdir" or die "Couldn't go to $kalyptusdir (edit script to change dir)\n";
+
+# Find out which header files we need to parse
+my %excludes = (
+);
+
+# List headers, and exclude the ones listed above
+my @headers = ();
+my $incdir=$here;
+opendir (INCS, $incdir) or die "Couldn't find $incdir";
+foreach $filename (readdir(INCS)) {
+ $entry = $incdir."/".$filename;
+ if ( ( -e $entry or -l $entry ) # A real file or a symlink
+ && ( ! -d _ ) ) # Not a symlink to a dir though
+ {
+ push(@headers, $entry)
+ if ( !defined $excludes{$filename} # Not excluded
+ && $filename =~ /\.h$/ ); # Not a backup file etc. Only headers.
+ }
+}
+closedir INCS;
+
+# Launch kalyptus
+system "perl kalyptus @ARGV -fECMA --name=ksvg --outputdir=$outdir @headers";
+my $exit = $? >> 8;
+exit $exit if ($exit);
+
+# Generate diff for generateddata.cpp
+if ( -e "$finaloutdir/generateddata.cpp" ) {
+ system "diff -u $finaloutdir/generateddata.cpp $outdir/generateddata.cpp > $outdir/generateddata.cpp.diff";
+}
+
+# Copy changed or new files to finaloutdir
+#opendir (OUT, $outdir) or die "Couldn't opendir $outdir";
+#foreach $filename (readdir(OUT)) {
+my $filename = "generateddata.cpp";
+ #next if ( -d "$outdir/$filename" ); # only files, not dirs
+ my $docopy = 1;
+ if ( -f "$finaloutdir/$filename" ) {
+ # How can I do a fast file compare in perl?
+ system "cmp -s $outdir/$filename $finaloutdir/$filename";
+ $docopy = ($?>>8); # 0 if files identical, 1 if different
+ }
+ if ($docopy) {
+ #print STDERR "Updating $filename...\n";
+ system "cp -f $outdir/$filename $finaloutdir/$filename";
+ }
+
+# Delete outdir
+system "rm -rf $outdir";
diff --git a/ksvg/scripts/genimpl.sh b/ksvg/scripts/genimpl.sh
new file mode 100755
index 00000000..5a0742d2
--- /dev/null
+++ b/ksvg/scripts/genimpl.sh
@@ -0,0 +1,49 @@
+# try to find an appropriate awk interpreter
+if which mawk > /dev/null 2>&1; then
+ cmd_awk=`which mawk`;
+else
+ if which awk > /dev/null 2>&1; then
+ cmd_awk=`which awk`;
+ else
+ echo "No suitable AWK interpreter found. Aborting."
+ exit 1
+ fi
+fi
+
+# you cant touch this
+touch $1Impl.h
+touch $1Impl.cc
+
+#start with copyright notices
+cat ../COPYRIGHTS > $1Impl.h
+cat ../COPYRIGHTS > $1Impl.cc
+
+# add define for multiple include problem
+echo "" >> $1Impl.h
+echo "#ifndef $1Impl_H" >> $1Impl.h
+echo "#define $1Impl_H" >> $1Impl.h
+
+# namespace
+echo "" >> $1Impl.h
+echo "namespace KSVG" >> $1Impl.h
+echo "{" >> $1Impl.h
+
+#include in .cc + namespace
+echo "" >> $1Impl.cc
+echo "#include \"$1Impl.h\"" >> $1Impl.cc
+echo "" >> $1Impl.cc
+echo "using namespace KSVG;" >> $1Impl.cc
+echo "" >> $1Impl.cc
+
+#go go go
+$cmd_awk -f ../makeimpl $1
+
+#add end of define
+echo "};" >> $1Impl.h
+echo "" >> $1Impl.h
+echo "#endif" >> $1Impl.h
+echo "" >> $1Impl.h
+echo "// vim:ts=4:noet" >> $1Impl.h
+
+echo "// vim:ts=4:noet" >> $1Impl.cc
+#done I hope
diff --git a/ksvg/scripts/getjs.php b/ksvg/scripts/getjs.php
new file mode 100755
index 00000000..5f300fe9
--- /dev/null
+++ b/ksvg/scripts/getjs.php
@@ -0,0 +1,390 @@
+#!/usr/local/bin/php
+<?
+/*
+ Copyright (C) 2002 KSVG Team
+ This file is part of the KDE project
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+
+class ecma_class
+{
+ var $properties; // array of properties
+ var $functions; // array of functions $functions[0][0]="geturl"; $functions[0][1]="2";
+ var $constants; // array of functions
+ var $class; // classname
+ var $params;
+ var $readonly;
+
+ function ecma_class($name)
+ {
+ $this->class=$name;
+ $this->functions=array();
+ $this->properties=array();
+ $this->constants=array();
+ $this->parmas=array();
+ }
+
+ function add_content($content)
+ {
+ if ($content->type==0)
+ {
+ if (!in_array($content->name,$this->properties))
+ {
+ $this->properties[]=$content->name;
+ $this->readonly[$content->name]=$content->readonly;
+ }
+ }
+ elseif ($content->type==1)
+ {
+ if (!in_array($content->name,$this->functions))
+ {
+ $this->functions[]=$content->name;
+ $this->params[$content->name]=$content->params;
+ }
+ }
+ elseif ($content->type==2)
+ {
+ if (!in_array($content->name,$this->constants))
+ $this->constants[]=$content->name;
+ }
+ }
+
+ function to_text()
+ {
+ $headline=$this->class." (".(sizeof($this->properties))." Properties and ".(sizeof($this->functions))." Functions and ".(sizeof($this->constants))." Constants)";
+ echo($headline."\n");
+ echo("====================");
+ echo("\n\n");
+
+
+ echo("Properties\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ echo($this->properties[$i]."\n");
+ }
+
+ echo("\n");
+ echo("Functions\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo($this->functions[$i]."\n");
+ }
+
+ echo("\n");
+ echo("Constants\n");
+ echo("----------\n");
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo($this->constants[$i]."\n");
+ }
+
+ echo("\n%%%%%%%%%%%%%%%%%%%%%%%%\n\n");
+ }
+
+ function to_html()
+ {
+ echo("<a name=\"".$this->class."\"></a>");
+ echo("<a href=\"#toc\">Back to Index</a>");
+ echo("<table border=\"1\" style=\"border-width: medium; border-collapse: collapse\">\n");
+ echo("<tr><td colspan=\"3\"><h2 style=\"text-align: left\">".$this->class."</h2></td></tr>\n");
+
+ if (sizeof($this->functions)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Functions</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->functions[$i]."</td><td>".$this->params[$this->functions[$i]]." Parameter(s)</td></tr>\n");
+ }
+ }
+
+ if (sizeof($this->properties)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Properties</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ if ($this->readonly[$this->properties[$i]])
+ $readonly="Property is ReadOnly";
+ else
+ $readonly="Property is ReadWrite";
+
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->properties[$i]."</td><td>$readonly</td></tr>\n");
+ }
+ }
+
+ if (sizeof($this->constants)>0)
+ {
+ echo("<tr><td colspan=\"3\"><h3>Constants</h3></td></tr>\n");
+
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo("<tr><td width=\"20\">&nbsp</td><td>".$this->constants[$i]."</td></tr>\n");
+ }
+ }
+ echo("</table><br><br>");
+ }
+
+ function to_svg(&$x,&$y)
+ {
+ $xtemp=$x+50;
+ $ytemp=$y+50;
+
+ echo("<text x=\"$xtemp\" y=\"$ytemp\">".$this->class."</text>");
+
+ $ytemp+=10;
+
+ if (sizeof($this->functions)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".($ytemp)."\">Functions</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->functions);$i++)
+ {
+ echo("<text x=\"".($xtemp+20)."\" y=\"".($ytemp)."\">".$this->functions[$i]." with ".$this->params[$this->functions[$i]]." Parameter(s)</text>\n");
+ $ytemp+=10;
+ }
+ }
+
+ if (sizeof($this->properties)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".($ytemp)."\">Properties</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->properties);$i++)
+ {
+ if ($this->readonly[$this->properties[$i]])
+ $readonly="Property is ReadOnly";
+ else
+ $readonly="Property is ReadWrite";
+
+ echo("<text x=\"".($xtemp+20)."\" y=\"".$ytemp."\">".$this->properties[$i]." $readonly</text>\n");
+ $ytemp+=10;
+ }
+ }
+
+ if (sizeof($this->constants)>0)
+ {
+ echo("<text x=\"".$xtemp."\" y=\"".$ytemp."\">Constants</text>\n");
+
+ $ytemp+=10;
+
+ for ($i=0;$i<sizeof($this->constants);$i++)
+ {
+ echo("<text x=\"".($xtemp+20)."\" y=\"".$ytemp."\">".$this->constants[$i]."</text>\n");
+ $ytemp+=10;
+ }
+ }
+ $x=$xtemp+200;
+ }
+}
+
+class kalyptus_result
+{
+ var $class;
+ var $type; // 0 = Property ; 1 = Function ; 2 = Constant
+ var $name;
+ var $params;
+ var $readonly;
+
+ function kalyptus_result($class,$type,$name,$params=0)
+ {
+ $this->class=$class;
+ $this->type=$type;
+ $this->name=$name;
+ $this->params=$params;
+ }
+
+ function setReadOnly($value)
+ {
+ $this->readonly=$value;
+ }
+}
+
+function parse_kalyptus($line,&$fp,&$last_constructor)
+{
+ if (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*KSVG::.*DontDelete/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Constant ".$match[1]." in class ".$match[2]."\n");
+ return new kalyptus_result($last_constructor,2,$match[1]);
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*Function ([0-9])/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Function ".$match[1]." in class ".$match[2]."\n");
+ return new kalyptus_result($match[2],1,$match[1],$match[3]);
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*DontDelete\|ReadOnly/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Property ".$match[1]." in class ".$match[2]."\n");
+ $property=new kalyptus_result($match[2],0,$match[1]);
+ $property->setReadOnly(true);
+ return $property;
+ }
+ elseif (preg_match("/^[ \t^#]*([a-zA-Z_]*)[ \t]*([a-zA-Z_]*)::.*DontDelete/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"MATCH => Property ".$match[1]." in class ".$match[2]."\n");
+ $property=new kalyptus_result($match[2],0,$match[1]);
+ $property->setReadOnly(false);
+ return $property;
+ }
+ elseif (preg_match("/^[ \t@begin^#]*([a-zA-Z_]*)Constructor::s_hashTable.*/",$line,$match))
+ {
+ if (DEBUG) fputs($fp,"Constructor => ".$match[1]."\n");
+ $last_constructor=$match[1];
+ return false;
+ }
+ else
+ {
+ if (DEBUG) fputs($fp,"Ignored => ".$line."\n");
+ return false;
+ }
+}
+
+function do_output($output,$ecma_classes)
+{
+ ksort($ecma_classes);
+
+ reset($ecma_classes);
+
+ switch($output)
+ {
+ case "txt":
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_text();
+ }
+ break;
+ case "svg":
+ echo("<svg width=\"100%\" height=\"100%\">\n");
+
+ $x=0;
+ $y=0;
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_svg($x,$y);
+ }
+ echo("</svg>");
+ break;
+ default:
+ echo("<html>\n<body>\n");
+
+ echo("<a name=\"toc\"><h1>Contents</h1></a><br>\n");
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ echo("<a href=\"#".$classname."\">$classname</a><br>\n");
+ }
+
+ echo("<hr>\n");
+
+ foreach ($ecma_classes as $classname => $obj)
+ {
+ $obj->to_html();
+ }
+ echo("</body>\n</html>");
+ }
+}
+
+function searchKalyptusCode($file,&$fp)
+{
+ global $ecma_classes;
+
+ ob_start();
+ readfile($file);
+ $content=ob_get_contents();
+ ob_end_clean();
+
+ if (preg_match("/@begin(.*)@end/s",$content,$matches)) // FIXME broken....if several @end's are there it takes always the last
+ {
+ if (DEBUG) fputs($fp,"Found ".(sizeof($matches)-1)." Matches in ".$file."\n");
+ for ($i=1;$i<sizeof($matches);$i++)
+ {
+ if (DEBUG) fputs($fp,"Checking ".$i.". Match\n");
+ $lines=explode("\n",$matches[$i]);
+ for ($j=0;$j<sizeof($lines);$j++)
+ {
+ $result=parse_kalyptus($lines[$j],$fp,$last_constructor);
+ if ($result)
+ $results[]=$result;
+ }
+ }
+
+ for ($i=0;$i<sizeof($results);$i++)
+ {
+ if ($ecma_classes[$results[$i]->class])
+ $ecma_classes[$results[$i]->class]->add_content($results[$i]);
+ else
+ {
+ $ecma_classes[$results[$i]->class]=new ecma_class($results[$i]->class);
+ $ecma_classes[$results[$i]->class]->add_content($results[$i]);
+ }
+ }
+ }
+}
+
+function crawlFiles($path)
+{
+ global $ecma_classes;
+
+ $fp=fopen("php://stderr","w+");
+
+ if ($dir = @opendir($path))
+ {
+ while (($file = readdir($dir)) !== false)
+ {
+ if (($file!=".") && ($file!=".."))
+ {
+ if (is_dir($path."/".$file))
+ {
+ fputs($fp,"Entering directory ".$file."\n");
+ crawlFiles($path."/".$file);
+ fputs($fp,"Leaving directory ".$file."\n");
+ }
+ elseif (is_file($path."/".$file) && preg_match("/^[A-Za-z0-9_]+(\.cc|\.cpp|\.h|\.hpp)$/",$file))
+ {
+ fputs($fp,"\tchecking $file\n");
+ searchKalyptusCode($path."/".$file,$fp);
+ }
+ }
+ }
+ closedir($dir);
+ }
+}
+
+define(DEBUG,0);
+
+$ecma_classes=array();
+
+$ksvg_path="../";
+
+$path=basename(realpath($ksvg_path));
+
+if ($path!="ksvg")
+{
+ echo "Execute it in base ksvg dir please :S\n";
+ return false;
+}
+
+crawlFiles($ksvg_path);
+
+do_output($argv[1],$ecma_classes);
+?>
diff --git a/ksvg/scripts/idl/svg.idl b/ksvg/scripts/idl/svg.idl
new file mode 100644
index 00000000..9b5ea3db
--- /dev/null
+++ b/ksvg/scripts/idl/svg.idl
@@ -0,0 +1,1756 @@
+// File: svg.idl
+#ifndef _SVG_IDL_
+#define _SVG_IDL_
+
+
+// For access to DOM2 core
+#include "dom.idl"
+
+// For access to DOM2 events
+#include "events.idl"
+
+// For access to those parts from DOM2 CSS OM used by SVG DOM.
+#include "css.idl"
+
+// For access to those parts from DOM2 Views OM used by SVG DOM.
+#include "views.idl"
+
+// For access to the SMIL OM used by SVG DOM.
+#include "smil.idl"
+
+#pragma prefix "dom.w3c.org"
+#pragma javaPackage "org.w3c.dom"
+module svg
+{
+ typedef dom::DOMString DOMString;
+ typedef dom::DOMException DOMException;
+ typedef dom::Element Element;
+ typedef dom::Document Document;
+ typedef dom::NodeList NodeList;
+
+ // Predeclarations
+ interface SVGElement;
+ interface SVGLangSpace;
+ interface SVGExternalResourcesRequired;
+ interface SVGTests;
+ interface SVGFitToViewBox;
+ interface SVGZoomAndPan;
+ interface SVGViewSpec;
+ interface SVGURIReference;
+ interface SVGPoint;
+ interface SVGMatrix;
+ interface SVGPreserveAspectRatio;
+ interface SVGAnimatedPreserveAspectRatio;
+ interface SVGTransformList;
+ interface SVGAnimatedTransformList;
+ interface SVGTransform;
+ interface SVGICCColor;
+ interface SVGColor;
+ interface SVGPaint;
+ interface SVGTransformable;
+ interface SVGDocument;
+ interface SVGSVGElement;
+ interface SVGElementInstance;
+ interface SVGElementInstanceList;
+
+
+ exception SVGException {
+ unsigned short code;
+ };
+
+ // SVGExceptionCode
+ const unsigned short SVG_WRONG_TYPE_ERR = 0;
+ const unsigned short SVG_INVALID_VALUE_ERR = 1;
+ const unsigned short SVG_MATRIX_NOT_INVERTABLE = 2;
+
+ interface SVGElement : Element {
+ attribute DOMString id;
+ // raises DOMException on setting
+ attribute DOMString xmlbase;
+ // raises DOMException on setting
+ readonly attribute SVGSVGElement ownerSVGElement;
+ readonly attribute SVGElement viewportElement;
+ };
+
+ interface SVGAnimatedBoolean {
+
+ attribute boolean baseVal;
+ // raises DOMException on setting
+ readonly attribute boolean animVal;
+ };
+
+ interface SVGAnimatedString {
+
+ attribute DOMString baseVal;
+ // raises DOMException on setting
+ readonly attribute DOMString animVal;
+ };
+
+ interface SVGStringList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ DOMString initialize ( in DOMString newItem )
+ raises( DOMException, SVGException );
+ DOMString getItem ( in unsigned long index )
+ raises( DOMException );
+ DOMString insertItemBefore ( in DOMString newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ DOMString replaceItem ( in DOMString newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ DOMString removeItem ( in unsigned long index )
+ raises( DOMException );
+ DOMString appendItem ( in DOMString newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedEnumeration {
+
+ attribute unsigned short baseVal;
+ // raises DOMException on setting
+ readonly attribute unsigned short animVal;
+ };
+
+ interface SVGAnimatedInteger {
+
+ attribute long baseVal;
+ // raises DOMException on setting
+ readonly attribute long animVal;
+ };
+
+ interface SVGNumber {
+
+ attribute float value;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedNumber {
+
+ attribute float baseVal;
+ // raises DOMException on setting
+ readonly attribute float animVal;
+ };
+
+ interface SVGNumberList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGNumber initialize ( in SVGNumber newItem )
+ raises( DOMException, SVGException );
+ SVGNumber getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGNumber insertItemBefore ( in SVGNumber newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGNumber replaceItem ( in SVGNumber newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGNumber removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGNumber appendItem ( in SVGNumber newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedNumberList {
+
+ readonly attribute SVGNumberList baseVal;
+ readonly attribute SVGNumberList animVal;
+ };
+
+ interface SVGLength {
+
+ // Length Unit Types
+ const unsigned short SVG_LENGTHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_LENGTHTYPE_NUMBER = 1;
+ const unsigned short SVG_LENGTHTYPE_PERCENTAGE = 2;
+ const unsigned short SVG_LENGTHTYPE_EMS = 3;
+ const unsigned short SVG_LENGTHTYPE_EXS = 4;
+ const unsigned short SVG_LENGTHTYPE_PX = 5;
+ const unsigned short SVG_LENGTHTYPE_CM = 6;
+ const unsigned short SVG_LENGTHTYPE_MM = 7;
+ const unsigned short SVG_LENGTHTYPE_IN = 8;
+ const unsigned short SVG_LENGTHTYPE_PT = 9;
+ const unsigned short SVG_LENGTHTYPE_PC = 10;
+
+ readonly attribute unsigned short unitType;
+ attribute float value;
+ // raises DOMException on setting
+ attribute float valueInSpecifiedUnits;
+ // raises DOMException on setting
+ attribute DOMString valueAsString;
+ // raises DOMException on setting
+
+ void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
+ void convertToSpecifiedUnits ( in unsigned short unitType );
+ };
+
+ interface SVGAnimatedLength {
+
+ readonly attribute SVGLength baseVal;
+ readonly attribute SVGLength animVal;
+ };
+
+ interface SVGLengthList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGLength initialize ( in SVGLength newItem )
+ raises( DOMException, SVGException );
+ SVGLength getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGLength insertItemBefore ( in SVGLength newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGLength replaceItem ( in SVGLength newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGLength removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGLength appendItem ( in SVGLength newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedLengthList {
+
+ readonly attribute SVGLengthList baseVal;
+ readonly attribute SVGLengthList animVal;
+ };
+
+ interface SVGAngle {
+
+ // Angle Unit Types
+ const unsigned short SVG_ANGLETYPE_UNKNOWN = 0;
+ const unsigned short SVG_ANGLETYPE_UNSPECIFIED = 1;
+ const unsigned short SVG_ANGLETYPE_DEG = 2;
+ const unsigned short SVG_ANGLETYPE_RAD = 3;
+ const unsigned short SVG_ANGLETYPE_GRAD = 4;
+
+ readonly attribute unsigned short unitType;
+ attribute float value;
+ // raises DOMException on setting
+ attribute float valueInSpecifiedUnits;
+ // raises DOMException on setting
+ attribute DOMString valueAsString;
+ // raises DOMException on setting
+
+ void newValueSpecifiedUnits ( in unsigned short unitType, in float valueInSpecifiedUnits );
+ void convertToSpecifiedUnits ( in unsigned short unitType );
+ };
+
+ interface SVGAnimatedAngle {
+
+ readonly attribute SVGAngle baseVal;
+ readonly attribute SVGAngle animVal;
+ };
+
+ interface 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 DOMString rgbColor )
+ raises( SVGException );
+ void setRGBColorICCColor ( in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ void setColor ( in unsigned short colorType, in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ };
+
+ interface SVGICCColor {
+
+ attribute DOMString colorProfile;
+ // raises DOMException on setting
+ readonly attribute SVGNumberList colors;
+ };
+
+ interface SVGRect {
+
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float width;
+ // raises DOMException on setting
+ attribute float height;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedRect {
+
+ readonly attribute SVGRect baseVal;
+ readonly attribute SVGRect animVal;
+ };
+
+ interface SVGUnitTypes {
+
+ // Unit Types
+ const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
+ const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
+ };
+
+ interface SVGStylable {
+
+ readonly attribute SVGAnimatedString className;
+ readonly attribute css::CSSStyleDeclaration style;
+
+ css::CSSValue getPresentationAttribute ( in DOMString name );
+ };
+
+ interface SVGLocatable {
+
+ readonly attribute SVGElement nearestViewportElement;
+ readonly attribute SVGElement farthestViewportElement;
+
+ SVGRect getBBox ( );
+ SVGMatrix getCTM ( );
+ SVGMatrix getScreenCTM ( );
+ SVGMatrix getTransformToElement ( in SVGElement element )
+ raises( SVGException );
+ };
+
+ interface SVGTransformable : SVGLocatable {
+ readonly attribute SVGAnimatedTransformList transform;
+ };
+
+ interface SVGTests {
+
+ readonly attribute SVGStringList requiredFeatures;
+ readonly attribute SVGStringList requiredExtensions;
+ readonly attribute SVGStringList systemLanguage;
+
+ boolean hasExtension ( in DOMString extension );
+ };
+
+ interface SVGLangSpace {
+
+ attribute DOMString xmllang;
+ // raises DOMException on setting
+ attribute DOMString xmlspace;
+ // raises DOMException on setting
+ };
+
+ interface SVGExternalResourcesRequired {
+
+ readonly attribute SVGAnimatedBoolean externalResourcesRequired;
+ };
+
+ interface SVGFitToViewBox {
+
+ readonly attribute SVGAnimatedRect viewBox;
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+ };
+
+ interface SVGZoomAndPan {
+
+ // Zoom and Pan Types
+ const unsigned short SVG_ZOOMANDPAN_UNKNOWN = 0;
+ const unsigned short SVG_ZOOMANDPAN_DISABLE = 1;
+ const unsigned short SVG_ZOOMANDPAN_MAGNIFY = 2;
+
+ attribute unsigned short zoomAndPan;
+ // raises DOMException on setting
+ };
+
+ interface SVGViewSpec :
+ SVGZoomAndPan,
+ SVGFitToViewBox {
+
+ readonly attribute SVGTransformList transform;
+ readonly attribute SVGElement viewTarget;
+ readonly attribute DOMString viewBoxString;
+ readonly attribute DOMString preserveAspectRatioString;
+ readonly attribute DOMString transformString;
+ readonly attribute DOMString viewTargetString;
+ };
+
+ interface SVGURIReference {
+
+ readonly attribute SVGAnimatedString href;
+ };
+
+ interface SVGCSSRule : css::CSSRule {
+ // Additional CSS RuleType to support ICC color specifications
+ const unsigned short COLOR_PROFILE_RULE = 7;
+ };
+
+ interface SVGRenderingIntent {
+
+ // Rendering Intent Types
+ const unsigned short RENDERING_INTENT_UNKNOWN = 0;
+ const unsigned short RENDERING_INTENT_AUTO = 1;
+ const unsigned short RENDERING_INTENT_PERCEPTUAL = 2;
+ const unsigned short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3;
+ const unsigned short RENDERING_INTENT_SATURATION = 4;
+ const unsigned short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5;
+ };
+
+ interface SVGDocument :
+ Document,
+ events::DocumentEvent {
+
+ readonly attribute DOMString title;
+ readonly attribute DOMString referrer;
+ readonly attribute DOMString domain;
+ readonly attribute DOMString URL;
+ readonly attribute SVGSVGElement rootElement;
+ };
+
+ interface SVGSVGElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGLocatable,
+ SVGFitToViewBox,
+ SVGZoomAndPan,
+ events::EventTarget,
+ events::DocumentEvent,
+ css::ViewCSS,
+ css::DocumentCSS {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ attribute DOMString contentScriptType;
+ // raises DOMException on setting
+ attribute DOMString contentStyleType;
+ // raises DOMException on setting
+ readonly attribute SVGRect viewport;
+ readonly attribute float pixelUnitToMillimeterX;
+ readonly attribute float pixelUnitToMillimeterY;
+ readonly attribute float screenPixelToMillimeterX;
+ readonly attribute float screenPixelToMillimeterY;
+ attribute boolean useCurrentView;
+ // raises DOMException on setting
+ readonly attribute SVGViewSpec currentView;
+ attribute float currentScale;
+ // raises DOMException on setting
+ readonly attribute SVGPoint currentTranslate;
+
+ unsigned long suspendRedraw ( in unsigned long max_wait_milliseconds );
+ void unsuspendRedraw ( in unsigned long suspend_handle_id )
+ raises( DOMException );
+ void unsuspendRedrawAll ( );
+ void forceRedraw ( );
+ void pauseAnimations ( );
+ void unpauseAnimations ( );
+ boolean animationsPaused ( );
+ float getCurrentTime ( );
+ void setCurrentTime ( in float seconds );
+ NodeList getIntersectionList ( in SVGRect rect, in SVGElement referenceElement );
+ NodeList getEnclosureList ( in SVGRect rect, in SVGElement referenceElement );
+ boolean checkIntersection ( in SVGElement element, in SVGRect rect );
+ boolean checkEnclosure ( in SVGElement element, in SVGRect rect );
+ void deselectAll ( );
+ SVGNumber createSVGNumber ( );
+ SVGLength createSVGLength ( );
+ SVGAngle createSVGAngle ( );
+ SVGPoint createSVGPoint ( );
+ SVGMatrix createSVGMatrix ( );
+ SVGRect createSVGRect ( );
+ SVGTransform createSVGTransform ( );
+ SVGTransform createSVGTransformFromMatrix ( in SVGMatrix matrix );
+ Element getElementById ( in DOMString elementId );
+ };
+
+ interface SVGGElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface SVGDefsElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface SVGDescElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGStylable {};
+
+ interface SVGTitleElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGStylable {};
+
+ interface SVGSymbolElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox,
+ events::EventTarget {};
+
+ interface SVGUseElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGElementInstance instanceRoot;
+ readonly attribute SVGElementInstance animatedInstanceRoot;
+ };
+
+ interface SVGElementInstance : events::EventTarget {
+ readonly attribute SVGElement correspondingElement;
+ readonly attribute SVGUseElement correspondingUseElement;
+ readonly attribute SVGElementInstance parentNode;
+ readonly attribute SVGElementInstanceList childNodes;
+ readonly attribute SVGElementInstance firstChild;
+ readonly attribute SVGElementInstance lastChild;
+ readonly attribute SVGElementInstance previousSibling;
+ readonly attribute SVGElementInstance nextSibling;
+ };
+
+ interface SVGElementInstanceList {
+
+ readonly attribute unsigned long length;
+
+ SVGElementInstance item ( in unsigned long index );
+ };
+
+ interface SVGImageElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedPreserveAspectRatio preserveAspectRatio;
+ };
+
+ interface SVGSwitchElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {};
+
+ interface GetSVGDocument {
+
+ SVGDocument getSVGDocument ( )
+ raises( DOMException );
+ };
+
+ interface SVGStyleElement : SVGElement {
+ attribute DOMString xmlspace;
+ // raises DOMException on setting
+ attribute DOMString type;
+ // raises DOMException on setting
+ attribute DOMString media;
+ // raises DOMException on setting
+ attribute DOMString title;
+ // raises DOMException on setting
+ };
+
+ interface SVGPoint {
+
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+
+ SVGPoint matrixTransform ( in SVGMatrix matrix );
+ };
+
+ interface SVGPointList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGPoint initialize ( in SVGPoint newItem )
+ raises( DOMException, SVGException );
+ SVGPoint getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPoint insertItemBefore ( in SVGPoint newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPoint replaceItem ( in SVGPoint newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPoint removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPoint appendItem ( in SVGPoint newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGMatrix {
+
+ attribute float a;
+ // raises DOMException on setting
+ attribute float b;
+ // raises DOMException on setting
+ attribute float c;
+ // raises DOMException on setting
+ attribute float d;
+ // raises DOMException on setting
+ attribute float e;
+ // raises DOMException on setting
+ attribute float f;
+ // raises DOMException on setting
+
+ SVGMatrix multiply ( in SVGMatrix secondMatrix );
+ SVGMatrix inverse ( )
+ raises( SVGException );
+ SVGMatrix translate ( in float x, in float y );
+ SVGMatrix scale ( in float scaleFactor );
+ SVGMatrix scaleNonUniform ( in float scaleFactorX, in float scaleFactorY );
+ SVGMatrix rotate ( in float angle );
+ SVGMatrix rotateFromVector ( in float x, in float y )
+ raises( SVGException );
+ SVGMatrix flipX ( );
+ SVGMatrix flipY ( );
+ SVGMatrix skewX ( in float angle );
+ SVGMatrix skewY ( in float angle );
+ };
+
+ interface SVGTransform {
+
+ // Transform Types
+ const unsigned short SVG_TRANSFORM_UNKNOWN = 0;
+ const unsigned short SVG_TRANSFORM_MATRIX = 1;
+ const unsigned short SVG_TRANSFORM_TRANSLATE = 2;
+ const unsigned short SVG_TRANSFORM_SCALE = 3;
+ const unsigned short SVG_TRANSFORM_ROTATE = 4;
+ const unsigned short SVG_TRANSFORM_SKEWX = 5;
+ const unsigned short SVG_TRANSFORM_SKEWY = 6;
+
+ readonly attribute unsigned short type;
+ readonly attribute SVGMatrix matrix;
+ readonly attribute float angle;
+
+ void setMatrix ( in SVGMatrix matrix );
+ void setTranslate ( in float tx, in float ty );
+ void setScale ( in float sx, in float sy );
+ void setRotate ( in float angle, in float cx, in float cy );
+ void setSkewX ( in float angle );
+ void setSkewY ( in float angle );
+ };
+
+ interface SVGTransformList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGTransform initialize ( in SVGTransform newItem )
+ raises( DOMException, SVGException );
+ SVGTransform getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGTransform insertItemBefore ( in SVGTransform newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGTransform replaceItem ( in SVGTransform newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGTransform removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGTransform appendItem ( in SVGTransform newItem )
+ raises( DOMException, SVGException );
+ SVGTransform createSVGTransformFromMatrix ( in SVGMatrix matrix );
+ SVGTransform consolidate ( );
+ };
+
+ interface SVGAnimatedTransformList {
+
+ readonly attribute SVGTransformList baseVal;
+ readonly attribute SVGTransformList animVal;
+ };
+
+ interface SVGPreserveAspectRatio {
+
+ // Alignment Types
+ const unsigned short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0;
+ const unsigned short SVG_PRESERVEASPECTRATIO_NONE = 1;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMID = 5;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9;
+ const unsigned short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10;
+ // Meet-or-slice Types
+ const unsigned short SVG_MEETORSLICE_UNKNOWN = 0;
+ const unsigned short SVG_MEETORSLICE_MEET = 1;
+ const unsigned short SVG_MEETORSLICE_SLICE = 2;
+
+ attribute unsigned short align;
+ // raises DOMException on setting
+ attribute unsigned short meetOrSlice;
+ // raises DOMException on setting
+ };
+
+ interface SVGAnimatedPreserveAspectRatio {
+
+ readonly attribute SVGPreserveAspectRatio baseVal;
+ readonly attribute SVGPreserveAspectRatio animVal;
+ };
+
+ interface SVGPathSeg {
+
+ // Path Segment Types
+ const unsigned short PATHSEG_UNKNOWN = 0;
+ const unsigned short PATHSEG_CLOSEPATH = 1;
+ const unsigned short PATHSEG_MOVETO_ABS = 2;
+ const unsigned short PATHSEG_MOVETO_REL = 3;
+ const unsigned short PATHSEG_LINETO_ABS = 4;
+ const unsigned short PATHSEG_LINETO_REL = 5;
+ const unsigned short PATHSEG_CURVETO_CUBIC_ABS = 6;
+ const unsigned short PATHSEG_CURVETO_CUBIC_REL = 7;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_ABS = 8;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_REL = 9;
+ const unsigned short PATHSEG_ARC_ABS = 10;
+ const unsigned short PATHSEG_ARC_REL = 11;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_ABS = 12;
+ const unsigned short PATHSEG_LINETO_HORIZONTAL_REL = 13;
+ const unsigned short PATHSEG_LINETO_VERTICAL_ABS = 14;
+ const unsigned short PATHSEG_LINETO_VERTICAL_REL = 15;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16;
+ const unsigned short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18;
+ const unsigned short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19;
+
+ readonly attribute unsigned short pathSegType;
+ readonly attribute DOMString pathSegTypeAsLetter;
+ };
+
+ interface SVGPathSegClosePath : SVGPathSeg {};
+
+ interface SVGPathSegMovetoAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegMovetoRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x1;
+ // raises DOMException on setting
+ attribute float y1;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegArcAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float r1;
+ // raises DOMException on setting
+ attribute float r2;
+ // raises DOMException on setting
+ attribute float angle;
+ // raises DOMException on setting
+ attribute boolean largeArcFlag;
+ // raises DOMException on setting
+ attribute boolean sweepFlag;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegArcRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float r1;
+ // raises DOMException on setting
+ attribute float r2;
+ // raises DOMException on setting
+ attribute float angle;
+ // raises DOMException on setting
+ attribute boolean largeArcFlag;
+ // raises DOMException on setting
+ attribute boolean sweepFlag;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoHorizontalAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoHorizontalRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoVerticalAbs : SVGPathSeg {
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegLinetoVerticalRel : SVGPathSeg {
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicSmoothAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoCubicSmoothRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float x2;
+ // raises DOMException on setting
+ attribute float y2;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticSmoothAbs : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegCurvetoQuadraticSmoothRel : SVGPathSeg {
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ };
+
+ interface SVGPathSegList {
+
+ readonly attribute unsigned long numberOfItems;
+
+ void clear ( )
+ raises( DOMException );
+ SVGPathSeg initialize ( in SVGPathSeg newItem )
+ raises( DOMException, SVGException );
+ SVGPathSeg getItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPathSeg insertItemBefore ( in SVGPathSeg newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPathSeg replaceItem ( in SVGPathSeg newItem, in unsigned long index )
+ raises( DOMException, SVGException );
+ SVGPathSeg removeItem ( in unsigned long index )
+ raises( DOMException );
+ SVGPathSeg appendItem ( in SVGPathSeg newItem )
+ raises( DOMException, SVGException );
+ };
+
+ interface SVGAnimatedPathData {
+
+ readonly attribute SVGPathSegList pathSegList;
+ readonly attribute SVGPathSegList normalizedPathSegList;
+ readonly attribute SVGPathSegList animatedPathSegList;
+ readonly attribute SVGPathSegList animatedNormalizedPathSegList;
+ };
+
+ interface SVGPathElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPathData {
+
+ readonly attribute SVGAnimatedNumber pathLength;
+
+ float getTotalLength ( );
+ SVGPoint getPointAtLength ( in float distance );
+ unsigned long getPathSegAtLength ( in float distance );
+ SVGPathSegClosePath createSVGPathSegClosePath ( );
+ SVGPathSegMovetoAbs createSVGPathSegMovetoAbs ( in float x, in float y );
+ SVGPathSegMovetoRel createSVGPathSegMovetoRel ( in float x, in float y );
+ SVGPathSegLinetoAbs createSVGPathSegLinetoAbs ( in float x, in float y );
+ SVGPathSegLinetoRel createSVGPathSegLinetoRel ( in float x, in float y );
+ SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs ( in float x, in float y, in float x1, in float y1, in float x2, in float y2 );
+ SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel ( in float x, in float y, in float x1, in float y1, in float x2, in float y2 );
+ SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs ( in float x, in float y, in float x1, in float y1 );
+ SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel ( in float x, in float y, in float x1, in float y1 );
+ SVGPathSegArcAbs createSVGPathSegArcAbs ( in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag );
+ SVGPathSegArcRel createSVGPathSegArcRel ( in float x, in float y, in float r1, in float r2, in float angle, in boolean largeArcFlag, in boolean sweepFlag );
+ SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs ( in float x );
+ SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel ( in float x );
+ SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs ( in float y );
+ SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel ( in float y );
+ SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs ( in float x, in float y, in float x2, in float y2 );
+ SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel ( in float x, in float y, in float x2, in float y2 );
+ SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs ( in float x, in float y );
+ SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel ( in float x, in float y );
+ };
+
+ interface SVGRectElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedLength rx;
+ readonly attribute SVGAnimatedLength ry;
+ };
+
+ interface SVGCircleElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength r;
+ };
+
+ interface SVGEllipseElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength rx;
+ readonly attribute SVGAnimatedLength ry;
+ };
+
+ interface SVGLineElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x1;
+ readonly attribute SVGAnimatedLength y1;
+ readonly attribute SVGAnimatedLength x2;
+ readonly attribute SVGAnimatedLength y2;
+ };
+
+ interface SVGAnimatedPoints {
+
+ readonly attribute SVGPointList points;
+ readonly attribute SVGPointList animatedPoints;
+ };
+
+ interface SVGPolylineElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPoints {};
+
+ interface SVGPolygonElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget,
+ SVGAnimatedPoints {};
+
+ interface SVGTextContentElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ events::EventTarget {
+
+ // lengthAdjust Types
+ const unsigned short LENGTHADJUST_UNKNOWN = 0;
+ const unsigned short LENGTHADJUST_SPACING = 1;
+ const unsigned short LENGTHADJUST_SPACINGANDGLYPHS = 2;
+
+ readonly attribute SVGAnimatedLength textLength;
+ readonly attribute SVGAnimatedEnumeration lengthAdjust;
+
+ long getNumberOfChars ( );
+ float getComputedTextLength ( );
+ float getSubStringLength ( in unsigned long charnum, in unsigned long nchars )
+ raises( DOMException );
+ SVGPoint getStartPositionOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ SVGPoint getEndPositionOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ SVGRect getExtentOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ float getRotationOfChar ( in unsigned long charnum )
+ raises( DOMException );
+ long getCharNumAtPosition ( in SVGPoint point );
+ void selectSubString ( in unsigned long charnum, in unsigned long nchars )
+ raises( DOMException );
+ };
+
+ interface SVGTextPositioningElement : SVGTextContentElement {
+ readonly attribute SVGAnimatedLengthList x;
+ readonly attribute SVGAnimatedLengthList y;
+ readonly attribute SVGAnimatedLengthList dx;
+ readonly attribute SVGAnimatedLengthList dy;
+ readonly attribute SVGAnimatedNumberList rotate;
+ };
+
+ interface SVGTextElement :
+ SVGTextPositioningElement,
+ SVGTransformable {};
+
+ interface SVGTSpanElement : SVGTextPositioningElement {};
+
+ interface SVGTRefElement :
+ SVGTextPositioningElement,
+ SVGURIReference {};
+
+ interface SVGTextPathElement :
+ SVGTextContentElement,
+ SVGURIReference {
+
+ // textPath Method Types
+ const unsigned short TEXTPATH_METHODTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_METHODTYPE_ALIGN = 1;
+ const unsigned short TEXTPATH_METHODTYPE_STRETCH = 2;
+ // textPath Spacing Types
+ const unsigned short TEXTPATH_SPACINGTYPE_UNKNOWN = 0;
+ const unsigned short TEXTPATH_SPACINGTYPE_AUTO = 1;
+ const unsigned short TEXTPATH_SPACINGTYPE_EXACT = 2;
+
+ readonly attribute SVGAnimatedLength startOffset;
+ readonly attribute SVGAnimatedEnumeration method;
+ readonly attribute SVGAnimatedEnumeration spacing;
+ };
+
+ interface SVGAltGlyphElement :
+ SVGTextPositioningElement,
+ SVGURIReference {
+
+ attribute DOMString glyphRef;
+ // raises DOMException on setting
+ attribute DOMString format;
+ // raises DOMException on setting
+ };
+
+ interface SVGAltGlyphDefElement : SVGElement {};
+
+ interface SVGAltGlyphItemElement : SVGElement {};
+
+ interface SVGGlyphRefElement :
+ SVGElement,
+ SVGURIReference,
+ SVGStylable {
+
+ attribute DOMString glyphRef;
+ // raises DOMException on setting
+ attribute DOMString format;
+ // raises DOMException on setting
+ attribute float x;
+ // raises DOMException on setting
+ attribute float y;
+ // raises DOMException on setting
+ attribute float dx;
+ // raises DOMException on setting
+ attribute float dy;
+ // raises DOMException on setting
+ };
+
+ interface SVGPaint : SVGColor {
+ // Paint Types
+ const unsigned short SVG_PAINTTYPE_UNKNOWN = 0;
+ const unsigned short SVG_PAINTTYPE_RGBCOLOR = 1;
+ const unsigned short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2;
+ const unsigned short SVG_PAINTTYPE_NONE = 101;
+ const unsigned short SVG_PAINTTYPE_CURRENTCOLOR = 102;
+ const unsigned short SVG_PAINTTYPE_URI_NONE = 103;
+ const unsigned short SVG_PAINTTYPE_URI_CURRENTCOLOR = 104;
+ const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR = 105;
+ const unsigned short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106;
+ const unsigned short SVG_PAINTTYPE_URI = 107;
+
+ readonly attribute unsigned short paintType;
+ readonly attribute DOMString uri;
+
+ void setUri ( in DOMString uri );
+ void setPaint ( in unsigned short paintType, in DOMString uri, in DOMString rgbColor, in DOMString iccColor )
+ raises( SVGException );
+ };
+
+ interface SVGMarkerElement :
+ SVGElement,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox {
+
+ // Marker Unit Types
+ const unsigned short SVG_MARKERUNITS_UNKNOWN = 0;
+ const unsigned short SVG_MARKERUNITS_USERSPACEONUSE = 1;
+ const unsigned short SVG_MARKERUNITS_STROKEWIDTH = 2;
+ // Marker Orientation Types
+ const unsigned short SVG_MARKER_ORIENT_UNKNOWN = 0;
+ const unsigned short SVG_MARKER_ORIENT_AUTO = 1;
+ const unsigned short SVG_MARKER_ORIENT_ANGLE = 2;
+
+ readonly attribute SVGAnimatedLength refX;
+ readonly attribute SVGAnimatedLength refY;
+ readonly attribute SVGAnimatedEnumeration markerUnits;
+ readonly attribute SVGAnimatedLength markerWidth;
+ readonly attribute SVGAnimatedLength markerHeight;
+ readonly attribute SVGAnimatedEnumeration orientType;
+ readonly attribute SVGAnimatedAngle orientAngle;
+
+ void setOrientToAuto ( );
+ void setOrientToAngle ( in SVGAngle angle );
+ };
+
+ interface SVGColorProfileElement :
+ SVGElement,
+ SVGURIReference,
+ SVGRenderingIntent {
+
+ attribute DOMString local;
+ // raises DOMException on setting
+ attribute DOMString name;
+ // raises DOMException on setting
+ attribute unsigned short renderingIntent;
+ // raises DOMException on setting
+ };
+
+ interface SVGColorProfileRule :
+ SVGCSSRule,
+ SVGRenderingIntent {
+
+ attribute DOMString src;
+ // raises DOMException on setting
+ attribute DOMString name;
+ // raises DOMException on setting
+ attribute unsigned short renderingIntent;
+ // raises DOMException on setting
+ };
+
+ interface SVGGradientElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ // Spread Method Types
+ const unsigned short SVG_SPREADMETHOD_UNKNOWN = 0;
+ const unsigned short SVG_SPREADMETHOD_PAD = 1;
+ const unsigned short SVG_SPREADMETHOD_REFLECT = 2;
+ const unsigned short SVG_SPREADMETHOD_REPEAT = 3;
+
+ readonly attribute SVGAnimatedEnumeration gradientUnits;
+ readonly attribute SVGAnimatedTransformList gradientTransform;
+ readonly attribute SVGAnimatedEnumeration spreadMethod;
+ };
+
+ interface SVGLinearGradientElement : SVGGradientElement {
+ readonly attribute SVGAnimatedLength x1;
+ readonly attribute SVGAnimatedLength y1;
+ readonly attribute SVGAnimatedLength x2;
+ readonly attribute SVGAnimatedLength y2;
+ };
+
+ interface SVGRadialGradientElement : SVGGradientElement {
+ readonly attribute SVGAnimatedLength cx;
+ readonly attribute SVGAnimatedLength cy;
+ readonly attribute SVGAnimatedLength r;
+ readonly attribute SVGAnimatedLength fx;
+ readonly attribute SVGAnimatedLength fy;
+ };
+
+ interface SVGStopElement :
+ SVGElement,
+ SVGStylable {
+
+ readonly attribute SVGAnimatedNumber offset;
+ };
+
+ interface SVGPatternElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFitToViewBox,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration patternUnits;
+ readonly attribute SVGAnimatedEnumeration patternContentUnits;
+ readonly attribute SVGAnimatedTransformList patternTransform;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+ interface SVGClipPathElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration clipPathUnits;
+ };
+
+ interface SVGMaskElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration maskUnits;
+ readonly attribute SVGAnimatedEnumeration maskContentUnits;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+ interface SVGFilterElement :
+ SVGElement,
+ SVGURIReference,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGUnitTypes {
+
+ readonly attribute SVGAnimatedEnumeration filterUnits;
+ readonly attribute SVGAnimatedEnumeration primitiveUnits;
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedInteger filterResX;
+ readonly attribute SVGAnimatedInteger filterResY;
+
+ void setFilterRes ( in unsigned long filterResX, in unsigned long filterResY );
+ };
+
+ interface SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ readonly attribute SVGAnimatedString result;
+ };
+
+ interface SVGFEBlendElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Blend Mode Types
+ const unsigned short SVG_FEBLEND_MODE_UNKNOWN = 0;
+ const unsigned short SVG_FEBLEND_MODE_NORMAL = 1;
+ const unsigned short SVG_FEBLEND_MODE_MULTIPLY = 2;
+ const unsigned short SVG_FEBLEND_MODE_SCREEN = 3;
+ const unsigned short SVG_FEBLEND_MODE_DARKEN = 4;
+ const unsigned short SVG_FEBLEND_MODE_LIGHTEN = 5;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedEnumeration mode;
+ };
+
+ interface SVGFEColorMatrixElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Color Matrix Types
+ const unsigned short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_MATRIX = 1;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_SATURATE = 2;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3;
+ const unsigned short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedEnumeration type;
+ readonly attribute SVGAnimatedNumberList values;
+ };
+
+ interface SVGFEComponentTransferElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGComponentTransferFunctionElement : SVGElement {
+ // Component Transfer Types
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4;
+ const unsigned short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5;
+
+ readonly attribute SVGAnimatedEnumeration type;
+ readonly attribute SVGAnimatedNumberList tableValues;
+ readonly attribute SVGAnimatedNumber slope;
+ readonly attribute SVGAnimatedNumber intercept;
+ readonly attribute SVGAnimatedNumber amplitude;
+ readonly attribute SVGAnimatedNumber exponent;
+ readonly attribute SVGAnimatedNumber offset;
+ };
+
+ interface SVGFEFuncRElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncGElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncBElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFEFuncAElement : SVGComponentTransferFunctionElement {};
+
+ interface SVGFECompositeElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Composite Operators
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OVER = 1;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_IN = 2;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_OUT = 3;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ATOP = 4;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_XOR = 5;
+ const unsigned short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedEnumeration operator;
+ readonly attribute SVGAnimatedNumber k1;
+ readonly attribute SVGAnimatedNumber k2;
+ readonly attribute SVGAnimatedNumber k3;
+ readonly attribute SVGAnimatedNumber k4;
+ };
+
+ interface SVGFEConvolveMatrixElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Edge Mode Values
+ const unsigned short SVG_EDGEMODE_UNKNOWN = 0;
+ const unsigned short SVG_EDGEMODE_DUPLICATE = 1;
+ const unsigned short SVG_EDGEMODE_WRAP = 2;
+ const unsigned short SVG_EDGEMODE_NONE = 3;
+
+ readonly attribute SVGAnimatedInteger orderX;
+ readonly attribute SVGAnimatedInteger orderY;
+ readonly attribute SVGAnimatedNumberList kernelMatrix;
+ readonly attribute SVGAnimatedNumber divisor;
+ readonly attribute SVGAnimatedNumber bias;
+ readonly attribute SVGAnimatedInteger targetX;
+ readonly attribute SVGAnimatedInteger targetY;
+ readonly attribute SVGAnimatedEnumeration edgeMode;
+ readonly attribute SVGAnimatedLength kernelUnitLengthX;
+ readonly attribute SVGAnimatedLength kernelUnitLengthY;
+ readonly attribute SVGAnimatedBoolean preserveAlpha;
+ };
+
+ interface SVGFEDiffuseLightingElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ readonly attribute SVGAnimatedNumber diffuseConstant;
+ };
+
+ interface SVGFEDistantLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber azimuth;
+ readonly attribute SVGAnimatedNumber elevation;
+ };
+
+ interface SVGFEPointLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber x;
+ readonly attribute SVGAnimatedNumber y;
+ readonly attribute SVGAnimatedNumber z;
+ };
+
+ interface SVGFESpotLightElement : SVGElement {
+ readonly attribute SVGAnimatedNumber x;
+ readonly attribute SVGAnimatedNumber y;
+ readonly attribute SVGAnimatedNumber z;
+ readonly attribute SVGAnimatedNumber pointsAtX;
+ readonly attribute SVGAnimatedNumber pointsAtY;
+ readonly attribute SVGAnimatedNumber pointsAtZ;
+ readonly attribute SVGAnimatedNumber specularExponent;
+ readonly attribute SVGAnimatedNumber limitingConeAngle;
+ };
+
+ interface SVGFEDisplacementMapElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Channel Selectors
+ const unsigned short SVG_CHANNEL_UNKNOWN = 0;
+ const unsigned short SVG_CHANNEL_R = 1;
+ const unsigned short SVG_CHANNEL_G = 2;
+ const unsigned short SVG_CHANNEL_B = 3;
+ const unsigned short SVG_CHANNEL_A = 4;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedString in2;
+ readonly attribute SVGAnimatedNumber scale;
+ readonly attribute SVGAnimatedEnumeration xChannelSelector;
+ readonly attribute SVGAnimatedEnumeration yChannelSelector;
+ };
+
+ interface SVGFEFloodElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFEGaussianBlurElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber stdDeviationX;
+ readonly attribute SVGAnimatedNumber stdDeviationY;
+
+ void setStdDeviation ( in float stdDeviationX, in float stdDeviationY );
+ };
+
+ interface SVGFEImageElement :
+ SVGElement,
+ SVGURIReference,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {};
+
+ interface SVGFEMergeElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {};
+
+ interface SVGFEMergeNodeElement : SVGElement {
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFEMorphologyElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Morphology Operators
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_ERODE = 1;
+ const unsigned short SVG_MORPHOLOGY_OPERATOR_DILATE = 2;
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedEnumeration operator;
+ readonly attribute SVGAnimatedLength radiusX;
+ readonly attribute SVGAnimatedLength radiusY;
+ };
+
+ interface SVGFEOffsetElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber dx;
+ readonly attribute SVGAnimatedNumber dy;
+ };
+
+ interface SVGFESpecularLightingElement :
+ SVGElement,
+ SVGStylable,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ readonly attribute SVGAnimatedNumber surfaceScale;
+ readonly attribute SVGAnimatedNumber specularConstant;
+ readonly attribute SVGAnimatedNumber specularExponent;
+ };
+
+ interface SVGFETileElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ readonly attribute SVGAnimatedString in1;
+ };
+
+ interface SVGFETurbulenceElement :
+ SVGElement,
+ SVGFilterPrimitiveStandardAttributes {
+
+ // Turbulence Types
+ const unsigned short SVG_TURBULENCE_TYPE_UNKNOWN = 0;
+ const unsigned short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1;
+ const unsigned short SVG_TURBULENCE_TYPE_TURBULENCE = 2;
+ // Stitch Options
+ const unsigned short SVG_STITCHTYPE_UNKNOWN = 0;
+ const unsigned short SVG_STITCHTYPE_STITCH = 1;
+ const unsigned short SVG_STITCHTYPE_NOSTITCH = 2;
+
+ readonly attribute SVGAnimatedNumber baseFrequencyX;
+ readonly attribute SVGAnimatedNumber baseFrequencyY;
+ readonly attribute SVGAnimatedInteger numOctaves;
+ readonly attribute SVGAnimatedNumber seed;
+ readonly attribute SVGAnimatedEnumeration stitchTiles;
+ readonly attribute SVGAnimatedEnumeration type;
+ };
+
+ interface SVGCursorElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGExternalResourcesRequired {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ };
+
+ interface SVGAElement :
+ SVGElement,
+ SVGURIReference,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedString target;
+ };
+
+ interface SVGViewElement :
+ SVGElement,
+ SVGExternalResourcesRequired,
+ SVGFitToViewBox,
+ SVGZoomAndPan {
+
+ readonly attribute SVGStringList viewTarget;
+ };
+
+ interface SVGScriptElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired {
+
+ attribute DOMString type;
+ // raises DOMException on setting
+ };
+
+ interface SVGEvent : events::Event {};
+
+ interface SVGZoomEvent : events::UIEvent {
+ readonly attribute SVGRect zoomRectScreen;
+ readonly attribute float previousScale;
+ readonly attribute SVGPoint previousTranslate;
+ readonly attribute float newScale;
+ readonly attribute SVGPoint newTranslate;
+ };
+
+ interface SVGAnimationElement :
+ SVGElement,
+ SVGTests,
+ SVGExternalResourcesRequired,
+ smil::ElementTimeControl,
+ events::EventTarget {
+
+ readonly attribute SVGElement targetElement;
+
+ float getStartTime ( );
+ float getCurrentTime ( );
+ float getSimpleDuration ( )
+ raises( DOMException );
+ };
+
+ interface SVGAnimateElement : SVGAnimationElement {};
+
+ interface SVGSetElement : SVGAnimationElement {};
+
+ interface SVGAnimateMotionElement : SVGAnimationElement {};
+
+ interface SVGMPathElement :
+ SVGElement,
+ SVGURIReference,
+ SVGExternalResourcesRequired {};
+
+ interface SVGAnimateColorElement : SVGAnimationElement {};
+
+ interface SVGAnimateTransformElement : SVGAnimationElement {};
+
+ interface SVGFontElement :
+ SVGElement,
+ SVGExternalResourcesRequired,
+ SVGStylable {};
+
+ interface SVGGlyphElement :
+ SVGElement,
+ SVGStylable {};
+
+ interface SVGMissingGlyphElement :
+ SVGElement,
+ SVGStylable {};
+
+ interface SVGHKernElement : SVGElement {};
+
+ interface SVGVKernElement : SVGElement {};
+
+ interface SVGFontFaceElement : SVGElement {};
+
+ interface SVGFontFaceSrcElement : SVGElement {};
+
+ interface SVGFontFaceUriElement : SVGElement {};
+
+ interface SVGFontFaceFormatElement : SVGElement {};
+
+ interface SVGFontFaceNameElement : SVGElement {};
+
+ interface SVGDefinitionSrcElement : SVGElement {};
+
+ interface SVGMetadataElement : SVGElement {};
+
+ interface SVGForeignObjectElement :
+ SVGElement,
+ SVGTests,
+ SVGLangSpace,
+ SVGExternalResourcesRequired,
+ SVGStylable,
+ SVGTransformable,
+ events::EventTarget {
+
+ readonly attribute SVGAnimatedLength x;
+ readonly attribute SVGAnimatedLength y;
+ readonly attribute SVGAnimatedLength width;
+ readonly attribute SVGAnimatedLength height;
+ };
+
+
+};
+
+#endif // _SVG_IDL_ \ No newline at end of file
diff --git a/ksvg/scripts/makecc b/ksvg/scripts/makecc
new file mode 100644
index 00000000..29a28b93
--- /dev/null
+++ b/ksvg/scripts/makecc
@@ -0,0 +1,211 @@
+function printg( a )
+{
+ printf a >> FILENAME ".cc"
+}
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ # do method
+ i = 1
+ nrparams = 0
+ rettype = b[1]
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ printg( b[i++] )
+ printg( " " )
+ }
+ printg( clas "::" )
+ method = b[i]
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if( b[i + 1] != "float" && match( b[i + 1], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ printg( b[i++] " " )
+ }
+ param[nrparams++] = b[i]
+ if( float == "ok" )
+ printg( "&" b[i++] )
+ else
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ")\n{\n" );
+ if( rettype != "void" )
+ {
+ printg( "\tif(!impl) return ; // FIXME\n" )
+ printg( "\treturn impl->" method "(" )
+ }
+ else
+ printg( "\tif(impl)\n\t\timpl->" method "(" )
+ k = 0
+ while( k < nrparams )
+ {
+ printg( param[k++] )
+ if( k < nrparams ) printg( " " )
+ }
+ printg( ");\n" )
+ printg( "}\n\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "void " clas "::set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if( b[i] != "float" && match( b[i], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ while ( i < nr )
+ {
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( " &" b[nr] ")\n{\n" )
+ else
+ printg( " " b[nr] ")\n{\n" )
+ printg( "\tif(impl)\n\t\timpl->set")
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ printg( b[nr] ");\n}\n\n" )
+
+ # do get method
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ $temp = b[nr]
+ printg( clas "::" $temp "() const\n{\n" )
+ printg( "\tif(!impl) return ; // FIXME\n\treturn impl->" )
+ printg( substr( b[nr], 1) "(" )
+ printg( ");\n}\n\n" )
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( clas "::" $temp "() const\n{\n" )
+ printg( "\tif(!impl) return ; // FIXME\n\treturn impl->" )
+ printg( substr( b[nr], 1) "(" )
+ printg( ");\n}\n\n" )
+}
+{
+ sub("boolean", "bool", $0)
+ if(/interface /)
+ {
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ nr = split($0, b, " ")
+ clas = b[1]
+ #printg( "// " clas " specification\n\n\n" )
+ printg( clas "::" clas "()" )
+ if( nr > 2 )
+ {
+ i = 2
+ sub( ":", " : ", b[i] )
+ while ( i < nr )
+ {
+ sub( "public", "", b[i] )
+ sub( ",", "(), ", b[i] )
+ printg( b[i++] )
+ }
+ printg( "()" )
+ }
+ printg( "\n{\n\timpl = new " clas "Impl();\n\timpl->ref();\n}\n\n" )
+ printg( clas "::" clas "(const " clas " &other)" )
+ if( nr > 2 )
+ {
+ i = 2
+ while ( i < nr )
+ printg( b[i++] )
+
+ printg( "(), impl(0)" )
+ }
+ else
+ printg( " : impl(0)" )
+ printg( "\n{\n\t(*this) = other;\n}\n\n" )
+ printg( clas " &" clas "::operator =(const " clas " &other)\n{\n\tif(impl == other.impl)\n\t\treturn *this;\n\n\tif(impl)\n\t\timpl->deref();\n\n\timpl = other.impl;\n\n\tif(impl)\n\t\timpl->ref();\n\n\treturn *this;\n}\n\n" )
+ printg( clas "::" clas "(" clas "Impl *other)" )
+ if( nr > 2 )
+ {
+ i = 2
+ while ( i < nr )
+ printg( b[i++] )
+
+ printg( "()" )
+ }
+ printg( "\n{\n\timpl = other;\n\tif(impl)\n\t\timpl->ref();\n}\n\n" )
+ printg( clas "::~" clas "()\n{\n\tif(impl)\n\t\timpl->deref();\n}\n\n" )
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ }
+ else if(/ = /)
+ {
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }
diff --git a/ksvg/scripts/makeheader b/ksvg/scripts/makeheader
new file mode 100644
index 00000000..f8594690
--- /dev/null
+++ b/ksvg/scripts/makeheader
@@ -0,0 +1,164 @@
+function printg( a )
+{
+ printf a >> FILENAME ".h"
+}
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ printg( "\t" )
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ printg( b[i++] )
+ printg( " " )
+ }
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if( b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ printg( b[i++] " " )
+ #if( b[ i ] != ");" ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( "&" b[i++] )
+ else
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ");\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "\tvoid set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if( b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ #if( b[i] != "float" && match( b[i], "unsigned") == 0)
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ float = "bad"
+ while ( i < nr )
+ {
+ printg( b[i++] )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok" )
+ printg( " &" )
+ else
+ printg( " " )
+
+ printg( b[nr] ");\n" )
+
+ # do get method
+ printg("\t")
+ i = 1
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ $temp = b[nr]
+ printg( $temp "() const;" )
+ printg( "\n\n" )
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method
+ i = 1
+ printg("\t")
+ while ( i < nr )
+ {
+ printg( b[i++] " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;" )
+ printg( "\n" )
+}
+{
+ sub("boolean", "bool", $0); # to shut up frerich :P
+ if(/interface /)
+ {
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ nr = split($0, b, " ")
+ clas = b[1]
+ printg( "class " clas "Impl;" )
+ printg( "\nclass " )
+ printg( $0 )
+ printg( "\npublic:\n" )
+ printg( "\t" clas "();\n" )
+ printg( "\t" clas "(const " clas " &other);\n" )
+ printg( "\t" clas " &operator=(const " clas " &other);\n" )
+ printg( "\t" clas "(" clas "Impl *other);\n" )
+ printg( "\tvirtual ~" clas "();\n\n" )
+ #printg( "\tbool isNull() const { return !impl; }\n" )
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ printg( "private:\n\t" clas "Impl *impl;\n};\n\n" );
+ }
+ else if(/ = /)
+ {
+ sub( "\r", "", $0 )
+ printg( $0 "\n" );
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }
diff --git a/ksvg/scripts/makeimpl b/ksvg/scripts/makeimpl
new file mode 100644
index 00000000..fb5ab8f5
--- /dev/null
+++ b/ksvg/scripts/makeimpl
@@ -0,0 +1,440 @@
+function printtoctor( aa )
+{
+ ctor = ctor aa
+}
+function printtodtor( aa )
+{
+ dtor = dtor aa
+}
+function printtofunc( aa )
+{
+ fun = fun aa
+}
+function printp( a )
+{
+ #printf a >> "PRIVATE"
+ private = private a
+}
+function printg( a )
+{
+ printf a >> FILENAME "Impl.h"
+}
+function printh( a )
+{
+ printf a >> FILENAME "Impl.cc"
+}
+function doFuncCC( a, class )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl " )
+ else
+ printtofunc( var " " )
+ }
+ printtofunc( class "::" );
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if(b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ #if(b[i + 1] != "float" && match(b[i + 1], "unsigned") == 0)
+ {
+ float = "ok"
+ printtofunc( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl " )
+ else
+ printtofunc( var " " )
+ }
+ if( float == "ok")
+ {
+ printtofunc( "&" b[i++] )
+ }
+ else
+ {
+ printtofunc( b[i++] )
+ }
+ if( i < nr ) printtofunc( " " )
+ }
+ else
+ printtofunc( b[i++] )
+ }
+ printtofunc( ")\n{\n}\n\n" );
+}
+
+function doFunc( a )
+{
+ gsub("attribute", "", $0)
+ nr = split($0, b, " ")
+ printg( "\t" )
+ # do method
+ i = 1
+ while ( i < nr && b[i + 1] != "(" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl " )
+ else
+ printg( var " " )
+ }
+ while ( i < nr && b[i + 1] != ");" )
+ {
+ if( b[i] == "in" )
+ {
+ if(b[i + 1] != "float" && b[i + 1] != "unsigned" && b[i+1] != "short" && b[i+1] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ i++
+ while ( i + 1 < nr && b[i + 1] != "in" && b[i + 1] != ");" )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl " )
+ else
+ printg( var " " )
+ }
+ if( float == "ok")
+ {
+ if( b[ i ] != "in" ) printg( "&" b[i++] )
+ }
+ else
+ {
+ if( b[ i ] != "in" ) printg( b[i++] )
+ }
+ if( i < nr ) printg( " " )
+ }
+ else
+ printg( b[i++] )
+ }
+ printg( ");\n" );
+}
+
+function doAttr( a, class )
+{
+ sub( ";", "", a)
+ sub( "\r", "", a)
+ gsub("attribute", "", a)
+ nr = split(a, b, " ")
+
+ # do put method
+ printg( "\tvoid set" )
+ printg( toupper( substr( b[nr], 1, 1) ) )
+ printg( substr( b[nr], 2) "(" )
+ i = 1
+ if(b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ {
+ float = "ok"
+ printg( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl" )
+ else
+ printg( var )
+ if( i < nr ) printg( " " )
+ }
+ if( float == "ok")
+ printg( " &" )
+ else
+ printg( " " )n
+ printg( b[nr] ");\n" )
+
+ # do put method .cc
+ printtofunc( "void " clas "::set" )
+ printtofunc( toupper( substr( b[nr], 1, 1) ) )
+ printtofunc( substr( b[nr], 2) "(" )
+ i = 1
+ if(b[i] != "float" && b[i] != "unsigned" && b[i] != "short" && b[i] != "bool" )
+ {
+ float = "ok"
+ printtofunc( "const " )
+ }
+ else
+ {
+ float = "bad"
+ }
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl" )
+ else
+ printtofunc( var )
+ if( i < nr ) printtofunc( " " )
+ }
+ if( float == "ok")
+ printtofunc( " &" )
+ else
+ printtofunc( " " )
+ printtofunc( b[nr] ")\n{\n\tm_" b[nr] " = " b[nr] ";\n}\n\n" )
+
+
+ # do get method .h
+ i = 1
+ printg( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl *" )
+ else
+ printg( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;\n" )
+
+ # do get method .cc
+ i = 1
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl *" )
+ else
+ printtofunc( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printtofunc( clas "::" $temp "() const\n{\n\treturn m_" $temp )
+ printtofunc( ";\n}\n\n" )
+
+ # do var
+ i = 1
+ printp( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ {
+ var = var "Impl"
+ printp( var " *" )
+ }
+ else
+ printp( var " " )
+ }
+ printp( "m_" )
+ #printp( toupper( substr( b[nr], 1, 1) ) )
+ printp( substr( b[nr], 1) ";\n" )
+
+ #add to ctor + dtor
+ if(match(var, "SVG") != 0)
+ {
+ printtoctor("\tm_" substr( b[nr], 1) " = new " var "();\n" )
+ printtoctor("\tm_" substr( b[nr], 1) "->ref();\n\n" )
+ printtodtor("\tif(m_" substr( b[nr], 1) ")\n" )
+ printtodtor("\t\tm_" substr( b[nr], 1) "->deref();\n\n" )
+ }
+}
+
+function doReadonlyAttr( a, class )
+{
+ gsub("readonly attribute", "", $0)
+ nr = split($0, b, " ")
+
+ # do get method .h
+ i = 1
+ printg( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printg( var "Impl *" )
+ else
+ printg( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printg( $temp "() const;\n" )
+
+ # do get method .cc
+ i = 1
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ printtofunc( var "Impl *" )
+ else
+ printtofunc( var " " )
+ }
+ sub( ";", "", b[nr])
+ sub( "\r", "", b[nr])
+ $temp = b[nr]
+ printtofunc( clas "::" $temp "() const\n{\n\treturn m_" $temp )
+ printtofunc( ";\n}\n\n" )
+
+ # do var
+ i = 1
+ printp( "\t" )
+ while ( i < nr )
+ {
+ var = b[i++]
+ if(match(var, "SVG") != 0 )
+ {
+ var = var "Impl"
+ printp( var " *" )
+ }
+ else
+ printp( var " " )
+ }
+ printp( "m_" )
+ printp( substr( b[nr], 1) ";\n" )
+
+ #add to ctor + dtor
+ if(match(var, "SVG") != 0)
+ {
+ printtoctor("\tm_" substr( b[nr], 1) " = new " var "();\n" )
+ printtoctor("\tm_" substr( b[nr], 1) "->ref();\n\n" )
+ printtodtor("\tif(m_" substr( b[nr], 1) ")\n" )
+ printtodtor("\t\tm_" substr( b[nr], 1) "->deref();\n\n" )
+ }
+}
+{
+ sub("boolean", "bool", $0); # to shut up frerich :P
+ # Frerich: Thank you :-)
+ if(/interface /)
+ {
+ private = "\nprivate:\n";
+ gsub(" interface ", "", $0)
+ gsub(": ", ": public ", $0)
+ gsub(",", ", public", $0)
+ gsub("{", "\n{", $0)
+ sub( ";", "", $0 )
+ sub( "\r", "", $0 )
+ printg( "\nclass " )
+ #printg( $0 )
+ #printg( "\npublic:\n" )
+ nr = split($0, b, " ")
+ clas = b[1] "Impl"
+ printg( clas " " )
+ i = 2
+ while ( i < nr )
+ {
+ if(match(b[i], "SVG") != 0 )
+ {
+ if(match(b[i], ",") != 0)
+ sub( ",", "Impl," , b[i])
+ else
+ b[i] = b[i] "Impl"
+ }
+ printg( b[i++] " " )
+ }
+ printg( "\n{\npublic:\n" )
+ printg( "\t" clas "();\n" )
+ #printg( "\t" clas "(const " clas " &other)" )
+ #if( nr > 2 )
+ #{
+ # i = 2
+ # sub( ":", " : ", b[i] )
+ # while ( i < nr )
+ # {
+ # sub( "public", "", b[i] )
+ # sub( ",", "(), ", b[i] )
+ # printg( b[i++] )
+ # }
+ # printg( "()" )
+ #}
+ #printg( " { *this = other; }\n" )
+
+ printg( "\tvirtual ~" clas "();\n\n" )
+ #printg( "\t" clas " &operator=(const " clas " &other);\n\n" )
+
+ # CC part
+ #printh( "// " b[1] " implementation \n\n" )
+ printtoctor( clas "::" clas "()" )
+ if( nr > 2 )
+ {
+ i = 2
+ sub( ":", " : ", b[i] )
+ while ( i < nr )
+ {
+ sub( "public", "",b[i] )
+ sub( ",", "(), ", b[i] )
+ printtoctor( b[i++] )
+ }
+
+ printtoctor( "()" )
+ }
+ printtoctor( "\n{\n" )
+
+ printtodtor( clas "::~" clas "()\n{\n" )
+ #printh( clas " &" clas "::operator =(const " clas " &other)\n{\n\treturn *this;\n}\n\n" )
+
+ }
+ else if(/readonly attribute/)
+ {
+ doReadonlyAttr( $0, $class )
+ }
+ else if(/attribute /)
+ {
+ doAttr( $0, $class )
+ }
+ else if(/raises/)
+ {
+ }
+ else if(/\)/)
+ {
+ doFuncCC( $0, clas );
+ doFunc( $0 );
+ }
+ else if(/};/)
+ {
+ printg(private)
+ printg( "};\n\n" );
+
+ printh( "\n" ctor )
+ printh( "}\n\n" )
+ ctor = ""
+
+ printh( dtor )
+ printh( "}\n\n" )
+ dtor = ""
+
+ printh( fun )
+ fun = ""
+ }
+ else if(/ = /)
+ {
+# sub( "\r", "", $0 )
+# printg( $0 "\n" );
+ }
+ #else if(//)
+ #{
+ # # end of class
+ # printf $0;
+ #}
+}
+# END
+# {
+# print "};";
+# }