diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2013-08-09 11:47:56 +0000 |
|---|---|---|
| committer | Javiertxo <jtx@jtx.marker.es> | 2013-08-09 11:47:56 +0000 |
| commit | 4e358f420a7a1512c722d9eccd864416bc4c075b (patch) | |
| tree | 223e826158e09ab2c864abf0214fe1e6a714ab61 /src | |
| parent | Update to trunk (diff) | |
| parent | Remove missing files from POTFILES.in (diff) | |
| download | inkscape-4e358f420a7a1512c722d9eccd864416bc4c075b.tar.gz inkscape-4e358f420a7a1512c722d9eccd864416bc4c075b.zip | |
update to trunk
(bzr r11950.1.127)
Diffstat (limited to 'src')
705 files changed, 2493 insertions, 39931 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fa54940db..4f7592119 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -46,7 +46,6 @@ set(sp_SRC sp-mesh-patch.cpp sp-mesh-row.cpp sp-metadata.cpp - sp-metrics.cpp sp-missing-glyph.cpp sp-namedview.cpp sp-object-group.cpp @@ -136,8 +135,6 @@ set(sp_SRC sp-mesh-row-fns.h sp-mesh-row.h sp-metadata.h - sp-metric.h - sp-metrics.h sp-missing-glyph.h sp-namedview.h sp-object-group.h @@ -216,7 +213,6 @@ set(inkscape_SRC file.cpp filter-chemistry.cpp filter-enums.cpp - fixes.cpp flood-context.cpp gc-anchored.cpp gc-finalized.cpp @@ -312,7 +308,6 @@ set(inkscape_SRC MultiPrinter.h PylogFormatter.h TRPIFormatter.h - approx-equal.h arc-context.h attributes-test.h attributes.h @@ -486,7 +481,6 @@ set(inkscape_SRC unclump.h undo-stack-observer.h unicoderange.h - unit-constants.h uri-references.h uri.h vanishing-point.h @@ -538,7 +532,6 @@ list(APPEND inkscape_SRC # All folders for internal inkscape # these call add_inkscape_source -add_subdirectory(bind) add_subdirectory(debug) add_subdirectory(dialogs) add_subdirectory(display) diff --git a/src/Makefile.am b/src/Makefile.am index b9ec53ab1..3ca99869f 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -82,8 +82,6 @@ AM_CPPFLAGS = \ $(INKSCAPE_CFLAGS) \ -I$(top_srcdir)/cxxtest \ $(WIN32_CFLAGS) \ - -I$(srcdir)/bind/javainc \ - -I$(srcdir)/bind/javainc/linux \ -I$(builddir)/extension/dbus \ $(X11_CFLAGS) @@ -107,7 +105,6 @@ endif # Include all partial makefiles from subdirectories include Makefile_insert -include bind/Makefile_insert include dialogs/Makefile_insert include display/Makefile_insert include dom/Makefile_insert @@ -115,7 +112,6 @@ include extension/Makefile_insert include extension/dbus/Makefile_insert include extension/implementation/Makefile_insert include extension/internal/Makefile_insert -include extension/script/Makefile_insert include filters/Makefile_insert include helper/Makefile_insert include io/Makefile_insert @@ -147,7 +143,6 @@ EXTRA_DIST += \ $(top_srcdir)/Doxyfile \ sp-skeleton.cpp sp-skeleton.h \ util/makefile.in \ - bind/makefile.in \ debug/makefile.in \ dialogs/makefile.in \ display/makefile.in \ @@ -155,7 +150,6 @@ EXTRA_DIST += \ extension/implementation/makefile.in \ extension/internal/makefile.in \ extension/makefile.in \ - extension/script/makefile.in \ filters/makefile.in \ helper/makefile.in \ io/makefile.in \ @@ -254,7 +248,18 @@ check_PROGRAMS = cxxtests # List of all tests to be run. TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests -XFAIL_TESTS = $(check_PROGRAMS) ../share/extensions/test/run-all-extension-tests + +# FIXME: Currently, a number of cxxtest tests fail. These should be fixed and +# the XFAIL_TESTS build target should be removed. +# See the following Launchpad bugs: +# +# LP #1202271 <cxxtest: preferences-test.h fails> +# LP #1208013 <cxxtest: curve-test.h fails> +# LP #1208002 <cxxtest: svg-length-test.h fails> +# LP #1208005 <cxxtest: svg-path-geom-test.h fails> +# LP #1207502 <cxxtest: svg-affine-test.h fails> + +XFAIL_TESTS = $(check_PROGRAMS) # including the the testsuites here ensures that they get distributed cxxtests_SOURCES = cxxtests.cpp $(CXXTEST_TESTSUITES) diff --git a/src/Makefile_insert b/src/Makefile_insert index 88f809b52..0cc4e7460 100644 --- a/src/Makefile_insert +++ b/src/Makefile_insert @@ -3,7 +3,7 @@ ink_common_sources += \ util/find-last-if.h \ util/longest-common-suffix.h \ - approx-equal.h remove-last.h \ + remove-last.h \ arc-context.cpp arc-context.h \ attributes.cpp attributes.h \ attribute-rel-svg.cpp attribute-rel-svg.h \ @@ -59,7 +59,6 @@ ink_common_sources += \ fill-or-stroke.h \ filter-chemistry.cpp filter-chemistry.h \ filter-enums.cpp filter-enums.h \ - fixes.cpp \ flood-context.cpp flood-context.h \ gc-alloc.h \ gc-anchored.h gc-anchored.cpp \ @@ -199,8 +198,6 @@ ink_common_sources += \ sp-mesh-patch.cpp sp-mesh-patch.h \ sp-mesh-row-fns.h \ sp-mesh-row.cpp sp-mesh-row.h \ - sp-metric.h \ - sp-metrics.cpp sp-metrics.h \ sp-missing-glyph.cpp sp-missing-glyph.h \ sp-namedview.cpp sp-namedview.h \ sp-object.cpp sp-object.h \ @@ -253,7 +250,6 @@ ink_common_sources += \ unclump.cpp unclump.h \ undo-stack-observer.h \ unicoderange.cpp unicoderange.h \ - unit-constants.h \ uri.cpp uri.h \ uri-references.cpp uri-references.h \ vanishing-point.cpp vanishing-point.h \ @@ -285,8 +281,8 @@ CXXTEST_TESTSUITES += \ $(srcdir)/extract-uri-test.h \ $(srcdir)/marker-test.h \ $(srcdir)/mod360-test.h \ + $(srcdir)/preferences-test.h \ $(srcdir)/round-test.h \ - $(srcdir)/preferences-test.h \ $(srcdir)/sp-gradient-test.h \ $(srcdir)/sp-style-elem-test.h \ $(srcdir)/style-test.h \ diff --git a/src/approx-equal.h b/src/approx-equal.h deleted file mode 100644 index 92f36d7a5..000000000 --- a/src/approx-equal.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef __APROX_EQUAL_H__ -#define __APROX_EQUAL_H__ - -#include <cmath> - -inline bool approx_equal(double const a, double const b) -{ - return ( (a == b) - || ( fabs( a - b ) < 1e-2 ) - || ( fabs( a / b - 1.0 ) < 1e-2 ) ); -} - - -#endif /* !__APROX_EQUAL_H__ */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/arc-context.cpp b/src/arc-context.cpp index 34e4bbeab..115f45493 100644 --- a/src/arc-context.cpp +++ b/src/arc-context.cpp @@ -32,7 +32,6 @@ #include "desktop-handles.h" #include "snap.h" #include "pixmaps/cursor-ellipse.xpm" -#include "sp-metrics.h" #include "xml/repr.h" #include "xml/node-event-vector.h" #include "preferences.h" @@ -450,8 +449,10 @@ static void sp_arc_drag(SPArcContext *ac, Geom::Point pt, guint state) double rdimx = r.dimensions()[Geom::X]; double rdimy = r.dimensions()[Geom::Y]; - GString *xs = SP_PX_TO_METRIC_STRING(rdimx, desktop->namedview->getDefaultMetric()); - GString *ys = SP_PX_TO_METRIC_STRING(rdimy, desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity rdimx_q = Inkscape::Util::Quantity(rdimx, "px"); + Inkscape::Util::Quantity rdimy_q = Inkscape::Util::Quantity(rdimy, "px"); + GString *xs = g_string_new(rdimx_q.string(*desktop->namedview->doc_units).c_str()); + GString *ys = g_string_new(rdimy_q.string(*desktop->namedview->doc_units).c_str()); if (state & GDK_CONTROL_MASK) { int ratio_x, ratio_y; if (fabs (rdimx) > fabs (rdimy)) { diff --git a/src/attribute-rel-util.cpp b/src/attribute-rel-util.cpp index 0527dad4e..933339632 100644 --- a/src/attribute-rel-util.cpp +++ b/src/attribute-rel-util.cpp @@ -198,23 +198,22 @@ void sp_attribute_clean_style(Node* repr, SPCSSAttr *css, unsigned int flags) { // Check if a property is applicable to an element (i.e. is font-family useful for a <rect>?). if( !SPAttributeRelCSS::findIfValid( property, element ) ) { - if( flags & SP_ATTR_CLEAN_STYLE_WARN ) { - g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" is inappropriate.", - element.c_str(), id.c_str(), property ); - } - if( flags & SP_ATTR_CLEAN_STYLE_REMOVE ) { - toDelete.insert(property); - } - continue; + if( flags & SP_ATTR_CLEAN_STYLE_WARN ) { + g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" is inappropriate.", + element.c_str(), id.c_str(), property ); + } + if( flags & SP_ATTR_CLEAN_STYLE_REMOVE ) { + toDelete.insert(property); + } + continue; } // Find parent value for same property (property) gchar const * value_p = NULL; if( css_parent != NULL ) { - gchar const * property_p = NULL; for ( List<AttributeRecord const> iter_p = css_parent->attributeList() ; iter_p ; ++iter_p ) { - property_p = g_quark_to_string(iter_p->key); + gchar const * property_p = g_quark_to_string(iter_p->key); if( !g_strcmp0( property, property_p ) ) { value_p = iter_p->value; @@ -226,29 +225,29 @@ void sp_attribute_clean_style(Node* repr, SPCSSAttr *css, unsigned int flags) { // If parent has same property value and property is inherited, mark for deletion. if ( !g_strcmp0( value, value_p ) && SPAttributeRelCSS::findIfInherit( property ) ) { - if ( flags & SP_ATTR_CLEAN_DEFAULT_WARN ) { - g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" has same value as parent (%s).", - element.c_str(), id.c_str(), property, value ); - } - if ( flags & SP_ATTR_CLEAN_DEFAULT_REMOVE ) { - toDelete.insert( property ); - } - continue; + if ( flags & SP_ATTR_CLEAN_DEFAULT_WARN ) { + g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" has same value as parent (%s).", + element.c_str(), id.c_str(), property, value ); + } + if ( flags & SP_ATTR_CLEAN_DEFAULT_REMOVE ) { + toDelete.insert( property ); + } + continue; } // If property value is same as default and the parent value not set or property is not inherited, // mark for deletion. if ( SPAttributeRelCSS::findIfDefault( property, value ) && - ( (css_parent != NULL && value_p == NULL) || !SPAttributeRelCSS::findIfInherit( property ) ) ) { - - if ( flags & SP_ATTR_CLEAN_DEFAULT_WARN ) { - g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" with default value (%s) not needed.", - element.c_str(), id.c_str(), property, value ); - } - if ( flags & SP_ATTR_CLEAN_DEFAULT_REMOVE ) { - toDelete.insert( property ); - } - continue; + ( (css_parent != NULL && value_p == NULL) || !SPAttributeRelCSS::findIfInherit( property ) ) ) { + + if ( flags & SP_ATTR_CLEAN_DEFAULT_WARN ) { + g_warning( "<%s id=\"%s\">: CSS Style property: \"%s\" with default value (%s) not needed.", + element.c_str(), id.c_str(), property, value ); + } + if ( flags & SP_ATTR_CLEAN_DEFAULT_REMOVE ) { + toDelete.insert( property ); + } + continue; } } // End loop over style properties diff --git a/src/attributes-test.h b/src/attributes-test.h index 78e0ea48f..295ad618c 100644 --- a/src/attributes-test.h +++ b/src/attributes-test.h @@ -214,7 +214,7 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"overline-position", true}, {"overline-thickness", true}, {"panose-1", true}, - {"path", false}, + {"path", true}, {"pathLength", false}, {"patternContentUnits", true}, {"patternTransform", true}, @@ -354,7 +354,6 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"inkscape:snap-bbox", true}, {"inkscape:snap-nodes", true}, {"inkscape:snap-others", true}, - {"inkscape:snap-from-guide", true}, {"inkscape:snap-center", true}, {"inkscape:snap-smooth-nodes", true}, {"inkscape:snap-midpoints", true}, @@ -383,6 +382,9 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"inkscape:connector-type", true}, {"inkscape:connection-start", true}, {"inkscape:connection-end", true}, + {"inkscape:connection-points", true}, + {"inkscape:connection-start-point", true}, + {"inkscape:connection-end-point", true}, {"inkscape:connector-curvature", true}, {"inkscape:connector-avoid", true}, {"inkscape:connector-spacing", true}, @@ -429,8 +431,17 @@ struct {char const *attr; bool supported;} const all_attrs[] = { {"inkscape:dstColumn", true}, {"inkscape:excludeShape", true}, {"inkscape:layoutOptions", true}, + {"osb:paint", true}, + + /* SPMeshPatch */ + {"tensor", true}, /* SPNamedView */ + {"fit-margin-top", true}, + {"fit-margin-left", true}, + {"fit-margin-right", true}, + {"fit-margin-bottom", true}, + {"units", true}, {"viewonly", true}, {"showgrid", true}, // {"gridtype", true}, diff --git a/src/bind/CMakeLists.txt b/src/bind/CMakeLists.txt deleted file mode 100644 index 9b6abad4f..000000000 --- a/src/bind/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ - -set(bind_SRC - dobinding.cpp - javabind.cpp - - - # ------- - # Headers - javabind-private.h - javabind.h - javainc/jni.h - javainc/linux/jni_md.h - javainc/solaris/jni_md.h - javainc/win32/jni_md.h -) - -# add_inkscape_lib(bind_LIB "${bind_SRC}") -add_inkscape_source("${bind_SRC}") diff --git a/src/bind/DomStub.java b/src/bind/DomStub.java deleted file mode 100644 index df82e5012..000000000 --- a/src/bind/DomStub.java +++ /dev/null @@ -1,299 +0,0 @@ - -import java.io.*; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.Collections; - - -/** - * This is not an actual java binding class. Rather, it is - * a simple tool for generating C++ native method stubs from classfiles - */ -public class DomStub -{ - -class MethodEntry -{ -ArrayList<String> parms; -String name; -String type; - -public void addParam(String type) -{ - parms.add(type); -} - -public MethodEntry(String methodName, String type) -{ - this.name = methodName; - this.type = type; - parms = new ArrayList<String>(); -} -} - - -class ClassEntry -{ -ArrayList<MethodEntry> methods; -String name; - -public void addMethod(MethodEntry method) -{ - methods.add(method); -} - -public ClassEntry(String className) -{ - this.name = className; - methods = new ArrayList<MethodEntry>(); -} -} - - -HashMap<String, ClassEntry> classes; - - -BufferedWriter out; - -void err(String msg) -{ - System.out.println("DomStub err:" + msg); -} - -void trace(String msg) -{ - System.out.println("DomStub:" + msg); -} - -void po(String msg) -{ - try - { - out.write(msg); - } - catch (IOException e) - { - } -} - - -//######################################################################## -//# G E N E R A T E -//######################################################################## - -void dumpClasses() -{ - for (ClassEntry ce : classes.values()) - { - trace("########################"); - trace("Class " + ce.name); - for (MethodEntry me : ce.methods) - { - trace(" " + me.type + " " + me.name); - for (String parm : me.parms) - { - trace(" " + parm); - } - } - } -} - - -void generateMethod(MethodEntry me) -{ - po("/**\n"); - po(" * Method : " + me.name + "\n"); - po(" */\n"); - for (String parm : me.parms) - { - po(" " + parm + "\n"); - } - -} - -void generateClass(ClassEntry ce) -{ - po("//################################################################\n"); - po("//## " + ce.name + "\n"); - po("//################################################################\n"); - - for (MethodEntry me : ce.methods) - generateMethod(me); - -} - - -void generate() -{ - ArrayList<String> classNames = new ArrayList<String>(classes.keySet()); - Collections.sort(classNames); - for (String key : classNames) - { - ClassEntry ce = classes.get(key); - generateClass(ce); - } -} - -//######################################################################## -//# P A R S E -//######################################################################## -boolean parseEntry(String className, String methodName, String signature) -{ - //trace("Decl :" + methodDecl); - //trace("params:" + params); - //################################# - //# Parse class and method lines - //################################# - String s = className.substring(14); - className = s.replace('_', '/'); - methodName = methodName.substring(14); - signature = signature.substring(14); - //trace("className : " + className); - //trace("methodName : " + methodName); - - int pos = signature.indexOf('('); - if (pos<0) - { - err("no opening ( for signature"); - return false; - } - pos++; - int p2 = signature.indexOf(')', pos); - if (p2<0) - { - err("no closing ) for signature"); - return false; - } - String parms = signature.substring(pos, p2); - String type = signature.substring(p2+1); - //################################# - //# create method entry. add to new or existing class - //################################# - MethodEntry method = new MethodEntry(methodName, type); - - ClassEntry clazz = classes.get(className); - if (clazz == null) - { - clazz = new ClassEntry(className); - classes.put(className, clazz); - } - clazz.addMethod(method); - - //################################# - //# Parse signature line - //################################# - - pos = 0; - int len = parms.length(); - while (pos<len) - { - String typ = ""; - char ch = parms.charAt(pos); - if (ch == '[') - { - pos++; - ch = parms.charAt(pos); - typ += ch; - } - if (ch == 'L') - { - pos++; - typ += ch; - while (pos<len) - { - ch = parms.charAt(pos); - if (ch == ';') - break; - typ += ch; - pos++; - } - } - else - typ += ch; - method.addParam(typ); - //trace("param:" + typ); - pos++; - } - return true; -} - - -public boolean parseFile(String fname) -{ - boolean ret = true; - try - { - BufferedReader in = new BufferedReader(new FileReader(fname)); - while (true) - { - String s1 = in.readLine(); - if (s1 == null) - break; - if (!s1.startsWith(" * Class: ")) - continue; - String s2 = in.readLine(); - if (!s2.startsWith(" * Method: ")) - continue; - String s3 = in.readLine(); - if (!s3.startsWith(" * Signature: ")) - continue; - if (!parseEntry(s1, s2, s3)) - { - ret = false; - break; - } - } - in.close(); - } - catch (IOException e) - { - err("processFile:" + e); - ret = false; - } - return ret; -} - - -public boolean processFile(String fname) -{ - try - { - out = new BufferedWriter(new FileWriter("out.txt")); - } - catch (IOException e) - { - err("processFile: " + e); - return false; - } - if (!parseFile(fname)) - return false; - //dumpClasses(); - generate(); - try - { - out.close(); - } - catch (IOException e) - { - err("processFile: " + e); - return false; - } - return true; -} - - -public DomStub() -{ - classes = new HashMap<String, ClassEntry>(); -} - - - -public static void main(String argv[]) -{ - DomStub st = new DomStub(); - boolean ret = st.processFile("out.h"); -} - - -}
\ No newline at end of file diff --git a/src/bind/Makefile_insert b/src/bind/Makefile_insert deleted file mode 100644 index b640957d3..000000000 --- a/src/bind/Makefile_insert +++ /dev/null @@ -1,11 +0,0 @@ -## Makefile.am fragment sourced by src/Makefile.am. - -ink_common_sources += \ - bind/javabind.h \ - bind/javabind-private.h \ - bind/javabind.cpp \ - bind/dobinding.cpp \ - bind/javainc/jni.h \ - bind/javainc/linux/jni_md.h \ - bind/javainc/solaris/jni_md.h \ - bind/javainc/win32/jni_md.h diff --git a/src/bind/dobinding.cpp b/src/bind/dobinding.cpp deleted file mode 100644 index 03b16a9dd..000000000 --- a/src/bind/dobinding.cpp +++ /dev/null @@ -1,251 +0,0 @@ -/* - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <jni.h> - -#ifdef __WIN32__ -#include <windows.h> -#else -#include <dlfcn.h> -#include <errno.h> -#endif - -#include "javabind.h" -#include "javabind-private.h" - -#include <dom/dom.h> -#include <dom/domimpl.h> - -namespace Inkscape -{ -namespace Bind -{ - -using namespace org::w3c::dom; - -/** - * This file has the actual C++ --> Java bindings - * This file can get quite large! - */ - -/** - * This struct associates a class name with its native - * bindings. Since C++ does not allow "flexible" arrays, - * we will separate each of the tables into a JNINativeMethod - * array, and a class with a name and a pointer to that array. - */ -typedef struct -{ - const char *className; - JNINativeMethod *methods; -} NativeClass; - -/** - * Although I dislike macros, this one seems reasonable - */ -#define EXCEPTION (getExceptionString(env).c_str()) - -//######################################################################## -//# BASE OBJECT -//######################################################################## - -static jmethodID _getPointer_id = NULL; - -static jlong getPointer(JNIEnv *env, jobject obj) -{ - if (!_getPointer_id) - { - _getPointer_id = env->GetMethodID(env->GetObjectClass(obj), "getPointer", "()J"); - if (!_getPointer_id) - { - err("getPointer(): %s", EXCEPTION); - return 0; - } - } - jlong val = env->CallLongMethod(obj, _getPointer_id); - return val; -} - - -static jmethodID _setPointer_id = NULL; - -static void setPointer(JNIEnv *env, jobject obj, jlong val) -{ - if (!_setPointer_id) - { - _setPointer_id = env->GetMethodID(env->GetObjectClass(obj), "setPointer", "(J)V"); - if (!_setPointer_id) - { - err("setPointer(): %s", EXCEPTION); - return; - } - } - env->CallVoidMethod(obj, _setPointer_id, val); -} - - -static void JNICALL BaseObject_construct (JNIEnv *env, jobject obj) -{ - setPointer(env, obj, 0L); -} - -static void JNICALL BaseObject_destruct (JNIEnv *env, jobject obj) -{ - BaseObject *ptr = reinterpret_cast<BaseObject *>(getPointer(env, obj)); - if (ptr) - { - delete ptr; - } - setPointer(env, obj, 0L); -} - - -static JNINativeMethod nm_BaseObject[] = -{ -{ (char *)"construct", (char *)"()V", (void *)BaseObject_construct }, -{ (char *)"destruct", (char *)"()V", (void *)BaseObject_destruct }, -{ NULL, NULL, NULL } -}; - -static NativeClass nc_BaseObject = -{ - "org/inkscape/cmn/BaseObject", - nm_BaseObject -}; - -//######################################################################## -//# BASE OBJECT -//######################################################################## - -static void JNICALL DOMBase_construct - (JNIEnv *env, jobject obj) -{ - setPointer(env, obj, 0L); -} - -static void JNICALL DOMBase_destruct - (JNIEnv *env, jobject obj) -{ - NodePtr *ptr = reinterpret_cast<NodePtr *>(getPointer(env, obj)); - if (ptr) - { - delete ptr; - } - setPointer(env, obj, 0L); -} - - -static JNINativeMethod nm_DOMBase[] = -{ -{ (char *)"construct", (char *)"()V", (void *)DOMBase_construct }, -{ (char *)"destruct", (char *)"()V", (void *)DOMBase_destruct }, -{ NULL, NULL, NULL } -}; - -static NativeClass nc_DOMBase = -{ - "org/inkscape/dom/DOMBase", - nm_DOMBase -}; - - -//######################################################################## -//# DOMImplementation -//######################################################################## - - -static void JNICALL DOMImplementation_nCreateDocument - (JNIEnv *env, jobject obj) -{ - DOMImplementationImpl domImpl; - DocumentTypePtr docType = domImpl.createDocumentType("", "", ""); - DocumentPtr doc = domImpl.createDocument("", "", docType); - DocumentPtr *ptr = new DocumentPtr(doc); - setPointer(env, obj, (jlong)ptr); -} - - - -static JNINativeMethod nm_DOMImplementation[] = -{ -{ (char *)"construct", (char *)"()V", (void *)DOMImplementation_nCreateDocument }, -{ NULL, NULL, NULL } -}; - -static NativeClass nc_DOMImplementation = -{ - "org/inkscape/dom/DOMImplementation", - nm_DOMImplementation -}; - - - -//######################################################################## -//# MAIN -//######################################################################## - - -/** - * This is a table-of-tables, matching a class name to its - * table of native methods. We can probably think of a cleaner way - * of doing this - */ -static NativeClass *allClasses[] = -{ - &nc_BaseObject, - &nc_DOMBase, - &nc_DOMImplementation, - NULL -}; - - - -bool JavaBinderyImpl::doBinding() -{ - for (NativeClass **nc = allClasses ; *nc ; nc++) - { - bool ret = registerNatives((*nc)->className, (*nc)->methods); - if (!ret) - { - err("Could not bind native methods"); - return false; - } - } - return true; -} - - - - -} // namespace Bind -} // namespace Inkscape - -//######################################################################## -//# E N D O F F I L E -//######################################################################## diff --git a/src/bind/java/org/inkscape/cmn/BaseInterface.java b/src/bind/java/org/inkscape/cmn/BaseInterface.java deleted file mode 100644 index 2cc1228f5..000000000 --- a/src/bind/java/org/inkscape/cmn/BaseInterface.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.cmn; - -/** - * A BaseInterface is not an object of its down, but is owned - * by a parent BaseObject. It has no mapping to a C++ object of - * its own, but is merely the delegate that a BaseObject calls. - * This is how we provide some semblance of multiple inheritance, - * and keep the native method count down. - */ -public class BaseInterface extends BaseObject -{ -BaseObject parent; - - -public void setParent(BaseObject par) -{ - parent = par; -} - -/** - * Overloaded. getPointer() means that -any- java instance rooted on - * either BaseObject or BaseInterface can call getPointer() to get the - * handle to the associated C++ object pointer. The difference is that - * BaseObject holds the actual pointer, while BaseInterface refers to - * its owner BaseObject. - */ -protected long getPointer() -{ - if (parent == null) - return 0L; - else - return parent.getPointer(); -} - -/** - * Since this is an interface, construct() - * means nothing. Nothing must happen - */ -protected void construct() -{ -} - -/** - * Since this is an interface, destruct() - * means nothing. Nothing must happen - */ -protected void destruct() -{ -} - - -/** - * Instances of this "interface" can only exist parasitically attached - * to a BaseObject - */ -public BaseInterface() -{ - setParent(null); -} - -} diff --git a/src/bind/java/org/inkscape/cmn/BaseObject.java b/src/bind/java/org/inkscape/cmn/BaseObject.java deleted file mode 100644 index b2c7aac8f..000000000 --- a/src/bind/java/org/inkscape/cmn/BaseObject.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.cmn; - -/** - * This is the base of all classes which map to a corresponding - * C++ object. The _pointer value is storage for the C++ object's - * pointer. Construct() and destruct() are called for when things - * need to be setup or cleaned up on the C++ side during creation or - * destruction of this object. - * - * @see BaseInterface for how we add multiple inheritance to classes - * which are rooted on this class. - */ -public class BaseObject -{ - -private long _pointer; - -/** - * getPointer() means that -any- java instance rooted on - * either BaseObject or BaseInterface can call getPointer() to get the - * handle to the associated C++ object pointer. The difference is that - * BaseObject holds the actual pointer, while BaseInterface refers to - * its owner BaseObject. - */ -protected long getPointer() -{ - return _pointer; -} - -/** - * sets the pointer to the associated C++ object to a new value - */ -protected void setPointer(long val) -{ - _pointer = val; -} - -protected native void construct(); - -protected native void destruct(); - -protected BaseInterface imbue(BaseInterface intf) -{ - intf.setParent(this); - return intf; -} - - -/** - * Simple constructor - */ -public BaseObject() -{ - construct(); -} - -} diff --git a/src/bind/java/org/inkscape/cmn/Gateway.java b/src/bind/java/org/inkscape/cmn/Gateway.java deleted file mode 100644 index fa70d2b7d..000000000 --- a/src/bind/java/org/inkscape/cmn/Gateway.java +++ /dev/null @@ -1,346 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.cmn; - -import java.util.List; -import java.io.FileReader; -import java.io.PrintStream; -import java.io.OutputStream; -import java.io.IOException; -import javax.swing.JOptionPane; - -//####for xml -//read -import org.w3c.dom.Document; -import java.io.ByteArrayInputStream; -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -//write -import java.io.ByteArrayOutputStream; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.inkscape.script.ScriptConsole; - - - -/** - * Provide a gateway from C to Java, to simplify adding - * interfaces. - */ -public class Gateway -{ -/** - * Pointer back to the BinderyImpl C++ object that launched me - */ -long backPtr; - - -//######################################################################## -//# MESSSAGES -//######################################################################## -void err(String message) -{ - ScriptConsole console = ScriptConsole.getInstance(); - if (console != null) - console.err("Gateway err:" + message); - else - log("Gateway err:" + message); -} - -void msg(String message) -{ - ScriptConsole console = ScriptConsole.getInstance(); - if (console != null) - console.msg("Gateway err:" + message); - else - log("Gateway:" + message); -} - -void trace(String message) -{ - ScriptConsole console = ScriptConsole.getInstance(); - if (console != null) - console.trace("Gateway:" + message); - else - log("Gateway:" + message); -} - - -//######################################################################## -//# U T I L I T Y -//######################################################################## - -/** - * Parse a String to an XML Document - */ -public Document stringToDoc(String xmlStr) -{ - if (xmlStr == null || xmlStr.length()==0) - return null; - Document doc = null; - try - { - DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); - DocumentBuilder parser = factory.newDocumentBuilder(); - doc = parser.parse(new ByteArrayInputStream(xmlStr.getBytes())); - } - catch (java.io.IOException e) - { - err("stringToDoc:" + e); - return null; - } - catch (javax.xml.parsers.ParserConfigurationException e) - { - err("stringToDoc:" + e); - return null; - } - catch (org.xml.sax.SAXException e) - { - err("stringToDoc:" + e); - return null; - } - return doc; -} - - - -/** - * Serialize an XML Document to a string - */ -public String docToString(Document doc) -{ - if (doc == null) - return ""; - String buf = ""; - try - { - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - TransformerFactory factory = TransformerFactory.newInstance(); - Transformer tf = factory.newTransformer(); - tf.transform(new DOMSource(doc), new StreamResult(baos)); - baos.close(); - buf = baos.toString(); - } - catch (java.io.IOException e) - { - err("docToString:" + e); - return null; - } - catch (javax.xml.transform.TransformerConfigurationException e) - { - err("docToString:" + e); - return null; - } - catch (javax.xml.transform.TransformerException e) - { - err("docToString:" + e); - return null; - } - return buf; -} - - -//######################################################################## -//# R E P R (inkscape's xml tree) -//######################################################################## - -private native String documentGet(long backPtr); - -public String documentGet() -{ - return documentGet(backPtr); -} - - -public Document documentGetXml() -{ - String xmlStr = documentGet(); - return stringToDoc(xmlStr); -} - -private native boolean documentSet(long backPtr, String xmlStr); - -public boolean documentSet(String xmlStr) -{ - return documentSet(backPtr, xmlStr); -} - -public boolean documentSetXml(Document doc) -{ - String xmlStr = docToString(doc); - return documentSet(xmlStr); -} - - -//######################################################################## -//# LOGGING STREAM -//######################################################################## - -public native void logWrite(long backptr, int ch); - -class LogStream extends OutputStream -{ - -public void write(int ch) -{ - logWrite(backPtr, ch); -} - -} - -PrintStream log = null; - -/** - * printf-style logging - */ -void log(String fmt, Object... args) -{ - log.printf("Gateway:" + fmt, args); -} - - -//######################################################################## -//# RUN -//######################################################################## - - -/** - * Run a script buffer - * - * @param backPtr pointer back to the C context that called this - * @param lang the scripting language to run - * @param str the script buffer to execute - * @return true if successful, else false - */ -public boolean scriptRun(String lang, String str) -{ - //wrap whole thing in try/catch, since this will - //likely be called from C - try - { - ScriptConsole console = ScriptConsole.getInstance(); - if (console == null) - { - err("ScriptConsole not initialized"); - return false; - } - return console.doRun(lang, str); - } - catch (Exception e) - { - err("run :" + e); - e.printStackTrace(); - return false; - } -} - - -/** - * Run a script file - * - * @param backPtr pointer back to the C context that called this - * @param lang the scripting language to run - * @param fname the script file to execute - * @return true if successful, else false - */ -public boolean scriptRunFile(String lang, String fname) -{ - //wrap whole thing in try/catch, since this will - //likely be called from C - try - { - { - ScriptConsole console = ScriptConsole.getInstance(); - if (console == null) - { - err("ScriptConsole not initialized"); - return false; - } - return console.doRun(lang, fname); - } - } - catch (Exception e) - { - err("scriptRunFile :" + e); - return false; - } -} - - - - - -//######################################################################## -//# C O N S O L E -//######################################################################## - - -public boolean showConsole() -{ - ScriptConsole.getInstance().setVisible(true); - return true; -} - - -//######################################################################## -//# CONSTRUCTOR -//######################################################################## - - - - -/** - * Constructor - * @param backPtr pointer back to the C context that called this - */ -public Gateway(long backPtr) -{ - /** - * Set up the logging stream - */ - log = new PrintStream(new LogStream()); - - //Point back to C++ object - this.backPtr = backPtr; - - _instance = this; -} - -private static Gateway _instance = null; - -public static Gateway getInstance() -{ - return _instance; -} - -} -//######################################################################## -//# E N D O F F I L E -//######################################################################## - - diff --git a/src/bind/java/org/inkscape/cmn/Resource.java b/src/bind/java/org/inkscape/cmn/Resource.java deleted file mode 100644 index 3ad139d8a..000000000 --- a/src/bind/java/org/inkscape/cmn/Resource.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.cmn; - -import java.awt.Image; -import javax.swing.ImageIcon; -import java.net.URL; - - - -/** - * This class will hold various functions for getting a - * resource from the classpath or jarfile - */ -public class Resource -{ - - -public static ImageIcon getIcon(String name) -{ - - String path = "/data/icons/" + name; - URL imgurl = Resource.class.getResource(path); - if (imgurl == null) - { - System.err.println("Icon '" + path + "' not found"); - return null; - } - ImageIcon icon = new ImageIcon(imgurl); - return icon; -} - -public static Image getImage(String name) -{ - - ImageIcon icon = getIcon(name); - if (icon == null) - return null; - return icon.getImage(); -} - - -} - diff --git a/src/bind/java/org/inkscape/dom/AttrImpl.java b/src/bind/java/org/inkscape/dom/AttrImpl.java deleted file mode 100644 index ead12c6c5..000000000 --- a/src/bind/java/org/inkscape/dom/AttrImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.Element; -import org.w3c.dom.TypeInfo; - - -public class AttrImpl - extends NodeImpl - implements org.w3c.dom.Attr -{ - -public native String getName(); - -public native boolean getSpecified(); - -public native String getValue(); - -public native void setValue(String value) - throws DOMException; - -public native Element getOwnerElement(); - -public native TypeInfo getSchemaTypeInfo(); - -public native boolean isId(); - -} diff --git a/src/bind/java/org/inkscape/dom/CDATASectionImpl.java b/src/bind/java/org/inkscape/dom/CDATASectionImpl.java deleted file mode 100644 index 3ac77da54..000000000 --- a/src/bind/java/org/inkscape/dom/CDATASectionImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - - -package org.inkscape.dom; - - -public class CDATASectionImpl - extends TextImpl - implements org.w3c.dom.CDATASection -{ -} diff --git a/src/bind/java/org/inkscape/dom/CharacterDataImpl.java b/src/bind/java/org/inkscape/dom/CharacterDataImpl.java deleted file mode 100644 index 1c540a41c..000000000 --- a/src/bind/java/org/inkscape/dom/CharacterDataImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - - - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - - - - -public class CharacterDataImpl - extends NodeImpl - implements org.w3c.dom.CharacterData -{ - -public native String getData() - throws DOMException; -public native void setData(String data) - throws DOMException; - -public native int getLength(); - -public native String substringData(int offset, - int count) - throws DOMException; - -public native void appendData(String arg) - throws DOMException; - -public native void insertData(int offset, - String arg) - throws DOMException; - -public native void deleteData(int offset, - int count) - throws DOMException; - -public native void replaceData(int offset, - int count, - String arg) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/CommentImpl.java b/src/bind/java/org/inkscape/dom/CommentImpl.java deleted file mode 100644 index 5abe4d14b..000000000 --- a/src/bind/java/org/inkscape/dom/CommentImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - - -package org.inkscape.dom; - - -public class CommentImpl - extends CharacterDataImpl - implements org.w3c.dom.Comment -{ -} diff --git a/src/bind/java/org/inkscape/dom/DOMBase.java b/src/bind/java/org/inkscape/dom/DOMBase.java deleted file mode 100644 index 4ab1409f0..000000000 --- a/src/bind/java/org/inkscape/dom/DOMBase.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.dom; - - - -/** - * This is the base Java class upon which - * all of the DOM classes are rooted - */ -public class DOMBase - extends org.inkscape.cmn.BaseObject -{ - -/** - * @see dobinding.cpp: DOMBase_construct(). - * - * Overloaded from BaseObject so that we can do 'special' construction - */ -protected native void construct(); - -/** - * @see dobinding.cpp: DOMBase_destruct() - * - * Overloaded from BaseObject so that we can do 'special' destruction - */ -protected native void destruct(); - - - -/** - * Overload Object.finalize() so that we - * can perform proper cleanup. - */ -protected void finalize() -{ - destruct(); -} - - -public DOMBase() -{ - construct(); -} - -} -//######################################################################## -//# E N D O F F I L E -//######################################################################## - diff --git a/src/bind/java/org/inkscape/dom/DOMConfigurationImpl.java b/src/bind/java/org/inkscape/dom/DOMConfigurationImpl.java deleted file mode 100644 index 23ed58628..000000000 --- a/src/bind/java/org/inkscape/dom/DOMConfigurationImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; -import org.w3c.dom.DOMStringList; - - - - -public class DOMConfigurationImpl - implements org.w3c.dom.DOMConfiguration -{ - -public native void setParameter(String name, - Object value) - throws DOMException; - -public native Object getParameter(String name) - throws DOMException; - -public native boolean canSetParameter(String name, - Object value); - -public native DOMStringList getParameterNames(); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMErrorHandlerImpl.java b/src/bind/java/org/inkscape/dom/DOMErrorHandlerImpl.java deleted file mode 100644 index 5cdbe2ee9..000000000 --- a/src/bind/java/org/inkscape/dom/DOMErrorHandlerImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class DOMErrorHandlerImpl - implements org.w3c.dom.DOMErrorHandler -{ - -public native boolean handleError(org.w3c.dom.DOMError error); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMErrorImpl.java b/src/bind/java/org/inkscape/dom/DOMErrorImpl.java deleted file mode 100644 index 80cb09b9b..000000000 --- a/src/bind/java/org/inkscape/dom/DOMErrorImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class DOMErrorImpl - implements org.w3c.dom.DOMError -{ - -public native short getSeverity(); - -public native String getMessage(); - -public native String getType(); - -public native Object getRelatedException(); - -public native Object getRelatedData(); - -public native org.w3c.dom.DOMLocator getLocation(); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMImplementationImpl.java b/src/bind/java/org/inkscape/dom/DOMImplementationImpl.java deleted file mode 100644 index 1c4188ed7..000000000 --- a/src/bind/java/org/inkscape/dom/DOMImplementationImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentType; - - - -public class DOMImplementationImpl - implements org.w3c.dom.DOMImplementation -{ - -public native boolean hasFeature(String feature, - String version); - - -public native DocumentType createDocumentType(String qualifiedName, - String publicId, - String systemId) - throws DOMException; - - -public native Document createDocument(String namespaceURI, - String qualifiedName, - DocumentType doctype) - throws DOMException; - - -public native Object getFeature(String feature, - String version); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMImplementationListImpl.java b/src/bind/java/org/inkscape/dom/DOMImplementationListImpl.java deleted file mode 100644 index 35bee53d2..000000000 --- a/src/bind/java/org/inkscape/dom/DOMImplementationListImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMImplementation; - - -public class DOMImplementationListImpl - implements org.w3c.dom.DOMImplementationList -{ - -public native DOMImplementation item(int index); - - -public native int getLength(); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMImplementationSourceImpl.java b/src/bind/java/org/inkscape/dom/DOMImplementationSourceImpl.java deleted file mode 100644 index a2a2a8f26..000000000 --- a/src/bind/java/org/inkscape/dom/DOMImplementationSourceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.DOMImplementationList; - -public class DOMImplementationSourceImpl - implements org.w3c.dom.DOMImplementationSource -{ -public native DOMImplementation getDOMImplementation(String features); - -public native DOMImplementationList getDOMImplementationList(String features); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMLocatorImpl.java b/src/bind/java/org/inkscape/dom/DOMLocatorImpl.java deleted file mode 100644 index c5abe4ca1..000000000 --- a/src/bind/java/org/inkscape/dom/DOMLocatorImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class DOMLocatorImpl - implements org.w3c.dom.DOMLocator -{ - -public native int getLineNumber(); - -public native int getColumnNumber(); - -public native int getByteOffset(); - -public native int getUtf16Offset(); - -public native org.w3c.dom.Node getRelatedNode(); - -public native String getUri(); - -} diff --git a/src/bind/java/org/inkscape/dom/DOMStringListImpl.java b/src/bind/java/org/inkscape/dom/DOMStringListImpl.java deleted file mode 100644 index 91c31c574..000000000 --- a/src/bind/java/org/inkscape/dom/DOMStringListImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - - -public class DOMStringListImpl - implements org.w3c.dom.DOMStringList -{ - -public native String item(int index); - -public native int getLength(); - -public native boolean contains(String str); - -} diff --git a/src/bind/java/org/inkscape/dom/DocumentFragmentImpl.java b/src/bind/java/org/inkscape/dom/DocumentFragmentImpl.java deleted file mode 100644 index 4148f598e..000000000 --- a/src/bind/java/org/inkscape/dom/DocumentFragmentImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class DocumentFragmentImpl - extends NodeImpl - implements org.w3c.dom.DocumentFragment -{ -} diff --git a/src/bind/java/org/inkscape/dom/DocumentImpl.java b/src/bind/java/org/inkscape/dom/DocumentImpl.java deleted file mode 100644 index e381ce573..000000000 --- a/src/bind/java/org/inkscape/dom/DocumentImpl.java +++ /dev/null @@ -1,138 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - - -import org.w3c.dom.Attr; -import org.w3c.dom.CDATASection; -import org.w3c.dom.Comment; -import org.w3c.dom.DocumentFragment; -import org.w3c.dom.DocumentType; -import org.w3c.dom.DOMConfiguration; -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.DOMStringList; -import org.w3c.dom.Element; -import org.w3c.dom.EntityReference; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.ProcessingInstruction; -import org.w3c.dom.Text; - - - -public class DocumentImpl - extends NodeImpl - implements org.w3c.dom.Document -{ - -public native DocumentType getDoctype(); - -public native DOMImplementation getImplementation(); - -public native Element getDocumentElement(); - -public native Element createElement(String tagName) - throws DOMException; - -public native DocumentFragment createDocumentFragment(); - -public native Text createTextNode(String data); - -public native Comment createComment(String data); - -public native CDATASection createCDATASection(String data) - throws DOMException; - -public native ProcessingInstruction createProcessingInstruction(String target, - String data) - throws DOMException; - -public native Attr createAttribute(String name) - throws DOMException; - -public native EntityReference createEntityReference(String name) - throws DOMException; - -public native NodeList getElementsByTagName(String tagname); - -public native Node importNode(Node importedNode, - boolean deep) - throws DOMException; - -public native Element createElementNS(String namespaceURI, - String qualifiedName) - throws DOMException; - -public native Attr createAttributeNS(String namespaceURI, - String qualifiedName) - throws DOMException; - -public native NodeList getElementsByTagNameNS(String namespaceURI, - String localName); - -public native Element getElementById(String elementId); - -public native String getInputEncoding(); - -public native String getXmlEncoding(); - -public native boolean getXmlStandalone(); - -public native void setXmlStandalone(boolean xmlStandalone) - throws DOMException; - -public native String getXmlVersion(); - -public native void setXmlVersion(String xmlVersion) - throws DOMException; - -public native boolean getStrictErrorChecking(); - -public native void setStrictErrorChecking(boolean strictErrorChecking); - -public native String getDocumentURI(); - -public native void setDocumentURI(String documentURI); - -public native Node adoptNode(Node source) - throws DOMException; - -public native DOMConfiguration getDomConfig(); - -public native void normalizeDocument(); - -public native Node renameNode(Node n, - String namespaceURI, - String qualifiedName) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/DocumentTypeImpl.java b/src/bind/java/org/inkscape/dom/DocumentTypeImpl.java deleted file mode 100644 index d3aa13552..000000000 --- a/src/bind/java/org/inkscape/dom/DocumentTypeImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.NamedNodeMap; - - - -public class DocumentTypeImpl - extends NodeImpl - implements org.w3c.dom.DocumentType -{ - -public native String getName(); - -public native NamedNodeMap getEntities(); - -public native NamedNodeMap getNotations(); - -public native String getPublicId(); - -public native String getSystemId(); - -public native String getInternalSubset(); - -} diff --git a/src/bind/java/org/inkscape/dom/ElementImpl.java b/src/bind/java/org/inkscape/dom/ElementImpl.java deleted file mode 100644 index 9040c6ba4..000000000 --- a/src/bind/java/org/inkscape/dom/ElementImpl.java +++ /dev/null @@ -1,111 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Attr; -import org.w3c.dom.NodeList; -import org.w3c.dom.TypeInfo; - - - - -public class ElementImpl - extends NodeImpl - implements org.w3c.dom.Element - -{ - -public native String getTagName(); - -public native String getAttribute(String name); - -public native void setAttribute(String name, - String value) - throws DOMException; - -public native void removeAttribute(String name) - throws DOMException; - -public native Attr getAttributeNode(String name); - -public native Attr setAttributeNode(Attr newAttr) - throws DOMException; - -public native Attr removeAttributeNode(Attr oldAttr) - throws DOMException; - -public native NodeList getElementsByTagName(String name); - -public native String getAttributeNS(String namespaceURI, - String localName) - throws DOMException; - -public native void setAttributeNS(String namespaceURI, - String qualifiedName, - String value) - throws DOMException; - -public native void removeAttributeNS(String namespaceURI, - String localName) - throws DOMException; - -public native Attr getAttributeNodeNS(String namespaceURI, - String localName) - throws DOMException; - -public native Attr setAttributeNodeNS(Attr newAttr) - throws DOMException; - -public native NodeList getElementsByTagNameNS(String namespaceURI, - String localName) - throws DOMException; - -public native boolean hasAttribute(String name); - -public native boolean hasAttributeNS(String namespaceURI, - String localName) - throws DOMException; - -public native TypeInfo getSchemaTypeInfo(); - -public native void setIdAttribute(String name, - boolean isId) - throws DOMException; - -public native void setIdAttributeNS(String namespaceURI, - String localName, - boolean isId) - throws DOMException; - -public native void setIdAttributeNode(Attr idAttr, - boolean isId) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/EntityImpl.java b/src/bind/java/org/inkscape/dom/EntityImpl.java deleted file mode 100644 index 9b86060a6..000000000 --- a/src/bind/java/org/inkscape/dom/EntityImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - - -public class EntityImpl - extends NodeImpl - implements org.w3c.dom.Entity -{ -public native String getPublicId(); - -public native String getSystemId(); - -public native String getNotationName(); - -public native String getInputEncoding(); - -public native String getXmlEncoding(); - -public native String getXmlVersion(); - -} diff --git a/src/bind/java/org/inkscape/dom/EntityReferenceImpl.java b/src/bind/java/org/inkscape/dom/EntityReferenceImpl.java deleted file mode 100644 index 32bbe6d58..000000000 --- a/src/bind/java/org/inkscape/dom/EntityReferenceImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - - -public class EntityReferenceImpl - extends NodeImpl - implements org.w3c.dom.EntityReference -{ -} diff --git a/src/bind/java/org/inkscape/dom/NameListImpl.java b/src/bind/java/org/inkscape/dom/NameListImpl.java deleted file mode 100644 index e6d1f10fe..000000000 --- a/src/bind/java/org/inkscape/dom/NameListImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class NameListImpl - implements org.w3c.dom.NameList -{ -public native String getName(int index); - -public native String getNamespaceURI(int index); - -public native int getLength(); - -public native boolean contains(String str); - -public native boolean containsNS(String namespaceURI, - String name); - -} diff --git a/src/bind/java/org/inkscape/dom/NamedNodeMapImpl.java b/src/bind/java/org/inkscape/dom/NamedNodeMapImpl.java deleted file mode 100644 index 2ee9a7c1e..000000000 --- a/src/bind/java/org/inkscape/dom/NamedNodeMapImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Node; - - - - -public class NamedNodeMapImpl - implements org.w3c.dom.NamedNodeMap -{ - -public native Node getNamedItem(String name); - - -public native Node setNamedItem(Node arg) - throws DOMException; - -public native Node removeNamedItem(String name) - throws DOMException; - -public native Node item(int index); - -public native int getLength(); - -public native Node getNamedItemNS(String namespaceURI, - String localName) - throws DOMException; - -public native Node setNamedItemNS(Node arg) - throws DOMException; - -public native Node removeNamedItemNS(String namespaceURI, - String localName) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/NodeImpl.java b/src/bind/java/org/inkscape/dom/NodeImpl.java deleted file mode 100644 index e6071df42..000000000 --- a/src/bind/java/org/inkscape/dom/NodeImpl.java +++ /dev/null @@ -1,139 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.Document; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.UserDataHandler; - - - - -public class NodeImpl - extends DOMBase - implements org.w3c.dom.Node -{ - -public native String getNodeName(); - -public native String getNodeValue() - throws DOMException; -public native void setNodeValue(String nodeValue) - throws DOMException; - -public native short getNodeType(); - -public native Node getParentNode(); - -public native NodeList getChildNodes(); - -public native Node getFirstChild(); - -public native Node getLastChild(); - -public native Node getPreviousSibling(); - -public native Node getNextSibling(); - -public native NamedNodeMap getAttributes(); - -public native Document getOwnerDocument(); - -public native Node insertBefore(Node newChild, - Node refChild) - throws DOMException; - -public native Node replaceChild(Node newChild, - Node oldChild) - throws DOMException; - -public native Node removeChild(Node oldChild) - throws DOMException; - -public native Node appendChild(Node newChild) - throws DOMException; - -public native boolean hasChildNodes(); - -public native Node cloneNode(boolean deep); - -public native void normalize(); - -public native boolean isSupported(String feature, - String version); - -public native String getNamespaceURI(); - -public native String getPrefix(); - -public native void setPrefix(String prefix) - throws DOMException; - -public native String getLocalName(); - -public native boolean hasAttributes(); - -public native String getBaseURI(); - - -public native short compareDocumentPosition(Node other) - throws DOMException; - - -public native String getTextContent() - throws DOMException; - -public native void setTextContent(String textContent) - throws DOMException; - - -public native boolean isSameNode(Node other); - -public native String lookupPrefix(String namespaceURI); - -public native boolean isDefaultNamespace(String namespaceURI); - -public native String lookupNamespaceURI(String prefix); - -public native boolean isEqualNode(Node arg); - -public native Object getFeature(String feature, - String version); - -public native Object setUserData(String key, - Object data, - UserDataHandler handler); - -public native Object getUserData(String key); - -} diff --git a/src/bind/java/org/inkscape/dom/NodeListImpl.java b/src/bind/java/org/inkscape/dom/NodeListImpl.java deleted file mode 100644 index 14568cc81..000000000 --- a/src/bind/java/org/inkscape/dom/NodeListImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class NodeListImpl - implements org.w3c.dom.NodeList -{ - -public native org.w3c.dom.Node item(int index); - - -public native int getLength(); - -} diff --git a/src/bind/java/org/inkscape/dom/NotationImpl.java b/src/bind/java/org/inkscape/dom/NotationImpl.java deleted file mode 100644 index 326e24f88..000000000 --- a/src/bind/java/org/inkscape/dom/NotationImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class NotationImpl - extends NodeImpl - implements org.w3c.dom.Notation -{ - -public native String getPublicId(); - -public native String getSystemId(); - -} diff --git a/src/bind/java/org/inkscape/dom/ProcessingInstructionImpl.java b/src/bind/java/org/inkscape/dom/ProcessingInstructionImpl.java deleted file mode 100644 index db63fd8c0..000000000 --- a/src/bind/java/org/inkscape/dom/ProcessingInstructionImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - - - -public class ProcessingInstructionImpl - extends NodeImpl - implements org.w3c.dom.ProcessingInstruction -{ - -public native String getTarget(); - -public native String getData(); - -public native void setData(String data) throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/TextImpl.java b/src/bind/java/org/inkscape/dom/TextImpl.java deleted file mode 100644 index 0c0bb79b8..000000000 --- a/src/bind/java/org/inkscape/dom/TextImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.Text; - - - -public class TextImpl - extends CharacterDataImpl - implements org.w3c.dom.Text -{ - -public native Text splitText(int offset) - throws DOMException; - -public native boolean isElementContentWhitespace(); - -public native String getWholeText(); - -public native Text replaceWholeText(String content) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/TypeInfoImpl.java b/src/bind/java/org/inkscape/dom/TypeInfoImpl.java deleted file mode 100644 index d19f5f6db..000000000 --- a/src/bind/java/org/inkscape/dom/TypeInfoImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - - -public class TypeInfoImpl - implements org.w3c.dom.TypeInfo -{ - -public native String getTypeName(); - -public native String getTypeNamespace(); - -public native boolean isDerivedFrom(String typeNamespaceArg, - String typeNameArg, - int derivationMethod); - -} diff --git a/src/bind/java/org/inkscape/dom/UserDataHandlerImpl.java b/src/bind/java/org/inkscape/dom/UserDataHandlerImpl.java deleted file mode 100644 index 98ebeae38..000000000 --- a/src/bind/java/org/inkscape/dom/UserDataHandlerImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/java-binding.html - */ - -package org.inkscape.dom; - -import org.w3c.dom.Node; - - - -public class UserDataHandlerImpl - implements org.w3c.dom.UserDataHandler -{ - -public native void handle(short operation, - String key, - Object data, - Node src, - Node dst); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSS2PropertiesImpl.java b/src/bind/java/org/inkscape/dom/css/CSS2PropertiesImpl.java deleted file mode 100644 index 2b1404da5..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSS2PropertiesImpl.java +++ /dev/null @@ -1,527 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; - - -public class CSS2PropertiesImpl - implements org.w3c.dom.css.CSS2Properties -{ - -public native String getAzimuth(); -public native void setAzimuth(String azimuth) - throws DOMException; - -public native String getBackground(); -public native void setBackground(String background) - throws DOMException; - -public native String getBackgroundAttachment(); -public native void setBackgroundAttachment(String backgroundAttachment) - throws DOMException; - -public native String getBackgroundColor(); -public native void setBackgroundColor(String backgroundColor) - throws DOMException; - -public native String getBackgroundImage(); -public native void setBackgroundImage(String backgroundImage) - throws DOMException; - -public native String getBackgroundPosition(); -public native void setBackgroundPosition(String backgroundPosition) - throws DOMException; - -public native String getBackgroundRepeat(); -public native void setBackgroundRepeat(String backgroundRepeat) - throws DOMException; - -public native String getBorder(); -public native void setBorder(String border) - throws DOMException; - -public native String getBorderCollapse(); -public native void setBorderCollapse(String borderCollapse) - throws DOMException; - -public native String getBorderColor(); -public native void setBorderColor(String borderColor) - throws DOMException; - -public native String getBorderSpacing(); -public native void setBorderSpacing(String borderSpacing) - throws DOMException; - -public native String getBorderStyle(); -public native void setBorderStyle(String borderStyle) - throws DOMException; - -public native String getBorderTop(); -public native void setBorderTop(String borderTop) - throws DOMException; - -public native String getBorderRight(); -public native void setBorderRight(String borderRight) - throws DOMException; - -public native String getBorderBottom(); -public native void setBorderBottom(String borderBottom) - throws DOMException; - -public native String getBorderLeft(); -public native void setBorderLeft(String borderLeft) - throws DOMException; - -public native String getBorderTopColor(); -public native void setBorderTopColor(String borderTopColor) - throws DOMException; - -public native String getBorderRightColor(); -public native void setBorderRightColor(String borderRightColor) - throws DOMException; - -public native String getBorderBottomColor(); -public native void setBorderBottomColor(String borderBottomColor) - throws DOMException; - -public native String getBorderLeftColor(); -public native void setBorderLeftColor(String borderLeftColor) - throws DOMException; - -public native String getBorderTopStyle(); -public native void setBorderTopStyle(String borderTopStyle) - throws DOMException; - -public native String getBorderRightStyle(); -public native void setBorderRightStyle(String borderRightStyle) - throws DOMException; - -public native String getBorderBottomStyle(); -public native void setBorderBottomStyle(String borderBottomStyle) - throws DOMException; - -public native String getBorderLeftStyle(); -public native void setBorderLeftStyle(String borderLeftStyle) - throws DOMException; - -public native String getBorderTopWidth(); -public native void setBorderTopWidth(String borderTopWidth) - throws DOMException; - -public native String getBorderRightWidth(); -public native void setBorderRightWidth(String borderRightWidth) - throws DOMException; - -public native String getBorderBottomWidth(); -public native void setBorderBottomWidth(String borderBottomWidth) - throws DOMException; - -public native String getBorderLeftWidth(); -public native void setBorderLeftWidth(String borderLeftWidth) - throws DOMException; - -public native String getBorderWidth(); -public native void setBorderWidth(String borderWidth) - throws DOMException; - -public native String getBottom(); -public native void setBottom(String bottom) - throws DOMException; - -public native String getCaptionSide(); -public native void setCaptionSide(String captionSide) - throws DOMException; - -public native String getClear(); -public native void setClear(String clear) - throws DOMException; - -public native String getClip(); -public native void setClip(String clip) - throws DOMException; - -public native String getColor(); -public native void setColor(String color) - throws DOMException; - -public native String getContent(); -public native void setContent(String content) - throws DOMException; - -public native String getCounterIncrement(); -public native void setCounterIncrement(String counterIncrement) - throws DOMException; - -public native String getCounterReset(); -public native void setCounterReset(String counterReset) - throws DOMException; - -public native String getCue(); -public native void setCue(String cue) - throws DOMException; - -public native String getCueAfter(); -public native void setCueAfter(String cueAfter) - throws DOMException; - -public native String getCueBefore(); -public native void setCueBefore(String cueBefore) - throws DOMException; - -public native String getCursor(); -public native void setCursor(String cursor) - throws DOMException; - -public native String getDirection(); -public native void setDirection(String direction) - throws DOMException; - -public native String getDisplay(); -public native void setDisplay(String display) - throws DOMException; - -public native String getElevation(); -public native void setElevation(String elevation) - throws DOMException; - -public native String getEmptyCells(); -public native void setEmptyCells(String emptyCells) - throws DOMException; - -public native String getCssFloat(); -public native void setCssFloat(String cssFloat) - throws DOMException; - -public native String getFont(); -public native void setFont(String font) - throws DOMException; - -public native String getFontFamily(); -public native void setFontFamily(String fontFamily) - throws DOMException; - -public native String getFontSize(); -public native void setFontSize(String fontSize) - throws DOMException; - -public native String getFontSizeAdjust(); -public native void setFontSizeAdjust(String fontSizeAdjust) - throws DOMException; - -public native String getFontStretch(); -public native void setFontStretch(String fontStretch) - throws DOMException; - -public native String getFontStyle(); -public native void setFontStyle(String fontStyle) - throws DOMException; - -public native String getFontVariant(); -public native void setFontVariant(String fontVariant) - throws DOMException; - -public native String getFontWeight(); -public native void setFontWeight(String fontWeight) - throws DOMException; - -public native String getHeight(); -public native void setHeight(String height) - throws DOMException; - -public native String getLeft(); -public native void setLeft(String left) - throws DOMException; - -public native String getLetterSpacing(); -public native void setLetterSpacing(String letterSpacing) - throws DOMException; - -public native String getLineHeight(); -public native void setLineHeight(String lineHeight) - throws DOMException; - -public native String getListStyle(); -public native void setListStyle(String listStyle) - throws DOMException; - -public native String getListStyleImage(); -public native void setListStyleImage(String listStyleImage) - throws DOMException; - -public native String getListStylePosition(); -public native void setListStylePosition(String listStylePosition) - throws DOMException; - -public native String getListStyleType(); -public native void setListStyleType(String listStyleType) - throws DOMException; - -public native String getMargin(); -public native void setMargin(String margin) - throws DOMException; - -public native String getMarginTop(); -public native void setMarginTop(String marginTop) - throws DOMException; - -public native String getMarginRight(); -public native void setMarginRight(String marginRight) - throws DOMException; - -public native String getMarginBottom(); -public native void setMarginBottom(String marginBottom) - throws DOMException; - -public native String getMarginLeft(); -public native void setMarginLeft(String marginLeft) - throws DOMException; - -public native String getMarkerOffset(); -public native void setMarkerOffset(String markerOffset) - throws DOMException; - -public native String getMarks(); -public native void setMarks(String marks) - throws DOMException; - -public native String getMaxHeight(); -public native void setMaxHeight(String maxHeight) - throws DOMException; - -public native String getMaxWidth(); -public native void setMaxWidth(String maxWidth) - throws DOMException; - -public native String getMinHeight(); -public native void setMinHeight(String minHeight) - throws DOMException; - -public native String getMinWidth(); -public native void setMinWidth(String minWidth) - throws DOMException; - -public native String getOrphans(); -public native void setOrphans(String orphans) - throws DOMException; - -public native String getOutline(); -public native void setOutline(String outline) - throws DOMException; - -public native String getOutlineColor(); -public native void setOutlineColor(String outlineColor) - throws DOMException; - -public native String getOutlineStyle(); -public native void setOutlineStyle(String outlineStyle) - throws DOMException; - -public native String getOutlineWidth(); -public native void setOutlineWidth(String outlineWidth) - throws DOMException; - -public native String getOverflow(); -public native void setOverflow(String overflow) - throws DOMException; - -public native String getPadding(); -public native void setPadding(String padding) - throws DOMException; - -public native String getPaddingTop(); -public native void setPaddingTop(String paddingTop) - throws DOMException; - -public native String getPaddingRight(); -public native void setPaddingRight(String paddingRight) - throws DOMException; - -public native String getPaddingBottom(); -public native void setPaddingBottom(String paddingBottom) - throws DOMException; - -public native String getPaddingLeft(); -public native void setPaddingLeft(String paddingLeft) - throws DOMException; - -public native String getPage(); -public native void setPage(String page) - throws DOMException; - -public native String getPageBreakAfter(); -public native void setPageBreakAfter(String pageBreakAfter) - throws DOMException; - -public native String getPageBreakBefore(); -public native void setPageBreakBefore(String pageBreakBefore) - throws DOMException; - -public native String getPageBreakInside(); -public native void setPageBreakInside(String pageBreakInside) - throws DOMException; - -public native String getPause(); -public native void setPause(String pause) - throws DOMException; - -public native String getPauseAfter(); -public native void setPauseAfter(String pauseAfter) - throws DOMException; - -public native String getPauseBefore(); -public native void setPauseBefore(String pauseBefore) - throws DOMException; - -public native String getPitch(); -public native void setPitch(String pitch) - throws DOMException; - -public native String getPitchRange(); -public native void setPitchRange(String pitchRange) - throws DOMException; - -public native String getPlayDuring(); -public native void setPlayDuring(String playDuring) - throws DOMException; - -public native String getPosition(); -public native void setPosition(String position) - throws DOMException; - -public native String getQuotes(); -public native void setQuotes(String quotes) - throws DOMException; - -public native String getRichness(); -public native void setRichness(String richness) - throws DOMException; - -public native String getRight(); -public native void setRight(String right) - throws DOMException; - -public native String getSize(); -public native void setSize(String size) - throws DOMException; - -public native String getSpeak(); -public native void setSpeak(String speak) - throws DOMException; - -public native String getSpeakHeader(); -public native void setSpeakHeader(String speakHeader) - throws DOMException; - -public native String getSpeakNumeral(); -public native void setSpeakNumeral(String speakNumeral) - throws DOMException; - -public native String getSpeakPunctuation(); -public native void setSpeakPunctuation(String speakPunctuation) - throws DOMException; - -public native String getSpeechRate(); -public native void setSpeechRate(String speechRate) - throws DOMException; - -public native String getStress(); -public native void setStress(String stress) - throws DOMException; - -public native String getTableLayout(); -public native void setTableLayout(String tableLayout) - throws DOMException; - -public native String getTextAlign(); -public native void setTextAlign(String textAlign) - throws DOMException; - -public native String getTextDecoration(); -public native void setTextDecoration(String textDecoration) - throws DOMException; - -public native String getTextIndent(); -public native void setTextIndent(String textIndent) - throws DOMException; - -public native String getTextShadow(); -public native void setTextShadow(String textShadow) - throws DOMException; - -public native String getTextTransform(); -public native void setTextTransform(String textTransform) - throws DOMException; - -public native String getTop(); -public native void setTop(String top) - throws DOMException; - -public native String getUnicodeBidi(); -public native void setUnicodeBidi(String unicodeBidi) - throws DOMException; - -public native String getVerticalAlign(); -public native void setVerticalAlign(String verticalAlign) - throws DOMException; - -public native String getVisibility(); -public native void setVisibility(String visibility) - throws DOMException; - -public native String getVoiceFamily(); -public native void setVoiceFamily(String voiceFamily) - throws DOMException; - -public native String getVolume(); -public native void setVolume(String volume) - throws DOMException; - -public native String getWhiteSpace(); -public native void setWhiteSpace(String whiteSpace) - throws DOMException; - -public native String getWidows(); -public native void setWidows(String widows) - throws DOMException; - -public native String getWidth(); -public native void setWidth(String width) - throws DOMException; - -public native String getWordSpacing(); -public native void setWordSpacing(String wordSpacing) - throws DOMException; - -public native String getZIndex(); -public native void setZIndex(String zIndex) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSCharsetRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSCharsetRuleImpl.java deleted file mode 100644 index b29173353..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSCharsetRuleImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; - - -public class CSSCharsetRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSCharsetRule -{ - -public native String getEncoding(); -public native void setEncoding(String encoding) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSFontFaceRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSFontFaceRuleImpl.java deleted file mode 100644 index cfa779e27..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSFontFaceRuleImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSStyleDeclaration; - - - -public class CSSFontFaceRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSFontFaceRule -{ - -public native CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSImportRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSImportRuleImpl.java deleted file mode 100644 index 8efb7265f..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSImportRuleImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSStyleSheet; -import org.w3c.dom.stylesheets.MediaList; - - - -public class CSSImportRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSImportRule -{ - -public native String getHref(); - -public native MediaList getMedia(); - -public native CSSStyleSheet getStyleSheet(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSMediaRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSMediaRuleImpl.java deleted file mode 100644 index 0993592ba..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSMediaRuleImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.stylesheets.MediaList; -import org.w3c.dom.css.CSSRuleList; - - -public class CSSMediaRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSMediaRule -{ - -public native MediaList getMedia(); - -public native CSSRuleList getCssRules(); - -public native int insertRule(String rule, - int index) - throws DOMException; - -public native void deleteRule(int index) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSPageRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSPageRuleImpl.java deleted file mode 100644 index 1b7594304..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSPageRuleImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.css.CSSStyleDeclaration; - - -public class CSSPageRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSPageRule -{ - -public native String getSelectorText(); -public native void setSelectorText(String selectorText) - throws DOMException; - -public native CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSPrimitiveValueImpl.java b/src/bind/java/org/inkscape/dom/css/CSSPrimitiveValueImpl.java deleted file mode 100644 index 34abe3ca1..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSPrimitiveValueImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.css.Counter; -import org.w3c.dom.css.RGBColor; -import org.w3c.dom.css.Rect; - - -public class CSSPrimitiveValueImpl - extends CSSValueImpl - implements org.w3c.dom.css.CSSPrimitiveValue -{ - -public native short getPrimitiveType(); - -public native void setFloatValue(short unitType, - float floatValue) - throws DOMException; - -public native float getFloatValue(short unitType) - throws DOMException; - -public native void setStringValue(short stringType, - String stringValue) - throws DOMException; - -public native String getStringValue() - throws DOMException; - -public native Counter getCounterValue() - throws DOMException; - -public native Rect getRectValue() - throws DOMException; - -public native RGBColor getRGBColorValue() - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSRuleImpl.java deleted file mode 100644 index ace49a055..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSRuleImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.css.CSSStyleSheet; -import org.w3c.dom.css.CSSRule; - - -public class CSSRuleImpl - implements org.w3c.dom.css.CSSRule -{ - -public native short getType(); - -public native String getCssText(); -public native void setCssText(String cssText) - throws DOMException; - -public native CSSStyleSheet getParentStyleSheet(); - -public native CSSRule getParentRule(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSRuleListImpl.java b/src/bind/java/org/inkscape/dom/css/CSSRuleListImpl.java deleted file mode 100644 index 9fa2d0535..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSRuleListImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSRule; - - - -public class CSSRuleListImpl - implements org.w3c.dom.css.CSSRuleList -{ - -public native int getLength(); - -public native CSSRule item(int index); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSStyleDeclarationImpl.java b/src/bind/java/org/inkscape/dom/css/CSSStyleDeclarationImpl.java deleted file mode 100644 index 73483f07b..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSStyleDeclarationImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.css.CSSRule; -import org.w3c.dom.css.CSSValue; - - - -public class CSSStyleDeclarationImpl - implements org.w3c.dom.css.CSSStyleDeclaration -{ - -public native String getCssText(); -public native void setCssText(String cssText) - throws DOMException; - -public native String getPropertyValue(String propertyName); - -public native CSSValue getPropertyCSSValue(String propertyName); - -public native String removeProperty(String propertyName) - throws DOMException; - -public native String getPropertyPriority(String propertyName); - -public native void setProperty(String propertyName, - String value, - String priority) - throws DOMException; - -public native int getLength(); - -public native String item(int index); - -public native CSSRule getParentRule(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSStyleRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSStyleRuleImpl.java deleted file mode 100644 index de2d4945e..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSStyleRuleImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.css.CSSStyleDeclaration; - - -public class CSSStyleRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSStyleRule -{ - -public native String getSelectorText(); -public native void setSelectorText(String selectorText) - throws DOMException; - -public native CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSStyleSheetImpl.java b/src/bind/java/org/inkscape/dom/css/CSSStyleSheetImpl.java deleted file mode 100644 index ed14d69c9..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSStyleSheetImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.stylesheets.StyleSheet; -import org.w3c.dom.css.CSSRule; -import org.w3c.dom.css.CSSRuleList; - - -public class CSSStyleSheetImpl - extends org.inkscape.dom.stylesheets.StyleSheetImpl - implements org.w3c.dom.css.CSSStyleSheet -{ - -public native CSSRule getOwnerRule(); - - -public native CSSRuleList getCssRules(); - -public native int insertRule(String rule, - int index) - throws DOMException; - -public native void deleteRule(int index) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSUnknownRuleImpl.java b/src/bind/java/org/inkscape/dom/css/CSSUnknownRuleImpl.java deleted file mode 100644 index d09a73681..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSUnknownRuleImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - - -public class CSSUnknownRuleImpl - extends CSSRuleImpl - implements org.w3c.dom.css.CSSUnknownRule -{ -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSValueImpl.java b/src/bind/java/org/inkscape/dom/css/CSSValueImpl.java deleted file mode 100644 index 6782a95b7..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSValueImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMException; - - -public class CSSValueImpl - implements org.w3c.dom.css.CSSValue -{ - -public native String getCssText(); -public native void setCssText(String cssText) - throws DOMException; - -public native short getCssValueType(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CSSValueListImpl.java b/src/bind/java/org/inkscape/dom/css/CSSValueListImpl.java deleted file mode 100644 index 334afb1c7..000000000 --- a/src/bind/java/org/inkscape/dom/css/CSSValueListImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSValue; - - - -public class CSSValueListImpl - extends CSSValueImpl - implements org.w3c.dom.css.CSSValueList -{ - -public native int getLength(); - -public native CSSValue item(int index); - -} diff --git a/src/bind/java/org/inkscape/dom/css/CounterImpl.java b/src/bind/java/org/inkscape/dom/css/CounterImpl.java deleted file mode 100644 index 1f656b944..000000000 --- a/src/bind/java/org/inkscape/dom/css/CounterImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - - - -public class CounterImpl - implements org.w3c.dom.css.Counter -{ - -public native String getIdentifier(); - -public native String getListStyle(); - -public native String getSeparator(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/DOMImplementationCSSImpl.java b/src/bind/java/org/inkscape/dom/css/DOMImplementationCSSImpl.java deleted file mode 100644 index 16bf7a994..000000000 --- a/src/bind/java/org/inkscape/dom/css/DOMImplementationCSSImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.DOMException; -import org.w3c.dom.css.CSSStyleSheet; - - -public class DOMImplementationCSSImpl - extends - org.inkscape.dom.DOMImplementationImpl - implements org.w3c.dom.css.DOMImplementationCSS -{ - -public native CSSStyleSheet createCSSStyleSheet(String title, - String media) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/css/DocumentCSSImpl.java b/src/bind/java/org/inkscape/dom/css/DocumentCSSImpl.java deleted file mode 100644 index bbbd9c110..000000000 --- a/src/bind/java/org/inkscape/dom/css/DocumentCSSImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.stylesheets.DocumentStyle; -import org.w3c.dom.Element; -import org.w3c.dom.css.CSSStyleDeclaration; - - - -public class DocumentCSSImpl - extends - org.inkscape.dom.stylesheets.DocumentStyleImpl - implements org.w3c.dom.css.DocumentCSS -{ - -public native CSSStyleDeclaration getOverrideStyle(Element elt, - String pseudoElt); - -} diff --git a/src/bind/java/org/inkscape/dom/css/ElementCSSInlineStyleImpl.java b/src/bind/java/org/inkscape/dom/css/ElementCSSInlineStyleImpl.java deleted file mode 100644 index ba36ae487..000000000 --- a/src/bind/java/org/inkscape/dom/css/ElementCSSInlineStyleImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSStyleDeclaration; - - - -public class ElementCSSInlineStyleImpl - implements org.w3c.dom.css.ElementCSSInlineStyle -{ - -public native CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/RGBColorImpl.java b/src/bind/java/org/inkscape/dom/css/RGBColorImpl.java deleted file mode 100644 index 0f4d50b58..000000000 --- a/src/bind/java/org/inkscape/dom/css/RGBColorImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSPrimitiveValue; - - -public class RGBColorImpl - implements org.w3c.dom.css.RGBColor -{ - -public native CSSPrimitiveValue getRed(); - -public native CSSPrimitiveValue getGreen(); - -public native CSSPrimitiveValue getBlue(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/RectImpl.java b/src/bind/java/org/inkscape/dom/css/RectImpl.java deleted file mode 100644 index 1ef0a766a..000000000 --- a/src/bind/java/org/inkscape/dom/css/RectImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - - -package org.inkscape.dom.css; - -import org.w3c.dom.css.CSSPrimitiveValue; - - -public class RectImpl - implements org.w3c.dom.css.Rect -{ - -public native CSSPrimitiveValue getTop(); - -public native CSSPrimitiveValue getRight(); - -public native CSSPrimitiveValue getBottom(); - -public native CSSPrimitiveValue getLeft(); - -} diff --git a/src/bind/java/org/inkscape/dom/css/ViewCSSImpl.java b/src/bind/java/org/inkscape/dom/css/ViewCSSImpl.java deleted file mode 100644 index c52d056b7..000000000 --- a/src/bind/java/org/inkscape/dom/css/ViewCSSImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style - */ - - -package org.inkscape.dom.css; - -import org.w3c.dom.views.AbstractView; -import org.w3c.dom.Element; -import org.w3c.dom.css.CSSStyleDeclaration; - - -public class ViewCSSImpl - extends - org.inkscape.dom.views.AbstractViewImpl - implements org.w3c.dom.css.ViewCSS -{ - -public native CSSStyleDeclaration getComputedStyle(Element elt, - String pseudoElt); - -} diff --git a/src/bind/java/org/inkscape/dom/events/CustomEventImpl.java b/src/bind/java/org/inkscape/dom/events/CustomEventImpl.java deleted file mode 100644 index 3762e57e2..000000000 --- a/src/bind/java/org/inkscape/dom/events/CustomEventImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.events.EventTarget; - - - -public class CustomEventImpl - extends EventImpl - implements org.w3c.dom.events.CustomEvent -{ -public native void setDispatchState(EventTarget target, - short phase); - -public native boolean isPropagationStopped(); - -public native boolean isImmediatePropagationStopped(); - -} diff --git a/src/bind/java/org/inkscape/dom/events/DocumentEventImpl.java b/src/bind/java/org/inkscape/dom/events/DocumentEventImpl.java deleted file mode 100644 index 504427db3..000000000 --- a/src/bind/java/org/inkscape/dom/events/DocumentEventImpl.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.events.Event; - - - -public class DocumentEventImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.events.DocumentEvent -{ - -public native Event createEvent(String eventType) - throws DOMException; -public native boolean canDispatch(String namespaceURI, - String type); - -} diff --git a/src/bind/java/org/inkscape/dom/events/EventImpl.java b/src/bind/java/org/inkscape/dom/events/EventImpl.java deleted file mode 100644 index 858a3e095..000000000 --- a/src/bind/java/org/inkscape/dom/events/EventImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.events.EventTarget; - - - -public class EventImpl - implements org.w3c.dom.events.Event -{ - -public native String getType(); - -public native EventTarget getTarget(); - -public native EventTarget getCurrentTarget(); - -public native short getEventPhase(); - -public native boolean getBubbles(); - -public native boolean getCancelable(); - -public native long getTimeStamp(); - -public native void stopPropagation(); - -public native void preventDefault(); - -public native void initEvent(String eventTypeArg, - boolean canBubbleArg, - boolean cancelableArg); - -public native String getNamespaceURI(); - -public native boolean isCustom(); - -public native void stopImmediatePropagation(); - -public native boolean isDefaultPrevented(); - -public native void initEventNS(String namespaceURIArg, - String eventTypeArg, - boolean canBubbleArg, - boolean cancelableArg); - -} diff --git a/src/bind/java/org/inkscape/dom/events/EventListenerImpl.java b/src/bind/java/org/inkscape/dom/events/EventListenerImpl.java deleted file mode 100644 index 4b680ff86..000000000 --- a/src/bind/java/org/inkscape/dom/events/EventListenerImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.events.Event; - - - -public class EventListenerImpl - implements org.w3c.dom.events.EventListener -{ - -public native void handleEvent(Event evt); - -} diff --git a/src/bind/java/org/inkscape/dom/events/EventTargetImpl.java b/src/bind/java/org/inkscape/dom/events/EventTargetImpl.java deleted file mode 100644 index 34778f03b..000000000 --- a/src/bind/java/org/inkscape/dom/events/EventTargetImpl.java +++ /dev/null @@ -1,71 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; - - - -public class EventTargetImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.events.EventTarget -{ - -public native void addEventListener(String type, - EventListener listener, - boolean useCapture); - -public native void removeEventListener(String type, - EventListener listener, - boolean useCapture); - -public native boolean dispatchEvent(Event evt) - throws EventException; - -public native void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup); - -public native void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture); - -public native boolean willTriggerNS(String namespaceURI, - String type); - -public native boolean hasEventListenerNS(String namespaceURI, - String type); - -} diff --git a/src/bind/java/org/inkscape/dom/events/KeyboardEventImpl.java b/src/bind/java/org/inkscape/dom/events/KeyboardEventImpl.java deleted file mode 100644 index 24f8de968..000000000 --- a/src/bind/java/org/inkscape/dom/events/KeyboardEventImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.views.AbstractView; - - -public class KeyboardEventImpl - extends UIEventImpl - implements org.w3c.dom.events.KeyboardEvent -{ - -public native String getKeyIdentifier(); - -public native int getKeyLocation(); - -public native boolean getCtrlKey(); - -public native boolean getShiftKey(); - -public native boolean getAltKey(); - -public native boolean getMetaKey(); - -public native boolean getModifierState(String keyIdentifierArg); - -public native void initKeyboardEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String keyIdentifierArg, - int keyLocationArg, - String modifiersList); - -public native void initKeyboardEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String keyIdentifierArg, - int keyLocationArg, - String modifiersList); - -} diff --git a/src/bind/java/org/inkscape/dom/events/MouseEventImpl.java b/src/bind/java/org/inkscape/dom/events/MouseEventImpl.java deleted file mode 100644 index 900074643..000000000 --- a/src/bind/java/org/inkscape/dom/events/MouseEventImpl.java +++ /dev/null @@ -1,96 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.views.AbstractView; - -import org.w3c.dom.events.EventTarget; - - - -public class MouseEventImpl - extends UIEventImpl - implements org.w3c.dom.events.MouseEvent -{ - -public native int getScreenX(); - -public native int getScreenY(); - -public native int getClientX(); - -public native int getClientY(); - -public native boolean getCtrlKey(); - -public native boolean getShiftKey(); - -public native boolean getAltKey(); - -public native boolean getMetaKey(); - -public native short getButton(); - -public native EventTarget getRelatedTarget(); - -public native void initMouseEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg, - int screenXArg, - int screenYArg, - int clientXArg, - int clientYArg, - boolean ctrlKeyArg, - boolean altKeyArg, - boolean shiftKeyArg, - boolean metaKeyArg, - short buttonArg, - EventTarget relatedTargetArg); - -public native boolean getModifierState(String keyIdentifierArg); - -public native void initMouseEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg, - int screenXArg, - int screenYArg, - int clientXArg, - int clientYArg, - short buttonArg, - EventTarget relatedTargetArg, - String modifiersList); - -} - - diff --git a/src/bind/java/org/inkscape/dom/events/MutationEventImpl.java b/src/bind/java/org/inkscape/dom/events/MutationEventImpl.java deleted file mode 100644 index df3b9915c..000000000 --- a/src/bind/java/org/inkscape/dom/events/MutationEventImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.Node; - - -public class MutationEventImpl - extends EventImpl - implements org.w3c.dom.events.MutationEvent -{ -public native Node getRelatedNode(); - -public native String getPrevValue(); - -public native String getNewValue(); - -public native String getAttrName(); - -public native short getAttrChange(); - -public native void initMutationEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevValueArg, - String newValueArg, - String attrNameArg, - short attrChangeArg); - -public native void initMutationEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevValueArg, - String newValueArg, - String attrNameArg, - short attrChangeArg); - -} diff --git a/src/bind/java/org/inkscape/dom/events/MutationNameEventImpl.java b/src/bind/java/org/inkscape/dom/events/MutationNameEventImpl.java deleted file mode 100644 index 5ee722bfa..000000000 --- a/src/bind/java/org/inkscape/dom/events/MutationNameEventImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.Node; - - -public class MutationNameEventImpl - extends MutationEventImpl - implements org.w3c.dom.events.MutationNameEvent -{ - -public native String getPrevNamespaceURI(); - -public native String getPrevNodeName(); - -public native void initMutationNameEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevNamespaceURIArg, - String prevNodeNameArg); - -public native void initMutationNameEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevNamespaceURIArg, - String prevNodeNameArg); - -} diff --git a/src/bind/java/org/inkscape/dom/events/TextEventImpl.java b/src/bind/java/org/inkscape/dom/events/TextEventImpl.java deleted file mode 100644 index c62963c53..000000000 --- a/src/bind/java/org/inkscape/dom/events/TextEventImpl.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - - -package org.inkscape.dom.events; - -import org.w3c.dom.views.AbstractView; - - -public class TextEventImpl - extends UIEventImpl - implements org.w3c.dom.events.TextEvent -{ - -public native String getData(); - -public native void initTextEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String dataArg); - -public native void initTextEventNS(String namespaceURI, - String type, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String dataArg); - -} diff --git a/src/bind/java/org/inkscape/dom/events/UIEventImpl.java b/src/bind/java/org/inkscape/dom/events/UIEventImpl.java deleted file mode 100644 index bb66d154f..000000000 --- a/src/bind/java/org/inkscape/dom/events/UIEventImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the Events files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107/java-binding.html - */ - -package org.inkscape.dom.events; - -import org.w3c.dom.views.AbstractView; - - -public class UIEventImpl - extends EventImpl - implements org.w3c.dom.events.UIEvent -{ - -public native AbstractView getView(); - -public native int getDetail(); - -public native void initUIEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg); - -public native void initUIEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg); - -} diff --git a/src/bind/java/org/inkscape/dom/smil/ElementExclusiveTimeContainerImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementExclusiveTimeContainerImpl.java deleted file mode 100644 index bc9ce930e..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementExclusiveTimeContainerImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; -import org.w3c.dom.NodeList; - - -public class ElementExclusiveTimeContainerImpl - extends ElementTimeContainerImpl - implements org.w3c.dom.smil.ElementExclusiveTimeContainer -{ - - -public native String getEndSync(); -public native void setEndSync(String endSync) - throws DOMException; - - -public native NodeList getPausedElements(); - - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementLayoutImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementLayoutImpl.java deleted file mode 100644 index 2dfeacbe7..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementLayoutImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class ElementLayoutImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementLayout -{ - -public native String getTitle(); -public native void setTitle(String title) throws DOMException; -public native String getBackgroundColor(); -public native void setBackgroundColor(String backgroundColor) throws DOMException; -public native int getHeight(); -public native void setHeight(int height) throws DOMException; -public native int getWidth(); -public native void setWidth(int width) throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementParallelTimeContainerImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementParallelTimeContainerImpl.java deleted file mode 100644 index 1feed68dd..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementParallelTimeContainerImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class ElementParallelTimeContainerImpl - extends ElementTimeContainerImpl - implements org.w3c.dom.smil.ElementParallelTimeContainer -{ - -public native String getEndSync(); -public native void setEndSync(String endSync) - throws DOMException; - - -public native float getImplicitDuration(); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementSequentialTimeContainerImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementSequentialTimeContainerImpl.java deleted file mode 100644 index 51a3abd38..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementSequentialTimeContainerImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class ElementSequentialTimeContainerImpl - extends ElementTimeContainerImpl - implements org.w3c.dom.smil.ElementSequentialTimeContainer -{ -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementSyncBehaviorImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementSyncBehaviorImpl.java deleted file mode 100644 index 891895064..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementSyncBehaviorImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class ElementSyncBehaviorImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementSyncBehavior -{ - -public native String getSyncBehavior(); - - -public native float getSyncTolerance(); - - -public native String getDefaultSyncBehavior(); - - -public native float getDefaultSyncTolerance(); - - -public native boolean getSyncMaster(); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTargetAttributesImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTargetAttributesImpl.java deleted file mode 100644 index e406a67e9..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTargetAttributesImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class ElementTargetAttributesImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementTargetAttributes -{ - -public native String getAttributeName(); -public native void setAttributeName(String attributeName); - - -public native short getAttributeType(); -public native void setAttributeType(short attributeType); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTestImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTestImpl.java deleted file mode 100644 index 8ab0c57b5..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTestImpl.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -public class ElementTestImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementTest -{ - -public native int getSystemBitrate(); -public native void setSystemBitrate(int systemBitrate) - throws DOMException; - - -public native boolean getSystemCaptions(); -public native void setSystemCaptions(boolean systemCaptions) - throws DOMException; - - -public native String getSystemLanguage(); -public native void setSystemLanguage(String systemLanguage) - throws DOMException; - - -public native boolean getSystemRequired(); - - -public native boolean getSystemScreenSize(); - - -public native boolean getSystemScreenDepth(); - - -public native String getSystemOverdubOrSubtitle(); -public native void setSystemOverdubOrSubtitle(String systemOverdubOrSubtitle) - throws DOMException; - - -public native boolean getSystemAudioDesc(); -public native void setSystemAudioDesc(boolean systemAudioDesc) - throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTimeContainerImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTimeContainerImpl.java deleted file mode 100644 index 2f4fc4cb2..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTimeContainerImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.NodeList; - - -public class ElementTimeContainerImpl - extends ElementTimeImpl - implements org.w3c.dom.smil.ElementTimeContainer -{ - -public native NodeList getTimeChildren(); -public native NodeList getActiveChildrenAt(float instant); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTimeControlImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTimeControlImpl.java deleted file mode 100644 index e82161139..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTimeControlImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class ElementTimeControlImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementTimeControl -{ -public native boolean beginElement() throws DOMException; -public native boolean endElement() throws DOMException; -public native boolean beginElementAt(float offset) throws DOMException; -public native boolean endElementAt(float offset) throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTimeImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTimeImpl.java deleted file mode 100644 index fd1567033..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTimeImpl.java +++ /dev/null @@ -1,95 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.smil.TimeList; - - - -public class ElementTimeImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementTime -{ - -public native TimeList getBegin(); -public native void setBegin(TimeList begin) - throws DOMException; - - -public native TimeList getEnd(); -public native void setEnd(TimeList end) - throws DOMException; - - -public native float getDur(); -public native void setDur(float dur) - throws DOMException; - - - -public native short getRestart(); -public native void setRestart(short restart) - throws DOMException; - - - -public native short getFill(); -public native void setFill(short fill) - throws DOMException; - - -public native float getRepeatCount(); -public native void setRepeatCount(float repeatCount) - throws DOMException; - - -public native float getRepeatDur(); -public native void setRepeatDur(float repeatDur) - throws DOMException; - - -public native boolean beginElement(); - - -public native boolean endElement(); - - -public native void pauseElement(); - - -public native void resumeElement(); - - -public native void seekElement(float seekTo); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/ElementTimeManipulationImpl.java b/src/bind/java/org/inkscape/dom/smil/ElementTimeManipulationImpl.java deleted file mode 100644 index 89acd6188..000000000 --- a/src/bind/java/org/inkscape/dom/smil/ElementTimeManipulationImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class ElementTimeManipulationImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.smil.ElementTimeManipulation -{ - -public native float getSpeed(); -public native void setSpeed(float speed) - throws DOMException; - - -public native float getAccelerate(); -public native void setAccelerate(float accelerate) - throws DOMException; - - -public native float getDecelerate(); -public native void setDecelerate(float decelerate) - throws DOMException; - - -public native boolean getAutoReverse(); -public native void setAutoReverse(boolean autoReverse) - throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILAnimateColorElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILAnimateColorElementImpl.java deleted file mode 100644 index 028bda1a9..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILAnimateColorElementImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class SMILAnimateColorElementImpl - extends SMILAnimationImpl - implements org.w3c.dom.smil.SMILAnimateColorElement -{ -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILAnimateElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILAnimateElementImpl.java deleted file mode 100644 index 371174d4e..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILAnimateElementImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class SMILAnimateElementImpl - extends SMILAnimationImpl - implements org.w3c.dom.smil.SMILAnimateElement -{ -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILAnimateMotionElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILAnimateMotionElementImpl.java deleted file mode 100644 index b5f9a5a10..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILAnimateMotionElementImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class SMILAnimateMotionElementImpl - extends SMILAnimateElementImpl - implements org.w3c.dom.smil.SMILAnimateMotionElement -{ - -public native String getPath(); -public native void setPath(String path) throws DOMException; - -public native String getOrigin(); -public native void setOrigin(String origin) throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILAnimationImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILAnimationImpl.java deleted file mode 100644 index 46c8feeb3..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILAnimationImpl.java +++ /dev/null @@ -1,153 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.smil.TimeList; - - -public class SMILAnimationImpl - extends SMILElementImpl - //ElementTargetAttributes, - //ElementTime, - //ElementTimeControl - implements org.w3c.dom.smil.SMILAnimation -{ - -public SMILAnimationImpl() -{ - imbue(_ElementTargetAttributes = new ElementTargetAttributesImpl()); - imbue(_ElementTime = new ElementTimeImpl()); - imbue(_ElementTimeControl = new ElementTimeControlImpl()); -} - -//from ElementTargetAttributes -ElementTargetAttributesImpl _ElementTargetAttributes; -public String getAttributeName() - { return _ElementTargetAttributes.getAttributeName(); } -public void setAttributeName(String attributeName) - { _ElementTargetAttributes.setAttributeName(attributeName); } -public short getAttributeType() - { return _ElementTargetAttributes.getAttributeType(); } -public void setAttributeType(short attributeType) - { _ElementTargetAttributes.setAttributeType(attributeType); } -//end ElementTargetAttributes - -//from ElementTime -ElementTimeImpl _ElementTime; -public TimeList getBegin() - { return _ElementTime.getBegin(); } -public void setBegin(TimeList begin) throws DOMException - { _ElementTime.setBegin(begin); } -public TimeList getEnd() - { return _ElementTime.getEnd(); } -public void setEnd(TimeList end) throws DOMException - { _ElementTime.setEnd(end); } -public float getDur() - { return _ElementTime.getDur(); } -public void setDur(float dur) throws DOMException - { _ElementTime.setDur(dur); } -public short getRestart() - { return _ElementTime.getRestart(); } -public void setRestart(short restart) throws DOMException - { _ElementTime.setRestart(restart); } -public short getFill() - { return _ElementTime.getFill(); } -public void setFill(short fill) throws DOMException - { _ElementTime.setFill(fill); } -public float getRepeatCount() - { return _ElementTime.getRepeatCount(); } -public void setRepeatCount(float repeatCount) throws DOMException - { _ElementTime.setRepeatCount(repeatCount); } -public float getRepeatDur() - { return _ElementTime.getRepeatDur(); } -public void setRepeatDur(float repeatDur) throws DOMException - { _ElementTime.setRepeatDur(repeatDur); } -public boolean beginElement() - { return _ElementTime.beginElement(); } -public boolean endElement() - { return _ElementTime.endElement(); } -public void pauseElement() - { _ElementTime.pauseElement(); } -public void resumeElement() - { _ElementTime.resumeElement(); } -public void seekElement(float seekTo) - { _ElementTime.seekElement(seekTo); } -//end ElementTime - - -//from ElementTimeControl -ElementTimeControlImpl _ElementTimeControl; -public boolean beginElementAt(float offset) throws DOMException - { return _ElementTimeControl.beginElementAt(offset); } -public boolean endElementAt(float offset) throws DOMException - { return _ElementTimeControl.endElementAt(offset); } -//end ElementTimeControl - - -public native short getAdditive(); -public native void setAdditive(short additive) - throws DOMException; - - -public native short getAccumulate(); -public native void setAccumulate(short accumulate) - throws DOMException; - -public native short getCalcMode(); -public native void setCalcMode(short calcMode) - throws DOMException; - -public native String getKeySplines(); -public native void setKeySplines(String keySplines) - throws DOMException; - -public native TimeList getKeyTimes(); -public native void setKeyTimes(TimeList keyTimes) - throws DOMException; - -public native String getValues(); -public native void setValues(String values) - throws DOMException; - -public native String getFrom(); -public native void setFrom(String from) - throws DOMException; - -public native String getTo(); -public native void setTo(String to) - throws DOMException; - -public native String getBy(); -public native void setBy(String by) - throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILDocumentImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILDocumentImpl.java deleted file mode 100644 index 15104bf47..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILDocumentImpl.java +++ /dev/null @@ -1,103 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.NodeList; -import org.w3c.dom.smil.TimeList; - - - -public class SMILDocumentImpl - extends org.inkscape.dom.DocumentImpl - //ElementTimeContainer - implements org.w3c.dom.smil.SMILDocument -{ -public SMILDocumentImpl() -{ - imbue(_ElementTimeContainer = new ElementTimeContainerImpl()); - _ElementTime = (ElementTimeImpl)_ElementTimeContainer; -} - - - -//from ElementTimeContainer -ElementTimeContainerImpl _ElementTimeContainer; -public NodeList getTimeChildren() - { return _ElementTimeContainer.getTimeChildren(); } -public NodeList getActiveChildrenAt(float instant) - { return _ElementTimeContainer.getActiveChildrenAt(instant); } -//end ElementTimeContainer - -//from ElementTime -ElementTimeImpl _ElementTime; -public TimeList getBegin() - { return _ElementTime.getBegin(); } -public void setBegin(TimeList begin) throws DOMException - { _ElementTime.setBegin(begin); } -public TimeList getEnd() - { return _ElementTime.getEnd(); } -public void setEnd(TimeList end) throws DOMException - { _ElementTime.setEnd(end); } -public float getDur() - { return _ElementTime.getDur(); } -public void setDur(float dur) throws DOMException - { _ElementTime.setDur(dur); } -public short getRestart() - { return _ElementTime.getRestart(); } -public void setRestart(short restart) throws DOMException - { _ElementTime.setRestart(restart); } -public short getFill() - { return _ElementTime.getFill(); } -public void setFill(short fill) throws DOMException - { _ElementTime.setFill(fill); } -public float getRepeatCount() - { return _ElementTime.getRepeatCount(); } -public void setRepeatCount(float repeatCount) throws DOMException - { _ElementTime.setRepeatCount(repeatCount); } -public float getRepeatDur() - { return _ElementTime.getRepeatDur(); } -public void setRepeatDur(float repeatDur) throws DOMException - { _ElementTime.setRepeatDur(repeatDur); } -public boolean beginElement() - { return _ElementTime.beginElement(); } -public boolean endElement() - { return _ElementTime.endElement(); } -public void pauseElement() - { _ElementTime.pauseElement(); } -public void resumeElement() - { _ElementTime.resumeElement(); } -public void seekElement(float seekTo) - { _ElementTime.seekElement(seekTo); } -//end ElementTime - - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILElementImpl.java deleted file mode 100644 index d69fdf02e..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILElementImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -public class SMILElementImpl - extends org.inkscape.dom.ElementImpl - implements org.w3c.dom.smil.SMILElement -{ - -public native String getId(); -public native void setId(String id) throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILLayoutElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILLayoutElementImpl.java deleted file mode 100644 index 51fc5912a..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILLayoutElementImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class SMILLayoutElementImpl - extends SMILElementImpl - implements org.w3c.dom.smil.SMILLayoutElement -{ - -public native String getType(); - - -public native boolean getResolved(); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILMediaElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILMediaElementImpl.java deleted file mode 100644 index 67e8b032a..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILMediaElementImpl.java +++ /dev/null @@ -1,152 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.smil.TimeList; - - - -public class SMILMediaElementImpl - extends SMILElementImpl - //ElementTime - implements org.w3c.dom.smil.SMILMediaElement -{ -public SMILMediaElementImpl() -{ - imbue(_ElementTime = new ElementTimeImpl()); -} - -//from ElementTime -ElementTimeImpl _ElementTime; -public TimeList getBegin() - { return _ElementTime.getBegin(); } -public void setBegin(TimeList begin) throws DOMException - { _ElementTime.setBegin(begin); } -public TimeList getEnd() - { return _ElementTime.getEnd(); } -public void setEnd(TimeList end) throws DOMException - { _ElementTime.setEnd(end); } -public float getDur() - { return _ElementTime.getDur(); } -public void setDur(float dur) throws DOMException - { _ElementTime.setDur(dur); } -public short getRestart() - { return _ElementTime.getRestart(); } -public void setRestart(short restart) throws DOMException - { _ElementTime.setRestart(restart); } -public short getFill() - { return _ElementTime.getFill(); } -public void setFill(short fill) throws DOMException - { _ElementTime.setFill(fill); } -public float getRepeatCount() - { return _ElementTime.getRepeatCount(); } -public void setRepeatCount(float repeatCount) throws DOMException - { _ElementTime.setRepeatCount(repeatCount); } -public float getRepeatDur() - { return _ElementTime.getRepeatDur(); } -public void setRepeatDur(float repeatDur) throws DOMException - { _ElementTime.setRepeatDur(repeatDur); } -public boolean beginElement() - { return _ElementTime.beginElement(); } -public boolean endElement() - { return _ElementTime.endElement(); } -public void pauseElement() - { _ElementTime.pauseElement(); } -public void resumeElement() - { _ElementTime.resumeElement(); } -public void seekElement(float seekTo) - { _ElementTime.seekElement(seekTo); } -//end ElementTime - - -public native String getAbstractAttr(); -public native void setAbstractAttr(String abstractAttr) - throws DOMException; - - -public native String getAlt(); -public native void setAlt(String alt) - throws DOMException; - -public native String getAuthor(); -public native void setAuthor(String author) - throws DOMException; - -public native String getClipBegin(); -public native void setClipBegin(String clipBegin) - throws DOMException; - -public native String getClipEnd(); -public native void setClipEnd(String clipEnd) - throws DOMException; - -public native String getCopyright(); -public native void setCopyright(String copyright) - throws DOMException; - -public native String getLongdesc(); -public native void setLongdesc(String longdesc) - throws DOMException; - -public native String getPort(); -public native void setPort(String port) - throws DOMException; - -public native String getReadIndex(); -public native void setReadIndex(String readIndex) - throws DOMException; - -public native String getRtpformat(); -public native void setRtpformat(String rtpformat) - throws DOMException; - -public native String getSrc(); -public native void setSrc(String src) - throws DOMException; - -public native String getStripRepeat(); -public native void setStripRepeat(String stripRepeat) - throws DOMException; - -public native String getTitle(); -public native void setTitle(String title) - throws DOMException; - -public native String getTransport(); -public native void setTransport(String transport) - throws DOMException; - -public native String getType(); -public native void setType(String type) - throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILRefElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILRefElementImpl.java deleted file mode 100644 index 1eb3d6a28..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILRefElementImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class SMILRefElementImpl - extends SMILMediaElementImpl - implements org.w3c.dom.smil.SMILRefElement -{ -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILRegionElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILRegionElementImpl.java deleted file mode 100644 index d85cf3d0f..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILRegionElementImpl.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - -public class SMILRegionElementImpl - extends SMILElementImpl - //ElementLayout - implements org.w3c.dom.smil.SMILRegionElement -{ - -public SMILRegionElementImpl() -{ - imbue(_ElementLayout = new ElementLayoutImpl()); -} - -//from ElementLayout -ElementLayoutImpl _ElementLayout; -public String getTitle() - { return _ElementLayout.getTitle(); } -public void setTitle(String title) throws DOMException - { _ElementLayout.setTitle(title); } -public String getBackgroundColor() - { return _ElementLayout.getBackgroundColor(); } -public void setBackgroundColor(String backgroundColor) throws DOMException - { _ElementLayout.setBackgroundColor(backgroundColor); } -public int getHeight() - { return _ElementLayout.getHeight(); } -public void setHeight(int height) throws DOMException - { _ElementLayout.setHeight(height); } -public int getWidth() - { return _ElementLayout.getWidth(); } -public void setWidth(int width) throws DOMException - { _ElementLayout.setWidth(width); } -//end ElementLayout - - -public native String getFit(); -public native void setFit(String fit) throws DOMException; - -public native String getTop(); -public native void setTop(String top) throws DOMException; - -public native int getZIndex(); -public native void setZIndex(int zIndex) throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILRegionInterfaceImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILRegionInterfaceImpl.java deleted file mode 100644 index 1f44f9d1b..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILRegionInterfaceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.smil.SMILRegionElement; - - -public class SMILRegionInterfaceImpl - implements org.w3c.dom.smil.SMILRegionInterface -{ - -public native SMILRegionElement getRegion(); -public native void setRegion(SMILRegionElement region); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILRootLayoutElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILRootLayoutElementImpl.java deleted file mode 100644 index 01def0622..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILRootLayoutElementImpl.java +++ /dev/null @@ -1,67 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - - -public class SMILRootLayoutElementImpl - extends SMILElementImpl - //, ElementLayout - implements org.w3c.dom.smil.SMILRootLayoutElement -{ - -public SMILRootLayoutElementImpl() -{ - imbue(_ElementLayout = new ElementLayoutImpl()); -} - -//from ElementLayout -ElementLayoutImpl _ElementLayout; -public String getTitle() - { return _ElementLayout.getTitle(); } -public void setTitle(String title) throws DOMException - { _ElementLayout.setTitle(title); } -public String getBackgroundColor() - { return _ElementLayout.getBackgroundColor(); } -public void setBackgroundColor(String backgroundColor) throws DOMException - { _ElementLayout.setBackgroundColor(backgroundColor); } -public int getHeight() - { return _ElementLayout.getHeight(); } -public void setHeight(int height) throws DOMException - { _ElementLayout.setHeight(height); } -public int getWidth() - { return _ElementLayout.getWidth(); } -public void setWidth(int width) throws DOMException - { _ElementLayout.setWidth(width); } -//end ElementLayout - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILSetElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILSetElementImpl.java deleted file mode 100644 index fce213000..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILSetElementImpl.java +++ /dev/null @@ -1,122 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.smil.TimeList; - - - -public class SMILSetElementImpl - extends SMILElementImpl - //ElementTimeControl, - //ElementTime, - //ElementTargetAttributes - implements org.w3c.dom.smil.SMILSetElement -{ - -public SMILSetElementImpl() -{ - imbue(_ElementTimeControl = new ElementTimeControlImpl()); - imbue(_ElementTime = new ElementTimeImpl()); - imbue(_ElementTargetAttributes = new ElementTargetAttributesImpl()); -} - - -//from ElementTimeControl -ElementTimeControlImpl _ElementTimeControl; -public boolean beginElementAt(float offset) throws DOMException - { return _ElementTimeControl.beginElementAt(offset); } -public boolean endElementAt(float offset) throws DOMException - { return _ElementTimeControl.endElementAt(offset); } -//end ElementTimeControl - -//from ElementTime -ElementTimeImpl _ElementTime; -public TimeList getBegin() - { return _ElementTime.getBegin(); } -public void setBegin(TimeList begin) throws DOMException - { _ElementTime.setBegin(begin); } -public TimeList getEnd() - { return _ElementTime.getEnd(); } -public void setEnd(TimeList end) throws DOMException - { _ElementTime.setEnd(end); } -public float getDur() - { return _ElementTime.getDur(); } -public void setDur(float dur) throws DOMException - { _ElementTime.setDur(dur); } -public short getRestart() - { return _ElementTime.getRestart(); } -public void setRestart(short restart) throws DOMException - { _ElementTime.setRestart(restart); } -public short getFill() - { return _ElementTime.getFill(); } -public void setFill(short fill) throws DOMException - { _ElementTime.setFill(fill); } -public float getRepeatCount() - { return _ElementTime.getRepeatCount(); } -public void setRepeatCount(float repeatCount) throws DOMException - { _ElementTime.setRepeatCount(repeatCount); } -public float getRepeatDur() - { return _ElementTime.getRepeatDur(); } -public void setRepeatDur(float repeatDur) throws DOMException - { _ElementTime.setRepeatDur(repeatDur); } -public boolean beginElement() - { return _ElementTime.beginElement(); } -public boolean endElement() - { return _ElementTime.endElement(); } -public void pauseElement() - { _ElementTime.pauseElement(); } -public void resumeElement() - { _ElementTime.resumeElement(); } -public void seekElement(float seekTo) - { _ElementTime.seekElement(seekTo); } -//end ElementTime - -//from ElementTargetAttributes -ElementTargetAttributesImpl _ElementTargetAttributes; -public String getAttributeName() - { return _ElementTargetAttributes.getAttributeName(); } -public void setAttributeName(String attributeName) - { _ElementTargetAttributes.setAttributeName(attributeName); } -public short getAttributeType() - { return _ElementTargetAttributes.getAttributeType(); } -public void setAttributeType(short attributeType) - { _ElementTargetAttributes.setAttributeType(attributeType); } -//end ElementTargetAttributes - - - - -public native String getTo(); -public native void setTo(String to); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILSwitchElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILSwitchElementImpl.java deleted file mode 100644 index 78fe093b5..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILSwitchElementImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - - -public class SMILSwitchElementImpl - extends SMILElementImpl - implements org.w3c.dom.smil.SMILSwitchElement -{ - -public native org.w3c.dom.Element getSelectedElement(); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/SMILTopLayoutElementImpl.java b/src/bind/java/org/inkscape/dom/smil/SMILTopLayoutElementImpl.java deleted file mode 100644 index c5982e5b3..000000000 --- a/src/bind/java/org/inkscape/dom/smil/SMILTopLayoutElementImpl.java +++ /dev/null @@ -1,66 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; - - - -public class SMILTopLayoutElementImpl - extends SMILElementImpl - //, ElementLayout - implements org.w3c.dom.smil.SMILTopLayoutElement -{ -public SMILTopLayoutElementImpl() -{ - imbue(_ElementLayout = new ElementLayoutImpl()); -} - -//from ElementLayout -ElementLayoutImpl _ElementLayout; -public String getTitle() - { return _ElementLayout.getTitle(); } -public void setTitle(String title) throws DOMException - { _ElementLayout.setTitle(title); } -public String getBackgroundColor() - { return _ElementLayout.getBackgroundColor(); } -public void setBackgroundColor(String backgroundColor) throws DOMException - { _ElementLayout.setBackgroundColor(backgroundColor); } -public int getHeight() - { return _ElementLayout.getHeight(); } -public void setHeight(int height) throws DOMException - { _ElementLayout.setHeight(height); } -public int getWidth() - { return _ElementLayout.getWidth(); } -public void setWidth(int width) throws DOMException - { _ElementLayout.setWidth(width); } -//end ElementLayout - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/TimeEventImpl.java b/src/bind/java/org/inkscape/dom/smil/TimeEventImpl.java deleted file mode 100644 index 40305a7ba..000000000 --- a/src/bind/java/org/inkscape/dom/smil/TimeEventImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.views.AbstractView; - - - -public class TimeEventImpl - extends org.inkscape.dom.events.EventImpl - implements org.w3c.dom.smil.TimeEvent -{ - -public native AbstractView getView(); - -public native int getDetail(); - -public native void initTimeEvent(String typeArg, - AbstractView viewArg, - int detailArg); - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/TimeImpl.java b/src/bind/java/org/inkscape/dom/smil/TimeImpl.java deleted file mode 100644 index e5c6d5987..000000000 --- a/src/bind/java/org/inkscape/dom/smil/TimeImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Element; - - - -public class TimeImpl - implements org.w3c.dom.smil.Time -{ - -public native boolean getResolved(); - -public native double getResolvedOffset(); - -public native short getTimeType(); - -public native double getOffset(); -public native void setOffset(double offset) - throws DOMException; - -public native Element getBaseElement(); -public native void setBaseElement(Element baseElement) - throws DOMException; - - -public native boolean getBaseBegin(); -public native void setBaseBegin(boolean baseBegin) - throws DOMException; - - -public native String getEvent(); -public native void setEvent(String event) - throws DOMException; - - -public native String getMarker(); -public native void setMarker(String marker) - throws DOMException; - -} - diff --git a/src/bind/java/org/inkscape/dom/smil/TimeListImpl.java b/src/bind/java/org/inkscape/dom/smil/TimeListImpl.java deleted file mode 100644 index 88759e61b..000000000 --- a/src/bind/java/org/inkscape/dom/smil/TimeListImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that the SMIL files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/smil-boston-dom/java-binding.html - */ - -package org.inkscape.dom.smil; - -import org.w3c.dom.smil.Time; - - -public class TimeListImpl - implements org.w3c.dom.smil.TimeList -{ - -public native Time item(int index); - -public native int getLength(); - -} - diff --git a/src/bind/java/org/inkscape/dom/stylesheets/DocumentStyleImpl.java b/src/bind/java/org/inkscape/dom/stylesheets/DocumentStyleImpl.java deleted file mode 100644 index 924e06d4e..000000000 --- a/src/bind/java/org/inkscape/dom/stylesheets/DocumentStyleImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style/ - */ - - -package org.inkscape.dom.stylesheets; - -import org.w3c.dom.stylesheets.StyleSheetList; - - -public class DocumentStyleImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.stylesheets.DocumentStyle -{ - -public native StyleSheetList getStyleSheets(); - -} diff --git a/src/bind/java/org/inkscape/dom/stylesheets/LinkStyleImpl.java b/src/bind/java/org/inkscape/dom/stylesheets/LinkStyleImpl.java deleted file mode 100644 index 8497fbccd..000000000 --- a/src/bind/java/org/inkscape/dom/stylesheets/LinkStyleImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style/ - */ - -package org.inkscape.dom.stylesheets; - -import org.w3c.dom.stylesheets.StyleSheet; - - - -public class LinkStyleImpl - implements org.w3c.dom.stylesheets.LinkStyle -{ - -public native StyleSheet getSheet(); - -} diff --git a/src/bind/java/org/inkscape/dom/stylesheets/MediaListImpl.java b/src/bind/java/org/inkscape/dom/stylesheets/MediaListImpl.java deleted file mode 100644 index 7451dd55d..000000000 --- a/src/bind/java/org/inkscape/dom/stylesheets/MediaListImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style/ - */ - - -package org.inkscape.dom.stylesheets; - -import org.w3c.dom.DOMException; - - -public class MediaListImpl - implements org.w3c.dom.stylesheets.MediaList -{ - -public native String getMediaText(); -public native void setMediaText(String mediaText) - throws DOMException; - -public native int getLength(); - -public native String item(int index); - -public native void deleteMedium(String oldMedium) - throws DOMException; - -public native void appendMedium(String newMedium) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetImpl.java b/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetImpl.java deleted file mode 100644 index 7383fa871..000000000 --- a/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style/ - */ - -package org.inkscape.dom.stylesheets; - -import org.w3c.dom.Node; -import org.w3c.dom.stylesheets.StyleSheet; -import org.w3c.dom.stylesheets.MediaList; - - - -public class StyleSheetImpl - implements org.w3c.dom.stylesheets.StyleSheet -{ - -public native String getType(); - -public native boolean getDisabled(); -public native void setDisabled(boolean disabled); - -public native Node getOwnerNode(); - -public native StyleSheet getParentStyleSheet(); - -public native String getHref(); - -public native String getTitle(); - -public native MediaList getMedia(); - -} diff --git a/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetListImpl.java b/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetListImpl.java deleted file mode 100644 index 11d024948..000000000 --- a/src/bind/java/org/inkscape/dom/stylesheets/StyleSheetListImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these DOM files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/DOM-Level-2-Style/ - */ - - -package org.inkscape.dom.stylesheets; - -import org.w3c.dom.stylesheets.StyleSheet; - -public class StyleSheetListImpl - implements org.w3c.dom.stylesheets.StyleSheetList -{ - -public native int getLength(); - -public native StyleSheet item(int index); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/GetSVGDocumentImpl.java b/src/bind/java/org/inkscape/dom/svg/GetSVGDocumentImpl.java deleted file mode 100644 index afa49fd2f..000000000 --- a/src/bind/java/org/inkscape/dom/svg/GetSVGDocumentImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGDocument; - - -public class GetSVGDocumentImpl - implements org.w3c.dom.svg.GetSVGDocument -{ - -public native SVGDocument getSVGDocument ( ) - throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAElementImpl.java deleted file mode 100644 index 5a2c8986f..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAElementImpl.java +++ /dev/null @@ -1,176 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGAElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGAElement -{ - -public SVGAElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -public native SVGAnimatedString getTarget( ); - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphDefElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphDefElementImpl.java deleted file mode 100644 index a7d7fa013..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphDefElementImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -public class SVGAltGlyphDefElementImpl - extends SVGElementImpl - implements org.w3c.dom.svg.SVGAltGlyphDefElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphElementImpl.java deleted file mode 100644 index a3d8522cb..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphElementImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.*; - - -public class SVGAltGlyphElementImpl - extends - SVGTextPositioningElementImpl - //SVGURIReference - implements org.w3c.dom.svg.SVGAltGlyphElement -{ - -public SVGAltGlyphElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); -} - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - - -public native String getGlyphRef(); -public native void setGlyphRef(String glyphRef) throws DOMException; -public native String getFormat(); -public native void setFormat(String format) throws DOMException; - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphItemElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphItemElementImpl.java deleted file mode 100644 index 6c769576a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAltGlyphItemElementImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -public class SVGAltGlyphItemElementImpl - extends SVGElementImpl - implements org.w3c.dom.svg.SVGAltGlyphItemElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAngleImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAngleImpl.java deleted file mode 100644 index 8c6f385d4..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAngleImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGAngleImpl - implements org.w3c.dom.svg.SVGAngle -{ -public native short getUnitType( ); -public native float getValue( ); -public native void setValue( float value ) - throws DOMException; -public native float getValueInSpecifiedUnits( ); -public native void setValueInSpecifiedUnits( float valueInSpecifiedUnits ) - throws DOMException; -public native String getValueAsString( ); -public native void setValueAsString( String valueAsString ) - throws DOMException; - -public native void newValueSpecifiedUnits ( short unitType, float valueInSpecifiedUnits ); -public native void convertToSpecifiedUnits ( short unitType ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimateColorElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimateColorElementImpl.java deleted file mode 100644 index d8dbeeab0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimateColorElementImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -public class SVGAnimateColorElementImpl - extends SVGAnimationElementImpl - implements org.w3c.dom.svg.SVGAnimateColorElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimateElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimateElementImpl.java deleted file mode 100644 index fb4cf9fe0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimateElementImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -public class SVGAnimateElementImpl - extends SVGAnimationElementImpl - implements org.w3c.dom.svg.SVGAnimateElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimateMotionElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimateMotionElementImpl.java deleted file mode 100644 index 40911bf9d..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimateMotionElementImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -public class SVGAnimateMotionElementImpl - extends SVGAnimationElementImpl - implements org.w3c.dom.svg.SVGAnimateMotionElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimateTransformElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimateTransformElementImpl.java deleted file mode 100644 index 1be3639ac..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimateTransformElementImpl.java +++ /dev/null @@ -1,35 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -public class SVGAnimateTransformElementImpl - extends SVGAnimationElementImpl - implements org.w3c.dom.svg.SVGAnimateTransformElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedAngleImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedAngleImpl.java deleted file mode 100644 index f419f49cc..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedAngleImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAngle; - - - -public class SVGAnimatedAngleImpl - implements org.w3c.dom.svg.SVGAnimatedAngle -{ - -public native SVGAngle getBaseVal( ); -public native SVGAngle getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedBooleanImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedBooleanImpl.java deleted file mode 100644 index 7501e5120..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedBooleanImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGAnimatedBooleanImpl - implements org.w3c.dom.svg.SVGAnimatedBoolean -{ - -public native boolean getBaseVal( ); - -public native void setBaseVal( boolean baseVal ) - throws DOMException; - -public native boolean getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedEnumerationImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedEnumerationImpl.java deleted file mode 100644 index f38118053..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedEnumerationImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGAnimatedEnumerationImpl - implements org.w3c.dom.svg.SVGAnimatedEnumeration -{ - -public native short getBaseVal( ); - -public native void setBaseVal( short baseVal ) - throws DOMException; - -public native short getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedIntegerImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedIntegerImpl.java deleted file mode 100644 index dc6ad43d1..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedIntegerImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGAnimatedIntegerImpl - implements org.w3c.dom.svg.SVGAnimatedInteger -{ - -public native int getBaseVal( ); - -public native void setBaseVal( int baseVal ) - throws DOMException; - -public native int getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthImpl.java deleted file mode 100644 index 44dce05c8..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGLength; - - -public class SVGAnimatedLengthImpl - implements org.w3c.dom.svg.SVGAnimatedLength -{ - -public native SVGLength getBaseVal( ); - -public native SVGLength getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthListImpl.java deleted file mode 100644 index b9ec6059a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedLengthListImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGLengthList; - - -public class SVGAnimatedLengthListImpl - implements org.w3c.dom.svg.SVGAnimatedLengthList -{ - -public native SVGLengthList getBaseVal( ); -public native SVGLengthList getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberImpl.java deleted file mode 100644 index dffbb259c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGAnimatedNumberImpl - implements org.w3c.dom.svg.SVGAnimatedNumber -{ - -public native float getBaseVal( ); - -public native void setBaseVal( float baseVal ) - throws DOMException; - -public native float getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberListImpl.java deleted file mode 100644 index 0862330b0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedNumberListImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGNumberList; - - -public class SVGAnimatedNumberListImpl - implements org.w3c.dom.svg.SVGAnimatedNumberList -{ - -public native SVGNumberList getBaseVal( ); - -public native SVGNumberList getAnimVal( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPathDataImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPathDataImpl.java deleted file mode 100644 index a26e0b5f7..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPathDataImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGPathSegList; - - -public class SVGAnimatedPathDataImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGAnimatedPathData -{ - -public native SVGPathSegList getPathSegList( ); -public native SVGPathSegList getNormalizedPathSegList( ); -public native SVGPathSegList getAnimatedPathSegList( ); -public native SVGPathSegList getAnimatedNormalizedPathSegList( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPointsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPointsImpl.java deleted file mode 100644 index 3b79d667a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPointsImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGPointList; - - -public class SVGAnimatedPointsImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGAnimatedPoints -{ - -public native SVGPointList getPoints( ); -public native SVGPointList getAnimatedPoints( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPreserveAspectRatioImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPreserveAspectRatioImpl.java deleted file mode 100644 index 93d463ca0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedPreserveAspectRatioImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGPreserveAspectRatio; - - -public class SVGAnimatedPreserveAspectRatioImpl - implements org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio -{ -public native SVGPreserveAspectRatio getBaseVal( ); -public native SVGPreserveAspectRatio getAnimVal( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedRectImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedRectImpl.java deleted file mode 100644 index ba2bc09a8..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedRectImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGRect; - -public class SVGAnimatedRectImpl - implements org.w3c.dom.svg.SVGAnimatedRect -{ -public native SVGRect getBaseVal( ); -public native SVGRect getAnimVal( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedStringImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedStringImpl.java deleted file mode 100644 index 4276bcb13..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedStringImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -public class SVGAnimatedStringImpl - implements org.w3c.dom.svg.SVGAnimatedString -{ -public native String getBaseVal( ); -public native void setBaseVal( String baseVal ) - throws DOMException; -public native String getAnimVal( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedTransformListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimatedTransformListImpl.java deleted file mode 100644 index 21a015177..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimatedTransformListImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGTransformList; - - -public class SVGAnimatedTransformListImpl - implements org.w3c.dom.svg.SVGAnimatedTransformList -{ -public native SVGTransformList getBaseVal( ); -public native SVGTransformList getAnimVal( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGAnimationElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGAnimationElementImpl.java deleted file mode 100644 index 8681052fd..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGAnimationElementImpl.java +++ /dev/null @@ -1,132 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.smil.ElementTimeControl; -import org.w3c.dom.svg.*; - -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; - - - -public class SVGAnimationElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGExternalResourcesRequired, - //ElementTimeControl, - //EventTarget - implements org.w3c.dom.svg.SVGAnimationElement -{ - -public SVGAnimationElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_ElementTimeControl = new org.inkscape.dom.smil.ElementTimeControlImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from ElementTimeControl -org.inkscape.dom.smil.ElementTimeControlImpl _ElementTimeControl; -public boolean beginElement() throws DOMException - { return _ElementTimeControl.beginElement(); } -public boolean endElement() throws DOMException - { return _ElementTimeControl.endElement(); } -public boolean beginElementAt(float offset) throws DOMException - { return _ElementTimeControl.beginElementAt(offset); } -public boolean endElementAt(float offset) throws DOMException - { return _ElementTimeControl.endElementAt(offset); } -//end ElementTimeControl - - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -public native SVGElement getTargetElement( ); - -public native float getStartTime ( ); - -public native float getCurrentTime ( ); - -public native float getSimpleDuration ( ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGCSSRuleImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGCSSRuleImpl.java deleted file mode 100644 index d99f6da80..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGCSSRuleImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - - - -public class SVGCSSRuleImpl - extends - org.inkscape.dom.css.CSSRuleImpl - implements org.w3c.dom.svg.SVGCSSRule -{ - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGCircleElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGCircleElementImpl.java deleted file mode 100644 index 4391867b4..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGCircleElementImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; - - -public class SVGCircleElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGCircleElement -{ - -public SVGCircleElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -public native SVGAnimatedLength getCx( ); - -public native SVGAnimatedLength getCy( ); - -public native SVGAnimatedLength getR( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGClipPathElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGClipPathElementImpl.java deleted file mode 100644 index be5dcbbfa..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGClipPathElementImpl.java +++ /dev/null @@ -1,134 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - - -public class SVGClipPathElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //SVGUnitTypes - implements org.w3c.dom.svg.SVGClipPathElement -{ - -public SVGClipPathElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); -} - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - - - - -public native SVGAnimatedEnumeration getClipPathUnits( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGColorImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGColorImpl.java deleted file mode 100644 index 51d11e777..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGColorImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.css.RGBColor; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.svg.SVGICCColor; - -public class SVGColorImpl - extends - org.inkscape.dom.css.CSSValueImpl - implements org.w3c.dom.svg.SVGColor -{ - -public native short getColorType( ); -public native RGBColor getRGBColor( ); -public native SVGICCColor getICCColor( ); - -public native void setRGBColor ( String rgbColor ) - throws SVGException; -public native void setRGBColorICCColor ( String rgbColor, String iccColor ) - throws SVGException; -public native void setColor ( short colorType, String rgbColor, String iccColor ) - throws SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGColorProfileElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGColorProfileElementImpl.java deleted file mode 100644 index 6e9e70a74..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGColorProfileElementImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGAnimatedString; - - - -public class SVGColorProfileElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGRenderingIntent - implements org.w3c.dom.svg.SVGColorProfileElement -{ - -public SVGColorProfileElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); -} - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - - -public native String getLocal( ); -public native void setLocal( String local ) - throws DOMException; - -public native String getName( ); -public native void setName( String name ) - throws DOMException; - -public native short getRenderingIntent( ); -public native void setRenderingIntent( short renderingIntent ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGColorProfileRuleImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGColorProfileRuleImpl.java deleted file mode 100644 index 62b95b219..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGColorProfileRuleImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGColorProfileRuleImpl - extends - SVGCSSRuleImpl - //SVGRenderingIntent - implements org.w3c.dom.svg.SVGColorProfileRule -{ - -public native String getSrc( ); -public native void setSrc( String src ) - throws DOMException; - -public native String getName( ); -public native void setName( String name ) - throws DOMException; - -public native short getRenderingIntent( ); -public native void setRenderingIntent( short renderingIntent ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGComponentTransferFunctionElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGComponentTransferFunctionElementImpl.java deleted file mode 100644 index e257e76c8..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGComponentTransferFunctionElementImpl.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedEnumeration; -import org.w3c.dom.svg.SVGAnimatedNumberList; -import org.w3c.dom.svg.SVGAnimatedNumber; - - -public class SVGComponentTransferFunctionElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGComponentTransferFunctionElement -{ - -public native SVGAnimatedEnumeration getType( ); -public native SVGAnimatedNumberList getTableValues( ); -public native SVGAnimatedNumber getSlope( ); -public native SVGAnimatedNumber getIntercept( ); -public native SVGAnimatedNumber getAmplitude( ); -public native SVGAnimatedNumber getExponent( ); -public native SVGAnimatedNumber getOffset( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGCursorElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGCursorElementImpl.java deleted file mode 100644 index 29ffd4a10..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGCursorElementImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - - -public class SVGCursorElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGTests, - //SVGExternalResourcesRequired - implements org.w3c.dom.svg.SVGCursorElement -{ - -public SVGCursorElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - - - -public native SVGAnimatedLength getX( ); - -public native SVGAnimatedLength getY( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGDefinitionSrcElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGDefinitionSrcElementImpl.java deleted file mode 100644 index bc57aa1c9..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGDefinitionSrcElementImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -public class SVGDefinitionSrcElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGDefinitionSrcElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGDefsElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGDefsElementImpl.java deleted file mode 100644 index b1d23df04..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGDefsElementImpl.java +++ /dev/null @@ -1,165 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGDefsElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGDefsElement -{ -public SVGDefsElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGDescElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGDescElementImpl.java deleted file mode 100644 index 56a510974..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGDescElementImpl.java +++ /dev/null @@ -1,82 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGDescElementImpl - extends - SVGElementImpl - // SVGLangSpace, - // SVGStylable - implements org.w3c.dom.svg.SVGDescElement -{ - -public SVGDescElementImpl() -{ - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGDocumentImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGDocumentImpl.java deleted file mode 100644 index 9ee152446..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGDocumentImpl.java +++ /dev/null @@ -1,65 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Document; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.DocumentEvent; - -import org.w3c.dom.svg.SVGSVGElement; - - -public class SVGDocumentImpl - extends - org.inkscape.dom.DocumentImpl - //DocumentEvent - implements org.w3c.dom.svg.SVGDocument -{ -public SVGDocumentImpl() -{ - imbue(_DocumentEvent = new org.inkscape.dom.events.DocumentEventImpl()); -} - -//from DocumentEvent -org.inkscape.dom.events.DocumentEventImpl _DocumentEvent; -public Event createEvent(String eventType) throws DOMException - { return _DocumentEvent.createEvent(eventType); } -public boolean canDispatch(String namespaceURI, String type) - { return _DocumentEvent.canDispatch(namespaceURI, type); } -//end DocumentEvent - -public native String getTitle( ); -public native String getReferrer( ); -public native String getDomain( ); -public native String getURL( ); -public native SVGSVGElement getRootElement( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGElementImpl.java deleted file mode 100644 index f0f8c3436..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGElementImpl.java +++ /dev/null @@ -1,53 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGElement; -import org.w3c.dom.svg.SVGSVGElement; - - - -public class SVGElementImpl - extends - org.inkscape.dom.ElementImpl - implements org.w3c.dom.svg.SVGElement -{ - -public native String getId( ); -public native void setId( String id ) - throws DOMException; -public native String getXMLbase( ); -public native void setXMLbase( String xmlbase ) - throws DOMException; -public native SVGSVGElement getOwnerSVGElement( ); -public native SVGElement getViewportElement( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceImpl.java deleted file mode 100644 index 2d33de6c2..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGElement; -import org.w3c.dom.svg.SVGUseElement; -import org.w3c.dom.svg.SVGElementInstance; -import org.w3c.dom.svg.SVGElementInstanceList; - - -public class SVGElementInstanceImpl - extends - org.inkscape.dom.events.EventTargetImpl - implements org.w3c.dom.svg.SVGElementInstance -{ - -public native SVGElement getCorrespondingElement( ); -public native SVGUseElement getCorrespondingUseElement( ); -public native SVGElementInstance getParentNode( ); -public native SVGElementInstanceList getChildNodes( ); -public native SVGElementInstance getFirstChild( ); -public native SVGElementInstance getLastChild( ); -public native SVGElementInstance getPreviousSibling( ); -public native SVGElementInstance getNextSibling( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceListImpl.java deleted file mode 100644 index c504701ae..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGElementInstanceListImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGElementInstance; - - -public class SVGElementInstanceListImpl - implements org.w3c.dom.svg.SVGElementInstanceList -{ -public native int getLength( ); - -public native SVGElementInstance item ( int index ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGEllipseElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGEllipseElementImpl.java deleted file mode 100644 index 2e2111649..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGEllipseElementImpl.java +++ /dev/null @@ -1,172 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGEllipseElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGEllipseElement -{ -public SVGEllipseElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - - -public native SVGAnimatedLength getCx( ); - -public native SVGAnimatedLength getCy( ); - -public native SVGAnimatedLength getRx( ); - -public native SVGAnimatedLength getRy( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGEventImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGEventImpl.java deleted file mode 100644 index ab1b4686d..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGEventImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - - - - -public class SVGEventImpl - extends - org.inkscape.dom.events.EventImpl - implements org.w3c.dom.svg.SVGEvent -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGExternalResourcesRequiredImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGExternalResourcesRequiredImpl.java deleted file mode 100644 index 08fac8312..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGExternalResourcesRequiredImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedBoolean; - - -public class SVGExternalResourcesRequiredImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGExternalResourcesRequired -{ - -public native SVGAnimatedBoolean getExternalResourcesRequired( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEBlendElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEBlendElementImpl.java deleted file mode 100644 index a55f2ef49..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEBlendElementImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFEBlendElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEBlendElement -{ -public SVGFEBlendElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedString getIn1(); - -public native SVGAnimatedString getIn2(); - -public native SVGAnimatedEnumeration getMode(); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEColorMatrixElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEColorMatrixElementImpl.java deleted file mode 100644 index 9a68d21ab..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEColorMatrixElementImpl.java +++ /dev/null @@ -1,84 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFEColorMatrixElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEColorMatrixElement -{ -public SVGFEColorMatrixElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedString getIn1( ); - -public native SVGAnimatedEnumeration getType( ); - -public native SVGAnimatedNumberList getValues( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEComponentTransferElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEComponentTransferElementImpl.java deleted file mode 100644 index 8ecf3180c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEComponentTransferElementImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFEComponentTransferElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEComponentTransferElement -{ -public SVGFEComponentTransferElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedString getIn1( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFECompositeElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFECompositeElementImpl.java deleted file mode 100644 index 0b5ca1276..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFECompositeElementImpl.java +++ /dev/null @@ -1,93 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFECompositeElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFECompositeElement -{ -public SVGFECompositeElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - - -public native SVGAnimatedString getIn1( ); - -public native SVGAnimatedString getIn2( ); - -public native SVGAnimatedEnumeration getOperator( ); - -public native SVGAnimatedNumber getK1( ); - -public native SVGAnimatedNumber getK2( ); - -public native SVGAnimatedNumber getK3( ); - -public native SVGAnimatedNumber getK4( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEConvolveMatrixElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEConvolveMatrixElementImpl.java deleted file mode 100644 index 5fc3514b6..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEConvolveMatrixElementImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEConvolveMatrixElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEConvolveMatrixElement -{ -public SVGFEConvolveMatrixElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedInteger getOrderX( ); - -public native SVGAnimatedInteger getOrderY( ); - -public native SVGAnimatedNumberList getKernelMatrix( ); - -public native SVGAnimatedNumber getDivisor( ); - -public native SVGAnimatedNumber getBias( ); - -public native SVGAnimatedInteger getTargetX( ); - -public native SVGAnimatedInteger getTargetY( ); - -public native SVGAnimatedEnumeration getEdgeMode( ); - -public native SVGAnimatedNumber getKernelUnitLengthX( ); - -public native SVGAnimatedNumber getKernelUnitLengthY( ); - -public native SVGAnimatedBoolean getPreserveAlpha( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEDiffuseLightingElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEDiffuseLightingElementImpl.java deleted file mode 100644 index 49c95cbec..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEDiffuseLightingElementImpl.java +++ /dev/null @@ -1,86 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEDiffuseLightingElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEDiffuseLightingElement -{ -public SVGFEDiffuseLightingElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedString getIn1( ); - -public native SVGAnimatedNumber getSurfaceScale( ); - -public native SVGAnimatedNumber getDiffuseConstant( ); - -public native SVGAnimatedNumber getKernelUnitLengthX( ); - -public native SVGAnimatedNumber getKernelUnitLengthY( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEDisplacementMapElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEDisplacementMapElementImpl.java deleted file mode 100644 index 53c3199c3..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEDisplacementMapElementImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEDisplacementMapElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEDisplacementMapElement -{ -public SVGFEDisplacementMapElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedString getIn1( ); -public native SVGAnimatedString getIn2( ); -public native SVGAnimatedNumber getScale( ); -public native SVGAnimatedEnumeration getXChannelSelector( ); -public native SVGAnimatedEnumeration getYChannelSelector( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEDistantLightElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEDistantLightElementImpl.java deleted file mode 100644 index bda6f9f2c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEDistantLightElementImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedNumber; - - -public class SVGFEDistantLightElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFEDistantLightElement -{ - -public native SVGAnimatedNumber getAzimuth( ); -public native SVGAnimatedNumber getElevation( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEFloodElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEFloodElementImpl.java deleted file mode 100644 index 476633c0c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEFloodElementImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFEFloodElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEFloodElement -{ -public SVGFEFloodElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedString getIn1( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncAElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEFuncAElementImpl.java deleted file mode 100644 index 347f2b0de..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncAElementImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - -public class SVGFEFuncAElementImpl - extends - SVGComponentTransferFunctionElementImpl - implements org.w3c.dom.svg.SVGFEFuncAElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncBElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEFuncBElementImpl.java deleted file mode 100644 index 536521c4a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncBElementImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - -public class SVGFEFuncBElementImpl - extends - SVGComponentTransferFunctionElementImpl - implements org.w3c.dom.svg.SVGFEFuncBElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncGElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEFuncGElementImpl.java deleted file mode 100644 index 09e50e137..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncGElementImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - -public class SVGFEFuncGElementImpl - extends - SVGComponentTransferFunctionElementImpl - implements org.w3c.dom.svg.SVGFEFuncGElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncRElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEFuncRElementImpl.java deleted file mode 100644 index 21cf4674e..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEFuncRElementImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - - -public class SVGFEFuncRElementImpl - extends - SVGComponentTransferFunctionElementImpl - implements org.w3c.dom.svg.SVGFEFuncRElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEGaussianBlurElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEGaussianBlurElementImpl.java deleted file mode 100644 index 07c085d35..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEGaussianBlurElementImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEGaussianBlurElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEGaussianBlurElement -{ -public SVGFEGaussianBlurElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - - -public native SVGAnimatedString getIn1( ); - -public native SVGAnimatedNumber getStdDeviationX( ); - -public native SVGAnimatedNumber getStdDeviationY( ); - -public native void setStdDeviation ( float stdDeviationX, float stdDeviationY ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEImageElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEImageElementImpl.java deleted file mode 100644 index 896e96228..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEImageElementImpl.java +++ /dev/null @@ -1,116 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGFEImageElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEImageElement -{ -public SVGFEImageElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEMergeElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEMergeElementImpl.java deleted file mode 100644 index 29e878b69..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEMergeElementImpl.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEMergeElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEMergeElement -{ -public SVGFEMergeElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEMergeNodeElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEMergeNodeElementImpl.java deleted file mode 100644 index 9083d0ae0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEMergeNodeElementImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedString; - - -public class SVGFEMergeNodeElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFEMergeNodeElement -{ - -public native SVGAnimatedString getIn1( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEMorphologyElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEMorphologyElementImpl.java deleted file mode 100644 index 4952375d0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEMorphologyElementImpl.java +++ /dev/null @@ -1,78 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFEMorphologyElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEMorphologyElement -{ -public SVGFEMorphologyElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedString getIn1(); -public native SVGAnimatedEnumeration getOperator(); -public native SVGAnimatedNumber getRadiusX(); -public native SVGAnimatedNumber getRadiusY(); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEOffsetElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEOffsetElementImpl.java deleted file mode 100644 index 86ca46c5b..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEOffsetElementImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFEOffsetElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFEOffsetElement -{ -public SVGFEOffsetElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - -public native SVGAnimatedString getIn1(); - -public native SVGAnimatedNumber getDx(); - -public native SVGAnimatedNumber getDy(); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFEPointLightElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFEPointLightElementImpl.java deleted file mode 100644 index 5da2e6571..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFEPointLightElementImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedNumber; - - -public class SVGFEPointLightElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFEPointLightElement -{ -public native SVGAnimatedNumber getX( ); -public native SVGAnimatedNumber getY( ); -public native SVGAnimatedNumber getZ( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFESpecularLightingElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFESpecularLightingElementImpl.java deleted file mode 100644 index 4d1091497..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFESpecularLightingElementImpl.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFESpecularLightingElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFESpecularLightingElement -{ -public SVGFESpecularLightingElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedString getIn1( ); - -public native SVGAnimatedNumber getSurfaceScale( ); - -public native SVGAnimatedNumber getSpecularConstant( ); - -public native SVGAnimatedNumber getSpecularExponent( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFESpotLightElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFESpotLightElementImpl.java deleted file mode 100644 index 9cd942d59..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFESpotLightElementImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedNumber; - - -public class SVGFESpotLightElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFESpotLightElement -{ -public native SVGAnimatedNumber getX( ); -public native SVGAnimatedNumber getY( ); -public native SVGAnimatedNumber getZ( ); -public native SVGAnimatedNumber getPointsAtX( ); -public native SVGAnimatedNumber getPointsAtY( ); -public native SVGAnimatedNumber getPointsAtZ( ); -public native SVGAnimatedNumber getSpecularExponent( ); -public native SVGAnimatedNumber getLimitingConeAngle( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFETileElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFETileElementImpl.java deleted file mode 100644 index 768f1d7b0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFETileElementImpl.java +++ /dev/null @@ -1,75 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFETileElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFETileElement -{ -public SVGFETileElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedString getIn1( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFETurbulenceElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFETurbulenceElementImpl.java deleted file mode 100644 index 15c206fe7..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFETurbulenceElementImpl.java +++ /dev/null @@ -1,85 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGFETurbulenceElementImpl - extends - SVGElementImpl - //SVGFilterPrimitiveStandardAttributes - implements org.w3c.dom.svg.SVGFETurbulenceElement -{ -public SVGFETurbulenceElementImpl() -{ - imbue(_SVGFilterPrimitiveStandardAttributes = - new SVGFilterPrimitiveStandardAttributesImpl()); -} - -//from SVGFilterPrimitiveStandardAttributes -SVGFilterPrimitiveStandardAttributesImpl _SVGFilterPrimitiveStandardAttributes; -public SVGAnimatedLength getX() - { return _SVGFilterPrimitiveStandardAttributes.getX(); } -public SVGAnimatedLength getY() - { return _SVGFilterPrimitiveStandardAttributes.getY(); } -public SVGAnimatedLength getWidth() - { return _SVGFilterPrimitiveStandardAttributes.getWidth(); } -public SVGAnimatedLength getHeight() - { return _SVGFilterPrimitiveStandardAttributes.getHeight(); } -public SVGAnimatedString getResult() - { return _SVGFilterPrimitiveStandardAttributes.getResult(); } -//end SVGFilterPrimitiveStandardAttributes - -//from SVGStylable (from SVGFilterPrimitiveStandardAttributes) -public SVGAnimatedString getClassName() - { return _SVGFilterPrimitiveStandardAttributes.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGFilterPrimitiveStandardAttributes.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGFilterPrimitiveStandardAttributes.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedNumber getBaseFrequencyX( ); - -public native SVGAnimatedNumber getBaseFrequencyY( ); - -public native SVGAnimatedInteger getNumOctaves( ); - -public native SVGAnimatedNumber getSeed( ); - -public native SVGAnimatedEnumeration getStitchTiles( ); - -public native SVGAnimatedEnumeration getType( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFilterElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFilterElementImpl.java deleted file mode 100644 index d5b36e81e..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFilterElementImpl.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFilterElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGUnitTypes - implements org.w3c.dom.svg.SVGFilterElement -{ -public SVGFilterElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedEnumeration getFilterUnits( ); -public native SVGAnimatedEnumeration getPrimitiveUnits( ); -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native SVGAnimatedInteger getFilterResX( ); -public native SVGAnimatedInteger getFilterResY( ); -public native void setFilterRes ( int filterResX, int filterResY ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFilterPrimitiveStandardAttributesImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFilterPrimitiveStandardAttributesImpl.java deleted file mode 100644 index 1dd6b2ea6..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFilterPrimitiveStandardAttributesImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedLength; -import org.w3c.dom.svg.SVGAnimatedString; - - -public class SVGFilterPrimitiveStandardAttributesImpl - extends - SVGStylableImpl - implements org.w3c.dom.svg.SVGFilterPrimitiveStandardAttributes -{ -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native SVGAnimatedString getResult( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFitToViewBoxImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFitToViewBoxImpl.java deleted file mode 100644 index a319e03bf..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFitToViewBoxImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedRect; -import org.w3c.dom.svg.SVGAnimatedPreserveAspectRatio; - - -public class SVGFitToViewBoxImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGFitToViewBox -{ - -public native SVGAnimatedRect getViewBox( ); -public native SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontElementImpl.java deleted file mode 100644 index 40e55e27c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontElementImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGFontElementImpl - extends - SVGElementImpl - //SVGExternalResourcesRequired, - //SVGStylable - implements org.w3c.dom.svg.SVGFontElement -{ -public SVGFontElementImpl() -{ - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontFaceElementImpl.java deleted file mode 100644 index 3e5da61f5..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceElementImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - -public class SVGFontFaceElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFontFaceElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceFormatElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontFaceFormatElementImpl.java deleted file mode 100644 index 448ffe732..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceFormatElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGFontFaceFormatElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFontFaceFormatElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceNameElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontFaceNameElementImpl.java deleted file mode 100644 index 506e1136f..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceNameElementImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - - -public class SVGFontFaceNameElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFontFaceNameElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceSrcElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontFaceSrcElementImpl.java deleted file mode 100644 index 7f86c9453..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceSrcElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGFontFaceSrcElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFontFaceSrcElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceUriElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGFontFaceUriElementImpl.java deleted file mode 100644 index 228bc4867..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGFontFaceUriElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGFontFaceUriElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGFontFaceUriElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGForeignObjectElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGForeignObjectElementImpl.java deleted file mode 100644 index 63df6409b..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGForeignObjectElementImpl.java +++ /dev/null @@ -1,169 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGForeignObjectElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGForeignObjectElement -{ -public SVGForeignObjectElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - - -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGGElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGGElementImpl.java deleted file mode 100644 index fcc026984..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGGElementImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGGElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGGElement -{ - -public SVGGElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGGlyphElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGGlyphElementImpl.java deleted file mode 100644 index b5dfc9fc0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGGlyphElementImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGGlyphElementImpl - extends - SVGElementImpl - //SVGStylable - implements org.w3c.dom.svg.SVGGlyphElement -{ -public SVGGlyphElementImpl() -{ - imbue(_SVGStylable = new SVGStylableImpl()); -} - - - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGGlyphRefElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGGlyphRefElementImpl.java deleted file mode 100644 index 8f72f4fec..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGGlyphRefElementImpl.java +++ /dev/null @@ -1,90 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGGlyphRefElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGStylable - implements org.w3c.dom.svg.SVGGlyphRefElement -{ -public SVGGlyphRefElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - - -public native String getGlyphRef( ); -public native void setGlyphRef( String glyphRef ) - throws DOMException; -public native String getFormat( ); -public native void setFormat( String format ) - throws DOMException; -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getDx( ); -public native void setDx( float dx ) - throws DOMException; -public native float getDy( ); -public native void setDy( float dy ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGGradientElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGGradientElementImpl.java deleted file mode 100644 index 5d4206901..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGGradientElementImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGGradientElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGUnitTypes - implements org.w3c.dom.svg.SVGGradientElement -{ - -public SVGGradientElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - - -public native SVGAnimatedEnumeration getGradientUnits( ); -public native SVGAnimatedTransformList getGradientTransform( ); -public native SVGAnimatedEnumeration getSpreadMethod( ); -} - - diff --git a/src/bind/java/org/inkscape/dom/svg/SVGHKernElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGHKernElementImpl.java deleted file mode 100644 index d8d303ec1..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGHKernElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGHKernElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGHKernElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGICCColorImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGICCColorImpl.java deleted file mode 100644 index f282df71e..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGICCColorImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGNumberList; - - -public class SVGICCColorImpl - implements org.w3c.dom.svg.SVGICCColor -{ -public native String getColorProfile( ); -public native void setColorProfile( String colorProfile ) - throws DOMException; -public native SVGNumberList getColors( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGImageElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGImageElementImpl.java deleted file mode 100644 index d7f287fd1..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGImageElementImpl.java +++ /dev/null @@ -1,178 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGImageElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGImageElement -{ - -public SVGImageElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLangSpaceImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLangSpaceImpl.java deleted file mode 100644 index 5caed0330..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLangSpaceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGLangSpaceImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGLangSpace -{ -public native String getXMLlang( ); -public native void setXMLlang( String xmllang ) - throws DOMException; -public native String getXMLspace( ); -public native void setXMLspace( String xmlspace ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLengthImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLengthImpl.java deleted file mode 100644 index 7b6bf9f86..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLengthImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGLengthImpl - implements org.w3c.dom.svg.SVGLength -{ -public native short getUnitType( ); -public native float getValue( ); -public native void setValue( float value ) - throws DOMException; -public native float getValueInSpecifiedUnits( ); -public native void setValueInSpecifiedUnits( float valueInSpecifiedUnits ) - throws DOMException; -public native String getValueAsString( ); -public native void setValueAsString( String valueAsString ) - throws DOMException; - -public native void newValueSpecifiedUnits ( short unitType, float valueInSpecifiedUnits ); -public native void convertToSpecifiedUnits ( short unitType ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLengthListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLengthListImpl.java deleted file mode 100644 index 4f0ce4c66..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLengthListImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.svg.SVGLength; - - -public class SVGLengthListImpl - implements org.w3c.dom.svg.SVGLengthList -{ -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native SVGLength initialize ( SVGLength newItem ) - throws DOMException, SVGException; -public native SVGLength getItem ( int index ) - throws DOMException; -public native SVGLength insertItemBefore ( SVGLength newItem, int index ) - throws DOMException, SVGException; -public native SVGLength replaceItem ( SVGLength newItem, int index ) - throws DOMException, SVGException; -public native SVGLength removeItem ( int index ) - throws DOMException; -public native SVGLength appendItem ( SVGLength newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLineElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLineElementImpl.java deleted file mode 100644 index 74a5f7a61..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLineElementImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGLineElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGLineElement -{ - -public SVGLineElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -public native SVGAnimatedLength getX1( ); -public native SVGAnimatedLength getY1( ); -public native SVGAnimatedLength getX2( ); -public native SVGAnimatedLength getY2( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLinearGradientElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLinearGradientElementImpl.java deleted file mode 100644 index 26d3bb8c0..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLinearGradientElementImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedLength; - - -public class SVGLinearGradientElementImpl - extends - SVGGradientElementImpl - implements org.w3c.dom.svg.SVGLinearGradientElement -{ -public native SVGAnimatedLength getX1( ); -public native SVGAnimatedLength getY1( ); -public native SVGAnimatedLength getX2( ); -public native SVGAnimatedLength getY2( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGLocatableImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGLocatableImpl.java deleted file mode 100644 index df9a0d59b..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGLocatableImpl.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.svg.SVGElement; -import org.w3c.dom.svg.SVGRect; -import org.w3c.dom.svg.SVGMatrix; - - -public class SVGLocatableImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGLocatable -{ -public native SVGElement getNearestViewportElement( ); -public native SVGElement getFarthestViewportElement( ); - -public native SVGRect getBBox ( ); -public native SVGMatrix getCTM ( ); -public native SVGMatrix getScreenCTM ( ); -public native SVGMatrix getTransformToElement ( SVGElement element ) - throws SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMPathElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMPathElementImpl.java deleted file mode 100644 index 9d7c1c6ee..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMPathElementImpl.java +++ /dev/null @@ -1,63 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - - -public class SVGMPathElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGExternalResourcesRequired - implements org.w3c.dom.svg.SVGMPathElement -{ - -public SVGMPathElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMarkerElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMarkerElementImpl.java deleted file mode 100644 index 656ae0f17..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMarkerElementImpl.java +++ /dev/null @@ -1,107 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGMarkerElementImpl - extends - SVGElementImpl - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGFitToViewBox - implements org.w3c.dom.svg.SVGMarkerElement -{ - -public SVGMarkerElementImpl() -{ - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); -} - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - - -public native SVGAnimatedLength getRefX( ); -public native SVGAnimatedLength getRefY( ); -public native SVGAnimatedEnumeration getMarkerUnits( ); -public native SVGAnimatedLength getMarkerWidth( ); -public native SVGAnimatedLength getMarkerHeight( ); -public native SVGAnimatedEnumeration getOrientType( ); -public native SVGAnimatedAngle getOrientAngle( ); -public native void setOrientToAuto ( ); -public native void setOrientToAngle ( SVGAngle angle ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMaskElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMaskElementImpl.java deleted file mode 100644 index 507095771..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMaskElementImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGMaskElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGUnitTypes - implements org.w3c.dom.svg.SVGMaskElement -{ - -public SVGMaskElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedEnumeration getMaskUnits( ); -public native SVGAnimatedEnumeration getMaskContentUnits( ); -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMatrixImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMatrixImpl.java deleted file mode 100644 index 65cf6fbfe..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMatrixImpl.java +++ /dev/null @@ -1,72 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.svg.SVGMatrix; - - -public class SVGMatrixImpl - implements org.w3c.dom.svg.SVGMatrix -{ -public native float getA( ); -public native void setA( float a ) - throws DOMException; -public native float getB( ); -public native void setB( float b ) - throws DOMException; -public native float getC( ); -public native void setC( float c ) - throws DOMException; -public native float getD( ); -public native void setD( float d ) - throws DOMException; -public native float getE( ); -public native void setE( float e ) - throws DOMException; -public native float getF( ); -public native void setF( float f ) - throws DOMException; - -public native SVGMatrix multiply ( SVGMatrix secondMatrix ); -public native SVGMatrix inverse ( ) - throws SVGException; -public native SVGMatrix translate ( float x, float y ); -public native SVGMatrix scale ( float scaleFactor ); -public native SVGMatrix scaleNonUniform ( float scaleFactorX, float scaleFactorY ); -public native SVGMatrix rotate ( float angle ); -public native SVGMatrix rotateFromVector ( float x, float y ) - throws SVGException; -public native SVGMatrix flipX ( ); -public native SVGMatrix flipY ( ); -public native SVGMatrix skewX ( float angle ); -public native SVGMatrix skewY ( float angle ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMetadataElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMetadataElementImpl.java deleted file mode 100644 index e0197ee6f..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMetadataElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGMetadataElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGMetadataElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGMissingGlyphElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGMissingGlyphElementImpl.java deleted file mode 100644 index cbb115ee1..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGMissingGlyphElementImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGMissingGlyphElementImpl - extends - SVGElementImpl - //SVGStylable - implements org.w3c.dom.svg.SVGMissingGlyphElement -{ - -public SVGMissingGlyphElementImpl() -{ - imbue(_SVGStylable = new SVGStylableImpl()); -} - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGNumberImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGNumberImpl.java deleted file mode 100644 index 1a0c94ffd..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGNumberImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGNumberImpl - implements org.w3c.dom.svg.SVGNumber -{ -public native float getValue( ); -public native void setValue( float value ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGNumberListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGNumberListImpl.java deleted file mode 100644 index 7e2b0c693..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGNumberListImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.svg.SVGNumber; - - -public class SVGNumberListImpl - implements org.w3c.dom.svg.SVGNumberList -{ - -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native SVGNumber initialize ( SVGNumber newItem ) - throws DOMException, SVGException; -public native SVGNumber getItem ( int index ) - throws DOMException; -public native SVGNumber insertItemBefore ( SVGNumber newItem, int index ) - throws DOMException, SVGException; -public native SVGNumber replaceItem ( SVGNumber newItem, int index ) - throws DOMException, SVGException; -public native SVGNumber removeItem ( int index ) - throws DOMException; -public native SVGNumber appendItem ( SVGNumber newItem ) - throws DOMException, SVGException; - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPaintImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPaintImpl.java deleted file mode 100644 index 7387ae150..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPaintImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.css.RGBColor; -import org.w3c.dom.svg.SVGException; - - - -public class SVGPaintImpl - extends - SVGColorImpl - implements org.w3c.dom.svg.SVGPaint -{ -public native short getPaintType( ); -public native String getUri( ); - -public native void setUri ( String uri ); -public native void setPaint ( short paintType, String uri, - String rgbColor, String iccColor ) - throws SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathElementImpl.java deleted file mode 100644 index 692c13213..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathElementImpl.java +++ /dev/null @@ -1,215 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGPathElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget, - //SVGAnimatedPathData - implements org.w3c.dom.svg.SVGPathElement -{ - -public SVGPathElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); - imbue(_SVGAnimatedPathData = new SVGAnimatedPathDataImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - -//from SVGAnimatedPathData -SVGAnimatedPathDataImpl _SVGAnimatedPathData; -public SVGPathSegList getPathSegList() - { return _SVGAnimatedPathData.getPathSegList(); } -public SVGPathSegList getNormalizedPathSegList() - { return _SVGAnimatedPathData.getNormalizedPathSegList(); } -public SVGPathSegList getAnimatedPathSegList() - { return _SVGAnimatedPathData.getAnimatedPathSegList(); } -public SVGPathSegList getAnimatedNormalizedPathSegList() - { return _SVGAnimatedPathData.getAnimatedNormalizedPathSegList(); } -//end SVGAnimatedPathData - -public native SVGAnimatedNumber getPathLength( ); -public native float getTotalLength ( ); -public native SVGPoint getPointAtLength ( float distance ); -public native int getPathSegAtLength ( float distance ); - -//CREATEs -public native SVGPathSegClosePath createSVGPathSegClosePath ( ); -public native SVGPathSegMovetoAbs createSVGPathSegMovetoAbs ( float x, float y ); -public native SVGPathSegMovetoRel createSVGPathSegMovetoRel ( float x, float y ); -public native SVGPathSegLinetoAbs createSVGPathSegLinetoAbs ( float x, float y ); -public native SVGPathSegLinetoRel createSVGPathSegLinetoRel ( float x, float y ); - -public native SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs ( float x, float y, float x1, float y1, float x2, float y2 ); -public native SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel ( float x, float y, float x1, float y1, float x2, float y2 ); - -public native SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs ( float x, float y, float x1, float y1 ); -public native SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel ( float x, float y, float x1, float y1 ); - -public native SVGPathSegArcAbs createSVGPathSegArcAbs ( float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag ); -public native SVGPathSegArcRel createSVGPathSegArcRel ( float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag ); - -public native SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs ( float x ); -public native SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel ( float x ); - -public native SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs ( float y ); -public native SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel ( float y ); - -public native SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs ( float x, float y, float x2, float y2 ); -public native SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel ( float x, float y, float x2, float y2 ); - -public native SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs ( float x, float y ); -public native SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel ( float x, float y ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcAbsImpl.java deleted file mode 100644 index ebef29a0a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcAbsImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegArcAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegArcAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getR1( ); -public native void setR1( float r1 ) - throws DOMException; -public native float getR2( ); -public native void setR2( float r2 ) - throws DOMException; -public native float getAngle( ); -public native void setAngle( float angle ) - throws DOMException; -public native boolean getLargeArcFlag( ); -public native void setLargeArcFlag( boolean largeArcFlag ) - throws DOMException; -public native boolean getSweepFlag( ); -public native void setSweepFlag( boolean sweepFlag ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcRelImpl.java deleted file mode 100644 index 5d2b15774..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegArcRelImpl.java +++ /dev/null @@ -1,61 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegArcRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegArcRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getR1( ); -public native void setR1( float r1 ) - throws DOMException; -public native float getR2( ); -public native void setR2( float r2 ) - throws DOMException; -public native float getAngle( ); -public native void setAngle( float angle ) - throws DOMException; -public native boolean getLargeArcFlag( ); -public native void setLargeArcFlag( boolean largeArcFlag ) - throws DOMException; -public native boolean getSweepFlag( ); -public native void setSweepFlag( boolean sweepFlag ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegClosePathImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegClosePathImpl.java deleted file mode 100644 index c1615d007..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegClosePathImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGPathSegClosePathImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegClosePath -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicAbsImpl.java deleted file mode 100644 index 2ace254c2..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicAbsImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoCubicAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoCubicAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX1( ); -public native void setX1( float x1 ) - throws DOMException; -public native float getY1( ); -public native void setY1( float y1 ) - throws DOMException; -public native float getX2( ); -public native void setX2( float x2 ) - throws DOMException; -public native float getY2( ); -public native void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicRelImpl.java deleted file mode 100644 index d3bbf140b..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicRelImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoCubicRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoCubicRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX1( ); -public native void setX1( float x1 ) - throws DOMException; -public native float getY1( ); -public native void setY1( float y1 ) - throws DOMException; -public native float getX2( ); -public native void setX2( float x2 ) - throws DOMException; -public native float getY2( ); -public native void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothAbsImpl.java deleted file mode 100644 index 1c1b1328c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothAbsImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoCubicSmoothAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoCubicSmoothAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX2( ); -public native void setX2( float x2 ) - throws DOMException; -public native float getY2( ); -public native void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothRelImpl.java deleted file mode 100644 index 265228bb5..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoCubicSmoothRelImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoCubicSmoothRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoCubicSmoothRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX2( ); -public native void setX2( float x2 ) - throws DOMException; -public native float getY2( ); -public native void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticAbsImpl.java deleted file mode 100644 index bc2b39052..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticAbsImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoQuadraticAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoQuadraticAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX1( ); -public native void setX1( float x1 ) - throws DOMException; -public native float getY1( ); -public native void setY1( float y1 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticRelImpl.java deleted file mode 100644 index 35dd8f927..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticRelImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoQuadraticRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoQuadraticRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getX1( ); -public native void setX1( float x1 ) - throws DOMException; -public native float getY1( ); -public native void setY1( float y1 ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbsImpl.java deleted file mode 100644 index 50f0f4be2..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoQuadraticSmoothAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoQuadraticSmoothAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothRelImpl.java deleted file mode 100644 index c55c706fc..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegCurvetoQuadraticSmoothRelImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegCurvetoQuadraticSmoothRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegCurvetoQuadraticSmoothRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegImpl.java deleted file mode 100644 index 2a57b613c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSeg -{ -public native short getPathSegType( ); -public native String getPathSegTypeAsLetter( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoAbsImpl.java deleted file mode 100644 index c53dc3de3..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoAbsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalAbsImpl.java deleted file mode 100644 index d7e29c87d..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalAbsImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoHorizontalAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoHorizontalAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalRelImpl.java deleted file mode 100644 index 105f321e8..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoHorizontalRelImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoHorizontalRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoHorizontalRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoRelImpl.java deleted file mode 100644 index 1c941a79e..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoRelImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalAbsImpl.java deleted file mode 100644 index ef7e38820..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalAbsImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoVerticalAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoVerticalAbs -{ -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalRelImpl.java deleted file mode 100644 index 22fdf9232..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegLinetoVerticalRelImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegLinetoVerticalRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegLinetoVerticalRel -{ -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegListImpl.java deleted file mode 100644 index 99d10586c..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegListImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; - -import org.w3c.dom.svg.SVGPathSeg; - - -public class SVGPathSegListImpl - implements org.w3c.dom.svg.SVGPathSegList -{ -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native SVGPathSeg initialize ( SVGPathSeg newItem ) - throws DOMException, SVGException; -public native SVGPathSeg getItem ( int index ) - throws DOMException; -public native SVGPathSeg insertItemBefore ( SVGPathSeg newItem, int index ) - throws DOMException, SVGException; -public native SVGPathSeg replaceItem ( SVGPathSeg newItem, int index ) - throws DOMException, SVGException; -public native SVGPathSeg removeItem ( int index ) - throws DOMException; -public native SVGPathSeg appendItem ( SVGPathSeg newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoAbsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoAbsImpl.java deleted file mode 100644 index a2e08dc46..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoAbsImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegMovetoAbsImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegMovetoAbs -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoRelImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoRelImpl.java deleted file mode 100644 index 989925787..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPathSegMovetoRelImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPathSegMovetoRelImpl - extends - SVGPathSegImpl - implements org.w3c.dom.svg.SVGPathSegMovetoRel -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPatternElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPatternElementImpl.java deleted file mode 100644 index 9d8c774fe..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPatternElementImpl.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGPatternElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGFitToViewBox, - //SVGUnitTypes - implements org.w3c.dom.svg.SVGPatternElement -{ - -public SVGPatternElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - - - -public native SVGAnimatedEnumeration getPatternUnits( ); -public native SVGAnimatedEnumeration getPatternContentUnits( ); -public native SVGAnimatedTransformList getPatternTransform( ); -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPointImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPointImpl.java deleted file mode 100644 index 87f806a1b..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPointImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGPoint; -import org.w3c.dom.svg.SVGMatrix; - - -public class SVGPointImpl - implements org.w3c.dom.svg.SVGPoint -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; - -public native SVGPoint matrixTransform ( SVGMatrix matrix ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPointListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPointListImpl.java deleted file mode 100644 index e1ab60265..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPointListImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; -import org.w3c.dom.svg.SVGPoint; - - -public class SVGPointListImpl - implements org.w3c.dom.svg.SVGPointList -{ -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native SVGPoint initialize ( SVGPoint newItem ) - throws DOMException, SVGException; -public native SVGPoint getItem ( int index ) - throws DOMException; -public native SVGPoint insertItemBefore ( SVGPoint newItem, int index ) - throws DOMException, SVGException; -public native SVGPoint replaceItem ( SVGPoint newItem, int index ) - throws DOMException, SVGException; -public native SVGPoint removeItem ( int index ) - throws DOMException; -public native SVGPoint appendItem ( SVGPoint newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPolygonElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPolygonElementImpl.java deleted file mode 100644 index a93eca993..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPolygonElementImpl.java +++ /dev/null @@ -1,177 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGPolygonElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget, - //SVGAnimatedPoints - implements org.w3c.dom.svg.SVGPolygonElement -{ - -public SVGPolygonElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); - imbue(_SVGAnimatedPoints = new SVGAnimatedPointsImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -//from SVGAnimatedPoints -SVGAnimatedPointsImpl _SVGAnimatedPoints; -public SVGPointList getPoints() - { return _SVGAnimatedPoints.getPoints(); } -public SVGPointList getAnimatedPoints() - { return _SVGAnimatedPoints.getAnimatedPoints(); } -//end SVGAnimatedPoints - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPolylineElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPolylineElementImpl.java deleted file mode 100644 index ea017691d..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPolylineElementImpl.java +++ /dev/null @@ -1,175 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGPolylineElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget, - //SVGAnimatedPoints - implements org.w3c.dom.svg.SVGPolylineElement -{ - -public SVGPolylineElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); - imbue(_SVGAnimatedPoints = new SVGAnimatedPointsImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -//from SVGAnimatedPoints -SVGAnimatedPointsImpl _SVGAnimatedPoints; -public SVGPointList getPoints() - { return _SVGAnimatedPoints.getPoints(); } -public SVGPointList getAnimatedPoints() - { return _SVGAnimatedPoints.getAnimatedPoints(); } -//end SVGAnimatedPoints - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGPreserveAspectRatioImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGPreserveAspectRatioImpl.java deleted file mode 100644 index 07d9e26ec..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGPreserveAspectRatioImpl.java +++ /dev/null @@ -1,44 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGPreserveAspectRatioImpl - implements org.w3c.dom.svg.SVGPreserveAspectRatio -{ -public native short getAlign( ); -public native void setAlign( short align ) - throws DOMException; -public native short getMeetOrSlice( ); -public native void setMeetOrSlice( short meetOrSlice ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGRadialGradientElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGRadialGradientElementImpl.java deleted file mode 100644 index 28db7de38..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGRadialGradientElementImpl.java +++ /dev/null @@ -1,46 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedLength; - - -public class SVGRadialGradientElementImpl - extends - SVGGradientElementImpl - implements org.w3c.dom.svg.SVGRadialGradientElement -{ -public native SVGAnimatedLength getCx( ); -public native SVGAnimatedLength getCy( ); -public native SVGAnimatedLength getR( ); -public native SVGAnimatedLength getFx( ); -public native SVGAnimatedLength getFy( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGRectElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGRectElementImpl.java deleted file mode 100644 index e0a3aefc7..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGRectElementImpl.java +++ /dev/null @@ -1,170 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGRectElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGRectElement -{ - -public SVGRectElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native SVGAnimatedLength getRx( ); -public native SVGAnimatedLength getRy( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGRectImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGRectImpl.java deleted file mode 100644 index 9b4b0e762..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGRectImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - - -public class SVGRectImpl - implements org.w3c.dom.svg.SVGRect -{ -public native float getX( ); -public native void setX( float x ) - throws DOMException; -public native float getY( ); -public native void setY( float y ) - throws DOMException; -public native float getWidth( ); -public native void setWidth( float width ) - throws DOMException; -public native float getHeight( ); -public native void setHeight( float height ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGRenderingIntentImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGRenderingIntentImpl.java deleted file mode 100644 index 629a105cb..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGRenderingIntentImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGRenderingIntentImpl - implements org.w3c.dom.svg.SVGRenderingIntent -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGSVGElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGSVGElementImpl.java deleted file mode 100644 index a98db9e07..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGSVGElementImpl.java +++ /dev/null @@ -1,280 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; -import org.w3c.dom.css.RGBColor; - -import org.w3c.dom.views.DocumentView; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; -import org.w3c.dom.events.DocumentEvent; - -import org.w3c.dom.stylesheets.DocumentStyle; -import org.w3c.dom.stylesheets.StyleSheetList; - - - -public class SVGSVGElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGLocatable, - //SVGFitToViewBox, - //SVGZoomAndPan, - //EventTarget, - //DocumentEvent, - //ViewCSS, - //DocumentCSS - implements org.w3c.dom.svg.SVGSVGElement -{ -public SVGSVGElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGLocatable = new SVGLocatableImpl()); - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); - imbue(_SVGZoomAndPan = new SVGZoomAndPanImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); - imbue(_DocumentEvent = new org.inkscape.dom.events.DocumentEventImpl()); - imbue(_ViewCSS = new org.inkscape.dom.css.ViewCSSImpl()); - imbue(_DocumentCSS = new org.inkscape.dom.css.DocumentCSSImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGLocatable -private SVGLocatableImpl _SVGLocatable; -public SVGElement getNearestViewportElement() - { return _SVGLocatable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGLocatable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGLocatable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGLocatable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGLocatable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGLocatable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - -//from SVGZoomAndPan -SVGZoomAndPanImpl _SVGZoomAndPan; -public short getZoomAndPan() - { return _SVGZoomAndPan.getZoomAndPan(); } -public void setZoomAndPan(short zoomAndPan) throws DOMException - { _SVGZoomAndPan.setZoomAndPan(zoomAndPan); } -//end SVGZoomAndPan - - -//from DocumentEvent -org.inkscape.dom.events.DocumentEventImpl _DocumentEvent; -public Event createEvent(String eventType) throws DOMException - { return _DocumentEvent.createEvent(eventType); } -public boolean canDispatch(String namespaceURI, String type) - { return _DocumentEvent.canDispatch(namespaceURI, type); } -//end DocumentEvent - -//from ViewCSS -org.inkscape.dom.css.ViewCSSImpl _ViewCSS; -public CSSStyleDeclaration getComputedStyle(Element elt, String pseudoElt) - { return _ViewCSS.getComputedStyle(elt, pseudoElt); } -//end ViewCSS - -//from AbstractView (from ViewCSS) -public DocumentView getDocument() - { return _ViewCSS.getDocument(); } -//end AbstractView - -//from DocumentCSS -org.inkscape.dom.css.DocumentCSSImpl _DocumentCSS; -public CSSStyleDeclaration getOverrideStyle(Element elt, String pseudoElt) - { return _DocumentCSS.getOverrideStyle(elt, pseudoElt); } -//end DocumentCSS - -//from DocumentStyle (from DocumentCSS) -public StyleSheetList getStyleSheets() - { return _DocumentCSS.getStyleSheets(); } -//end DocumentStyle - - -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native String getContentScriptType( ); -public native void setContentScriptType( String contentScriptType ) - throws DOMException; -public native String getContentStyleType( ); -public native void setContentStyleType( String contentStyleType ) - throws DOMException; -public native SVGRect getViewport( ); -public native float getPixelUnitToMillimeterX( ); -public native float getPixelUnitToMillimeterY( ); -public native float getScreenPixelToMillimeterX( ); -public native float getScreenPixelToMillimeterY( ); -public native boolean getUseCurrentView( ); -public native void setUseCurrentView( boolean useCurrentView ) - throws DOMException; -public native SVGViewSpec getCurrentView( ); -public native float getCurrentScale( ); -public native void setCurrentScale( float currentScale ) - throws DOMException; -public native SVGPoint getCurrentTranslate( ); - -public native int suspendRedraw ( int max_wait_milliseconds ); -public native void unsuspendRedraw ( int suspend_handle_id ) - throws DOMException; -public native void unsuspendRedrawAll ( ); -public native void forceRedraw ( ); -public native void pauseAnimations ( ); -public native void unpauseAnimations ( ); -public native boolean animationsPaused ( ); -public native float getCurrentTime ( ); -public native void setCurrentTime ( float seconds ); -public native NodeList getIntersectionList ( SVGRect rect, SVGElement referenceElement ); -public native NodeList getEnclosureList ( SVGRect rect, SVGElement referenceElement ); -public native boolean checkIntersection ( SVGElement element, SVGRect rect ); -public native boolean checkEnclosure ( SVGElement element, SVGRect rect ); -public native void deselectAll ( ); -public native SVGNumber createSVGNumber ( ); -public native SVGLength createSVGLength ( ); -public native SVGAngle createSVGAngle ( ); -public native SVGPoint createSVGPoint ( ); -public native SVGMatrix createSVGMatrix ( ); -public native SVGRect createSVGRect ( ); -public native SVGTransform createSVGTransform ( ); -public native SVGTransform createSVGTransformFromMatrix ( SVGMatrix matrix ); -public native Element getElementById ( String elementId ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGScriptElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGScriptElementImpl.java deleted file mode 100644 index a211ad345..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGScriptElementImpl.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.*; - - - -public class SVGScriptElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGExternalResourcesRequired - implements org.w3c.dom.svg.SVGScriptElement -{ - -public SVGScriptElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - - -public native String getType( ); -public native void setType( String type ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGSetElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGSetElementImpl.java deleted file mode 100644 index 9187d6104..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGSetElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGSetElementImpl - extends - SVGAnimationElementImpl - implements org.w3c.dom.svg.SVGSetElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGStopElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGStopElementImpl.java deleted file mode 100644 index dee28e3ed..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGStopElementImpl.java +++ /dev/null @@ -1,62 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - -public class SVGStopElementImpl - extends - SVGElementImpl - //SVGStylable - implements org.w3c.dom.svg.SVGStopElement -{ - -public SVGStopElementImpl() -{ - imbue(_SVGStylable = new SVGStylableImpl()); -} - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -public native SVGAnimatedNumber getOffset( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGStringListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGStringListImpl.java deleted file mode 100644 index cb352d9c9..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGStringListImpl.java +++ /dev/null @@ -1,56 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; - - - -public class SVGStringListImpl - implements org.w3c.dom.svg.SVGStringList -{ -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native String initialize ( String newItem ) - throws DOMException, SVGException; -public native String getItem ( int index ) - throws DOMException; -public native String insertItemBefore ( String newItem, int index ) - throws DOMException, SVGException; -public native String replaceItem ( String newItem, int index ) - throws DOMException, SVGException; -public native String removeItem ( int index ) - throws DOMException; -public native String appendItem ( String newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGStylableImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGStylableImpl.java deleted file mode 100644 index 7523d456d..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGStylableImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; -import org.w3c.dom.svg.SVGAnimatedString; - -public class SVGStylableImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGStylable -{ - -public native SVGAnimatedString getClassName( ); -public native CSSStyleDeclaration getStyle( ); -public native CSSValue getPresentationAttribute ( String name ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGStyleElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGStyleElementImpl.java deleted file mode 100644 index 8b7408434..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGStyleElementImpl.java +++ /dev/null @@ -1,52 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGStyleElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGStyleElement -{ -public native String getXMLspace( ); -public native void setXMLspace( String xmlspace ) - throws DOMException; -public native String getType( ); -public native void setType( String type ) - throws DOMException; -public native String getMedia( ); -public native void setMedia( String media ) - throws DOMException; -public native String getTitle( ); -public native void setTitle( String title ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGSwitchElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGSwitchElementImpl.java deleted file mode 100644 index fa74caf70..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGSwitchElementImpl.java +++ /dev/null @@ -1,166 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGSwitchElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGSwitchElement -{ - -public SVGSwitchElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -} - diff --git a/src/bind/java/org/inkscape/dom/svg/SVGSymbolElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGSymbolElementImpl.java deleted file mode 100644 index 5fded7c3a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGSymbolElementImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - - -public class SVGSymbolElementImpl - extends - SVGElementImpl - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGFitToViewBox, - //EventTarget - implements org.w3c.dom.svg.SVGSymbolElement -{ - -public SVGSymbolElementImpl() -{ - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTRefElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTRefElementImpl.java deleted file mode 100644 index 545c1f305..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTRefElementImpl.java +++ /dev/null @@ -1,54 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedString; - - - -public class SVGTRefElementImpl - extends - SVGTextPositioningElementImpl - //SVGURIReference - implements org.w3c.dom.svg.SVGTRefElement -{ - -public SVGTRefElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTSpanElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTSpanElementImpl.java deleted file mode 100644 index 89ed5dabb..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTSpanElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGTSpanElementImpl - extends - SVGTextPositioningElementImpl - implements org.w3c.dom.svg.SVGTSpanElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTestsImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTestsImpl.java deleted file mode 100644 index 5f0a8c727..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTestsImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGStringList; - - -public class SVGTestsImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGTests -{ -public native SVGStringList getRequiredFeatures( ); -public native SVGStringList getRequiredExtensions( ); -public native SVGStringList getSystemLanguage( ); -public native boolean hasExtension ( String extension ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTextContentElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTextContentElementImpl.java deleted file mode 100644 index 3a271ce7a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTextContentElementImpl.java +++ /dev/null @@ -1,161 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventListener; - - - - -public class SVGTextContentElementImpl - extends - SVGElementImpl - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //EventTarget - implements org.w3c.dom.svg.SVGTextContentElement -{ - -public SVGTextContentElementImpl() -{ - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - - -public native SVGAnimatedLength getTextLength( ); -public native SVGAnimatedEnumeration getLengthAdjust( ); - -public native int getNumberOfChars ( ); -public native float getComputedTextLength ( ); -public native float getSubStringLength ( int charnum, int nchars ) - throws DOMException; -public native SVGPoint getStartPositionOfChar ( int charnum ) - throws DOMException; -public native SVGPoint getEndPositionOfChar ( int charnum ) - throws DOMException; -public native SVGRect getExtentOfChar ( int charnum ) - throws DOMException; -public native float getRotationOfChar ( int charnum ) - throws DOMException; -public native int getCharNumAtPosition ( SVGPoint point ); -public native void selectSubString ( int charnum, int nchars ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTextElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTextElementImpl.java deleted file mode 100644 index a312aade8..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTextElementImpl.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - - -public class SVGTextElementImpl - extends - SVGTextPositioningElementImpl - //SVGTransformable - implements org.w3c.dom.svg.SVGTextElement -{ - -public SVGTextElementImpl() -{ - imbue(_SVGTransformable = new SVGTransformableImpl()); -} - - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTextPathElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTextPathElementImpl.java deleted file mode 100644 index ce6a96da9..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTextPathElementImpl.java +++ /dev/null @@ -1,57 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedLength; -import org.w3c.dom.svg.SVGAnimatedString; -import org.w3c.dom.svg.SVGAnimatedEnumeration; - -public class SVGTextPathElementImpl - extends - SVGTextContentElementImpl - //SVGURIReference - implements org.w3c.dom.svg.SVGTextPathElement -{ - -public SVGTextPathElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -public native SVGAnimatedLength getStartOffset( ); -public native SVGAnimatedEnumeration getMethod( ); -public native SVGAnimatedEnumeration getSpacing( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTextPositioningElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTextPositioningElementImpl.java deleted file mode 100644 index 1192f081a..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTextPositioningElementImpl.java +++ /dev/null @@ -1,45 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedLengthList; -import org.w3c.dom.svg.SVGAnimatedNumberList; - - -public class SVGTextPositioningElementImpl - extends - SVGTextContentElementImpl - implements org.w3c.dom.svg.SVGTextPositioningElement -{ -public native SVGAnimatedLengthList getX( ); -public native SVGAnimatedLengthList getY( ); -public native SVGAnimatedLengthList getDx( ); -public native SVGAnimatedLengthList getDy( ); -public native SVGAnimatedNumberList getRotate( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTitleElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTitleElementImpl.java deleted file mode 100644 index 83cdea5bf..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTitleElementImpl.java +++ /dev/null @@ -1,79 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - - - -public class SVGTitleElementImpl - extends - SVGElementImpl - //SVGLangSpace, - //SVGStylable - implements org.w3c.dom.svg.SVGTitleElement -{ - -public SVGTitleElementImpl() -{ - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); -} - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTransformImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTransformImpl.java deleted file mode 100644 index 1a5fdc3e5..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTransformImpl.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGMatrix; - - -public class SVGTransformImpl - implements org.w3c.dom.svg.SVGTransform -{ -public native short getType( ); -public native SVGMatrix getMatrix( ); -public native float getAngle( ); - -public native void setMatrix ( SVGMatrix matrix ); -public native void setTranslate ( float tx, float ty ); -public native void setScale ( float sx, float sy ); -public native void setRotate ( float angle, float cx, float cy ); -public native void setSkewX ( float angle ); -public native void setSkewY ( float angle ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTransformListImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTransformListImpl.java deleted file mode 100644 index 6fa6012a3..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTransformListImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.SVGException; - -import org.w3c.dom.svg.SVGTransform; -import org.w3c.dom.svg.SVGMatrix; - - -public class SVGTransformListImpl - implements org.w3c.dom.svg.SVGTransformList -{ -public native int getNumberOfItems( ); - -public native void clear ( ) - throws DOMException; -public native SVGTransform initialize ( SVGTransform newItem ) - throws DOMException, SVGException; -public native SVGTransform getItem ( int index ) - throws DOMException; -public native SVGTransform insertItemBefore ( SVGTransform newItem, int index ) - throws DOMException, SVGException; -public native SVGTransform replaceItem ( SVGTransform newItem, int index ) - throws DOMException, SVGException; -public native SVGTransform removeItem ( int index ) - throws DOMException; -public native SVGTransform appendItem ( SVGTransform newItem ) - throws DOMException, SVGException; -public native SVGTransform createSVGTransformFromMatrix ( SVGMatrix matrix ); -public native SVGTransform consolidate ( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGTransformableImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGTransformableImpl.java deleted file mode 100644 index 96384f6f6..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGTransformableImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedTransformList; - - -public class SVGTransformableImpl - extends - SVGLocatableImpl - implements org.w3c.dom.svg.SVGTransformable -{ -public native SVGAnimatedTransformList getTransform( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGURIReferenceImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGURIReferenceImpl.java deleted file mode 100644 index 2e3bb0bd4..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGURIReferenceImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.SVGAnimatedString; - - -public class SVGURIReferenceImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGURIReference -{ -public native SVGAnimatedString getHref( ); -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGUnitTypesImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGUnitTypesImpl.java deleted file mode 100644 index b76dab8ea..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGUnitTypesImpl.java +++ /dev/null @@ -1,36 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGUnitTypesImpl - implements org.w3c.dom.svg.SVGUnitTypes -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGUseElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGUseElementImpl.java deleted file mode 100644 index 3283cdc26..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGUseElementImpl.java +++ /dev/null @@ -1,180 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -import org.w3c.dom.svg.*; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -import org.w3c.dom.events.Event; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.events.EventException; -import org.w3c.dom.events.EventListener; - - -public class SVGUseElementImpl - extends - SVGElementImpl - //SVGURIReference, - //SVGTests, - //SVGLangSpace, - //SVGExternalResourcesRequired, - //SVGStylable, - //SVGTransformable, - //EventTarget - implements org.w3c.dom.svg.SVGUseElement -{ -public SVGUseElementImpl() -{ - imbue(_SVGURIReference = new SVGURIReferenceImpl()); - imbue(_SVGTests = new SVGTestsImpl()); - imbue(_SVGLangSpace = new SVGLangSpaceImpl()); - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGStylable = new SVGStylableImpl()); - imbue(_SVGTransformable = new SVGTransformableImpl()); - imbue(_EventTarget = new org.inkscape.dom.events.EventTargetImpl()); -} - - -//from SVGURIReference -private SVGURIReferenceImpl _SVGURIReference; -public SVGAnimatedString getHref() - { return _SVGURIReference.getHref(); } -//end SVGURIReference - -//from SVGTests -private SVGTestsImpl _SVGTests; -public SVGStringList getRequiredFeatures() - { return _SVGTests.getRequiredFeatures(); } -public SVGStringList getRequiredExtensions() - { return _SVGTests.getRequiredExtensions(); } -public SVGStringList getSystemLanguage() - { return _SVGTests.getSystemLanguage(); } -public boolean hasExtension (String extension) - { return _SVGTests.hasExtension(extension); } -//end SVGTests - -//from SVGLangSpace -private SVGLangSpaceImpl _SVGLangSpace; -public String getXMLlang() - { return _SVGLangSpace.getXMLlang(); } -public void setXMLlang(String xmllang) - throws DOMException - { _SVGLangSpace.setXMLlang(xmllang); } -public String getXMLspace() - { return _SVGLangSpace.getXMLspace(); } -public void setXMLspace(String xmlspace) - throws DOMException - { _SVGLangSpace.setXMLspace(xmlspace); } -//end SVGLangSpace - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - -//from SVGStylable -private SVGStylableImpl _SVGStylable; -public SVGAnimatedString getClassName() - { return _SVGStylable.getClassName(); } -public CSSStyleDeclaration getStyle() - { return _SVGStylable.getStyle(); } -public CSSValue getPresentationAttribute(String name) - { return _SVGStylable.getPresentationAttribute(name); } -//end SVGStylable - -//from SVGTransformable -private SVGTransformableImpl _SVGTransformable; -public SVGAnimatedTransformList getTransform() - { return _SVGTransformable.getTransform(); } -//end SVGTransformable - -//from SVGLocatable (from SVGTransformable) -public SVGElement getNearestViewportElement() - { return _SVGTransformable.getNearestViewportElement(); } -public SVGElement getFarthestViewportElement() - { return _SVGTransformable.getFarthestViewportElement(); } -public SVGRect getBBox() - { return _SVGTransformable.getBBox(); } -public SVGMatrix getCTM() - { return _SVGTransformable.getCTM(); } -public SVGMatrix getScreenCTM() - { return _SVGTransformable.getScreenCTM(); } -public SVGMatrix getTransformToElement (SVGElement element) - throws SVGException - { return _SVGTransformable.getTransformToElement(element); } -//end SVGLocatable - -//from EventTarget -private org.inkscape.dom.events.EventTargetImpl _EventTarget; -public void addEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.addEventListener(type, listener, useCapture); } -public void removeEventListener(String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListener(type, listener, useCapture); } -public boolean dispatchEvent(Event evt) - throws EventException - { return _EventTarget.dispatchEvent(evt); } -public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup) - { _EventTarget.addEventListenerNS(namespaceURI, type, listener, useCapture, evtGroup); } -public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture) - { _EventTarget.removeEventListenerNS(namespaceURI, type, listener, useCapture); } -public boolean willTriggerNS(String namespaceURI, - String type) - { return _EventTarget.willTriggerNS(namespaceURI, type); } -public boolean hasEventListenerNS(String namespaceURI, - String type) - { return _EventTarget.hasEventListenerNS(namespaceURI, type); } -//end EventTarget - - -public native SVGAnimatedLength getX( ); -public native SVGAnimatedLength getY( ); -public native SVGAnimatedLength getWidth( ); -public native SVGAnimatedLength getHeight( ); -public native SVGElementInstance getInstanceRoot( ); -public native SVGElementInstance getAnimatedInstanceRoot( ); - -} - - diff --git a/src/bind/java/org/inkscape/dom/svg/SVGVKernElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGVKernElementImpl.java deleted file mode 100644 index 97af0c646..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGVKernElementImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -public class SVGVKernElementImpl - extends - SVGElementImpl - implements org.w3c.dom.svg.SVGVKernElement -{ -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGViewElementImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGViewElementImpl.java deleted file mode 100644 index c47336a02..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGViewElementImpl.java +++ /dev/null @@ -1,77 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.svg.*; - - -public class SVGViewElementImpl - extends - SVGElementImpl - //SVGExternalResourcesRequired, - //SVGFitToViewBox, - //SVGZoomAndPan - implements org.w3c.dom.svg.SVGViewElement -{ -public SVGViewElementImpl() -{ - imbue(_SVGExternalResourcesRequired = new SVGExternalResourcesRequiredImpl()); - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); - imbue(_SVGZoomAndPan = new SVGZoomAndPanImpl()); -} - - -//from SVGExternalResourcesRequired -private SVGExternalResourcesRequiredImpl _SVGExternalResourcesRequired; -public SVGAnimatedBoolean getExternalResourcesRequired() - { return _SVGExternalResourcesRequired.getExternalResourcesRequired(); } -//end SVGExternalResourcesRequired - - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - -//from SVGZoomAndPan -SVGZoomAndPanImpl _SVGZoomAndPan; -public short getZoomAndPan() - { return _SVGZoomAndPan.getZoomAndPan(); } -public void setZoomAndPan(short zoomAndPan) throws DOMException - { _SVGZoomAndPan.setZoomAndPan(zoomAndPan); } -//end SVGZoomAndPan - - -public native SVGStringList getViewTarget( ); - -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGViewSpecImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGViewSpecImpl.java deleted file mode 100644 index 20042bad5..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGViewSpecImpl.java +++ /dev/null @@ -1,64 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - -package org.inkscape.dom.svg; - -import org.w3c.dom.svg.*; - - - -public class SVGViewSpecImpl - extends - SVGZoomAndPanImpl - //SVGFitToViewBox - implements org.w3c.dom.svg.SVGViewSpec -{ - -public SVGViewSpecImpl() -{ - imbue(_SVGFitToViewBox = new SVGFitToViewBoxImpl()); -} - - -//from SVGFitToViewBox -SVGFitToViewBoxImpl _SVGFitToViewBox; -public SVGAnimatedRect getViewBox() - { return _SVGFitToViewBox.getViewBox(); } -public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio() - { return _SVGFitToViewBox.getPreserveAspectRatio(); } -//end SVGFitToViewBox - - -public native SVGTransformList getTransform( ); -public native SVGElement getViewTarget( ); -public native String getViewBoxString( ); -public native String getPreserveAspectRatioString( ); -public native String getTransformString( ); -public native String getViewTargetString( ); -} - diff --git a/src/bind/java/org/inkscape/dom/svg/SVGZoomAndPanImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGZoomAndPanImpl.java deleted file mode 100644 index d77d64f75..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGZoomAndPanImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG11/java.html - */ - - - -package org.inkscape.dom.svg; - -import org.w3c.dom.DOMException; - -public class SVGZoomAndPanImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.svg.SVGZoomAndPan -{ -public native short getZoomAndPan( ); -public native void setZoomAndPan( short zoomAndPan ) - throws DOMException; -} diff --git a/src/bind/java/org/inkscape/dom/svg/SVGZoomEventImpl.java b/src/bind/java/org/inkscape/dom/svg/SVGZoomEventImpl.java deleted file mode 100644 index 018eee915..000000000 --- a/src/bind/java/org/inkscape/dom/svg/SVGZoomEventImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these SVG files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/SVG/java.html - */ - - -package org.inkscape.dom.svg; - -import org.w3c.dom.events.UIEvent; -import org.w3c.dom.svg.SVGRect; -import org.w3c.dom.svg.SVGPoint; - - -public class SVGZoomEventImpl - extends - org.inkscape.dom.events.UIEventImpl - implements org.w3c.dom.svg.SVGZoomEvent -{ -public native SVGRect getZoomRectScreen( ); -public native float getPreviousScale( ); -public native SVGPoint getPreviousTranslate( ); -public native float getNewScale( ); -public native SVGPoint getNewTranslate( ); -} diff --git a/src/bind/java/org/inkscape/dom/views/AbstractViewImpl.java b/src/bind/java/org/inkscape/dom/views/AbstractViewImpl.java deleted file mode 100644 index 9b2bd2dad..000000000 --- a/src/bind/java/org/inkscape/dom/views/AbstractViewImpl.java +++ /dev/null @@ -1,42 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113/java-binding.html - */ - -package org.inkscape.dom.views; - -import org.w3c.dom.views.DocumentView; - - -public class AbstractViewImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.views.AbstractView -{ - -public native DocumentView getDocument(); - -} diff --git a/src/bind/java/org/inkscape/dom/views/DocumentViewImpl.java b/src/bind/java/org/inkscape/dom/views/DocumentViewImpl.java deleted file mode 100644 index a0ae88004..000000000 --- a/src/bind/java/org/inkscape/dom/views/DocumentViewImpl.java +++ /dev/null @@ -1,43 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (c) 2007-2008 Inkscape.org - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Note that these files are implementations of the Java - * interface package found here: - * http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113/java-binding.html - */ - - -package org.inkscape.dom.views; - -import org.w3c.dom.views.AbstractView; - - -public class DocumentViewImpl - extends - org.inkscape.cmn.BaseInterface - implements org.w3c.dom.views.DocumentView -{ - -public native AbstractView getDefaultView(); - -} diff --git a/src/bind/java/org/inkscape/script/Editor.java b/src/bind/java/org/inkscape/script/Editor.java deleted file mode 100644 index 81d65f4cf..000000000 --- a/src/bind/java/org/inkscape/script/Editor.java +++ /dev/null @@ -1,311 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.script; - - -import java.awt.BorderLayout; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import javax.swing.filechooser.FileNameExtensionFilter; -import javax.swing.JFileChooser; -import javax.swing.JOptionPane; -import javax.swing.JPanel; -import javax.swing.JTextPane; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; - - - -/** - * A simple script editor for quick fixes. - */ -public class Editor extends JPanel -{ -ScriptConsole parent; -JTextPane textPane; - -//######################################################################## -//# MESSSAGES -//######################################################################## -void err(String fmt, Object... arguments) -{ - parent.err("Editor err:" + fmt, arguments); -} - -void msg(String fmt, Object... arguments) -{ - parent.msg("Editor:" + fmt, arguments); -} - -void trace(String fmt, Object... arguments) -{ - parent.trace("Editor:" + fmt, arguments); -} - - -//######################################################################## -//# U T I L I T Y -//######################################################################## - -private JFileChooser _chooser; - -JFileChooser getChooser() -{ - if (_chooser == null) - { - _chooser = new JFileChooser(); - _chooser.setAcceptAllFileFilterUsed(false); - _chooser.setCurrentDirectory(new File(".")); - FileNameExtensionFilter filter = new FileNameExtensionFilter( - "Script Files", "js", "py", "r"); - _chooser.setFileFilter(filter); - } - return _chooser; -} - - -/** - * Returns the current text contained in this editor - */ -public String getText() -{ - return textPane.getText(); -} - - -String lastHash = null; - -/** - * Sets the text of this editor - */ -public void setText(String txt) -{ - textPane.setText(txt); - lastHash = getHash(txt); - trace("hash:" + lastHash); -} - -MessageDigest md = null; - -final String hex = "0123456789abcdef"; - -String toHex(byte arr[]) -{ - StringBuffer buf = new StringBuffer(); - for (byte b : arr) - { - buf.append(hex.charAt((b>>4) & 15)); - buf.append(hex.charAt((b ) & 15)); - } - return buf.toString(); -} - -String getHash(String text) -{ - if (md == null) - { - try - { - md = MessageDigest.getInstance("MD5"); - } - catch (NoSuchAlgorithmException e) - { - err("getHash: " + e); - return ""; - } - } - byte hash[] = md.digest(text.getBytes()); - return toHex(hash); -} - - -//######################################################################## -//# L O A D / S A V E -//######################################################################## -String fileName = ""; - -/** - * Gets the name of the current file in the editor - */ -public String getFileName() -{ - return fileName; -} - -/** - * Sets the name of the current file in the editor - */ -public void setFileName(String val) -{ - fileName = val; -} - -/** - * Selects and opens a file, loading into the editor - */ -public boolean openFile() -{ - JFileChooser chooser = getChooser(); - int ret = chooser.showOpenDialog(this); - if (ret != JFileChooser.APPROVE_OPTION) - return false; - File f = chooser.getSelectedFile(); - String fname = f.getName(); - try - { - FileReader in = new FileReader(fname); - StringBuffer buf = new StringBuffer(); - while (true) - { - int ch = in.read(); - if (ch < 0) - break; - buf.append((char)ch); - } - in.close(); - setText(buf.toString()); - } - catch (IOException e) - { - err("save file:" + e); - return false; - } - return true; -} - - -/** - * Saves the file currently in the editor. Uses the Save - * selector if there is not current file name. - */ -public boolean saveFile() -{ - if (!isDirty()) - return true; - - String fname = getFileName(); - if (fname == null || fname.length()==0) - { - JFileChooser chooser = getChooser(); - int ret = chooser.showSaveDialog(this); - if (ret != JFileChooser.APPROVE_OPTION) - return false; - File f = chooser.getSelectedFile(); - fname = f.getName(); - } - try - { - FileWriter out = new FileWriter(fname); - out.write(getText()); - out.close(); - setFileName(fname); - resetDirty(); - } - catch (IOException e) - { - err("save file:" + e); - return false; - } - return true; -} - - -/** - * Saves the file currently in the editor under a new name. - * Get the new name from the chooser, and see if it already exists. - */ -public boolean saveAsFile() -{ - JFileChooser chooser = getChooser(); - int ret = chooser.showSaveDialog(this); - if (ret != JFileChooser.APPROVE_OPTION) - return false; - File f = chooser.getSelectedFile(); - String fname = f.getName(); - if (f.exists()) - { - ret = JOptionPane.showConfirmDialog(this, - "File '" + fname + "' already exists. Overwrite?"); - if (ret != JOptionPane.YES_OPTION) - return false; - } - try - { - FileWriter out = new FileWriter(fname); - out.write(getText()); - out.close(); - setFileName(fname); - resetDirty(); - } - catch (IOException e) - { - err("saveAs file:" + e); - return false; - } - return true; -} - - -/** - * State that the editor is now 'unedited' - */ -public void resetDirty() -{ - lastHash = getHash(getText()); -} - -/** - * Determines if the editor has been edited since the last open/save - */ -public boolean isDirty() -{ - String txt = getText(); - String hash = getHash(txt); - if ( (lastHash == null && txt.length()>0) || - (lastHash != null && !lastHash.equals(hash)) ) - return true; - return false; -} - - -/** - * Creates the editor for the ScriptConsole - */ -public Editor(ScriptConsole par) -{ - super(); - parent = par; - setLayout(new BorderLayout()); - textPane = new JTextPane(); - add(textPane, BorderLayout.CENTER); -} - - - -} - diff --git a/src/bind/java/org/inkscape/script/ScriptConsole.java b/src/bind/java/org/inkscape/script/ScriptConsole.java deleted file mode 100644 index 8241e2797..000000000 --- a/src/bind/java/org/inkscape/script/ScriptConsole.java +++ /dev/null @@ -1,652 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.script; - -import org.inkscape.cmn.Resource; - -import javax.script.*; - -import javax.swing.WindowConstants; -import javax.swing.JFrame; -import javax.swing.JButton; -import javax.swing.JMenu; -import javax.swing.JLabel; -import javax.swing.JMenuBar; -import javax.swing.JMenuItem; -import javax.swing.JComboBox; -import javax.swing.ButtonGroup; -import javax.swing.JOptionPane; -import javax.swing.JTabbedPane; -import javax.swing.JToolBar; -import javax.swing.Action; -import javax.swing.AbstractAction; - - -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.awt.BorderLayout; - -import java.io.File; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; - - -import java.util.List; -import java.util.HashMap; -import java.util.ArrayList; -import java.util.List; - - - -/** - * This is the main Script Console window. It contains - * a terminal-like console, and a simple script editor. - */ -public class ScriptConsole extends JFrame -{ -Terminal terminal; -Editor editor; - -JTabbedPane tabPane; -JToolBar toolbar; -JMenuBar menubar; -JComboBox engineBox; - -//######################################################################## -//# MESSSAGES -//######################################################################## -public void err(String fmt, Object... arguments) -{ - terminal.errorf("ScriptConsole err:" + fmt + "\n", arguments); -} - -public void msg(String fmt, Object... arguments) -{ - terminal.outputf("ScriptConsole:" + fmt, arguments); -} - -public void trace(String fmt, Object... arguments) -{ - terminal.outputf("ScriptConsole:" + fmt + "\n", arguments); -} - - - - - - -void alert(String msg) -{ - JOptionPane.showMessageDialog(this, msg); -} - - - - -//######################################################################## -//# S C R I P T S -//######################################################################## -ScriptEngine engine; - -ArrayList<ScriptEngine> engines; - - -public void setEngine(ScriptEngine engine) -{ - this.engine = engine; - this.engine.getContext().setWriter(terminal.getOutWriter()); - this.engine.getContext().setErrorWriter(terminal.getErrWriter()); - //do something to make the combobox show the current engine -} - - -public ScriptEngine getEngine() -{ - return engine; -} - - -public boolean setEngine(String langName) -{ - for (ScriptEngine engine : engines) - { - for(String name: engine.getFactory().getNames()) - { - if (langName.equalsIgnoreCase(name)) - { - setEngine(engine); - return true; - } - } - } - return false; -} - - -/** - * Run a script buffer - * - * @param str the script buffer to execute - * @return true if successful, else false - */ -public boolean doRunCmd(String str) -{ - if (engine == null) - { - err("No engine set"); - return false; - } - - //execute script from buffer - try - { - getEngine().eval(str); - } - catch (javax.script.ScriptException e) - { - err("Executing script: " + e); - //e.printStackTrace(); - } - terminal.output("\nscript> "); - return true; -} - -/** - * Run a script buffer - * - * @param str the script buffer to execute - * @return true if successful, else false - */ -public boolean doRun(String str) -{ - if (engine == null) - { - err("No engine set"); - return false; - } - - //execute script from buffer - try - { - getEngine().eval(str); - } - catch (javax.script.ScriptException e) - { - err("Executing script: " + e); - //e.printStackTrace(); - } - return true; -} - - -/** - * Run a script buffer - * - * @param lang the scripting language to run - * @param str the script buffer to execute - * @return true if successful, else false - */ -public boolean doRun(String lang, String str) -{ - // find script engine - if (!setEngine(lang)) - { - err("doRun: cannot find script engine '" + lang + "'"); - return false; - } - return doRun(str); -} - - -/** - * Run a script file - * - * @param fname the script file to execute - * @return true if successful, else false - */ -public boolean doRunFile(String fname) -{ - if (engine == null) - { - err("No engine set"); - return false; - } - - //try opening file and feeding into engine - FileReader in = null; - boolean ret = true; - try - { - in = new FileReader(fname); - } - catch (java.io.IOException e) - { - err("Executing file: " + e); - return false; - } - try - { - engine.eval(in); - } - catch (javax.script.ScriptException e) - { - err("Executing file: " + e); - ret = false; - } - try - { - in.close(); - } - catch (java.io.IOException e) - { - err("Executing file: " + e); - return false; - } - return ret; -} - - -/** - * Run a script file - * - * @param lang the scripting language to run - * @param fname the script file to execute - * @return true if successful, else false - */ -public boolean doRunFile(String lang, String fname) -{ - // find script engine - if (!setEngine(lang)) - { - err("doRunFile: cannot find script engine '" + lang + "'"); - return false; - } - return doRunFile(fname); -} - - - -class ScriptEngineAction extends AbstractAction -{ - - -public void actionPerformed(ActionEvent evt) -{ - int index = engineBox.getSelectedIndex(); - if (index<0) - return; - ScriptEngine engine = engines.get(index); - setEngine(engine); -} - -public ScriptEngineAction() -{ - super("SelectEngine", null); - putValue(SHORT_DESCRIPTION, "Select a scripting engine"); -} - -} - - -private void initScripts() -{ - engines = new ArrayList<ScriptEngine>(); - Action action = new ScriptEngineAction(); - engineBox = new JComboBox(); - engineBox.setAction(action); - engineBox.setEditable(false); - toolbar.add(engineBox); - - ScriptEngineManager scriptEngineManager = - new ScriptEngineManager(); - List<ScriptEngineFactory> factories = - scriptEngineManager.getEngineFactories(); - for (ScriptEngineFactory factory: factories) - { - trace("ScriptEngineFactory Info"); - String engName = factory.getEngineName(); - String engVersion = factory.getEngineVersion(); - String fullEngName = engName + " (" + engVersion + ")"; - String langName = factory.getLanguageName(); - String langVersion = factory.getLanguageVersion(); - String fullLangName = langName + " (" + langVersion + ")"; - trace("\t" + fullEngName); - List<String> engNames = factory.getNames(); - for(String name: engNames) - { - trace("\tEngine Alias: " + name); - } - trace("\t" + fullLangName); - engines.add(factory.getScriptEngine()); - engineBox.addItem(fullLangName + " / " + fullEngName); - } - if (engineBox.getItemCount()>0) - { - engineBox.setSelectedIndex(0); - setEngine(engines.get(0)); - } -} - - -static final String defaultCodeStr = - "/**\n" + - " * This is some example Javascript.\n" + - " * Try executing\n" + - " */\n" + - "importPackage(javax.swing);\n" + - "function sayHello() {\n" + - " JOptionPane.showMessageDialog(null, 'Hello, world!',\n" + - " 'Welcome to Inkscape', JOptionPane.WARNING_MESSAGE);\n" + - "}\n" + - "\n" + - "sayHello();\n" + - "\n"; - - -//######################################################################## -//# A C T I O N S -//######################################################################## -Action newAction; -Action openAction; -Action quitAction; -Action runAction; -Action saveAction; -Action saveAsAction; -Action stopAction; - - - -class NewAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - // -} - -public NewAction() -{ - super("New", Resource.getIcon("document-new.png")); - putValue(SHORT_DESCRIPTION, "Create a new script file"); -} - -} - - - -class OpenAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - editor.openFile(); -} - -public OpenAction() -{ - super("Open", Resource.getIcon("document-open.png")); - putValue(SHORT_DESCRIPTION, "Open a script file"); -} - -} - - - -class QuitAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - setVisible(false); -} - -public QuitAction() -{ - super("Quit", Resource.getIcon("system-log-out.png")); - putValue(SHORT_DESCRIPTION, "Quit this script console"); -} - -} - - - -class RunAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - String txt = editor.getText(); - doRun(txt); -} - -public RunAction() -{ - super("Run", Resource.getIcon("go-next.png")); - putValue(SHORT_DESCRIPTION, "Run the script in the editor"); -} - -} - - - -class SaveAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - editor.saveFile(); -} - -public SaveAction() -{ - super("Save", Resource.getIcon("document-save.png")); - putValue(SHORT_DESCRIPTION, "Save file"); -} - -} - - - -class SaveAsAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - editor.saveAsFile(); -} - -public SaveAsAction() -{ - super("SaveAs", Resource.getIcon("document-save-as.png")); - putValue(SHORT_DESCRIPTION, "Save under a new file name"); -} - -} - - - -class StopAction extends AbstractAction -{ - -public void actionPerformed(ActionEvent evt) -{ - //# -} - -public StopAction() -{ - super("Stop", Resource.getIcon("process-stop.png")); - putValue(SHORT_DESCRIPTION, "Stop the running script"); -} - -} - - - -HashMap<String, Action> actions; -void setupActions() -{ - actions = new HashMap<String, Action>(); - actions.put("New", newAction = new NewAction()); - actions.put("Open", openAction = new OpenAction()); - actions.put("Quit", quitAction = new QuitAction()); - actions.put("Run", runAction = new RunAction()); - actions.put("Save", saveAction = new SaveAction()); - actions.put("SaveAs", saveAsAction = new SaveAsAction()); - actions.put("Stop", stopAction = new StopAction()); -} - - -public void enableAction(String name) -{ - Action action = actions.get(name); - if (action == null) - return; - action.setEnabled(true); -} - -public void disableAction(String name) -{ - Action action = actions.get(name); - if (action == null) - return; - action.setEnabled(false); -} - - - -//######################################################################## -//# S E T U P -//######################################################################## - -JButton toolbarButton(Action action) -{ - JButton btn = new JButton(action); - btn.setText(""); - btn.setToolTipText((String)action.getValue(Action.SHORT_DESCRIPTION)); - return btn; -} - - -private boolean setup() -{ - setTitle("Inkscape Script Console"); - setSize(600, 400); - setIconImage(Resource.getImage("inkscape.png")); - setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE); - - //###################################################### - //# A C T I O N S - //###################################################### - setupActions(); - - //###################################################### - //# M E N U - //###################################################### - menubar = new JMenuBar(); - setJMenuBar(menubar); - - JMenu menu = new JMenu("File"); - menubar.add(menu); - menu.add(new JMenuItem(openAction)); - menu.add(new JMenuItem(saveAction)); - menu.add(new JMenuItem(saveAsAction)); - menu.add(new JMenuItem(quitAction)); - - menu = new JMenu("Run"); - menubar.add(menu); - menu.add(new JMenuItem(runAction)); - menu.add(new JMenuItem(stopAction)); - - //###################################################### - //# T O O L B A R - //###################################################### - toolbar = new JToolBar(); - getContentPane().add(toolbar, BorderLayout.NORTH); - toolbar.add(toolbarButton(openAction)); - toolbar.add(toolbarButton(saveAction)); - toolbar.add(toolbarButton(runAction)); - toolbar.add(toolbarButton(stopAction)); - - //###################################################### - //# C O N T E N T - //###################################################### - tabPane = new JTabbedPane(); - getContentPane().add(tabPane, BorderLayout.CENTER); - - terminal = new Terminal(); - tabPane.addTab("Console", - Resource.getIcon("utilities-terminal.png"), - terminal); - terminal.output("\nscript> "); - - editor = new Editor(this); - tabPane.addTab("Script", - Resource.getIcon("accessories-text-editor.png"), - editor); - - editor.setText(defaultCodeStr); - - //###################################################### - //# E N G I N E - //###################################################### - initScripts(); - - return true; -} - - - - - - -public ScriptConsole() -{ - setup(); -} - - -private static ScriptConsole _instance = null; -public static ScriptConsole getInstance() -{ - if (_instance == null) - _instance = new ScriptConsole(); - return _instance; -} - - -public static void main(String argv[]) -{ - ScriptConsole sc = getInstance(); - sc.setVisible(true); -} - - -} -//######################################################################## -//# E N D O F F I L E -//######################################################################## - diff --git a/src/bind/java/org/inkscape/script/Terminal.java b/src/bind/java/org/inkscape/script/Terminal.java deleted file mode 100644 index 22d2cb251..000000000 --- a/src/bind/java/org/inkscape/script/Terminal.java +++ /dev/null @@ -1,297 +0,0 @@ -/** - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -package org.inkscape.script; - -import java.awt.BorderLayout; -import javax.swing.JFrame; -import javax.swing.JPanel; -import javax.swing.JTextPane; -import javax.swing.JScrollPane; -import javax.swing.text.DefaultCaret; -import javax.swing.text.Document; -import javax.swing.text.BadLocationException; -import javax.swing.text.StyleConstants; -import javax.swing.text.SimpleAttributeSet; -import java.awt.Color; -import java.awt.event.KeyEvent; -import java.awt.event.KeyListener; -import java.awt.Font; - -import java.io.ByteArrayOutputStream; -import java.io.PrintStream; -import java.io.IOException; -import java.io.Writer; -import java.io.PrintWriter; - -public class Terminal extends JPanel - implements KeyListener -{ - -SimpleAttributeSet inTextAttr; -SimpleAttributeSet outTextAttr; -SimpleAttributeSet errTextAttr; - -StringBuffer buf = new StringBuffer(); -JTextPane textPane; - -void err(String msg) -{ - System.out.println("Terminal err: " + msg); -} - -void trace(String msg) -{ - System.out.println("Terminal: " + msg); -} - - -void processInputLine(String txt) -{ - ScriptConsole cons = ScriptConsole.getInstance(); - if (cons != null) - cons.doRunCmd(txt); -} - - - -class OutWriter extends Writer -{ - -public void write(char[] cbuf, int off, int len) -{ - String s = new String(cbuf, off, len); - output(s); -} - -public void flush() -{ -} - -public void close() -{ -} - -} - - - -PrintWriter outWriter; - -public Writer getOutWriter() -{ - if (outWriter == null) - outWriter = new PrintWriter(new OutWriter()); - return outWriter; -} - - -public void output(String txt) -{ - Document doc = textPane.getDocument(); - try - { - doc.insertString(doc.getLength(), txt, outTextAttr); - textPane.setCaretPosition(doc.getLength()); - } - catch (BadLocationException e) - { - } - -} - - -public void outputf(String fmt, Object... args) -{ - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream out = new PrintStream(baos); - out.printf(fmt, args); - out.close(); - String s = baos.toString(); - output(s); -} - - - -class ErrWriter extends Writer -{ - -public void write(char[] cbuf, int off, int len) -{ - String s = new String(cbuf, off, len); - error(s); -} - -public void flush() -{ -} - -public void close() -{ -} - -} - - - -PrintWriter errWriter; - -public Writer getErrWriter() -{ - if (errWriter == null) - errWriter = new PrintWriter(new ErrWriter()); - return errWriter; -} - - -public void error(String txt) -{ - Document doc = textPane.getDocument(); - try - { - doc.insertString(doc.getLength(), txt, errTextAttr); - textPane.setCaretPosition(doc.getLength()); - } - catch (BadLocationException e) - { - } - -} - -public void errorf(String fmt, Object... args) -{ - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - PrintStream out = new PrintStream(baos); - out.printf(fmt, args); - out.close(); - String s = baos.toString(); - error(s); -} - - -public void keyPressed(KeyEvent evt) -{ -} - -public void keyReleased(KeyEvent evt) -{ -} - -public void keyTyped(KeyEvent evt) -{ - Document doc = textPane.getDocument(); - char ch = evt.getKeyChar(); - if (ch == 127) - { - } - else if (ch == '\b') - { - if (buf.length() == 0) - return; - try - { - buf.delete(buf.length()-1, buf.length()); - doc.remove(doc.getLength()-1, 1); - textPane.setCaretPosition(doc.getLength()); - } - catch (BadLocationException e) - { - err("keyTyped:" + e); - } - } - else - { - try - { - buf.append(ch); - doc.insertString(doc.getLength(), "" + ch, inTextAttr); - textPane.setCaretPosition(doc.getLength()); - } - catch (BadLocationException e) - { - } - if (ch == '\n' || ch == '\r') - { - String txt = buf.toString(); - buf.delete(0, buf.length()); - txt = txt.trim(); - processInputLine(txt); - } - } - - - -} - - - -void setup() -{ - setLayout(new BorderLayout()); - textPane = new JTextPane(); - add(new JScrollPane(textPane), BorderLayout.CENTER); - textPane.setEditable(false); - textPane.setBackground(Color.BLACK); - textPane.setCaretColor(Color.WHITE); - textPane.setCaret(new DefaultCaret()); - textPane.getCaret().setVisible(true); - textPane.getCaret().setBlinkRate(500); - Font currentFont = textPane.getFont(); - textPane.setFont(new Font("Monospaced", currentFont.getStyle(), currentFont.getSize())); - textPane.addKeyListener(this); - - inTextAttr = new SimpleAttributeSet(); - StyleConstants.setForeground(inTextAttr, Color.YELLOW); - outTextAttr = new SimpleAttributeSet(); - StyleConstants.setForeground(outTextAttr, Color.GREEN); - errTextAttr = new SimpleAttributeSet(); - StyleConstants.setForeground(errTextAttr, Color.RED); - - -} - - - - - - -public Terminal() -{ - super(); - setup(); -} - - - -public static void main(String argv[]) -{ - Terminal t = new Terminal(); - JFrame par = new JFrame("Terminal Test"); - par.setSize(500, 350); - par.getContentPane().add(t); - par.setVisible(true); -} - -} - diff --git a/src/bind/java/org/w3c/dom/css/CSS2Properties.java b/src/bind/java/org/w3c/dom/css/CSS2Properties.java deleted file mode 100644 index b84df9b30..000000000 --- a/src/bind/java/org/w3c/dom/css/CSS2Properties.java +++ /dev/null @@ -1,1411 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSS2Properties</code> interface represents a convenience - * mechanism for retrieving and setting properties within a - * <code>CSSStyleDeclaration</code>. The attributes of this interface - * correspond to all the properties specified in CSS2. Getting an attribute - * of this interface is equivalent to calling the - * <code>getPropertyValue</code> method of the - * <code>CSSStyleDeclaration</code> interface. Setting an attribute of this - * interface is equivalent to calling the <code>setProperty</code> method of - * the <code>CSSStyleDeclaration</code> interface. - * <p> A conformant implementation of the CSS module is not required to - * implement the <code>CSS2Properties</code> interface. If an implementation - * does implement this interface, the expectation is that language-specific - * methods can be used to cast from an instance of the - * <code>CSSStyleDeclaration</code> interface to the - * <code>CSS2Properties</code> interface. - * <p> If an implementation does implement this interface, it is expected to - * understand the specific syntax of the shorthand properties, and apply - * their semantics; when the <code>margin</code> property is set, for - * example, the <code>marginTop</code>, <code>marginRight</code>, - * <code>marginBottom</code> and <code>marginLeft</code> properties are - * actually being set by the underlying implementation. - * <p> When dealing with CSS "shorthand" properties, the shorthand properties - * should be decomposed into their component longhand properties as - * appropriate, and when querying for their value, the form returned should - * be the shortest form exactly equivalent to the declarations made in the - * ruleset. However, if there is no shorthand declaration that could be - * added to the ruleset without changing in any way the rules already - * declared in the ruleset (i.e., by adding longhand rules that were - * previously not declared in the ruleset), then the empty string should be - * returned for the shorthand property. - * <p> For example, querying for the <code>font</code> property should not - * return "normal normal normal 14pt/normal Arial, sans-serif", when "14pt - * Arial, sans-serif" suffices. (The normals are initial values, and are - * implied by use of the longhand property.) - * <p> If the values for all the longhand properties that compose a particular - * string are the initial values, then a string consisting of all the - * initial values should be returned (e.g. a <code>border-width</code> value - * of "medium" should be returned as such, not as ""). - * <p> For some shorthand properties that take missing values from other - * sides, such as the <code>margin</code>, <code>padding</code>, and - * <code>border-[width|style|color]</code> properties, the minimum number of - * sides possible should be used; i.e., "0px 10px" will be returned instead - * of "0px 10px 0px 10px". - * <p> If the value of a shorthand property can not be decomposed into its - * component longhand properties, as is the case for the <code>font</code> - * property with a value of "menu", querying for the values of the component - * longhand properties should return the empty string. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSS2Properties { - /** - * See the azimuth property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getAzimuth(); - public void setAzimuth(String azimuth) - throws DOMException; - - /** - * See the background property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackground(); - public void setBackground(String background) - throws DOMException; - - /** - * See the background-attachment property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackgroundAttachment(); - public void setBackgroundAttachment(String backgroundAttachment) - throws DOMException; - - /** - * See the background-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackgroundColor(); - public void setBackgroundColor(String backgroundColor) - throws DOMException; - - /** - * See the background-image property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackgroundImage(); - public void setBackgroundImage(String backgroundImage) - throws DOMException; - - /** - * See the background-position property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackgroundPosition(); - public void setBackgroundPosition(String backgroundPosition) - throws DOMException; - - /** - * See the background-repeat property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBackgroundRepeat(); - public void setBackgroundRepeat(String backgroundRepeat) - throws DOMException; - - /** - * See the border property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorder(); - public void setBorder(String border) - throws DOMException; - - /** - * See the border-collapse property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderCollapse(); - public void setBorderCollapse(String borderCollapse) - throws DOMException; - - /** - * See the border-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderColor(); - public void setBorderColor(String borderColor) - throws DOMException; - - /** - * See the border-spacing property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderSpacing(); - public void setBorderSpacing(String borderSpacing) - throws DOMException; - - /** - * See the border-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderStyle(); - public void setBorderStyle(String borderStyle) - throws DOMException; - - /** - * See the border-top property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderTop(); - public void setBorderTop(String borderTop) - throws DOMException; - - /** - * See the border-right property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderRight(); - public void setBorderRight(String borderRight) - throws DOMException; - - /** - * See the border-bottom property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderBottom(); - public void setBorderBottom(String borderBottom) - throws DOMException; - - /** - * See the border-left property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderLeft(); - public void setBorderLeft(String borderLeft) - throws DOMException; - - /** - * See the border-top-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderTopColor(); - public void setBorderTopColor(String borderTopColor) - throws DOMException; - - /** - * See the border-right-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderRightColor(); - public void setBorderRightColor(String borderRightColor) - throws DOMException; - - /** - * See the border-bottom-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderBottomColor(); - public void setBorderBottomColor(String borderBottomColor) - throws DOMException; - - /** - * See the border-left-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderLeftColor(); - public void setBorderLeftColor(String borderLeftColor) - throws DOMException; - - /** - * See the border-top-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderTopStyle(); - public void setBorderTopStyle(String borderTopStyle) - throws DOMException; - - /** - * See the border-right-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderRightStyle(); - public void setBorderRightStyle(String borderRightStyle) - throws DOMException; - - /** - * See the border-bottom-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderBottomStyle(); - public void setBorderBottomStyle(String borderBottomStyle) - throws DOMException; - - /** - * See the border-left-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderLeftStyle(); - public void setBorderLeftStyle(String borderLeftStyle) - throws DOMException; - - /** - * See the border-top-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderTopWidth(); - public void setBorderTopWidth(String borderTopWidth) - throws DOMException; - - /** - * See the border-right-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderRightWidth(); - public void setBorderRightWidth(String borderRightWidth) - throws DOMException; - - /** - * See the border-bottom-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderBottomWidth(); - public void setBorderBottomWidth(String borderBottomWidth) - throws DOMException; - - /** - * See the border-left-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderLeftWidth(); - public void setBorderLeftWidth(String borderLeftWidth) - throws DOMException; - - /** - * See the border-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBorderWidth(); - public void setBorderWidth(String borderWidth) - throws DOMException; - - /** - * See the bottom property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getBottom(); - public void setBottom(String bottom) - throws DOMException; - - /** - * See the caption-side property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCaptionSide(); - public void setCaptionSide(String captionSide) - throws DOMException; - - /** - * See the clear property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getClear(); - public void setClear(String clear) - throws DOMException; - - /** - * See the clip property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getClip(); - public void setClip(String clip) - throws DOMException; - - /** - * See the color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getColor(); - public void setColor(String color) - throws DOMException; - - /** - * See the content property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getContent(); - public void setContent(String content) - throws DOMException; - - /** - * See the counter-increment property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCounterIncrement(); - public void setCounterIncrement(String counterIncrement) - throws DOMException; - - /** - * See the counter-reset property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCounterReset(); - public void setCounterReset(String counterReset) - throws DOMException; - - /** - * See the cue property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCue(); - public void setCue(String cue) - throws DOMException; - - /** - * See the cue-after property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCueAfter(); - public void setCueAfter(String cueAfter) - throws DOMException; - - /** - * See the cue-before property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCueBefore(); - public void setCueBefore(String cueBefore) - throws DOMException; - - /** - * See the cursor property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCursor(); - public void setCursor(String cursor) - throws DOMException; - - /** - * See the direction property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getDirection(); - public void setDirection(String direction) - throws DOMException; - - /** - * See the display property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getDisplay(); - public void setDisplay(String display) - throws DOMException; - - /** - * See the elevation property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getElevation(); - public void setElevation(String elevation) - throws DOMException; - - /** - * See the empty-cells property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getEmptyCells(); - public void setEmptyCells(String emptyCells) - throws DOMException; - - /** - * See the float property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getCssFloat(); - public void setCssFloat(String cssFloat) - throws DOMException; - - /** - * See the font property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFont(); - public void setFont(String font) - throws DOMException; - - /** - * See the font-family property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontFamily(); - public void setFontFamily(String fontFamily) - throws DOMException; - - /** - * See the font-size property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontSize(); - public void setFontSize(String fontSize) - throws DOMException; - - /** - * See the font-size-adjust property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontSizeAdjust(); - public void setFontSizeAdjust(String fontSizeAdjust) - throws DOMException; - - /** - * See the font-stretch property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontStretch(); - public void setFontStretch(String fontStretch) - throws DOMException; - - /** - * See the font-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontStyle(); - public void setFontStyle(String fontStyle) - throws DOMException; - - /** - * See the font-variant property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontVariant(); - public void setFontVariant(String fontVariant) - throws DOMException; - - /** - * See the font-weight property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getFontWeight(); - public void setFontWeight(String fontWeight) - throws DOMException; - - /** - * See the height property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getHeight(); - public void setHeight(String height) - throws DOMException; - - /** - * See the left property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getLeft(); - public void setLeft(String left) - throws DOMException; - - /** - * See the letter-spacing property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getLetterSpacing(); - public void setLetterSpacing(String letterSpacing) - throws DOMException; - - /** - * See the line-height property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getLineHeight(); - public void setLineHeight(String lineHeight) - throws DOMException; - - /** - * See the list-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getListStyle(); - public void setListStyle(String listStyle) - throws DOMException; - - /** - * See the list-style-image property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getListStyleImage(); - public void setListStyleImage(String listStyleImage) - throws DOMException; - - /** - * See the list-style-position property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getListStylePosition(); - public void setListStylePosition(String listStylePosition) - throws DOMException; - - /** - * See the list-style-type property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getListStyleType(); - public void setListStyleType(String listStyleType) - throws DOMException; - - /** - * See the margin property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMargin(); - public void setMargin(String margin) - throws DOMException; - - /** - * See the margin-top property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarginTop(); - public void setMarginTop(String marginTop) - throws DOMException; - - /** - * See the margin-right property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarginRight(); - public void setMarginRight(String marginRight) - throws DOMException; - - /** - * See the margin-bottom property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarginBottom(); - public void setMarginBottom(String marginBottom) - throws DOMException; - - /** - * See the margin-left property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarginLeft(); - public void setMarginLeft(String marginLeft) - throws DOMException; - - /** - * See the marker-offset property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarkerOffset(); - public void setMarkerOffset(String markerOffset) - throws DOMException; - - /** - * See the marks property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMarks(); - public void setMarks(String marks) - throws DOMException; - - /** - * See the max-height property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMaxHeight(); - public void setMaxHeight(String maxHeight) - throws DOMException; - - /** - * See the max-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMaxWidth(); - public void setMaxWidth(String maxWidth) - throws DOMException; - - /** - * See the min-height property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMinHeight(); - public void setMinHeight(String minHeight) - throws DOMException; - - /** - * See the min-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getMinWidth(); - public void setMinWidth(String minWidth) - throws DOMException; - - /** - * See the orphans property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOrphans(); - public void setOrphans(String orphans) - throws DOMException; - - /** - * See the outline property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOutline(); - public void setOutline(String outline) - throws DOMException; - - /** - * See the outline-color property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOutlineColor(); - public void setOutlineColor(String outlineColor) - throws DOMException; - - /** - * See the outline-style property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOutlineStyle(); - public void setOutlineStyle(String outlineStyle) - throws DOMException; - - /** - * See the outline-width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOutlineWidth(); - public void setOutlineWidth(String outlineWidth) - throws DOMException; - - /** - * See the overflow property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getOverflow(); - public void setOverflow(String overflow) - throws DOMException; - - /** - * See the padding property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPadding(); - public void setPadding(String padding) - throws DOMException; - - /** - * See the padding-top property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPaddingTop(); - public void setPaddingTop(String paddingTop) - throws DOMException; - - /** - * See the padding-right property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPaddingRight(); - public void setPaddingRight(String paddingRight) - throws DOMException; - - /** - * See the padding-bottom property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPaddingBottom(); - public void setPaddingBottom(String paddingBottom) - throws DOMException; - - /** - * See the padding-left property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPaddingLeft(); - public void setPaddingLeft(String paddingLeft) - throws DOMException; - - /** - * See the page property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPage(); - public void setPage(String page) - throws DOMException; - - /** - * See the page-break-after property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPageBreakAfter(); - public void setPageBreakAfter(String pageBreakAfter) - throws DOMException; - - /** - * See the page-break-before property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPageBreakBefore(); - public void setPageBreakBefore(String pageBreakBefore) - throws DOMException; - - /** - * See the page-break-inside property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPageBreakInside(); - public void setPageBreakInside(String pageBreakInside) - throws DOMException; - - /** - * See the pause property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPause(); - public void setPause(String pause) - throws DOMException; - - /** - * See the pause-after property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPauseAfter(); - public void setPauseAfter(String pauseAfter) - throws DOMException; - - /** - * See the pause-before property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPauseBefore(); - public void setPauseBefore(String pauseBefore) - throws DOMException; - - /** - * See the pitch property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPitch(); - public void setPitch(String pitch) - throws DOMException; - - /** - * See the pitch-range property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPitchRange(); - public void setPitchRange(String pitchRange) - throws DOMException; - - /** - * See the play-during property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPlayDuring(); - public void setPlayDuring(String playDuring) - throws DOMException; - - /** - * See the position property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getPosition(); - public void setPosition(String position) - throws DOMException; - - /** - * See the quotes property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getQuotes(); - public void setQuotes(String quotes) - throws DOMException; - - /** - * See the richness property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getRichness(); - public void setRichness(String richness) - throws DOMException; - - /** - * See the right property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getRight(); - public void setRight(String right) - throws DOMException; - - /** - * See the size property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSize(); - public void setSize(String size) - throws DOMException; - - /** - * See the speak property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSpeak(); - public void setSpeak(String speak) - throws DOMException; - - /** - * See the speak-header property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSpeakHeader(); - public void setSpeakHeader(String speakHeader) - throws DOMException; - - /** - * See the speak-numeral property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSpeakNumeral(); - public void setSpeakNumeral(String speakNumeral) - throws DOMException; - - /** - * See the speak-punctuation property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSpeakPunctuation(); - public void setSpeakPunctuation(String speakPunctuation) - throws DOMException; - - /** - * See the speech-rate property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getSpeechRate(); - public void setSpeechRate(String speechRate) - throws DOMException; - - /** - * See the stress property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getStress(); - public void setStress(String stress) - throws DOMException; - - /** - * See the table-layout property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTableLayout(); - public void setTableLayout(String tableLayout) - throws DOMException; - - /** - * See the text-align property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTextAlign(); - public void setTextAlign(String textAlign) - throws DOMException; - - /** - * See the text-decoration property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTextDecoration(); - public void setTextDecoration(String textDecoration) - throws DOMException; - - /** - * See the text-indent property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTextIndent(); - public void setTextIndent(String textIndent) - throws DOMException; - - /** - * See the text-shadow property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTextShadow(); - public void setTextShadow(String textShadow) - throws DOMException; - - /** - * See the text-transform property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTextTransform(); - public void setTextTransform(String textTransform) - throws DOMException; - - /** - * See the top property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getTop(); - public void setTop(String top) - throws DOMException; - - /** - * See the unicode-bidi property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getUnicodeBidi(); - public void setUnicodeBidi(String unicodeBidi) - throws DOMException; - - /** - * See the vertical-align property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getVerticalAlign(); - public void setVerticalAlign(String verticalAlign) - throws DOMException; - - /** - * See the visibility property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getVisibility(); - public void setVisibility(String visibility) - throws DOMException; - - /** - * See the voice-family property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getVoiceFamily(); - public void setVoiceFamily(String voiceFamily) - throws DOMException; - - /** - * See the volume property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getVolume(); - public void setVolume(String volume) - throws DOMException; - - /** - * See the white-space property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getWhiteSpace(); - public void setWhiteSpace(String whiteSpace) - throws DOMException; - - /** - * See the widows property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getWidows(); - public void setWidows(String widows) - throws DOMException; - - /** - * See the width property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getWidth(); - public void setWidth(String width) - throws DOMException; - - /** - * See the word-spacing property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getWordSpacing(); - public void setWordSpacing(String wordSpacing) - throws DOMException; - - /** - * See the z-index property definition in CSS2. - * @exception DOMException - * SYNTAX_ERR: Raised if the new value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public String getZIndex(); - public void setZIndex(String zIndex) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSCharsetRule.java b/src/bind/java/org/w3c/dom/css/CSSCharsetRule.java deleted file mode 100644 index ac1884557..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSCharsetRule.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSCharsetRule</code> interface represents a @charset rule in a - * CSS style sheet. The value of the <code>encoding</code> attribute does - * not affect the encoding of text data in the DOM objects; this encoding is - * always UTF-16. After a stylesheet is loaded, the value of the - * <code>encoding</code> attribute is the value found in the - * <code>@charset</code> rule. If there was no <code>@charset</code> in the - * original document, then no <code>CSSCharsetRule</code> is created. The - * value of the <code>encoding</code> attribute may also be used as a hint - * for the encoding used on serialization of the style sheet. - * <p> The value of the @charset rule (and therefore of the - * <code>CSSCharsetRule</code>) may not correspond to the encoding the - * document actually came in; character encoding information e.g. in an HTTP - * header, has priority (see CSS document representation) but this is not - * reflected in the <code>CSSCharsetRule</code>. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSCharsetRule extends CSSRule { - /** - * The encoding information used in this <code>@charset</code> rule. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified encoding value has a syntax error - * and is unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this encoding rule is - * readonly. - */ - public String getEncoding(); - public void setEncoding(String encoding) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSFontFaceRule.java b/src/bind/java/org/w3c/dom/css/CSSFontFaceRule.java deleted file mode 100644 index a17957061..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSFontFaceRule.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>CSSFontFaceRule</code> interface represents a @font-face rule in - * a CSS style sheet. The <code>@font-face</code> rule is used to hold a set - * of font descriptions. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSFontFaceRule extends CSSRule { - /** - * The declaration-block of this rule. - */ - public CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSImportRule.java b/src/bind/java/org/w3c/dom/css/CSSImportRule.java deleted file mode 100644 index e18ad569b..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSImportRule.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.stylesheets.MediaList; - -/** - * The <code>CSSImportRule</code> interface represents a @import rule within - * a CSS style sheet. The <code>@import</code> rule is used to import style - * rules from other style sheets. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSImportRule extends CSSRule { - /** - * The location of the style sheet to be imported. The attribute will not - * contain the <code>"url(...)"</code> specifier around the URI. - */ - public String getHref(); - - /** - * A list of media types for which this style sheet may be used. - */ - public MediaList getMedia(); - - /** - * The style sheet referred to by this rule, if it has been loaded. The - * value of this attribute is <code>null</code> if the style sheet has - * not yet been loaded or if it will not be loaded (e.g. if the style - * sheet is for a media type not supported by the user agent). - */ - public CSSStyleSheet getStyleSheet(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSMediaRule.java b/src/bind/java/org/w3c/dom/css/CSSMediaRule.java deleted file mode 100644 index c74d3faf5..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSMediaRule.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.stylesheets.MediaList; - -/** - * The <code>CSSMediaRule</code> interface represents a @media rule in a CSS - * style sheet. A <code>@media</code> rule can be used to delimit style - * rules for specific media types. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSMediaRule extends CSSRule { - /** - * A list of media types for this rule. - */ - public MediaList getMedia(); - - /** - * A list of all CSS rules contained within the media block. - */ - public CSSRuleList getCssRules(); - - /** - * Used to insert a new rule into the media block. - * @param rule The parsable text representing the rule. For rule sets - * this contains both the selector and the style declaration. For - * at-rules, this specifies both the at-identifier and the rule - * content. - * @param index The index within the media block's rule collection of the - * rule before which to insert the specified rule. If the specified - * index is equal to the length of the media blocks's rule collection, - * the rule will be added to the end of the media block. - * @return The index within the media block's rule collection of the - * newly inserted rule. - * @exception DOMException - * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the - * specified index, e.g., if an <code>@import</code> rule is inserted - * after a standard rule set or other at-rule. - * <br>INDEX_SIZE_ERR: Raised if the specified index is not a valid - * insertion point. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is - * readonly. - * <br>SYNTAX_ERR: Raised if the specified rule has a syntax error and - * is unparsable. - */ - public int insertRule(String rule, - int index) - throws DOMException; - - /** - * Used to delete a rule from the media block. - * @param index The index within the media block's rule collection of the - * rule to remove. - * @exception DOMException - * INDEX_SIZE_ERR: Raised if the specified index does not correspond to - * a rule in the media rule list. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media rule is - * readonly. - */ - public void deleteRule(int index) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSPageRule.java b/src/bind/java/org/w3c/dom/css/CSSPageRule.java deleted file mode 100644 index d2fc9c351..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSPageRule.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSPageRule</code> interface represents a @page rule within a - * CSS style sheet. The <code>@page</code> rule is used to specify the - * dimensions, orientation, margins, etc. of a page box for paged media. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSPageRule extends CSSRule { - /** - * The parsable textual representation of the page selector for the rule. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified CSS string value has a syntax - * error and is unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. - */ - public String getSelectorText(); - public void setSelectorText(String selectorText) - throws DOMException; - - /** - * The declaration-block of this rule. - */ - public CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSPrimitiveValue.java b/src/bind/java/org/w3c/dom/css/CSSPrimitiveValue.java deleted file mode 100644 index 781ce8ab4..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSPrimitiveValue.java +++ /dev/null @@ -1,296 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSPrimitiveValue</code> interface represents a single CSS value - * . This interface may be used to determine the value of a specific style - * property currently set in a block or to set a specific style property - * explicitly within the block. An instance of this interface might be - * obtained from the <code>getPropertyCSSValue</code> method of the - * <code>CSSStyleDeclaration</code> interface. A - * <code>CSSPrimitiveValue</code> object only occurs in a context of a CSS - * property. - * <p> Conversions are allowed between absolute values (from millimeters to - * centimeters, from degrees to radians, and so on) but not between relative - * values. (For example, a pixel value cannot be converted to a centimeter - * value.) Percentage values can't be converted since they are relative to - * the parent value (or another property value). There is one exception for - * color percentage values: since a color percentage value is relative to - * the range 0-255, a color percentage value can be converted to a number; - * (see also the <code>RGBColor</code> interface). - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSPrimitiveValue extends CSSValue { - // UnitTypes - /** - * The value is not a recognized CSS2 value. The value can only be - * obtained by using the <code>cssText</code> attribute. - */ - public static final short CSS_UNKNOWN = 0; - /** - * The value is a simple number. The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_NUMBER = 1; - /** - * The value is a percentage. The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_PERCENTAGE = 2; - /** - * The value is a length (ems). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_EMS = 3; - /** - * The value is a length (exs). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_EXS = 4; - /** - * The value is a length (px). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_PX = 5; - /** - * The value is a length (cm). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_CM = 6; - /** - * The value is a length (mm). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_MM = 7; - /** - * The value is a length (in). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_IN = 8; - /** - * The value is a length (pt). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_PT = 9; - /** - * The value is a length (pc). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_PC = 10; - /** - * The value is an angle (deg). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_DEG = 11; - /** - * The value is an angle (rad). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_RAD = 12; - /** - * The value is an angle (grad). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_GRAD = 13; - /** - * The value is a time (ms). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_MS = 14; - /** - * The value is a time (s). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_S = 15; - /** - * The value is a frequency (Hz). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_HZ = 16; - /** - * The value is a frequency (kHz). The value can be obtained by using the - * <code>getFloatValue</code> method. - */ - public static final short CSS_KHZ = 17; - /** - * The value is a number with an unknown dimension. The value can be - * obtained by using the <code>getFloatValue</code> method. - */ - public static final short CSS_DIMENSION = 18; - /** - * The value is a STRING. The value can be obtained by using the - * <code>getStringValue</code> method. - */ - public static final short CSS_STRING = 19; - /** - * The value is a URI. The value can be obtained by using the - * <code>getStringValue</code> method. - */ - public static final short CSS_URI = 20; - /** - * The value is an identifier. The value can be obtained by using the - * <code>getStringValue</code> method. - */ - public static final short CSS_IDENT = 21; - /** - * The value is a attribute function. The value can be obtained by using - * the <code>getStringValue</code> method. - */ - public static final short CSS_ATTR = 22; - /** - * The value is a counter or counters function. The value can be obtained - * by using the <code>getCounterValue</code> method. - */ - public static final short CSS_COUNTER = 23; - /** - * The value is a rect function. The value can be obtained by using the - * <code>getRectValue</code> method. - */ - public static final short CSS_RECT = 24; - /** - * The value is a RGB color. The value can be obtained by using the - * <code>getRGBColorValue</code> method. - */ - public static final short CSS_RGBCOLOR = 25; - - /** - * The type of the value as defined by the constants specified above. - */ - public short getPrimitiveType(); - - /** - * A method to set the float value with a specified unit. If the property - * attached with this value can not accept the specified unit or the - * float value, the value will be unchanged and a - * <code>DOMException</code> will be raised. - * @param unitType A unit code as defined above. The unit code can only - * be a float unit type (i.e. <code>CSS_NUMBER</code>, - * <code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>, - * <code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>, - * <code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>, - * <code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>, - * <code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>, - * <code>CSS_HZ</code>, <code>CSS_KHZ</code>, - * <code>CSS_DIMENSION</code>). - * @param floatValue The new float value. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the attached property doesn't support - * the float value or the unit type. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public void setFloatValue(short unitType, - float floatValue) - throws DOMException; - - /** - * This method is used to get a float value in a specified unit. If this - * CSS value doesn't contain a float value or can't be converted into - * the specified unit, a <code>DOMException</code> is raised. - * @param unitType A unit code to get the float value. The unit code can - * only be a float unit type (i.e. <code>CSS_NUMBER</code>, - * <code>CSS_PERCENTAGE</code>, <code>CSS_EMS</code>, - * <code>CSS_EXS</code>, <code>CSS_PX</code>, <code>CSS_CM</code>, - * <code>CSS_MM</code>, <code>CSS_IN</code>, <code>CSS_PT</code>, - * <code>CSS_PC</code>, <code>CSS_DEG</code>, <code>CSS_RAD</code>, - * <code>CSS_GRAD</code>, <code>CSS_MS</code>, <code>CSS_S</code>, - * <code>CSS_HZ</code>, <code>CSS_KHZ</code>, - * <code>CSS_DIMENSION</code>). - * @return The float value in the specified unit. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a float - * value or if the float value can't be converted into the specified - * unit. - */ - public float getFloatValue(short unitType) - throws DOMException; - - /** - * A method to set the string value with the specified unit. If the - * property attached to this value can't accept the specified unit or - * the string value, the value will be unchanged and a - * <code>DOMException</code> will be raised. - * @param stringType A string code as defined above. The string code can - * only be a string unit type (i.e. <code>CSS_STRING</code>, - * <code>CSS_URI</code>, <code>CSS_IDENT</code>, and - * <code>CSS_ATTR</code>). - * @param stringValue The new string value. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string - * value or if the string value can't be converted into the specified - * unit. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this property is readonly. - */ - public void setStringValue(short stringType, - String stringValue) - throws DOMException; - - /** - * This method is used to get the string value. If the CSS value doesn't - * contain a string value, a <code>DOMException</code> is raised. Some - * properties (like 'font-family' or 'voice-family') convert a - * whitespace separated list of idents to a string. - * @return The string value in the current unit. The current - * <code>primitiveType</code> can only be a string unit type (i.e. - * <code>CSS_STRING</code>, <code>CSS_URI</code>, - * <code>CSS_IDENT</code> and <code>CSS_ATTR</code>). - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a string - * value. - */ - public String getStringValue() - throws DOMException; - - /** - * This method is used to get the Counter value. If this CSS value - * doesn't contain a counter value, a <code>DOMException</code> is - * raised. Modification to the corresponding style property can be - * achieved using the <code>Counter</code> interface. - * @return The Counter value. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a - * Counter value (e.g. this is not <code>CSS_COUNTER</code>). - */ - public Counter getCounterValue() - throws DOMException; - - /** - * This method is used to get the Rect value. If this CSS value doesn't - * contain a rect value, a <code>DOMException</code> is raised. - * Modification to the corresponding style property can be achieved - * using the <code>Rect</code> interface. - * @return The Rect value. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the CSS value doesn't contain a Rect - * value. (e.g. this is not <code>CSS_RECT</code>). - */ - public Rect getRectValue() - throws DOMException; - - /** - * This method is used to get the RGB color. If this CSS value doesn't - * contain a RGB color value, a <code>DOMException</code> is raised. - * Modification to the corresponding style property can be achieved - * using the <code>RGBColor</code> interface. - * @return the RGB color value. - * @exception DOMException - * INVALID_ACCESS_ERR: Raised if the attached property can't return a - * RGB color value (e.g. this is not <code>CSS_RGBCOLOR</code>). - */ - public RGBColor getRGBColorValue() - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSRule.java b/src/bind/java/org/w3c/dom/css/CSSRule.java deleted file mode 100644 index 8626f8089..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSRule.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSRule</code> interface is the abstract base interface for any - * type of CSS statement. This includes both rule sets and at-rules. An - * implementation is expected to preserve all rules specified in a CSS style - * sheet, even if the rule is not recognized by the parser. Unrecognized - * rules are represented using the <code>CSSUnknownRule</code> interface. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSRule { - // RuleType - /** - * The rule is a <code>CSSUnknownRule</code>. - */ - public static final short UNKNOWN_RULE = 0; - /** - * The rule is a <code>CSSStyleRule</code>. - */ - public static final short STYLE_RULE = 1; - /** - * The rule is a <code>CSSCharsetRule</code>. - */ - public static final short CHARSET_RULE = 2; - /** - * The rule is a <code>CSSImportRule</code>. - */ - public static final short IMPORT_RULE = 3; - /** - * The rule is a <code>CSSMediaRule</code>. - */ - public static final short MEDIA_RULE = 4; - /** - * The rule is a <code>CSSFontFaceRule</code>. - */ - public static final short FONT_FACE_RULE = 5; - /** - * The rule is a <code>CSSPageRule</code>. - */ - public static final short PAGE_RULE = 6; - - /** - * The type of the rule, as defined above. The expectation is that - * binding-specific casting methods can be used to cast down from an - * instance of the <code>CSSRule</code> interface to the specific - * derived interface implied by the <code>type</code>. - */ - public short getType(); - - /** - * The parsable textual representation of the rule. This reflects the - * current state of the rule and not its initial value. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified CSS string value has a syntax - * error and is unparsable. - * <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string - * value represents a different type of rule than the current one. - * <br>HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at - * this point in the style sheet. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if the rule is readonly. - */ - public String getCssText(); - public void setCssText(String cssText) - throws DOMException; - - /** - * The style sheet that contains this rule. - */ - public CSSStyleSheet getParentStyleSheet(); - - /** - * If this rule is contained inside another rule (e.g. a style rule - * inside an @media block), this is the containing rule. If this rule is - * not nested inside any other rules, this returns <code>null</code>. - */ - public CSSRule getParentRule(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSRuleList.java b/src/bind/java/org/w3c/dom/css/CSSRuleList.java deleted file mode 100644 index ba4052074..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSRuleList.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>CSSRuleList</code> interface provides the abstraction of an - * ordered collection of CSS rules. - * <p> The items in the <code>CSSRuleList</code> are accessible via an - * integral index, starting from 0. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSRuleList { - /** - * The number of <code>CSSRules</code> in the list. The range of valid - * child rule indices is <code>0</code> to <code>length-1</code> - * inclusive. - */ - public int getLength(); - - /** - * Used to retrieve a CSS rule by ordinal index. The order in this - * collection represents the order of the rules in the CSS style sheet. - * If index is greater than or equal to the number of rules in the list, - * this returns <code>null</code>. - * @param indexIndex into the collection - * @return The style rule at the <code>index</code> position in the - * <code>CSSRuleList</code>, or <code>null</code> if that is not a - * valid index. - */ - public CSSRule item(int index); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSStyleDeclaration.java b/src/bind/java/org/w3c/dom/css/CSSStyleDeclaration.java deleted file mode 100644 index d017fbd55..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSStyleDeclaration.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSStyleDeclaration</code> interface represents a single CSS - * declaration block. This interface may be used to determine the style - * properties currently set in a block or to set style properties explicitly - * within the block. - * <p> While an implementation may not recognize all CSS properties within a - * CSS declaration block, it is expected to provide access to all specified - * properties in the style sheet through the <code>CSSStyleDeclaration</code> - * interface. Furthermore, implementations that support a specific level of - * CSS should correctly handle CSS shorthand properties for that level. For - * a further discussion of shorthand properties, see the - * <code>CSS2Properties</code> interface. - * <p> This interface is also used to provide a read-only access to the - * computed values of an element. See also the <code>ViewCSS</code> - * interface. The CSS Object Model doesn't provide an access to the - * specified or actual values of the CSS cascade. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSStyleDeclaration { - /** - * The parsable textual representation of the declaration block - * (excluding the surrounding curly braces). Setting this attribute will - * result in the parsing of the new value and resetting of all the - * properties in the declaration block including the removal or addition - * of properties. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified CSS string value has a syntax - * error and is unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is - * readonly or a property is readonly. - */ - public String getCssText(); - public void setCssText(String cssText) - throws DOMException; - - /** - * Used to retrieve the value of a CSS property if it has been explicitly - * set within this declaration block. - * @param propertyName The name of the CSS property. See the CSS property - * index. - * @return Returns the value of the property if it has been explicitly - * set for this declaration block. Returns the empty string if the - * property has not been set. - */ - public String getPropertyValue(String propertyName); - - /** - * Used to retrieve the object representation of the value of a CSS - * property if it has been explicitly set within this declaration block. - * This method returns <code>null</code> if the property is a shorthand - * property. Shorthand property values can only be accessed and modified - * as strings, using the <code>getPropertyValue</code> and - * <code>setProperty</code> methods. - * @param propertyName The name of the CSS property. See the CSS property - * index. - * @return Returns the value of the property if it has been explicitly - * set for this declaration block. Returns <code>null</code> if the - * property has not been set. - */ - public CSSValue getPropertyCSSValue(String propertyName); - - /** - * Used to remove a CSS property if it has been explicitly set within - * this declaration block. - * @param propertyName The name of the CSS property. See the CSS property - * index. - * @return Returns the value of the property if it has been explicitly - * set for this declaration block. Returns the empty string if the - * property has not been set or the property name does not correspond - * to a known CSS property. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is readonly - * or the property is readonly. - */ - public String removeProperty(String propertyName) - throws DOMException; - - /** - * Used to retrieve the priority of a CSS property (e.g. the - * <code>"important"</code> qualifier) if the property has been - * explicitly set in this declaration block. - * @param propertyName The name of the CSS property. See the CSS property - * index. - * @return A string representing the priority (e.g. - * <code>"important"</code>) if one exists. The empty string if none - * exists. - */ - public String getPropertyPriority(String propertyName); - - /** - * Used to set a property value and priority within this declaration - * block. - * @param propertyName The name of the CSS property. See the CSS property - * index. - * @param value The new value of the property. - * @param priority The new priority of the property (e.g. - * <code>"important"</code>). - * @exception DOMException - * SYNTAX_ERR: Raised if the specified value has a syntax error and is - * unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this declaration is - * readonly or the property is readonly. - */ - public void setProperty(String propertyName, - String value, - String priority) - throws DOMException; - - /** - * The number of properties that have been explicitly set in this - * declaration block. The range of valid indices is 0 to length-1 - * inclusive. - */ - public int getLength(); - - /** - * Used to retrieve the properties that have been explicitly set in this - * declaration block. The order of the properties retrieved using this - * method does not have to be the order in which they were set. This - * method can be used to iterate over all properties in this declaration - * block. - * @param index Index of the property name to retrieve. - * @return The name of the property at this ordinal position. The empty - * string if no property exists at this position. - */ - public String item(int index); - - /** - * The CSS rule that contains this declaration block or <code>null</code> - * if this <code>CSSStyleDeclaration</code> is not attached to a - * <code>CSSRule</code>. - */ - public CSSRule getParentRule(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSStyleRule.java b/src/bind/java/org/w3c/dom/css/CSSStyleRule.java deleted file mode 100644 index 45a647b19..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSStyleRule.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSStyleRule</code> interface represents a single rule set in a - * CSS style sheet. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSStyleRule extends CSSRule { - /** - * The textual representation of the selector for the rule set. The - * implementation may have stripped out insignificant whitespace while - * parsing the selector. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified CSS string value has a syntax - * error and is unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this rule is readonly. - */ - public String getSelectorText(); - public void setSelectorText(String selectorText) - throws DOMException; - - /** - * The declaration-block of this rule set. - */ - public CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSStyleSheet.java b/src/bind/java/org/w3c/dom/css/CSSStyleSheet.java deleted file mode 100644 index cdfd74d9a..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSStyleSheet.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; -import org.w3c.dom.stylesheets.StyleSheet; - -/** - * The <code>CSSStyleSheet</code> interface is a concrete interface used to - * represent a CSS style sheet i.e., a style sheet whose content type is - * "text/css". - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSStyleSheet extends StyleSheet { - /** - * If this style sheet comes from an <code>@import</code> rule, the - * <code>ownerRule</code> attribute will contain the - * <code>CSSImportRule</code>. In that case, the <code>ownerNode</code> - * attribute in the <code>StyleSheet</code> interface will be - * <code>null</code>. If the style sheet comes from an element or a - * processing instruction, the <code>ownerRule</code> attribute will be - * <code>null</code> and the <code>ownerNode</code> attribute will - * contain the <code>Node</code>. - */ - public CSSRule getOwnerRule(); - - /** - * The list of all CSS rules contained within the style sheet. This - * includes both rule sets and at-rules. - */ - public CSSRuleList getCssRules(); - - /** - * Used to insert a new rule into the style sheet. The new rule now - * becomes part of the cascade. - * @param rule The parsable text representing the rule. For rule sets - * this contains both the selector and the style declaration. For - * at-rules, this specifies both the at-identifier and the rule - * content. - * @param index The index within the style sheet's rule list of the rule - * before which to insert the specified rule. If the specified index - * is equal to the length of the style sheet's rule collection, the - * rule will be added to the end of the style sheet. - * @return The index within the style sheet's rule collection of the - * newly inserted rule. - * @exception DOMException - * HIERARCHY_REQUEST_ERR: Raised if the rule cannot be inserted at the - * specified index e.g. if an <code>@import</code> rule is inserted - * after a standard rule set or other at-rule. - * <br>INDEX_SIZE_ERR: Raised if the specified index is not a valid - * insertion point. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is - * readonly. - * <br>SYNTAX_ERR: Raised if the specified rule has a syntax error and - * is unparsable. - */ - public int insertRule(String rule, - int index) - throws DOMException; - - /** - * Used to delete a rule from the style sheet. - * @param index The index within the style sheet's rule list of the rule - * to remove. - * @exception DOMException - * INDEX_SIZE_ERR: Raised if the specified index does not correspond to - * a rule in the style sheet's rule list. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this style sheet is - * readonly. - */ - public void deleteRule(int index) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSUnknownRule.java b/src/bind/java/org/w3c/dom/css/CSSUnknownRule.java deleted file mode 100644 index 763d5f1b6..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSUnknownRule.java +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>CSSUnknownRule</code> interface represents an at-rule not - * supported by this user agent. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSUnknownRule extends CSSRule { -} diff --git a/src/bind/java/org/w3c/dom/css/CSSValue.java b/src/bind/java/org/w3c/dom/css/CSSValue.java deleted file mode 100644 index c40929095..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSValue.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMException; - -/** - * The <code>CSSValue</code> interface represents a simple or a complex - * value. A <code>CSSValue</code> object only occurs in a context of a CSS - * property. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSValue { - // UnitTypes - /** - * The value is inherited and the <code>cssText</code> contains "inherit". - */ - public static final short CSS_INHERIT = 0; - /** - * The value is a primitive value and an instance of the - * <code>CSSPrimitiveValue</code> interface can be obtained by using - * binding-specific casting methods on this instance of the - * <code>CSSValue</code> interface. - */ - public static final short CSS_PRIMITIVE_VALUE = 1; - /** - * The value is a <code>CSSValue</code> list and an instance of the - * <code>CSSValueList</code> interface can be obtained by using - * binding-specific casting methods on this instance of the - * <code>CSSValue</code> interface. - */ - public static final short CSS_VALUE_LIST = 2; - /** - * The value is a custom value. - */ - public static final short CSS_CUSTOM = 3; - - /** - * A string representation of the current value. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified CSS string value has a syntax - * error (according to the attached property) or is unparsable. - * <br>INVALID_MODIFICATION_ERR: Raised if the specified CSS string - * value represents a different type of values than the values allowed - * by the CSS property. - * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this value is readonly. - */ - public String getCssText(); - public void setCssText(String cssText) - throws DOMException; - - /** - * A code defining the type of the value as defined above. - */ - public short getCssValueType(); - -} diff --git a/src/bind/java/org/w3c/dom/css/CSSValueList.java b/src/bind/java/org/w3c/dom/css/CSSValueList.java deleted file mode 100644 index b159165d9..000000000 --- a/src/bind/java/org/w3c/dom/css/CSSValueList.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>CSSValueList</code> interface provides the abstraction of an - * ordered collection of CSS values. - * <p> Some properties allow an empty list into their syntax. In that case, - * these properties take the <code>none</code> identifier. So, an empty list - * means that the property has the value <code>none</code>. - * <p> The items in the <code>CSSValueList</code> are accessible via an - * integral index, starting from 0. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface CSSValueList extends CSSValue { - /** - * The number of <code>CSSValues</code> in the list. The range of valid - * values of the indices is <code>0</code> to <code>length-1</code> - * inclusive. - */ - public int getLength(); - - /** - * Used to retrieve a <code>CSSValue</code> by ordinal index. The order in - * this collection represents the order of the values in the CSS style - * property. If index is greater than or equal to the number of values - * in the list, this returns <code>null</code>. - * @param indexIndex into the collection. - * @return The <code>CSSValue</code> at the <code>index</code> position - * in the <code>CSSValueList</code>, or <code>null</code> if that is - * not a valid index. - */ - public CSSValue item(int index); - -} diff --git a/src/bind/java/org/w3c/dom/css/Counter.java b/src/bind/java/org/w3c/dom/css/Counter.java deleted file mode 100644 index 8cd4967b3..000000000 --- a/src/bind/java/org/w3c/dom/css/Counter.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>Counter</code> interface is used to represent any counter or - * counters function value. This interface reflects the values in the - * underlying style property. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface Counter { - /** - * This attribute is used for the identifier of the counter. - */ - public String getIdentifier(); - - /** - * This attribute is used for the style of the list. - */ - public String getListStyle(); - - /** - * This attribute is used for the separator of the nested counters. - */ - public String getSeparator(); - -} diff --git a/src/bind/java/org/w3c/dom/css/DOMImplementationCSS.java b/src/bind/java/org/w3c/dom/css/DOMImplementationCSS.java deleted file mode 100644 index 66755de64..000000000 --- a/src/bind/java/org/w3c/dom/css/DOMImplementationCSS.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.DOMImplementation; -import org.w3c.dom.DOMException; - -/** - * This interface allows the DOM user to create a <code>CSSStyleSheet</code> - * outside the context of a document. There is no way to associate the new - * <code>CSSStyleSheet</code> with a document in DOM Level 2. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface DOMImplementationCSS extends DOMImplementation { - /** - * Creates a new <code>CSSStyleSheet</code>. - * @param title The advisory title. See also the section. - * @param media The comma-separated list of media associated with the new - * style sheet. See also the section. - * @return A new CSS style sheet. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified media string value has a syntax - * error and is unparsable. - */ - public CSSStyleSheet createCSSStyleSheet(String title, - String media) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/css/DocumentCSS.java b/src/bind/java/org/w3c/dom/css/DocumentCSS.java deleted file mode 100644 index bb1b8540a..000000000 --- a/src/bind/java/org/w3c/dom/css/DocumentCSS.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.stylesheets.DocumentStyle; -import org.w3c.dom.Element; - -/** - * This interface represents a document with a CSS view. - * <p> The <code>getOverrideStyle</code> method provides a mechanism through - * which a DOM author could effect immediate change to the style of an - * element without modifying the explicitly linked style sheets of a - * document or the inline style of elements in the style sheets. This style - * sheet comes after the author style sheet in the cascade algorithm and is - * called override style sheet. The override style sheet takes precedence - * over author style sheets. An "!important" declaration still takes - * precedence over a normal declaration. Override, author, and user style - * sheets all may contain "!important" declarations. User "!important" rules - * take precedence over both override and author "!important" rules, and - * override "!important" rules take precedence over author "!important" - * rules. - * <p> The expectation is that an instance of the <code>DocumentCSS</code> - * interface can be obtained by using binding-specific casting methods on an - * instance of the <code>Document</code> interface. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface DocumentCSS extends DocumentStyle { - /** - * This method is used to retrieve the override style declaration for a - * specified element and a specified pseudo-element. - * @param elt The element whose style is to be modified. This parameter - * cannot be null. - * @param pseudoElt The pseudo-element or <code>null</code> if none. - * @return The override style declaration. - */ - public CSSStyleDeclaration getOverrideStyle(Element elt, - String pseudoElt); - -} diff --git a/src/bind/java/org/w3c/dom/css/ElementCSSInlineStyle.java b/src/bind/java/org/w3c/dom/css/ElementCSSInlineStyle.java deleted file mode 100644 index 98b60bf9d..000000000 --- a/src/bind/java/org/w3c/dom/css/ElementCSSInlineStyle.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * Inline style information attached to elements is exposed through the - * <code>style</code> attribute. This represents the contents of the STYLE - * attribute for HTML elements (or elements in other schemas or DTDs which - * use the STYLE attribute in the same way). The expectation is that an - * instance of the ElementCSSInlineStyle interface can be obtained by using - * binding-specific casting methods on an instance of the Element interface - * when the element supports inline CSS style informations. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface ElementCSSInlineStyle { - /** - * The style attribute. - */ - public CSSStyleDeclaration getStyle(); - -} diff --git a/src/bind/java/org/w3c/dom/css/RGBColor.java b/src/bind/java/org/w3c/dom/css/RGBColor.java deleted file mode 100644 index cd5daa567..000000000 --- a/src/bind/java/org/w3c/dom/css/RGBColor.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>RGBColor</code> interface is used to represent any RGB color - * value. This interface reflects the values in the underlying style - * property. Hence, modifications made to the <code>CSSPrimitiveValue</code> - * objects modify the style property. - * <p> A specified RGB color is not clipped (even if the number is outside the - * range 0-255 or 0%-100%). A computed RGB color is clipped depending on the - * device. - * <p> Even if a style sheet can only contain an integer for a color value, - * the internal storage of this integer is a float, and this can be used as - * a float in the specified or the computed style. - * <p> A color percentage value can always be converted to a number and vice - * versa. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface RGBColor { - /** - * This attribute is used for the red value of the RGB color. - */ - public CSSPrimitiveValue getRed(); - - /** - * This attribute is used for the green value of the RGB color. - */ - public CSSPrimitiveValue getGreen(); - - /** - * This attribute is used for the blue value of the RGB color. - */ - public CSSPrimitiveValue getBlue(); - -} diff --git a/src/bind/java/org/w3c/dom/css/Rect.java b/src/bind/java/org/w3c/dom/css/Rect.java deleted file mode 100644 index f5efb1084..000000000 --- a/src/bind/java/org/w3c/dom/css/Rect.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -/** - * The <code>Rect</code> interface is used to represent any rect value. This - * interface reflects the values in the underlying style property. Hence, - * modifications made to the <code>CSSPrimitiveValue</code> objects modify - * the style property. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface Rect { - /** - * This attribute is used for the top of the rect. - */ - public CSSPrimitiveValue getTop(); - - /** - * This attribute is used for the right of the rect. - */ - public CSSPrimitiveValue getRight(); - - /** - * This attribute is used for the bottom of the rect. - */ - public CSSPrimitiveValue getBottom(); - - /** - * This attribute is used for the left of the rect. - */ - public CSSPrimitiveValue getLeft(); - -} diff --git a/src/bind/java/org/w3c/dom/css/ViewCSS.java b/src/bind/java/org/w3c/dom/css/ViewCSS.java deleted file mode 100644 index 6c98bd4ec..000000000 --- a/src/bind/java/org/w3c/dom/css/ViewCSS.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.css; - -import org.w3c.dom.views.AbstractView; -import org.w3c.dom.Element; - -/** - * This interface represents a CSS view. The <code>getComputedStyle</code> - * method provides a read only access to the computed values of an element. - * <p> The expectation is that an instance of the <code>ViewCSS</code> - * interface can be obtained by using binding-specific casting methods on an - * instance of the <code>AbstractView</code> interface. - * <p> Since a computed style is related to an <code>Element</code> node, if - * this element is removed from the document, the associated - * <code>CSSStyleDeclaration</code> and <code>CSSValue</code> related to - * this declaration are no longer valid. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface ViewCSS extends AbstractView { - /** - * This method is used to get the computed style as it is defined in . - * @param elt The element whose style is to be computed. This parameter - * cannot be null. - * @param pseudoElt The pseudo-element or <code>null</code> if none. - * @return The computed style. The <code>CSSStyleDeclaration</code> is - * read-only and contains only absolute values. - */ - public CSSStyleDeclaration getComputedStyle(Element elt, - String pseudoElt); - -} diff --git a/src/bind/java/org/w3c/dom/events/CustomEvent.java b/src/bind/java/org/w3c/dom/events/CustomEvent.java deleted file mode 100644 index c7bdf0433..000000000 --- a/src/bind/java/org/w3c/dom/events/CustomEvent.java +++ /dev/null @@ -1,70 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -/** - * The <code>CustomEvent</code> interface gives access to the attributes - * <code>Event.currentTarget</code> and <code>Event.eventPhase</code>. It is - * intended to be used by the DOM Events implementation to access the - * underlying current target and event phase while dispatching a custom - * <code>Event</code> in the tree; it is also intended to be implemented, - * and <em>not used</em>, by DOM applications. - * <p> The methods contained in this interface are not intended to be used by - * a DOM application, especially during the dispatch on the - * <code>Event</code> object. Changing the current target or the current - * phase may result in unpredictable results of the event flow. The DOM - * Events implementation should ensure that both methods return the - * appropriate current target and phase before invoking each event listener - * on the current target to protect DOM applications from malicious event - * listeners. - * <p ><b>Note:</b> If this interface is supported by the event object, - * <code>Event.isCustom()</code> must return <code>true</code>. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 3 - */ -public interface CustomEvent extends Event { - /** - * The <code>setDispatchState</code> method is used by the DOM Events - * implementation to set the values of <code>Event.currentTarget</code> - * and <code>Event.eventPhase</code>. It also reset the states of - * <code>isPropagationStopped</code> and - * <code>isImmediatePropagationStopped</code>. - * @param target Specifies the new value for the - * <code>Event.currentTarget</code> attribute. - * @param phase Specifies the new value for the - * <code>Event.eventPhase</code> attribute. - */ - public void setDispatchState(EventTarget target, - short phase); - - /** - * This method will return <code>true</code> if the method - * <code>stopPropagation()</code> has been called for this event, - * <code>false</code> in any other cases. - * @return <code>true</code> if the event propagation has been stopped - * in the current group. - */ - public boolean isPropagationStopped(); - - /** - * The <code>isImmediatePropagationStopped</code> method is used by the - * DOM Events implementation to know if the method - * <code>stopImmediatePropagation()</code> has been called for this - * event. It returns <code>true</code> if the method has been called, - * <code>false</code> otherwise. - * @return <code>true</code> if the event propagation has been stopped - * immediately in the current group. - */ - public boolean isImmediatePropagationStopped(); - -} diff --git a/src/bind/java/org/w3c/dom/events/DocumentEvent.java b/src/bind/java/org/w3c/dom/events/DocumentEvent.java deleted file mode 100644 index 8f50dd74b..000000000 --- a/src/bind/java/org/w3c/dom/events/DocumentEvent.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.DOMException; - -/** - * The <code>DocumentEvent</code> interface provides a mechanism by which the - * user can create an <code>Event</code> object of a type supported by the - * implementation. If the feature "Events" is supported by the - * <code>Document</code> object, the <code>DocumentEvent</code> interface - * must be implemented on the same object. If the feature "+Events" is - * supported by the <code>Document</code> object, an object that supports - * the <code>DocumentEvent</code> interface must be returned by invoking the - * method <code>Node.getFeature("+Events", "3.0")</code> on the - * <code>Document</code> object. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface DocumentEvent { - /** - * - * @param eventType The <code>eventType</code> parameter specifies the - * name of the DOM Events interface to be supported by the created - * event object, e.g. <code>"Event"</code>, <code>"MouseEvent"</code>, - * <code>"MutationEvent"</code> and so on. If the <code>Event</code> - * is to be dispatched via the <code>EventTarget.dispatchEvent()</code> - * method the appropriate event init method must be called after - * creation in order to initialize the <code>Event</code>'s values. - * As an example, a user wishing to synthesize some kind of - * <code>UIEvent</code> would invoke - * <code>DocumentEvent.createEvent("UIEvent")</code>. The - * <code>UIEvent.initUIEventNS()</code> method could then be called on - * the newly created <code>UIEvent</code> object to set the specific - * type of user interface event to be dispatched, - * <code>{"http://www.w3.org/2001/xml-events", "DOMActivate"}</code> - * for example, and set its context information, e.g. - * <code>UIEvent.detail</code> in this example. The - * <code>createEvent</code> method is used in creating - * <code>Event</code>s when it is either inconvenient or unnecessary - * for the user to create an <code>Event</code> themselves. In cases - * where the implementation provided <code>Event</code> is - * insufficient, users may supply their own <code>Event</code> - * implementations for use with the - * <code>EventTarget.dispatchEvent()</code> method. However, the DOM - * implementation needs access to the attributes - * <code>Event.currentTarget</code> and <code>Event.eventPhase</code> - * to appropriately propagate the event in the DOM tree. Therefore - * users' <code>Event</code> implementations might need to support the - * <code>CustomEvent</code> interface for that effect. - * <p ><b>Note:</b> For backward compatibility reason, "UIEvents", - * "MouseEvents", "MutationEvents", and "HTMLEvents" feature names are - * valid values for the parameter <code>eventType</code> and represent - * respectively the interfaces "UIEvent", "MouseEvent", - * "MutationEvent", and "Event". - * @return The newly created event object. - * @exception DOMException - * NOT_SUPPORTED_ERR: Raised if the implementation does not support the - * <code>Event</code> interface requested. - */ - public Event createEvent(String eventType) - throws DOMException; - - /** - * Test if the implementation can generate events of a specified type. - * @param namespaceURI Specifies the <code>Event.namespaceURI</code> of - * the event. - * @param type Specifies the <code>Event.type</code> of the event. - * @return <code>true</code> if the implementation can generate and - * dispatch this event type, <code>false</code> otherwise. - * @since DOM Level 3 - */ - public boolean canDispatch(String namespaceURI, - String type); - -} diff --git a/src/bind/java/org/w3c/dom/events/Event.java b/src/bind/java/org/w3c/dom/events/Event.java deleted file mode 100644 index 949931518..000000000 --- a/src/bind/java/org/w3c/dom/events/Event.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -/** - * The <code>Event</code> interface is used to provide contextual information - * about an event to the listener processing the event. An object which - * implements the <code>Event</code> interface is passed as the parameter to - * an <code>EventListener</code>. More specific context information is - * passed to event listeners by deriving additional interfaces from - * <code>Event</code> which contain information directly relating to the - * type of event they represent. These derived interfaces are also - * implemented by the object passed to the event listener. - * <p> To create an instance of the <code>Event</code> interface, use the - * <code>DocumentEvent.createEvent("Event")</code> method call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface Event { - // PhaseType - /** - * The current event phase is the capture phase. - */ - public static final short CAPTURING_PHASE = 1; - /** - * The current event is in the target phase, i.e. it is being evaluated - * at the event target. - */ - public static final short AT_TARGET = 2; - /** - * The current event phase is the bubbling phase. - */ - public static final short BUBBLING_PHASE = 3; - - /** - * The name should be an <a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCName'>NCName</a> as defined in [<a href='http://www.w3.org/TR/1999/REC-xml-names-19990114/'>XML Namespaces</a>] - * and is case-sensitive. - * <br> If the attribute <code>Event.namespaceURI</code> is different from - * <code>null</code>, this attribute represents a local name. - */ - public String getType(); - - /** - * Used to indicate the event target. This attribute contains the target - * node when used with the . - */ - public EventTarget getTarget(); - - /** - * Used to indicate the <code>EventTarget</code> whose - * <code>EventListeners</code> are currently being processed. This is - * particularly useful during the capture and bubbling phases. This - * attribute could contain the target node or a target ancestor when - * used with the . - */ - public EventTarget getCurrentTarget(); - - /** - * Used to indicate which phase of event flow is currently being - * accomplished. - */ - public short getEventPhase(); - - /** - * Used to indicate whether or not an event is a bubbling event. If the - * event can bubble the value is <code>true</code>, otherwise the value - * is <code>false</code>. - */ - public boolean getBubbles(); - - /** - * Used to indicate whether or not an event can have its default action - * prevented (see also ). If the default action can be prevented the - * value is <code>true</code>, otherwise the value is <code>false</code> - * . - */ - public boolean getCancelable(); - - /** - * Used to specify the time (in milliseconds relative to the epoch) at - * which the event was created. Due to the fact that some systems may - * not provide this information the value of <code>timeStamp</code> may - * be not available for all events. When not available, a value of - * <code>0</code> will be returned. Examples of epoch time are the time - * of the system start or 0:0:0 UTC 1st January 1970. - */ - public long getTimeStamp(); - - /** - * This method is used to prevent event listeners of the same group to be - * triggered but its effect is deferred until all event listeners - * attached on the <code>currentTarget</code> have been triggered (see - * ). Once it has been called, further calls to that method have no - * additional effect. - * <p ><b>Note:</b> This method does not prevent the default action from - * being invoked; use <code>preventDefault</code> for that effect. - */ - public void stopPropagation(); - - /** - * If an event is cancelable, the <code>preventDefault</code> method is - * used to signify that the event is to be canceled, meaning any default - * action normally taken by the implementation as a result of the event - * will not occur (see also ), and thus independently of event groups. - * Calling this method for a non-cancelable event has no effect. - * <p ><b>Note:</b> This method does not stop the event propagation; use - * <code>stopPropagation</code> or <code>stopImmediatePropagation</code> - * for that effect. - */ - public void preventDefault(); - - /** - * The <code>initEvent</code> method is used to initialize the value of - * an <code>Event</code> created through the - * <code>DocumentEvent.createEvent</code> method. This method may only - * be called before the <code>Event</code> has been dispatched via the - * <code>EventTarget.dispatchEvent()</code> method. If the method is - * called several times before invoking - * <code>EventTarget.dispatchEvent</code>, only the final invocation - * takes precedence. This method has no effect if called after the event - * has been dispatched. If called from a subclass of the - * <code>Event</code> interface only the values specified in this method - * are modified, all other attributes are left unchanged. - * <br> This method sets the <code>Event.type</code> attribute to - * <code>eventTypeArg</code>, and <code>Event.namespaceURI</code> to - * <code>null</code>. To initialize an event with a namespace URI, use - * the <code>Event.initEventNS(namespaceURIArg, eventTypeArg, ...)</code> - * method. - * @param eventTypeArg Specifies <code>Event.type</code>. - * @param canBubbleArg Specifies <code>Event.bubbles</code>. This - * parameter overrides the intrinsic bubbling behavior of the event. - * @param cancelableArg Specifies <code>Event.cancelable</code>. This - * parameter overrides the intrinsic cancelable behavior of the event. - */ - public void initEvent(String eventTypeArg, - boolean canBubbleArg, - boolean cancelableArg); - - /** - * The namespace URI associated with this event at creation time, or - * <code>null</code> if it is unspecified. - * <br> For events initialized with a DOM Level 2 Events method, such as - * <code>Event.initEvent()</code>, this is always <code>null</code>. - * @since DOM Level 3 - */ - public String getNamespaceURI(); - - /** - * This method will always return <code>false</code>, unless the event - * implements the <code>CustomEvent</code> interface. - * @return <code>false</code>, unless the event object implements the - * <code>CustomEvent</code> interface. - * @since DOM Level 3 - */ - public boolean isCustom(); - - /** - * This method is used to prevent event listeners of the same group to be - * triggered and, unlike <code>stopPropagation</code> its effect is - * immediate (see ). Once it has been called, further calls to that - * method have no additional effect. - * <p ><b>Note:</b> This method does not prevent the default action from - * being invoked; use <code>Event.preventDefault()</code> for that - * effect. - * @since DOM Level 3 - */ - public void stopImmediatePropagation(); - - /** - * This method will return <code>true</code> if the method - * <code>Event.preventDefault()</code> has been called for this event, - * <code>false</code> otherwise. - * @return <code>true</code> if <code>Event.preventDefault()</code> has - * been called for this event. - * @since DOM Level 3 - */ - public boolean isDefaultPrevented(); - - /** - * The <code>initEventNS</code> method is used to initialize the value of - * an <code>Event</code> object and has the same behavior as - * <code>Event.initEvent()</code>. - * @param namespaceURIArg Specifies <code>Event.namespaceuRI</code>, the - * namespace URI associated with this event, or <code>null</code> if - * no namespace. - * @param eventTypeArg Specifies <code>Event.type</code>, the local name - * of the event type. - * @param canBubbleArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @since DOM Level 3 - */ - public void initEventNS(String namespaceURIArg, - String eventTypeArg, - boolean canBubbleArg, - boolean cancelableArg); - -} diff --git a/src/bind/java/org/w3c/dom/events/EventException.java b/src/bind/java/org/w3c/dom/events/EventException.java deleted file mode 100644 index 51763b46b..000000000 --- a/src/bind/java/org/w3c/dom/events/EventException.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -/** - * Event operations may throw an <code>EventException</code> as specified in - * their method descriptions. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public class EventException extends RuntimeException { - public EventException(short code, String message) { - super(message); - this.code = code; - } - public short code; - // EventExceptionCode - /** - * If the <code>Event.type</code> was not specified by initializing the - * event before the method was called. Specification of the - * <code>Event.type</code> as <code>null</code> or an empty string will - * also trigger this exception. - */ - public static final short UNSPECIFIED_EVENT_TYPE_ERR = 0; - /** - * If the <code>Event</code> object is already dispatched in the tree. - * @since DOM Level 3 - */ - public static final short DISPATCH_REQUEST_ERR = 1; - -} diff --git a/src/bind/java/org/w3c/dom/events/EventListener.java b/src/bind/java/org/w3c/dom/events/EventListener.java deleted file mode 100644 index a5102b130..000000000 --- a/src/bind/java/org/w3c/dom/events/EventListener.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -/** - * The <code>EventListener</code> interface is the primary way for handling - * events. Users implement the <code>EventListener</code> interface and - * register their event listener on an <code>EventTarget</code>. The users - * should also remove their <code>EventListener</code> from its - * <code>EventTarget</code> after they have completed using the listener. - * <p> Copying a <code>Node</code>, with methods such as - * <code>Node.cloneNode</code> or <code>Range.cloneContents</code>, does not - * copy the event listeners attached to it. Event listeners must be attached - * to the newly created <code>Node</code> afterwards if so desired. - * <p> Moving a <code>Node</code>, with methods <code>Document.adoptNode</code> - * , <code>Node.appendChild</code>, or <code>Range.extractContents</code>, - * does not affect the event listeners attached to it. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface EventListener { - /** - * This method is called whenever an event occurs of the event type for - * which the <code>EventListener</code> interface was registered. - * @param evt The <code>Event</code> contains contextual information - * about the event. - */ - public void handleEvent(Event evt); - -} diff --git a/src/bind/java/org/w3c/dom/events/EventTarget.java b/src/bind/java/org/w3c/dom/events/EventTarget.java deleted file mode 100644 index 1be6edace..000000000 --- a/src/bind/java/org/w3c/dom/events/EventTarget.java +++ /dev/null @@ -1,202 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -/** - * The <code>EventTarget</code> interface is implemented by all the objects - * which could be event targets in an implementation which supports the . - * The interface allows registration, removal or query of event listeners, - * and dispatch of events to an event target. - * <p> When used with , this interface is implemented by all target nodes and - * target ancestors, i.e. all DOM <code>Nodes</code> of the tree support - * this interface when the implementation conforms to DOM Level 3 Events - * and, therefore, this interface can be obtained by using binding-specific - * casting methods on an instance of the <code>Node</code> interface. - * <p> Invoking <code>addEventListener</code> or - * <code>addEventListenerNS</code> multiple times on the same - * <code>EventTarget</code> with the same parameters ( - * <code>namespaceURI</code>, <code>type</code>, <code>listener</code>, and - * <code>useCapture</code>) is considered to be a no-op and thus - * independently of the event group. They do not cause the - * <code>EventListener</code> to be called more than once and do not cause a - * change in the triggering order. In order to guarantee that an event - * listener will be added to the event target for the specified event group, - * one needs to invoke <code>removeEventListener</code> or - * <code>removeEventListenerNS</code> first. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface EventTarget { - /** - * This method allows the registration of an event listener in the - * default group and, depending on the <code>useCapture</code> - * parameter, on the capture phase of the DOM event flow or its target - * and bubbling phases. - * @param type Specifies the <code>Event.type</code> associated with the - * event for which the user is registering. - * @param listener The <code>listener</code> parameter takes an object - * implemented by the user which implements the - * <code>EventListener</code> interface and contains the method to be - * called when the event occurs. - * @param useCapture If true, <code>useCapture</code> indicates that the - * user wishes to add the event listener for the capture phase only, - * i.e. this event listener will not be triggered during the target - * and bubbling phases. If <code>false</code>, the event listener will - * only be triggered during the target and bubbling phases. - */ - public void addEventListener(String type, - EventListener listener, - boolean useCapture); - - /** - * This method allows the removal of event listeners from the default - * group. - * <br> Calling <code>removeEventListener</code> with arguments which do - * not identify any currently registered <code>EventListener</code> on - * the <code>EventTarget</code> has no effect. - * @param type Specifies the <code>Event.type</code> for which the user - * registered the event listener. - * @param listener The <code>EventListener</code> to be removed. - * @param useCapture Specifies whether the <code>EventListener</code> - * being removed was registered for the capture phase or not. If a - * listener was registered twice, once for the capture phase and once - * for the target and bubbling phases, each must be removed - * separately. Removal of an event listener registered for the capture - * phase does not affect the same event listener registered for the - * target and bubbling phases, and vice versa. - */ - public void removeEventListener(String type, - EventListener listener, - boolean useCapture); - - /** - * This method allows the dispatch of events into the implementation's - * event model. The event target of the event is the - * <code>EventTarget</code> object on which <code>dispatchEvent</code> - * is called. - * @param evt The event to be dispatched. - * @return Indicates whether any of the listeners which handled the - * event called <code>Event.preventDefault()</code>. If - * <code>Event.preventDefault()</code> was called the returned value - * is <code>false</code>, else it is <code>true</code>. - * @exception EventException - * UNSPECIFIED_EVENT_TYPE_ERR: Raised if the <code>Event.type</code> - * was not specified by initializing the event before - * <code>dispatchEvent</code> was called. Specification of the - * <code>Event.type</code> as <code>null</code> or an empty string - * will also trigger this exception. - * <br> DISPATCH_REQUEST_ERR: Raised if the <code>Event</code> object is - * already being dispatched in the tree. - * <br> NOT_SUPPORTED_ERR: Raised if the <code>Event</code> object has - * not been created using <code>DocumentEvent.createEvent()</code> or - * does not support the interface <code>CustomEvent</code>. - * @version DOM Level 3 - */ - public boolean dispatchEvent(Event evt) - throws EventException; - - /** - * This method allows the registration of an event listener in a - * specified group or the default group and, depending on the - * <code>useCapture</code> parameter, on the capture phase of the DOM - * event flow or its target and bubbling phases. - * @param namespaceURI Specifies the <code>Event.namespaceURI</code> - * associated with the event for which the user is registering. - * @param type Specifies the <code>Event.type</code> associated with the - * event for which the user is registering. - * @param listener The <code>listener</code> parameter takes an object - * implemented by the user which implements the - * <code>EventListener</code> interface and contains the method to be - * called when the event occurs. - * @param useCapture If true, <code>useCapture</code> indicates that the - * user wishes to add the event listener for the capture phase only, - * i.e. this event listener will not be triggered during the target - * and bubbling phases. If <code>false</code>, the event listener will - * only be triggered during the target and bubbling phases. - * @param evtGroup The object that represents the event group to - * associate with the <code>EventListener</code> (see also ). Use - * <code>null</code> to attach the event listener to the default - * group. - * @since DOM Level 3 - */ - public void addEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture, - Object evtGroup); - - /** - * This method allows the removal of an event listener, independently of - * the associated event group. - * <br> Calling <code>removeEventListenerNS</code> with arguments which do - * not identify any currently registered <code>EventListener</code> on - * the <code>EventTarget</code> has no effect. - * @param namespaceURI Specifies the <code>Event.namespaceURI</code> - * associated with the event for which the user registered the event - * listener. - * @param type Specifies the <code>Event.type</code> associated with the - * event for which the user registered the event listener. - * @param listener The <code>EventListener</code> parameter indicates - * the <code>EventListener</code> to be removed. - * @param useCapture Specifies whether the <code>EventListener</code> - * being removed was registered for the capture phase or not. If a - * listener was registered twice, once for the capture phase and once - * for the target and bubbling phases, each must be removed - * separately. Removal of an event listener registered for the capture - * phase does not affect the same event listener registered for the - * target and bubbling phases, and vice versa. - * @since DOM Level 3 - */ - public void removeEventListenerNS(String namespaceURI, - String type, - EventListener listener, - boolean useCapture); - - /** - * This method allows the DOM application to know if an event listener, - * attached to this <code>EventTarget</code> or one of its ancestors, - * will be triggered by the specified event type during the dispatch of - * the event to this event target or one of its descendants. - * @param namespaceURI Specifies the <code>Event.namespaceURI</code> - * associated with the event. - * @param type Specifies the <code>Event.type</code> associated with the - * event. - * @return <code>true</code> if an event listener will be triggered on - * the <code>EventTarget</code> with the specified event type, - * <code>false</code> otherwise. - * @since DOM Level 3 - */ - public boolean willTriggerNS(String namespaceURI, - String type); - - /** - * This method allows the DOM application to know if this - * <code>EventTarget</code> contains an event listener registered for - * the specified event type. This is useful for determining at which - * nodes within a hierarchy altered handling of specific event types has - * been introduced, but should not be used to determine whether the - * specified event type triggers an event listener (see - * <code>EventTarget.willTriggerNS()</code>). - * @param namespaceURI Specifies the <code>Event.namespaceURI</code> - * associated with the event. - * @param type Specifies the <code>Event.type</code> associated with the - * event. - * @return <code>true</code> if an event listener is registered on this - * <code>EventTarget</code> for the specified event type, - * <code>false</code> otherwise. - * @since DOM Level 3 - */ - public boolean hasEventListenerNS(String namespaceURI, - String type); - -} diff --git a/src/bind/java/org/w3c/dom/events/KeyboardEvent.java b/src/bind/java/org/w3c/dom/events/KeyboardEvent.java deleted file mode 100644 index e166f5f77..000000000 --- a/src/bind/java/org/w3c/dom/events/KeyboardEvent.java +++ /dev/null @@ -1,178 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.views.AbstractView; - -/** - * The <code>KeyboardEvent</code> interface provides specific contextual - * information associated with keyboard devices. Each keyboard event - * references a key using an identifier. Keyboard events are commonly - * directed at the element that has the focus. - * <p> The <code>KeyboardEvent</code> interface provides convenient attributes - * for some common modifiers keys: <code>KeyboardEvent.ctrlKey</code>, - * <code>KeyboardEvent.shiftKey</code>, <code>KeyboardEvent.altKey</code>, - * <code>KeyboardEvent.metaKey</code>. These attributes are equivalent to - * use the method - * <code>KeyboardEvent.getModifierState(keyIdentifierArg)</code> with - * "Control", "Shift", "Alt", or "Meta" respectively. - * <p> To create an instance of the <code>KeyboardEvent</code> interface, use - * the <code>DocumentEvent.createEvent("KeyboardEvent")</code> method call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 3 - */ -public interface KeyboardEvent extends UIEvent { - // KeyLocationCode - /** - * The key activation is not distinguished as the left or right version - * of the key, and did not originate from the numeric keypad (or did not - * originate with a virtual key corresponding to the numeric keypad). - * Example: the 'Q' key on a PC 101 Key US keyboard. - */ - public static final int DOM_KEY_LOCATION_STANDARD = 0x00; - /** - * The key activated is in the left key location (there is more than one - * possible location for this key). Example: the left Shift key on a PC - * 101 Key US keyboard. - */ - public static final int DOM_KEY_LOCATION_LEFT = 0x01; - /** - * The key activation is in the right key location (there is more than - * one possible location for this key). Example: the right Shift key on - * a PC 101 Key US keyboard. - */ - public static final int DOM_KEY_LOCATION_RIGHT = 0x02; - /** - * The key activation originated on the numeric keypad or with a virtual - * key corresponding to the numeric keypad. Example: the '1' key on a PC - * 101 Key US keyboard located on the numeric pad. - */ - public static final int DOM_KEY_LOCATION_NUMPAD = 0x03; - - /** - * <code>keyIdentifier</code> holds the identifier of the key. The key - * identifiers are defined in Appendix A.2 "". Implementations that are - * unable to identify a key must use the key identifier - * <code>"Unidentified"</code>. - */ - public String getKeyIdentifier(); - - /** - * The <code>keyLocation</code> attribute contains an indication of the - * location of they key on the device, as described in . - */ - public int getKeyLocation(); - - /** - * <code>true</code> if the control (Ctrl) key modifier is activated. - */ - public boolean getCtrlKey(); - - /** - * <code>true</code> if the shift (Shift) key modifier is activated. - */ - public boolean getShiftKey(); - - /** - * <code>true</code> if the alternative (Alt) key modifier is activated. - * <p ><b>Note:</b> The Option key modifier on Macintosh systems must be - * represented using this key modifier. - */ - public boolean getAltKey(); - - /** - * <code>true</code> if the meta (Meta) key modifier is activated. - * <p ><b>Note:</b> The Command key modifier on Macintosh systems must be - * represented using this key modifier. - */ - public boolean getMetaKey(); - - /** - * This methods queries the state of a modifier using a key identifier. - * See also . - * @param keyIdentifierArg A modifier key identifier. Common modifier - * keys are <code>"Alt"</code>, <code>"AltGraph"</code>, - * <code>"CapsLock"</code>, <code>"Control"</code>, <code>"Meta"</code> - * , <code>"NumLock"</code>, <code>"Scroll"</code>, or - * <code>"Shift"</code>. - * <p ><b>Note:</b> If an application wishes to distinguish between - * right and left modifiers, this information could be deduced using - * keyboard events and <code>KeyboardEvent.keyLocation</code>. - * @return <code>true</code> if it is modifier key and the modifier is - * activated, <code>false</code> otherwise. - */ - public boolean getModifierState(String keyIdentifierArg); - - /** - * The <code>initKeyboardEvent</code> method is used to initialize the - * value of a <code>KeyboardEvent</code> object and has the same - * behavior as <code>UIEvent.initUIEvent()</code>. The value of - * <code>UIEvent.detail</code> remains undefined. - * @param typeArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param keyIdentifierArg Specifies - * <code>KeyboardEvent.keyIdentifier</code>. - * @param keyLocationArg Specifies <code>KeyboardEvent.keyLocation</code> - * . - * @param modifiersList A <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-S'>white space</a> separated list of modifier key identifiers to be activated on this - * object. - */ - public void initKeyboardEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String keyIdentifierArg, - int keyLocationArg, - String modifiersList); - - /** - * The <code>initKeyboardEventNS</code> method is used to initialize the - * value of a <code>KeyboardEvent</code> object and has the same - * behavior as <code>UIEvent.initUIEventNS()</code>. The value of - * <code>UIEvent.detail</code> remains undefined. - * @param namespaceURI Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param typeArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param keyIdentifierArg Refer to the - * <code>KeyboardEvent.initKeyboardEvent()</code> method for a - * description of this parameter. - * @param keyLocationArg Refer to the - * <code>KeyboardEvent.initKeyboardEvent()</code> method for a - * description of this parameter. - * @param modifiersList A <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-S'>white space</a> separated list of modifier key identifiers to be activated on this - * object. As an example, <code>"Control Alt"</code> will activated - * the control and alt modifiers. - */ - public void initKeyboardEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String keyIdentifierArg, - int keyLocationArg, - String modifiersList); - -} diff --git a/src/bind/java/org/w3c/dom/events/MouseEvent.java b/src/bind/java/org/w3c/dom/events/MouseEvent.java deleted file mode 100644 index 9877e8dbc..000000000 --- a/src/bind/java/org/w3c/dom/events/MouseEvent.java +++ /dev/null @@ -1,219 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.views.AbstractView; - -/** - * The <code>MouseEvent</code> interface provides specific contextual - * information associated with Mouse events. - * <p> In the case of nested elements mouse events are always targeted at the - * most deeply nested element. Ancestors of the targeted element may use - * bubbling to obtain notification of mouse events which occur within theirs - * descendent elements. - * <p> To create an instance of the <code>MouseEvent</code> interface, use the - * <code>DocumentEvent.createEvent("MouseEvent")</code> method call. - * <p ><b>Note:</b> When initializing <code>MouseEvent</code> objects using - * <code>initMouseEvent</code> or <code>initMouseEventNS</code>, - * implementations should use the client coordinates <code>clientX</code> - * and <code>clientY</code> for calculation of other coordinates (such as - * target coordinates exposed by DOM Level 0 implementations). - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface MouseEvent extends UIEvent { - /** - * The horizontal coordinate at which the event occurred relative to the - * origin of the screen coordinate system. - */ - public int getScreenX(); - - /** - * The vertical coordinate at which the event occurred relative to the - * origin of the screen coordinate system. - */ - public int getScreenY(); - - /** - * The horizontal coordinate at which the event occurred relative to the - * DOM implementation's client area. - */ - public int getClientX(); - - /** - * The vertical coordinate at which the event occurred relative to the DOM - * implementation's client area. - */ - public int getClientY(); - - /** - * <code>true</code> if the control (Ctrl) key modifier is activated. - */ - public boolean getCtrlKey(); - - /** - * <code>true</code> if the shift (Shift) key modifier is activated. - */ - public boolean getShiftKey(); - - /** - * <code>true</code> if the alt (alternative) key modifier is activated. - * <p ><b>Note:</b> The Option key modifier on Macintosh systems must be - * represented using this key modifier. - */ - public boolean getAltKey(); - - /** - * <code>true</code> if the meta (Meta) key modifier is activated. - * <p ><b>Note:</b> The Command key modifier on Macintosh system must be - * represented using this meta key. - */ - public boolean getMetaKey(); - - /** - * During mouse events caused by the depression or release of a mouse - * button, <code>button</code> is used to indicate which mouse button - * changed state. <code>0</code> indicates the normal button of the - * mouse (in general on the left or the one button on Macintosh mice, - * used to activate a button or select text). <code>2</code> indicates - * the contextual property (in general on the right, used to display a - * context menu) button of the mouse if present. <code>1</code> - * indicates the extra (in general in the middle and often combined with - * the mouse wheel) button. Some mice may provide or simulate more - * buttons, and values higher than <code>2</code> can be used to - * represent such buttons. - */ - public short getButton(); - - /** - * Used to identify a secondary <code>EventTarget</code> related to a UI - * event. Currently this attribute is used with the mouseover event to - * indicate the <code>EventTarget</code> which the pointing device - * exited and with the mouseout event to indicate the - * <code>EventTarget</code> which the pointing device entered. - */ - public EventTarget getRelatedTarget(); - - /** - * The <code>initMouseEvent</code> method is used to initialize the value - * of a <code>MouseEvent</code> object and has the same behavior as - * <code>UIEvent.initUIEvent()</code>. - * @param typeArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param detailArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param screenXArg Specifies <code>MouseEvent.screenX</code>. - * @param screenYArg Specifies <code>MouseEvent.screenY</code>. - * @param clientXArg Specifies <code>MouseEvent.clientX</code>. - * @param clientYArg Specifies <code>MouseEvent.clientY</code>. - * @param ctrlKeyArg Specifies <code>MouseEvent.ctrlKey</code>. - * @param altKeyArg Specifies <code>MouseEvent.altKey</code>. - * @param shiftKeyArg Specifies <code>MouseEvent.shiftKey</code>. - * @param metaKeyArg Specifies <code>MouseEvent.metaKey</code>. - * @param buttonArg Specifies <code>MouseEvent.button</code>. - * @param relatedTargetArg Specifies - * <code>MouseEvent.relatedTarget</code>. - */ - public void initMouseEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg, - int screenXArg, - int screenYArg, - int clientXArg, - int clientYArg, - boolean ctrlKeyArg, - boolean altKeyArg, - boolean shiftKeyArg, - boolean metaKeyArg, - short buttonArg, - EventTarget relatedTargetArg); - - /** - * This methods queries the state of a modifier using a key identifier. - * See also . - * @param keyIdentifierArg A modifier key identifier, as defined by the - * <code>KeyboardEvent.keyIdentifier</code> attribute. Common modifier - * keys are <code>"Alt"</code>, <code>"AltGraph"</code>, - * <code>"CapsLock"</code>, <code>"Control"</code>, <code>"Meta"</code> - * , <code>"NumLock"</code>, <code>"Scroll"</code>, or - * <code>"Shift"</code>. - * <p ><b>Note:</b> If an application wishes to distinguish between - * right and left modifiers, this information could be deduced using - * keyboard events and <code>KeyboardEvent.keyLocation</code>. - * @return <code>true</code> if it is modifier key and the modifier is - * activated, <code>false</code> otherwise. - * @since DOM Level 3 - */ - public boolean getModifierState(String keyIdentifierArg); - - /** - * The <code>initMouseEventNS</code> method is used to initialize the - * value of a <code>MouseEvent</code> object and has the same behavior - * as <code>UIEvent.initUIEventNS()</code>. - * @param namespaceURI Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param typeArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param detailArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param screenXArg Refer to the - * <code>MouseEvent.initMouseEvent()</code> method for a description - * of this parameter. - * @param screenYArg Refer to the - * <code>MouseEvent.initMouseEvent()</code> method for a description - * of this parameter. - * @param clientXArg Refer to the - * <code>MouseEvent.initMouseEvent()</code> method for a description - * of this parameter. - * @param clientYArg Refer to the - * <code>MouseEvent.initMouseEvent()</code> method for a description - * of this parameter. - * @param buttonArg Refer to the <code>MouseEvent.initMouseEvent()</code> - * method for a description of this parameter. - * @param relatedTargetArg Refer to the - * <code>MouseEvent.initMouseEvent()</code> method for a description - * of this parameter. - * @param modifiersList A <a href='http://www.w3.org/TR/2000/REC-xml-20001006#NT-S'>white space</a> separated list of modifier key identifiers to be activated on this - * object. As an example, <code>"Control Alt"</code> will activated - * the control and alt modifiers. - * @since DOM Level 3 - */ - public void initMouseEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg, - int screenXArg, - int screenYArg, - int clientXArg, - int clientYArg, - short buttonArg, - EventTarget relatedTargetArg, - String modifiersList); - -} diff --git a/src/bind/java/org/w3c/dom/events/MutationEvent.java b/src/bind/java/org/w3c/dom/events/MutationEvent.java deleted file mode 100644 index 12d8b2f6b..000000000 --- a/src/bind/java/org/w3c/dom/events/MutationEvent.java +++ /dev/null @@ -1,160 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.Node; - -/** - * The <code>MutationEvent</code> interface provides specific contextual - * information associated with Mutation events. - * <p> To create an instance of the <code>MutationEvent</code> interface, use - * the <code>DocumentEvent.createEvent("MutationEvent")</code> method call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface MutationEvent extends Event { - // attrChangeType - /** - * The <code>Attr</code> was modified in place. - */ - public static final short MODIFICATION = 1; - /** - * The <code>Attr</code> was just added. - */ - public static final short ADDITION = 2; - /** - * The <code>Attr</code> was just removed. - */ - public static final short REMOVAL = 3; - - /** - * <code>relatedNode</code> is used to identify a secondary node related - * to a mutation event. For example, if a mutation event is dispatched - * to a node indicating that its parent has changed, the - * <code>relatedNode</code> is the changed parent. If an event is - * instead dispatched to a subtree indicating a node was changed within - * it, the <code>relatedNode</code> is the changed node. In the case of - * the - * <code>{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}</code> - * event it indicates the <code>Attr</code> node which was modified, - * added, or removed. - */ - public Node getRelatedNode(); - - /** - * <code>prevValue</code> indicates the previous value of the - * <code>Attr</code> node in - * <code>{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}</code> - * events, and of the <code>CharacterData</code> node in - * <code>{"http://www.w3.org/2001/xml-events", "DOMCharacterDataModified"}</code> - * events. - */ - public String getPrevValue(); - - /** - * <code>newValue</code> indicates the new value of the <code>Attr</code> - * node in - * <code>{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}</code> - * events, and of the <code>CharacterData</code> node in - * <code>{"http://www.w3.org/2001/xml-events", "DOMCharacterDataModified"}</code> - * events. - */ - public String getNewValue(); - - /** - * <code>attrName</code> indicates the name of the changed - * <code>Attr</code> node in a - * <code>{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}</code> - * event. - */ - public String getAttrName(); - - /** - * <code>attrChange</code> indicates the type of change which triggered - * the - * <code>{"http://www.w3.org/2001/xml-events", "DOMAttrModified"}</code> - * event. The values can be <code>MODIFICATION</code>, - * <code>ADDITION</code>, or <code>REMOVAL</code>. - */ - public short getAttrChange(); - - /** - * The <code>initMutationEvent</code> method is used to initialize the - * value of a <code>MutationEvent</code> object and has the same - * behavior as <code>Event.initEvent()</code>. - * @param typeArg Refer to the <code>Event.initEvent()</code> method for - * a description of this parameter. - * @param canBubbleArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @param relatedNodeArg Specifies <code>MutationEvent.relatedNode</code> - * . - * @param prevValueArg Specifies <code>MutationEvent.prevValue</code>. - * This value may be null. - * @param newValueArg Specifies <code>MutationEvent.newValue</code>. - * This value may be null. - * @param attrNameArg Specifies <code>MutationEvent.attrname</code>. - * This value may be null. - * @param attrChangeArg Specifies <code>MutationEvent.attrChange</code>. - * This value may be null. - */ - public void initMutationEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevValueArg, - String newValueArg, - String attrNameArg, - short attrChangeArg); - - /** - * The <code>initMutationEventNS</code> method is used to initialize the - * value of a <code>MutationEvent</code> object and has the same - * behavior as <code>Event.initEventNS()</code>. - * @param namespaceURI Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param typeArg Refer to the <code>Event.initEventNS()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param relatedNodeArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param prevValueArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param newValueArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param attrNameArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param attrChangeArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @since DOM Level 3 - */ - public void initMutationEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevValueArg, - String newValueArg, - String attrNameArg, - short attrChangeArg); - -} diff --git a/src/bind/java/org/w3c/dom/events/MutationNameEvent.java b/src/bind/java/org/w3c/dom/events/MutationNameEvent.java deleted file mode 100644 index f5c217198..000000000 --- a/src/bind/java/org/w3c/dom/events/MutationNameEvent.java +++ /dev/null @@ -1,104 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.Node; - -/** - * The <code>MutationNameEvent</code> interface provides specific contextual - * information associated with Mutation name event types. - * <p> To create an instance of the <code>MutationNameEvent</code> interface, - * use the <code>Document.createEvent("MutationNameEvent")</code> method - * call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 3 - */ -public interface MutationNameEvent extends MutationEvent { - /** - * The previous value of the <code>relatedNode</code>'s - * <code>namespaceURI</code>. - */ - public String getPrevNamespaceURI(); - - /** - * The previous value of the <code>relatedNode</code>'s - * <code>nodeName</code>. - */ - public String getPrevNodeName(); - - /** - * The <code>initMutationNameEvent</code> method is used to initialize - * the value of a <code>MutationNameEvent</code> object and has the same - * behavior as <code>MutationEvent.initMutationEvent()</code>. - * @param typeArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param canBubbleArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param cancelableArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param relatedNodeArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param prevNamespaceURIArg Specifies - * <code>MutationNameEvent.prevNamespaceURI</code>. This value may be - * <code>null</code>. - * @param prevNodeNameArg Specifies - * <code>MutationNameEvent.prevNodeName</code>. - * @since DOM Level 3 - */ - public void initMutationNameEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevNamespaceURIArg, - String prevNodeNameArg); - - /** - * The <code>initMutationNameEventNS</code> method is used to initialize - * the value of a <code>MutationNameEvent</code> object and has the same - * behavior as <code>MutationEvent.initMutationEventNS()</code>. - * @param namespaceURI Refer to the - * <code>MutationEvent.initMutationEventNS()</code> method for a - * description of this parameter. - * @param typeArg Refer to the - * <code>MutationEvent.initMutationEventNS()</code> method for a - * description of this parameter. - * @param canBubbleArg Refer to the - * <code>MutationEvent.initMutationEventNS()</code> method for a - * description of this parameter. - * @param cancelableArg Refer to the - * <code>MutationEvent.initMutationEventNS()</code> method for a - * description of this parameter. - * @param relatedNodeArg Refer to the - * <code>MutationEvent.initMutationEventNS()</code> method for a - * description of this parameter. - * @param prevNamespaceURIArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @param prevNodeNameArg Refer to the - * <code>MutationEvent.initMutationEvent()</code> method for a - * description of this parameter. - * @since DOM Level 3 - */ - public void initMutationNameEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - Node relatedNodeArg, - String prevNamespaceURIArg, - String prevNodeNameArg); - -} diff --git a/src/bind/java/org/w3c/dom/events/TextEvent.java b/src/bind/java/org/w3c/dom/events/TextEvent.java deleted file mode 100644 index 4ba5f5abf..000000000 --- a/src/bind/java/org/w3c/dom/events/TextEvent.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.views.AbstractView; - -/** - * The <code>TextEvent</code> interface provides specific contextual - * information associated with Text Events. - * <p> To create an instance of the <code>TextEvent</code> interface, use the - * <code>DocumentEvent.createEvent("TextEvent")</code> method call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 3 - */ -public interface TextEvent extends UIEvent { - /** - * <code>data</code> holds the value of the characters generated by the - * character device. This may be a single Unicode character or a - * non-empty sequence of Unicode characters [Unicode]. Characters should be normalized as defined by the Unicode - * normalization form NFC, defined in [<a href='http://www.unicode.org/unicode/reports/tr15/'>UTR #15</a>]. This - * attribute cannot be null or contain the empty string. - */ - public String getData(); - - /** - * The <code>initTextEvent</code> method is used to initialize the value - * of a <code>TextEvent</code> object and has the same behavior as - * <code>UIEvent.initUIEvent()</code>. The value of - * <code>UIEvent.detail</code> remains undefined. - * @param typeArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param dataArg Specifies <code>TextEvent.data</code>. - */ - public void initTextEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String dataArg); - - /** - * The <code>initTextEventNS</code> method is used to initialize the - * value of a <code>TextEvent</code> object and has the same behavior as - * <code>UIEvent.initUIEventNS()</code>. The value of - * <code>UIEvent.detail</code> remains undefined. - * @param namespaceURI Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param type Refer to the <code>UIEvent.initUIEventNS()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEventNS()</code> - * method for a description of this parameter. - * @param dataArg Refer to the <code>TextEvent.initTextEvent()</code> - * method for a description of this parameter. - */ - public void initTextEventNS(String namespaceURI, - String type, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - String dataArg); - -} diff --git a/src/bind/java/org/w3c/dom/events/UIEvent.java b/src/bind/java/org/w3c/dom/events/UIEvent.java deleted file mode 100644 index e4a819c73..000000000 --- a/src/bind/java/org/w3c/dom/events/UIEvent.java +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2003 World Wide Web Consortium, - * - * (Massachusetts Institute of Technology, European Research Consortium for - * Informatics and Mathematics, Keio University). All Rights Reserved. This - * work is distributed under the W3C(r) Software License [1] 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. - * - * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 - */ - -package org.w3c.dom.events; - -import org.w3c.dom.views.AbstractView; - -/** - * The <code>UIEvent</code> interface provides specific contextual - * information associated with User Interface events. - * <p> To create an instance of the <code>UIEvent</code> interface, use the - * <code>DocumentEvent.createEvent("UIEvent")</code> method call. - * <p>See also the <a href='http://www.w3.org/TR/2003/NOTE-DOM-Level-3-Events-20031107'>Document Object Model (DOM) Level 3 Events Specification</a>. - * @since DOM Level 2 - */ -public interface UIEvent extends Event { - /** - * The <code>view</code> attribute identifies the <code>AbstractView</code> - * from which the event was generated. - */ - public AbstractView getView(); - - /** - * Specifies some detail information about the <code>Event</code>, - * depending on the type of event. - */ - public int getDetail(); - - /** - * The <code>initUIEvent</code> method is used to initialize the value of - * a <code>UIEvent</code> object and has the same behavior as - * <code>Event.initEvent()</code>. - * @param typeArg Refer to the <code>Event.initEvent()</code> method for - * a description of this parameter. - * @param canBubbleArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>Event.initEvent()</code> - * method for a description of this parameter. - * @param viewArg Specifies <code>UIEvent.view</code>. - * @param detailArg Specifies <code>UIEvent.detail</code>. - */ - public void initUIEvent(String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg); - - /** - * The <code>initUIEventNS</code> method is used to initialize the value - * of a <code>UIEvent</code> object and has the same behavior as - * <code>Event.initEventNS()</code>. - * @param namespaceURI Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param typeArg Refer to the <code>Event.initEventNS()</code> method - * for a description of this parameter. - * @param canBubbleArg Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param cancelableArg Refer to the <code>Event.initEventNS()</code> - * method for a description of this parameter. - * @param viewArg Refer to the <code>UIEvent.initUIEvent()</code> method - * for a description of this parameter. - * @param detailArg Refer to the <code>UIEvent.initUIEvent()</code> - * method for a description of this parameter. - * @since DOM Level 3 - */ - public void initUIEventNS(String namespaceURI, - String typeArg, - boolean canBubbleArg, - boolean cancelableArg, - AbstractView viewArg, - int detailArg); - -} diff --git a/src/bind/java/org/w3c/dom/smil/ElementExclusiveTimeContainer.java b/src/bind/java/org/w3c/dom/smil/ElementExclusiveTimeContainer.java deleted file mode 100644 index 84c7a14b4..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementExclusiveTimeContainer.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; -import org.w3c.dom.NodeList; - -/** - * This interface defines a time container with semantics based upon par, but - * with the additional constraint that only one child element may play at a - * time. - */ -public interface ElementExclusiveTimeContainer extends ElementTimeContainer { - /** - * Controls the end of the container. Need to address thr id-ref value. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getEndSync(); - public void setEndSync(String endSync) - throws DOMException; - - /** - * This should support another method to get the ordered collection of - * paused elements (the paused stack) at a given point in time. - * @return All paused elements at the current time. - */ - public NodeList getPausedElements(); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementLayout.java b/src/bind/java/org/w3c/dom/smil/ElementLayout.java deleted file mode 100644 index 7f3128fae..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementLayout.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * This interface is used by SMIL elements root-layout, top-layout and region. - * - */ -public interface ElementLayout { - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getTitle(); - public void setTitle(String title) - throws DOMException; - - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getBackgroundColor(); - public void setBackgroundColor(String backgroundColor) - throws DOMException; - - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public int getHeight(); - public void setHeight(int height) - throws DOMException; - - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public int getWidth(); - public void setWidth(int width) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementParallelTimeContainer.java b/src/bind/java/org/w3c/dom/smil/ElementParallelTimeContainer.java deleted file mode 100644 index a796bc7be..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementParallelTimeContainer.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * A <code>parallel</code> container defines a simple parallel time grouping - * in which multiple elements can play back at the same time. It may have to - * specify a repeat iteration. (?) - */ -public interface ElementParallelTimeContainer extends ElementTimeContainer { - /** - * Controls the end of the container. Need to address thr id-ref value. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getEndSync(); - public void setEndSync(String endSync) - throws DOMException; - - /** - * This method returns the implicit duration in seconds. - * @return The implicit duration in seconds or -1 if the implicit is - * unknown (indefinite?). - */ - public float getImplicitDuration(); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementSequentialTimeContainer.java b/src/bind/java/org/w3c/dom/smil/ElementSequentialTimeContainer.java deleted file mode 100644 index bca584164..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementSequentialTimeContainer.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * A <code>seq</code> container defines a sequence of elements in which - * elements play one after the other. - */ -public interface ElementSequentialTimeContainer extends ElementTimeContainer { -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementSyncBehavior.java b/src/bind/java/org/w3c/dom/smil/ElementSyncBehavior.java deleted file mode 100644 index e75feccc0..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementSyncBehavior.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * The synchronization behavior extension. - */ -public interface ElementSyncBehavior { - /** - * The runtime synchronization behavior for an element. - */ - public String getSyncBehavior(); - - /** - * The sync tolerance for the associated element. It has an effect only if - * the element has <code>syncBehavior="locked"</code> . - */ - public float getSyncTolerance(); - - /** - * Defines the default value for the runtime synchronization behavior for - * an element, and all descendents. - */ - public String getDefaultSyncBehavior(); - - /** - * Defines the default value for the sync tolerance for an element, and - * all descendents. - */ - public float getDefaultSyncTolerance(); - - /** - * If set to true, forces the time container playback to sync to this - * element. - */ - public boolean getSyncMaster(); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTargetAttributes.java b/src/bind/java/org/w3c/dom/smil/ElementTargetAttributes.java deleted file mode 100644 index 23a37b638..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTargetAttributes.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * This interface define the set of animation target extensions. - */ -public interface ElementTargetAttributes { - /** - * The name of the target attribute. - */ - public String getAttributeName(); - public void setAttributeName(String attributeName); - - // attributeTypes - public static final short ATTRIBUTE_TYPE_AUTO = 0; - public static final short ATTRIBUTE_TYPE_CSS = 1; - public static final short ATTRIBUTE_TYPE_XML = 2; - - /** - * A code representing the value of the attributeType attribute, as - * defined above. Default value is <code>ATTRIBUTE_TYPE_CODE</code> . - */ - public short getAttributeType(); - public void setAttributeType(short attributeType); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTest.java b/src/bind/java/org/w3c/dom/smil/ElementTest.java deleted file mode 100644 index 78fe497d5..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * Defines the test attributes interface. See the Test attributes definition - * . - */ -public interface ElementTest { - /** - * The systemBitrate value. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public int getSystemBitrate(); - public void setSystemBitrate(int systemBitrate) - throws DOMException; - - /** - * The systemCaptions value. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public boolean getSystemCaptions(); - public void setSystemCaptions(boolean systemCaptions) - throws DOMException; - - /** - * The systemLanguage value. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getSystemLanguage(); - public void setSystemLanguage(String systemLanguage) - throws DOMException; - - /** - * The result of the evaluation of the systemRequired attribute. - */ - public boolean getSystemRequired(); - - /** - * The result of the evaluation of the systemScreenSize attribute. - */ - public boolean getSystemScreenSize(); - - /** - * The result of the evaluation of the systemScreenDepth attribute. - */ - public boolean getSystemScreenDepth(); - - /** - * The value of the systemOverdubOrSubtitle attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getSystemOverdubOrSubtitle(); - public void setSystemOverdubOrSubtitle(String systemOverdubOrSubtitle) - throws DOMException; - - /** - * The value of the systemAudioDesc attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public boolean getSystemAudioDesc(); - public void setSystemAudioDesc(boolean systemAudioDesc) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTime.java b/src/bind/java/org/w3c/dom/smil/ElementTime.java deleted file mode 100644 index 715d46ac9..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTime.java +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * This interface defines the set of timing attributes that are common to all - * timed elements. - */ -public interface ElementTime { - /** - * The desired value (as a list of times) of the begin instant of this - * node. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public TimeList getBegin(); - public void setBegin(TimeList begin) - throws DOMException; - - /** - * The list of active ends for this node. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public TimeList getEnd(); - public void setEnd(TimeList end) - throws DOMException; - - /** - * The desired simple duration value of this node in seconds. Negative - * value means "indefinite". - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getDur(); - public void setDur(float dur) - throws DOMException; - - // restartTypes - public static final short RESTART_ALWAYS = 0; - public static final short RESTART_NEVER = 1; - public static final short RESTART_WHEN_NOT_ACTIVE = 2; - - /** - * A code representing the value of the restart attribute, as defined - * above. Default value is <code>RESTART_ALWAYS</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public short getRestart(); - public void setRestart(short restart) - throws DOMException; - - // fillTypes - public static final short FILL_REMOVE = 0; - public static final short FILL_FREEZE = 1; - - /** - * A code representing the value of the fill attribute, as defined - * above. Default value is <code>FILL_REMOVE</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public short getFill(); - public void setFill(short fill) - throws DOMException; - - /** - * The repeatCount attribute causes the element to play repeatedly - * (loop) for the specified number of times. A negative value repeat the - * element indefinitely. Default value is 0 (unspecified). - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getRepeatCount(); - public void setRepeatCount(float repeatCount) - throws DOMException; - - /** - * The repeatDur causes the element to play repeatedly (loop) for the - * specified duration in milliseconds. Negative means "indefinite". - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getRepeatDur(); - public void setRepeatDur(float repeatDur) - throws DOMException; - - /** - * Causes this element to begin the local timeline (subject to sync - * constraints). - * @return <code>true</code> if the method call was successful and the - * element was begun. <code>false</code> if the method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>beginElement</code> method. (the <code>beginEvent</code> - * attribute is not set to <code>"undefinite"</code> ) The element is - * already active and can't be restart when it is active. (the - * <code>restart</code> attribute is set to <code>"whenNotActive"</code> - * ) The element is active or has been active and can't be restart. - * (the <code>restart</code> attribute is set to <code>"never"</code> ). - * - */ - public boolean beginElement(); - - /** - * Causes this element to end the local timeline (subject to sync - * constraints). - * @return <code>true</code> if the method call was successful and the - * element was endeed. <code>false</code> if method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>endElement</code> method. (the <code>endEvent</code> - * attribute is not set to <code>"undefinite"</code> ) The element is - * not active. - */ - public boolean endElement(); - - /** - * Causes this element to pause the local timeline (subject to sync - * constraints). - */ - public void pauseElement(); - - /** - * Causes this element to resume a paused local timeline. - */ - public void resumeElement(); - - /** - * Seeks this element to the specified point on the local timeline - * (subject to sync constraints). If this is a timeline, this must seek - * the entire timeline (i.e. propagate to all timeChildren). - * @param seekTo The desired position on the local timeline in - * milliseconds. - */ - public void seekElement(float seekTo); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTimeContainer.java b/src/bind/java/org/w3c/dom/smil/ElementTimeContainer.java deleted file mode 100644 index 69b39e820..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTimeContainer.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.NodeList; - -/** - * This is a placeholder - subject to change. This represents generic - * timelines. - */ -public interface ElementTimeContainer extends ElementTime { - /** - * A NodeList that contains all timed childrens of this node. If there are - * no timed children, the <code>Nodelist</code> is empty. An iterator - * is more appropriate here than a node list but it requires Traversal - * module support. - */ - public NodeList getTimeChildren(); - - /** - * Returns a list of child elements active at the specified invocation. - * @param instant The desired position on the local timeline in - * milliseconds. - * @return List of timed child-elements active at instant. - */ - public NodeList getActiveChildrenAt(float instant); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTimeControl.java b/src/bind/java/org/w3c/dom/smil/ElementTimeControl.java deleted file mode 100644 index e546b3609..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTimeControl.java +++ /dev/null @@ -1,103 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - */ -public interface ElementTimeControl { - /** - * Causes this element to begin the local timeline (subject to sync - * constraints). - * @return <code>true</code> if the method call was successful and the - * element was begun. <code>false</code> if the method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>beginElement</code> method. (the <code>begin</code> - * attribute is not set to <code>"indefinite"</code> ) The element is - * already active and can't be restart when it is active. (the - * <code>restart</code> attribute is set to <code>"whenNotActive"</code> - * ) The element is active or has been active and can't be restart. - * (the <code>restart</code> attribute is set to <code>"never"</code> ). - * - * @exception DOMException - * SYNTAX_ERR: The element was not defined with the appropriate syntax - * to allow <code>beginElement</code> calls. - */ - public boolean beginElement() - throws DOMException; - - /** - * Causes this element to begin the local timeline (subject to sync - * constraints), at the passed offset from the current time when the - * method is called. If the offset is >= 0, the semantics are - * equivalent to an event-base begin with the specified offset. If the - * offset is < 0, the semantics are equivalent to beginElement(), but - * the element active duration is evaluated as though the element had - * begun at the passed (negative) offset from the current time when the - * method is called. - * @param offset The offset in seconds at which to begin the element. - * @return <code>true</code> if the method call was successful and the - * element was begun. <code>false</code> if the method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>beginElementAt</code> method. (the <code>begin</code> - * attribute is not set to <code>"indefinite"</code> ) The element is - * already active and can't be restart when it is active. (the - * <code>restart</code> attribute is set to <code>"whenNotActive"</code> - * ) The element is active or has been active and can't be restart. - * (the <code>restart</code> attribute is set to <code>"never"</code> ). - * - * @exception DOMException - * SYNTAX_ERR: The element was not defined with the appropriate syntax - * to allow <code>beginElementAt</code> calls. - */ - public boolean beginElementAt(float offset) - throws DOMException; - - /** - * Causes this element to end the local timeline (subject to sync - * constraints). - * @return <code>true</code> if the method call was successful and the - * element was ended. <code>false</code> if method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>endElement</code> method. (the <code>end</code> attribute - * is not set to <code>"indefinite"</code> ) The element is not active. - * - * @exception DOMException - * SYNTAX_ERR: The element was not defined with the appropriate syntax - * to allow <code>endElement</code> calls. - */ - public boolean endElement() - throws DOMException; - - /** - * Causes this element to end the local timeline (subject to sync - * constraints) at the specified offset from the current time when the - * method is called. - * @param offset The offset in seconds at which to end the element. Must - * be >= 0. - * @return <code>true</code> if the method call was successful and the - * element was ended. <code>false</code> if method call failed. - * Possible reasons for failure include: The element doesn't support - * the <code>endElementAt</code> method. (the <code>end</code> - * attribute is not set to <code>"indefinite"</code> ) The element is - * not active. - * @exception DOMException - * SYNTAX_ERR: The element was not defined with the appropriate syntax - * to allow <code>endElementAt</code> calls. - */ - public boolean endElementAt(float offset) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/ElementTimeManipulation.java b/src/bind/java/org/w3c/dom/smil/ElementTimeManipulation.java deleted file mode 100644 index bb83326e6..000000000 --- a/src/bind/java/org/w3c/dom/smil/ElementTimeManipulation.java +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * This interface support use-cases commonly associated with animation. - * "accelerate" and "decelerate" are float values in the timing draft and - * percentage values even in this draft if both of them represent a - * percentage. - */ -public interface ElementTimeManipulation { - /** - * Defines the playback speed of element time. The value is specified as - * a multiple of normal (parent time container) play speed. Legal values - * are signed floating point values. Zero values are not allowed. The - * default is <code>1.0</code> (no modification of speed). - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getSpeed(); - public void setSpeed(float speed) - throws DOMException; - - /** - * The percentage value of the simple acceleration of time for the - * element. Allowed values are from <code>0</code> to <code>100</code> . - * Default value is <code>0</code> (no acceleration). - * <br> The sum of the values for accelerate and decelerate must not exceed - * 100. If it does, the deceleration value will be reduced to make the - * sum legal. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getAccelerate(); - public void setAccelerate(float accelerate) - throws DOMException; - - /** - * The percentage value of the simple decelerate of time for the - * element. Allowed values are from <code>0</code> to <code>100</code> . - * Default value is <code>0</code> (no deceleration). - * <br> The sum of the values for accelerate and decelerate must not exceed - * 100. If it does, the deceleration value will be reduced to make the - * sum legal. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public float getDecelerate(); - public void setDecelerate(float decelerate) - throws DOMException; - - /** - * The autoReverse attribute controls the "play forwards then backwards" - * functionality. Default value is <code>false</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public boolean getAutoReverse(); - public void setAutoReverse(boolean autoReverse) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILAnimateColorElement.java b/src/bind/java/org/w3c/dom/smil/SMILAnimateColorElement.java deleted file mode 100644 index 9bd9d13a6..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILAnimateColorElement.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * This interface represents the SMIL <code>animateColor</code> element. - */ -public interface SMILAnimateColorElement extends SMILAnimation { -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILAnimateElement.java b/src/bind/java/org/w3c/dom/smil/SMILAnimateElement.java deleted file mode 100644 index 9393e00c5..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILAnimateElement.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * This interface represents the SMIL <code>animate</code> element. - */ -public interface SMILAnimateElement extends SMILAnimation { -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILAnimateMotionElement.java b/src/bind/java/org/w3c/dom/smil/SMILAnimateMotionElement.java deleted file mode 100644 index 6a140ad9f..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILAnimateMotionElement.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * This interface present the <code>animationMotion</code> element in SMIL. - */ -public interface SMILAnimateMotionElement extends SMILAnimateElement { - /** - * Specifies the curve that describes the attribute value as a function - * of time. Check with the SVG spec for better support - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getPath(); - public void setPath(String path) - throws DOMException; - - /** - * Specifies the origin of motion for the animation. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getOrigin(); - public void setOrigin(String origin) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILAnimation.java b/src/bind/java/org/w3c/dom/smil/SMILAnimation.java deleted file mode 100644 index 8615dfaeb..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILAnimation.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * This interface define the set of animation extensions for SMIL. The - * attributes will go in a XLink interface. - */ -public interface SMILAnimation extends SMILElement, ElementTargetAttributes, ElementTime, ElementTimeControl { - // additiveTypes - public static final short ADDITIVE_REPLACE = 0; - public static final short ADDITIVE_SUM = 1; - - /** - * A code representing the value of the additive attribute, as defined - * above. Default value is <code>ADDITIVE_REPLACE</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public short getAdditive(); - public void setAdditive(short additive) - throws DOMException; - - // accumulateTypes - public static final short ACCUMULATE_NONE = 0; - public static final short ACCUMULATE_SUM = 1; - - /** - * A code representing the value of the accumulate attribute, as defined - * above. Default value is <code>ACCUMULATE_NONE</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public short getAccumulate(); - public void setAccumulate(short accumulate) - throws DOMException; - - // calcModeTypes - public static final short CALCMODE_DISCRETE = 0; - public static final short CALCMODE_LINEAR = 1; - public static final short CALCMODE_PACED = 2; - public static final short CALCMODE_SPLINE = 3; - - /** - * A code representing the value of the calcMode attribute, as defined - * above. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public short getCalcMode(); - public void setCalcMode(short calcMode) - throws DOMException; - - /** - * A <code>DOMString</code> representing the value of the keySplines - * attribute. Need an interface a point (x1,y1,x2,y2) - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getKeySplines(); - public void setKeySplines(String keySplines) - throws DOMException; - - /** - * A list of the time value of the keyTimes attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public TimeList getKeyTimes(); - public void setKeyTimes(TimeList keyTimes) - throws DOMException; - - /** - * A <code>DOMString</code> representing the value of the values - * attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getValues(); - public void setValues(String values) - throws DOMException; - - /** - * A <code>DOMString</code> representing the value of the from attribute. - * - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getFrom(); - public void setFrom(String from) - throws DOMException; - - /** - * A <code>DOMString</code> representing the value of the to attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getTo(); - public void setTo(String to) - throws DOMException; - - /** - * A <code>DOMString</code> representing the value of the by attribute. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getBy(); - public void setBy(String by) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILDocument.java b/src/bind/java/org/w3c/dom/smil/SMILDocument.java deleted file mode 100644 index 5f54dd329..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILDocument.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.Document; - -/** - * A SMIL document is the root of the SMIL Hierarchy and holds the entire - * content. Beside providing access to the hierarchy, it also provides some - * convenience methods for accessing certain sets of information from the - * document. Cover document timing, document locking?, linking modality and - * any other document level issues. Are there issues with nested SMIL files? - * Is it worth talking about different document scenarios, corresponding to - * differing profiles? E.g. Standalone SMIL, HTML integration, etc. - */ -public interface SMILDocument extends Document, ElementSequentialTimeContainer { -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILElement.java b/src/bind/java/org/w3c/dom/smil/SMILElement.java deleted file mode 100644 index 748de23fc..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILElement.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Element; - -/** - * The <code>SMILElement</code> interface is the base for all SMIL element - * types. It follows the model of the <code>HTMLElement</code> in the HTML - * DOM, extending the base <code>Element</code> class to denote SMIL-specific - * elements. - * <p> Note that the <code>SMILElement</code> interface overlaps with the - * <code>HTMLElement</code> interface. In practice, an integrated document - * profile that include HTML and SMIL modules will effectively implement both - * interfaces (see also the DOM documentation discussion of Inheritance vs - * Flattened Views of the API ). // etc. This needs attention - */ -public interface SMILElement extends Element { - /** - * The unique id. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getId(); - public void setId(String id) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILLayoutElement.java b/src/bind/java/org/w3c/dom/smil/SMILLayoutElement.java deleted file mode 100644 index 2d6136db3..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILLayoutElement.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * Declares layout type for the document. See the LAYOUT element definition . - * - */ -public interface SMILLayoutElement extends SMILElement { - /** - * The mime type of the layout langage used in this layout element.The - * default value of the type attribute is "text/smil-basic-layout". - */ - public String getType(); - - /** - * <code>true</code> if the player can understand the mime type, - * <code>false</code> otherwise. - */ - public boolean getResolved(); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILMediaElement.java b/src/bind/java/org/w3c/dom/smil/SMILMediaElement.java deleted file mode 100644 index d6a2d2de2..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILMediaElement.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * Declares media content. - */ -public interface SMILMediaElement extends ElementTime, SMILElement { - /** - * See the abstract attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getAbstractAttr(); - public void setAbstractAttr(String abstractAttr) - throws DOMException; - - /** - * See the alt attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getAlt(); - public void setAlt(String alt) - throws DOMException; - - /** - * See the author attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getAuthor(); - public void setAuthor(String author) - throws DOMException; - - /** - * See the clipBegin attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getClipBegin(); - public void setClipBegin(String clipBegin) - throws DOMException; - - /** - * See the clipEnd attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getClipEnd(); - public void setClipEnd(String clipEnd) - throws DOMException; - - /** - * See the copyright attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getCopyright(); - public void setCopyright(String copyright) - throws DOMException; - - /** - * See the longdesc attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getLongdesc(); - public void setLongdesc(String longdesc) - throws DOMException; - - /** - * See the port attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getPort(); - public void setPort(String port) - throws DOMException; - - /** - * See the readIndex attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getReadIndex(); - public void setReadIndex(String readIndex) - throws DOMException; - - /** - * See the rtpformat attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getRtpformat(); - public void setRtpformat(String rtpformat) - throws DOMException; - - /** - * See the src attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getSrc(); - public void setSrc(String src) - throws DOMException; - - /** - * See the stripRepeat attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getStripRepeat(); - public void setStripRepeat(String stripRepeat) - throws DOMException; - - /** - * See the title attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getTitle(); - public void setTitle(String title) - throws DOMException; - - /** - * See the transport attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getTransport(); - public void setTransport(String transport) - throws DOMException; - - /** - * See the type attribute from . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getType(); - public void setType(String type) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILRefElement.java b/src/bind/java/org/w3c/dom/smil/SMILRefElement.java deleted file mode 100644 index adeb2b354..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILRefElement.java +++ /dev/null @@ -1,20 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * // audio, video, ... - */ -public interface SMILRefElement extends SMILMediaElement { -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILRegionElement.java b/src/bind/java/org/w3c/dom/smil/SMILRegionElement.java deleted file mode 100644 index 927fb4007..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILRegionElement.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; - -/** - * Controls the position, size and scaling of media object elements. See the - * region element definition . - */ -public interface SMILRegionElement extends SMILElement, ElementLayout { - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getFit(); - public void setFit(String fit) - throws DOMException; - - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public String getTop(); - public void setTop(String top) - throws DOMException; - - /** - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this attribute is readonly. - */ - public int getZIndex(); - public void setZIndex(int zIndex) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILRegionInterface.java b/src/bind/java/org/w3c/dom/smil/SMILRegionInterface.java deleted file mode 100644 index b5e43c3b2..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILRegionInterface.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * Declares rendering surface for an element. See the region attribute - * definition . - */ -public interface SMILRegionInterface { - /** - */ - public SMILRegionElement getRegion(); - public void setRegion(SMILRegionElement region); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILRootLayoutElement.java b/src/bind/java/org/w3c/dom/smil/SMILRootLayoutElement.java deleted file mode 100644 index 327ecd6b2..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILRootLayoutElement.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * Declares layout properties for the root-layout element. See the - * root-layout element definition . - */ -public interface SMILRootLayoutElement extends SMILElement, ElementLayout { -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILSetElement.java b/src/bind/java/org/w3c/dom/smil/SMILSetElement.java deleted file mode 100644 index 8e0b1b72f..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILSetElement.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * This interface represents the set element. - */ -public interface SMILSetElement extends ElementTimeControl, ElementTime, ElementTargetAttributes, SMILElement { - /** - * Specifies the value for the attribute during the duration of this - * element. - */ - public String getTo(); - public void setTo(String to); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILSwitchElement.java b/src/bind/java/org/w3c/dom/smil/SMILSwitchElement.java deleted file mode 100644 index 27abb91cf..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILSwitchElement.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.Element; - -/** - * Defines a block of content control. See the switch element definition . - */ -public interface SMILSwitchElement extends SMILElement { - /** - * Returns the slected element at runtime. <code>null</code> if the - * selected element is not yet available. - * @return The selected <code>Element</code> for thisd <code>switch</code> - * element. - */ - public Element getSelectedElement(); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/SMILTopLayoutElement.java b/src/bind/java/org/w3c/dom/smil/SMILTopLayoutElement.java deleted file mode 100644 index 26214191b..000000000 --- a/src/bind/java/org/w3c/dom/smil/SMILTopLayoutElement.java +++ /dev/null @@ -1,21 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * Declares layout properties for the top-layout element. See the top-layout - * element definition . - */ -public interface SMILTopLayoutElement extends SMILElement, ElementLayout { -} - diff --git a/src/bind/java/org/w3c/dom/smil/Time.java b/src/bind/java/org/w3c/dom/smil/Time.java deleted file mode 100644 index 72fe08668..000000000 --- a/src/bind/java/org/w3c/dom/smil/Time.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Element; - -/** - * The <code>Time</code> interface is a datatype that represents times within - * the timegraph. A <code>Time</code> has a type, key values to describe the - * time, and a boolean to indicate whether the values are currently - * unresolved. Still need to address the wallclock values. - */ -public interface Time { - /** - * A boolean indicating whether the current <code>Time</code> has been - * fully resolved to the document schedule. Note that for this to be - * true, the current <code>Time</code> must be defined (not indefinite), - * the syncbase and all <code>Time</code> 's that the syncbase depends on - * must be defined (not indefinite), and the begin <code>Time</code> of - * all ascendent time containers of this element and all <code>Time</code> - * elements that this depends upon must be defined (not indefinite). - * <br> If this <code>Time</code> is based upon an event, this - * <code>Time</code> will only be resolved once the specified event has - * happened, subject to the constraints of the time container. - * <br> Note that this may change from true to false when the parent time - * container ends its simple duration (including when it repeats or - * restarts). - */ - public boolean getResolved(); - - /** - * The clock value in seconds relative to the parent time container begin. - * This indicates the resolved time relationship to the parent time - * container. This is only valid if resolved is true. - */ - public double getResolvedOffset(); - - // TimeTypes - public static final short SMIL_TIME_INDEFINITE = 0; - public static final short SMIL_TIME_OFFSET = 1; - public static final short SMIL_TIME_SYNC_BASED = 2; - public static final short SMIL_TIME_EVENT_BASED = 3; - public static final short SMIL_TIME_WALLCLOCK = 4; - public static final short SMIL_TIME_MEDIA_MARKER = 5; - - /** - * A code representing the type of the underlying object, as defined - * above. - */ - public short getTimeType(); - - /** - * The clock value in seconds relative to the syncbase or eventbase. - * Default value is <code>0</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this - * readonly attribute. - */ - public double getOffset(); - public void setOffset(double offset) - throws DOMException; - - /** - * The base element for a sync-based or event-based time. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this - * readonly attribute. - */ - public Element getBaseElement(); - public void setBaseElement(Element baseElement) - throws DOMException; - - /** - * If <code>true</code> , indicates that a sync-based time is relative to - * the begin of the baseElement. If <code>false</code> , indicates that a - * sync-based time is relative to the active end of the baseElement. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this - * readonly attribute. - */ - public boolean getBaseBegin(); - public void setBaseBegin(boolean baseBegin) - throws DOMException; - - /** - * The name of the event for an event-based time. Default value is - * <code>null</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this - * readonly attribute. - */ - public String getEvent(); - public void setEvent(String event) - throws DOMException; - - /** - * The name of the marker from the media element, for media marker times. - * Default value is <code>null</code> . - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised on attempts to modify this - * readonly attribute. - */ - public String getMarker(); - public void setMarker(String marker) - throws DOMException; - -} - diff --git a/src/bind/java/org/w3c/dom/smil/TimeEvent.java b/src/bind/java/org/w3c/dom/smil/TimeEvent.java deleted file mode 100644 index a79c4ca05..000000000 --- a/src/bind/java/org/w3c/dom/smil/TimeEvent.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -import org.w3c.dom.events.Event; -import org.w3c.dom.views.AbstractView; - -/** - * The <code>TimeEvent</code> interface provides specific contextual - * information associated with Time events. - */ -public interface TimeEvent extends Event { - /** - * The <code>view</code> attribute identifies the - * <code>AbstractView</code> from which the event was generated. - */ - public AbstractView getView(); - - /** - * Specifies some detail information about the <code>Event</code> , - * depending on the type of event. - */ - public int getDetail(); - - /** - * The <code>initTimeEvent</code> method is used to initialize the value - * of a <code>TimeEvent</code> created through the - * <code>DocumentEvent</code> interface. This method may only be called - * before the <code>TimeEvent</code> has been dispatched via the - * <code>dispatchEvent</code> method, though it may be called multiple - * times during that phase if necessary. If called multiple times, the - * final invocation takes precedence. - * @param typeArg Specifies the event type. - * @param viewArg Specifies the <code>Event</code> 's - * <code>AbstractView</code> . - * @param detailArg Specifies the <code>Event</code> 's detail. - */ - public void initTimeEvent(String typeArg, - AbstractView viewArg, - int detailArg); - -} - diff --git a/src/bind/java/org/w3c/dom/smil/TimeList.java b/src/bind/java/org/w3c/dom/smil/TimeList.java deleted file mode 100644 index 7cec133fa..000000000 --- a/src/bind/java/org/w3c/dom/smil/TimeList.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more - * details. - */ - -package org.w3c.dom.smil; - -/** - * The <code>TimeList</code> interface provides the abstraction of an ordered - * collection of times, without defining or constraining how this collection - * is implemented. - * <p> The items in the <code>TimeList</code> are accessible via an integral - * index, starting from 0. - */ -public interface TimeList { - /** - * Returns the <code>index</code> th item in the collection. If - * <code>index</code> is greater than or equal to the number of times in - * the list, this returns <code>null</code> . - * @param index Index into the collection. - * @return The time at the <code>index</code> th position in the - * <code>TimeList</code> , or <code>null</code> if that is not a valid - * index. - */ - public Time item(int index); - - /** - * The number of times in the list. The range of valid child time indices - * is 0 to <code>length-1</code> inclusive. - */ - public int getLength(); - -} - diff --git a/src/bind/java/org/w3c/dom/stylesheets/DocumentStyle.java b/src/bind/java/org/w3c/dom/stylesheets/DocumentStyle.java deleted file mode 100644 index 2270505e7..000000000 --- a/src/bind/java/org/w3c/dom/stylesheets/DocumentStyle.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.stylesheets; - -/** - * The <code>DocumentStyle</code> interface provides a mechanism by which the - * style sheets embedded in a document can be retrieved. The expectation is - * that an instance of the <code>DocumentStyle</code> interface can be - * obtained by using binding-specific casting methods on an instance of the - * <code>Document</code> interface. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface DocumentStyle { - /** - * A list containing all the style sheets explicitly linked into or - * embedded in a document. For HTML documents, this includes external - * style sheets, included via the HTML LINK element, and inline STYLE - * elements. In XML, this includes external style sheets, included via - * style sheet processing instructions (see ). - */ - public StyleSheetList getStyleSheets(); - -} diff --git a/src/bind/java/org/w3c/dom/stylesheets/LinkStyle.java b/src/bind/java/org/w3c/dom/stylesheets/LinkStyle.java deleted file mode 100644 index 481bd19db..000000000 --- a/src/bind/java/org/w3c/dom/stylesheets/LinkStyle.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.stylesheets; - -/** - * The <code>LinkStyle</code> interface provides a mechanism by which a style - * sheet can be retrieved from the node responsible for linking it into a - * document. An instance of the <code>LinkStyle</code> interface can be - * obtained using binding-specific casting methods on an instance of a - * linking node (<code>HTMLLinkElement</code>, <code>HTMLStyleElement</code> - * or <code>ProcessingInstruction</code> in DOM Level 2). - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface LinkStyle { - /** - * The style sheet. - */ - public StyleSheet getSheet(); - -} diff --git a/src/bind/java/org/w3c/dom/stylesheets/MediaList.java b/src/bind/java/org/w3c/dom/stylesheets/MediaList.java deleted file mode 100644 index 92c46609f..000000000 --- a/src/bind/java/org/w3c/dom/stylesheets/MediaList.java +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.stylesheets; - -import org.w3c.dom.DOMException; - -/** - * The <code>MediaList</code> interface provides the abstraction of an - * ordered collection of media, without defining or constraining how this - * collection is implemented. An empty list is the same as a list that - * contains the medium <code>"all"</code>. - * <p> The items in the <code>MediaList</code> are accessible via an integral - * index, starting from 0. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface MediaList { - /** - * The parsable textual representation of the media list. This is a - * comma-separated list of media. - * @exception DOMException - * SYNTAX_ERR: Raised if the specified string value has a syntax error - * and is unparsable. - * <br>NO_MODIFICATION_ALLOWED_ERR: Raised if this media list is - * readonly. - */ - public String getMediaText(); - public void setMediaText(String mediaText) - throws DOMException; - - /** - * The number of media in the list. The range of valid media is - * <code>0</code> to <code>length-1</code> inclusive. - */ - public int getLength(); - - /** - * Returns the <code>index</code>th in the list. If <code>index</code> is - * greater than or equal to the number of media in the list, this - * returns <code>null</code>. - * @param index Index into the collection. - * @return The medium at the <code>index</code>th position in the - * <code>MediaList</code>, or <code>null</code> if that is not a valid - * index. - */ - public String item(int index); - - /** - * Deletes the medium indicated by <code>oldMedium</code> from the list. - * @param oldMediumThe medium to delete in the media list. - * @exception DOMException - * NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. - * <br> NOT_FOUND_ERR: Raised if <code>oldMedium</code> is not in the - * list. - */ - public void deleteMedium(String oldMedium) - throws DOMException; - - /** - * Adds the medium <code>newMedium</code> to the end of the list. If the - * <code>newMedium</code> is already used, it is first removed. - * @param newMediumThe new medium to add. - * @exception DOMException - * INVALID_CHARACTER_ERR: If the medium contains characters that are - * invalid in the underlying style language. - * <br> NO_MODIFICATION_ALLOWED_ERR: Raised if this list is readonly. - */ - public void appendMedium(String newMedium) - throws DOMException; - -} diff --git a/src/bind/java/org/w3c/dom/stylesheets/StyleSheet.java b/src/bind/java/org/w3c/dom/stylesheets/StyleSheet.java deleted file mode 100644 index 94ccc1885..000000000 --- a/src/bind/java/org/w3c/dom/stylesheets/StyleSheet.java +++ /dev/null @@ -1,95 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.stylesheets; - -import org.w3c.dom.Node; - -/** - * The <code>StyleSheet</code> interface is the abstract base interface for - * any type of style sheet. It represents a single style sheet associated - * with a structured document. In HTML, the StyleSheet interface represents - * either an external style sheet, included via the HTML LINK element, or - * an inline STYLE element. In XML, this interface represents an external - * style sheet, included via a style sheet processing instruction. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface StyleSheet { - /** - * This specifies the style sheet language for this style sheet. The - * style sheet language is specified as a content type (e.g. - * "text/css"). The content type is often specified in the - * <code>ownerNode</code>. Also see the type attribute definition for - * the <code>LINK</code> element in HTML 4.0, and the type - * pseudo-attribute for the XML style sheet processing instruction. - */ - public String getType(); - - /** - * <code>false</code> if the style sheet is applied to the document. - * <code>true</code> if it is not. Modifying this attribute may cause a - * new resolution of style for the document. A stylesheet only applies - * if both an appropriate medium definition is present and the disabled - * attribute is false. So, if the media doesn't apply to the current - * user agent, the <code>disabled</code> attribute is ignored. - */ - public boolean getDisabled(); - public void setDisabled(boolean disabled); - - /** - * The node that associates this style sheet with the document. For HTML, - * this may be the corresponding <code>LINK</code> or <code>STYLE</code> - * element. For XML, it may be the linking processing instruction. For - * style sheets that are included by other style sheets, the value of - * this attribute is <code>null</code>. - */ - public Node getOwnerNode(); - - /** - * For style sheet languages that support the concept of style sheet - * inclusion, this attribute represents the including style sheet, if - * one exists. If the style sheet is a top-level style sheet, or the - * style sheet language does not support inclusion, the value of this - * attribute is <code>null</code>. - */ - public StyleSheet getParentStyleSheet(); - - /** - * If the style sheet is a linked style sheet, the value of its attribute - * is its location. For inline style sheets, the value of this attribute - * is <code>null</code>. See the href attribute definition for the - * <code>LINK</code> element in HTML 4.0, and the href pseudo-attribute - * for the XML style sheet processing instruction. - */ - public String getHref(); - - /** - * The advisory title. The title is often specified in the - * <code>ownerNode</code>. See the title attribute definition for the - * <code>LINK</code> element in HTML 4.0, and the title pseudo-attribute - * for the XML style sheet processing instruction. - */ - public String getTitle(); - - /** - * The intended destination media for style information. The media is - * often specified in the <code>ownerNode</code>. If no media has been - * specified, the <code>MediaList</code> will be empty. See the media - * attribute definition for the <code>LINK</code> element in HTML 4.0, - * and the media pseudo-attribute for the XML style sheet processing - * instruction . Modifying the media list may cause a change to the - * attribute <code>disabled</code>. - */ - public MediaList getMedia(); - -} diff --git a/src/bind/java/org/w3c/dom/stylesheets/StyleSheetList.java b/src/bind/java/org/w3c/dom/stylesheets/StyleSheetList.java deleted file mode 100644 index 76c0c59e1..000000000 --- a/src/bind/java/org/w3c/dom/stylesheets/StyleSheetList.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.stylesheets; - -/** - * The <code>StyleSheetList</code> interface provides the abstraction of an - * ordered collection of style sheets. - * <p> The items in the <code>StyleSheetList</code> are accessible via an - * integral index, starting from 0. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Style-20001113'>Document Object Model (DOM) Level 2 Style Specification</a>. - * @since DOM Level 2 - */ -public interface StyleSheetList { - /** - * The number of <code>StyleSheets</code> in the list. The range of valid - * child stylesheet indices is <code>0</code> to <code>length-1</code> - * inclusive. - */ - public int getLength(); - - /** - * Used to retrieve a style sheet by ordinal index. If index is greater - * than or equal to the number of style sheets in the list, this returns - * <code>null</code>. - * @param indexIndex into the collection - * @return The style sheet at the <code>index</code> position in the - * <code>StyleSheetList</code>, or <code>null</code> if that is not a - * valid index. - */ - public StyleSheet item(int index); - -} diff --git a/src/bind/java/org/w3c/dom/svg/GetSVGDocument.java b/src/bind/java/org/w3c/dom/svg/GetSVGDocument.java deleted file mode 100644 index cc8970137..000000000 --- a/src/bind/java/org/w3c/dom/svg/GetSVGDocument.java +++ /dev/null @@ -1,9 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface GetSVGDocument { - public SVGDocument getSVGDocument ( ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAElement.java b/src/bind/java/org/w3c/dom/svg/SVGAElement.java deleted file mode 100644 index a403086cd..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAElement.java +++ /dev/null @@ -1,16 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGAElement extends - SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedString getTarget( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphDefElement.java b/src/bind/java/org/w3c/dom/svg/SVGAltGlyphDefElement.java deleted file mode 100644 index c8e4d2dd0..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphDefElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAltGlyphDefElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphElement.java b/src/bind/java/org/w3c/dom/svg/SVGAltGlyphElement.java deleted file mode 100644 index 4362efb35..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphElement.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGAltGlyphElement extends - SVGTextPositioningElement, - SVGURIReference { - public String getGlyphRef( ); - public void setGlyphRef( String glyphRef ) - throws DOMException; - public String getFormat( ); - public void setFormat( String format ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphItemElement.java b/src/bind/java/org/w3c/dom/svg/SVGAltGlyphItemElement.java deleted file mode 100644 index 93c01b3d5..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAltGlyphItemElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAltGlyphItemElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAngle.java b/src/bind/java/org/w3c/dom/svg/SVGAngle.java deleted file mode 100644 index 8f212b7c5..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAngle.java +++ /dev/null @@ -1,26 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAngle { - // Angle Unit Types - public static final short SVG_ANGLETYPE_UNKNOWN = 0; - public static final short SVG_ANGLETYPE_UNSPECIFIED = 1; - public static final short SVG_ANGLETYPE_DEG = 2; - public static final short SVG_ANGLETYPE_RAD = 3; - public static final short SVG_ANGLETYPE_GRAD = 4; - - public short getUnitType( ); - public float getValue( ); - public void setValue( float value ) - throws DOMException; - public float getValueInSpecifiedUnits( ); - public void setValueInSpecifiedUnits( float valueInSpecifiedUnits ) - throws DOMException; - public String getValueAsString( ); - public void setValueAsString( String valueAsString ) - throws DOMException; - - public void newValueSpecifiedUnits ( short unitType, float valueInSpecifiedUnits ); - public void convertToSpecifiedUnits ( short unitType ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimateColorElement.java b/src/bind/java/org/w3c/dom/svg/SVGAnimateColorElement.java deleted file mode 100644 index 9efb69aab..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimateColorElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimateColorElement extends - SVGAnimationElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimateElement.java b/src/bind/java/org/w3c/dom/svg/SVGAnimateElement.java deleted file mode 100644 index 4d365b257..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimateElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimateElement extends - SVGAnimationElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimateMotionElement.java b/src/bind/java/org/w3c/dom/svg/SVGAnimateMotionElement.java deleted file mode 100644 index a06728dde..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimateMotionElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimateMotionElement extends - SVGAnimationElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimateTransformElement.java b/src/bind/java/org/w3c/dom/svg/SVGAnimateTransformElement.java deleted file mode 100644 index 1f4ac36cd..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimateTransformElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimateTransformElement extends - SVGAnimationElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedAngle.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedAngle.java deleted file mode 100644 index ae5d8a08a..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedAngle.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedAngle { - public SVGAngle getBaseVal( ); - public SVGAngle getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedBoolean.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedBoolean.java deleted file mode 100644 index 1a5e39259..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedBoolean.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAnimatedBoolean { - public boolean getBaseVal( ); - public void setBaseVal( boolean baseVal ) - throws DOMException; - public boolean getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedEnumeration.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedEnumeration.java deleted file mode 100644 index 71122ffe4..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedEnumeration.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAnimatedEnumeration { - public short getBaseVal( ); - public void setBaseVal( short baseVal ) - throws DOMException; - public short getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedInteger.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedInteger.java deleted file mode 100644 index dbc20bc35..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedInteger.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAnimatedInteger { - public int getBaseVal( ); - public void setBaseVal( int baseVal ) - throws DOMException; - public int getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedLength.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedLength.java deleted file mode 100644 index 75da0ceb7..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedLength.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedLength { - public SVGLength getBaseVal( ); - public SVGLength getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedLengthList.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedLengthList.java deleted file mode 100644 index 4294f55ed..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedLengthList.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedLengthList { - public SVGLengthList getBaseVal( ); - public SVGLengthList getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumber.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumber.java deleted file mode 100644 index 39bb6a14d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumber.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAnimatedNumber { - public float getBaseVal( ); - public void setBaseVal( float baseVal ) - throws DOMException; - public float getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumberList.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumberList.java deleted file mode 100644 index 29ea31ad0..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedNumberList.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedNumberList { - public SVGNumberList getBaseVal( ); - public SVGNumberList getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPathData.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedPathData.java deleted file mode 100644 index 3154b9ba0..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPathData.java +++ /dev/null @@ -1,9 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedPathData { - public SVGPathSegList getPathSegList( ); - public SVGPathSegList getNormalizedPathSegList( ); - public SVGPathSegList getAnimatedPathSegList( ); - public SVGPathSegList getAnimatedNormalizedPathSegList( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPoints.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedPoints.java deleted file mode 100644 index 1f7f7280c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPoints.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedPoints { - public SVGPointList getPoints( ); - public SVGPointList getAnimatedPoints( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPreserveAspectRatio.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedPreserveAspectRatio.java deleted file mode 100644 index a3cddac37..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedPreserveAspectRatio.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedPreserveAspectRatio { - public SVGPreserveAspectRatio getBaseVal( ); - public SVGPreserveAspectRatio getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedRect.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedRect.java deleted file mode 100644 index 405d45c04..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedRect.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedRect { - public SVGRect getBaseVal( ); - public SVGRect getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedString.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedString.java deleted file mode 100644 index 78cf12e0c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedString.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGAnimatedString { - public String getBaseVal( ); - public void setBaseVal( String baseVal ) - throws DOMException; - public String getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimatedTransformList.java b/src/bind/java/org/w3c/dom/svg/SVGAnimatedTransformList.java deleted file mode 100644 index 793df4316..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimatedTransformList.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGAnimatedTransformList { - public SVGTransformList getBaseVal( ); - public SVGTransformList getAnimVal( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGAnimationElement.java b/src/bind/java/org/w3c/dom/svg/SVGAnimationElement.java deleted file mode 100644 index f299c2b94..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGAnimationElement.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.smil.ElementTimeControl; - -public interface SVGAnimationElement extends - SVGElement, - SVGTests, - SVGExternalResourcesRequired, - ElementTimeControl, - EventTarget { - public SVGElement getTargetElement( ); - - public float getStartTime ( ); - public float getCurrentTime ( ); - public float getSimpleDuration ( ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGCSSRule.java b/src/bind/java/org/w3c/dom/svg/SVGCSSRule.java deleted file mode 100644 index 5365e5dfd..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGCSSRule.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.css.CSSRule; - -public interface SVGCSSRule extends - CSSRule { - // Additional CSS RuleType to support ICC color specifications - public static final short COLOR_PROFILE_RULE = 7; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGCircleElement.java b/src/bind/java/org/w3c/dom/svg/SVGCircleElement.java deleted file mode 100644 index 6c9aa02ec..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGCircleElement.java +++ /dev/null @@ -1,17 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGCircleElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getCx( ); - public SVGAnimatedLength getCy( ); - public SVGAnimatedLength getR( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGClipPathElement.java b/src/bind/java/org/w3c/dom/svg/SVGClipPathElement.java deleted file mode 100644 index ebe018c2c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGClipPathElement.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGClipPathElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - SVGUnitTypes { - public SVGAnimatedEnumeration getClipPathUnits( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGColor.java b/src/bind/java/org/w3c/dom/svg/SVGColor.java deleted file mode 100644 index 27e942ac8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGColor.java +++ /dev/null @@ -1,25 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.css.RGBColor; -import org.w3c.dom.css.CSSValue; - -public interface SVGColor extends - CSSValue { - // Color Types - public static final short SVG_COLORTYPE_UNKNOWN = 0; - public static final short SVG_COLORTYPE_RGBCOLOR = 1; - public static final short SVG_COLORTYPE_RGBCOLOR_ICCCOLOR = 2; - public static final short SVG_COLORTYPE_CURRENTCOLOR = 3; - - public short getColorType( ); - public RGBColor getRGBColor( ); - public SVGICCColor getICCColor( ); - - public void setRGBColor ( String rgbColor ) - throws SVGException; - public void setRGBColorICCColor ( String rgbColor, String iccColor ) - throws SVGException; - public void setColor ( short colorType, String rgbColor, String iccColor ) - throws SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGColorProfileElement.java b/src/bind/java/org/w3c/dom/svg/SVGColorProfileElement.java deleted file mode 100644 index ce6d33598..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGColorProfileElement.java +++ /dev/null @@ -1,19 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGColorProfileElement extends - SVGElement, - SVGURIReference, - SVGRenderingIntent { - public String getLocal( ); - public void setLocal( String local ) - throws DOMException; - public String getName( ); - public void setName( String name ) - throws DOMException; - public short getRenderingIntent( ); - public void setRenderingIntent( short renderingIntent ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGColorProfileRule.java b/src/bind/java/org/w3c/dom/svg/SVGColorProfileRule.java deleted file mode 100644 index 97faa309b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGColorProfileRule.java +++ /dev/null @@ -1,18 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGColorProfileRule extends - SVGCSSRule, - SVGRenderingIntent { - public String getSrc( ); - public void setSrc( String src ) - throws DOMException; - public String getName( ); - public void setName( String name ) - throws DOMException; - public short getRenderingIntent( ); - public void setRenderingIntent( short renderingIntent ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGComponentTransferFunctionElement.java b/src/bind/java/org/w3c/dom/svg/SVGComponentTransferFunctionElement.java deleted file mode 100644 index 82e061141..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGComponentTransferFunctionElement.java +++ /dev/null @@ -1,21 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGComponentTransferFunctionElement extends - SVGElement { - // Component Transfer Types - public static final short SVG_FECOMPONENTTRANSFER_TYPE_UNKNOWN = 0; - public static final short SVG_FECOMPONENTTRANSFER_TYPE_IDENTITY = 1; - public static final short SVG_FECOMPONENTTRANSFER_TYPE_TABLE = 2; - public static final short SVG_FECOMPONENTTRANSFER_TYPE_DISCRETE = 3; - public static final short SVG_FECOMPONENTTRANSFER_TYPE_LINEAR = 4; - public static final short SVG_FECOMPONENTTRANSFER_TYPE_GAMMA = 5; - - public SVGAnimatedEnumeration getType( ); - public SVGAnimatedNumberList getTableValues( ); - public SVGAnimatedNumber getSlope( ); - public SVGAnimatedNumber getIntercept( ); - public SVGAnimatedNumber getAmplitude( ); - public SVGAnimatedNumber getExponent( ); - public SVGAnimatedNumber getOffset( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGCursorElement.java b/src/bind/java/org/w3c/dom/svg/SVGCursorElement.java deleted file mode 100644 index cc8cdf298..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGCursorElement.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGCursorElement extends - SVGElement, - SVGURIReference, - SVGTests, - SVGExternalResourcesRequired { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGDefinitionSrcElement.java b/src/bind/java/org/w3c/dom/svg/SVGDefinitionSrcElement.java deleted file mode 100644 index 4123b5a97..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGDefinitionSrcElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGDefinitionSrcElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGDefsElement.java b/src/bind/java/org/w3c/dom/svg/SVGDefsElement.java deleted file mode 100644 index 6b83bedc3..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGDefsElement.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGDefsElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGDescElement.java b/src/bind/java/org/w3c/dom/svg/SVGDescElement.java deleted file mode 100644 index d3eaf7384..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGDescElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGDescElement extends - SVGElement, - SVGLangSpace, - SVGStylable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGDocument.java b/src/bind/java/org/w3c/dom/svg/SVGDocument.java deleted file mode 100644 index b6d9064b8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGDocument.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.Document; -import org.w3c.dom.events.DocumentEvent; - -public interface SVGDocument extends - Document, - DocumentEvent { - public String getTitle( ); - public String getReferrer( ); - public String getDomain( ); - public String getURL( ); - public SVGSVGElement getRootElement( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGElement.java b/src/bind/java/org/w3c/dom/svg/SVGElement.java deleted file mode 100644 index d6a0299ca..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGElement.java +++ /dev/null @@ -1,17 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -import org.w3c.dom.Element; - -public interface SVGElement extends - Element { - public String getId( ); - public void setId( String id ) - throws DOMException; - public String getXMLbase( ); - public void setXMLbase( String xmlbase ) - throws DOMException; - public SVGSVGElement getOwnerSVGElement( ); - public SVGElement getViewportElement( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGElementInstance.java b/src/bind/java/org/w3c/dom/svg/SVGElementInstance.java deleted file mode 100644 index 2509ec9c6..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGElementInstance.java +++ /dev/null @@ -1,16 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGElementInstance extends - EventTarget { - public SVGElement getCorrespondingElement( ); - public SVGUseElement getCorrespondingUseElement( ); - public SVGElementInstance getParentNode( ); - public SVGElementInstanceList getChildNodes( ); - public SVGElementInstance getFirstChild( ); - public SVGElementInstance getLastChild( ); - public SVGElementInstance getPreviousSibling( ); - public SVGElementInstance getNextSibling( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGElementInstanceList.java b/src/bind/java/org/w3c/dom/svg/SVGElementInstanceList.java deleted file mode 100644 index 010ddfb4f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGElementInstanceList.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGElementInstanceList { - public int getLength( ); - - public SVGElementInstance item ( int index ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGEllipseElement.java b/src/bind/java/org/w3c/dom/svg/SVGEllipseElement.java deleted file mode 100644 index 2f7f7dbaa..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGEllipseElement.java +++ /dev/null @@ -1,18 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGEllipseElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getCx( ); - public SVGAnimatedLength getCy( ); - public SVGAnimatedLength getRx( ); - public SVGAnimatedLength getRy( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGEvent.java b/src/bind/java/org/w3c/dom/svg/SVGEvent.java deleted file mode 100644 index 252825ba7..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGEvent.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.Event; - -public interface SVGEvent extends - Event { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGException.java b/src/bind/java/org/w3c/dom/svg/SVGException.java deleted file mode 100644 index 64f3743e1..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGException.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.w3c.dom.svg; - -public class SVGException extends RuntimeException { - public SVGException(short code, String message) { - super(message); - this.code = code; - } - public short code; - // ExceptionCode - public static final short SVG_WRONG_TYPE_ERR = 0; - public static final short SVG_INVALID_VALUE_ERR = 1; - public static final short SVG_MATRIX_NOT_INVERTABLE = 2; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGExternalResourcesRequired.java b/src/bind/java/org/w3c/dom/svg/SVGExternalResourcesRequired.java deleted file mode 100644 index aa362066f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGExternalResourcesRequired.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGExternalResourcesRequired { - public SVGAnimatedBoolean getExternalResourcesRequired( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEBlendElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEBlendElement.java deleted file mode 100644 index 3d8a11ade..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEBlendElement.java +++ /dev/null @@ -1,18 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEBlendElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Blend Mode Types - public static final short SVG_FEBLEND_MODE_UNKNOWN = 0; - public static final short SVG_FEBLEND_MODE_NORMAL = 1; - public static final short SVG_FEBLEND_MODE_MULTIPLY = 2; - public static final short SVG_FEBLEND_MODE_SCREEN = 3; - public static final short SVG_FEBLEND_MODE_DARKEN = 4; - public static final short SVG_FEBLEND_MODE_LIGHTEN = 5; - - public SVGAnimatedString getIn1( ); - public SVGAnimatedString getIn2( ); - public SVGAnimatedEnumeration getMode( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEColorMatrixElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEColorMatrixElement.java deleted file mode 100644 index 6aac0e35c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEColorMatrixElement.java +++ /dev/null @@ -1,17 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEColorMatrixElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Color Matrix Types - public static final short SVG_FECOLORMATRIX_TYPE_UNKNOWN = 0; - public static final short SVG_FECOLORMATRIX_TYPE_MATRIX = 1; - public static final short SVG_FECOLORMATRIX_TYPE_SATURATE = 2; - public static final short SVG_FECOLORMATRIX_TYPE_HUEROTATE = 3; - public static final short SVG_FECOLORMATRIX_TYPE_LUMINANCETOALPHA = 4; - - public SVGAnimatedString getIn1( ); - public SVGAnimatedEnumeration getType( ); - public SVGAnimatedNumberList getValues( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEComponentTransferElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEComponentTransferElement.java deleted file mode 100644 index 38d3fba34..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEComponentTransferElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEComponentTransferElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFECompositeElement.java b/src/bind/java/org/w3c/dom/svg/SVGFECompositeElement.java deleted file mode 100644 index 244888d01..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFECompositeElement.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFECompositeElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Composite Operators - public static final short SVG_FECOMPOSITE_OPERATOR_UNKNOWN = 0; - public static final short SVG_FECOMPOSITE_OPERATOR_OVER = 1; - public static final short SVG_FECOMPOSITE_OPERATOR_IN = 2; - public static final short SVG_FECOMPOSITE_OPERATOR_OUT = 3; - public static final short SVG_FECOMPOSITE_OPERATOR_ATOP = 4; - public static final short SVG_FECOMPOSITE_OPERATOR_XOR = 5; - public static final short SVG_FECOMPOSITE_OPERATOR_ARITHMETIC = 6; - - public SVGAnimatedString getIn1( ); - public SVGAnimatedString getIn2( ); - public SVGAnimatedEnumeration getOperator( ); - public SVGAnimatedNumber getK1( ); - public SVGAnimatedNumber getK2( ); - public SVGAnimatedNumber getK3( ); - public SVGAnimatedNumber getK4( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEConvolveMatrixElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEConvolveMatrixElement.java deleted file mode 100644 index 391a0d858..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEConvolveMatrixElement.java +++ /dev/null @@ -1,24 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEConvolveMatrixElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Edge Mode Values - public static final short SVG_EDGEMODE_UNKNOWN = 0; - public static final short SVG_EDGEMODE_DUPLICATE = 1; - public static final short SVG_EDGEMODE_WRAP = 2; - public static final short SVG_EDGEMODE_NONE = 3; - - public SVGAnimatedInteger getOrderX( ); - public SVGAnimatedInteger getOrderY( ); - public SVGAnimatedNumberList getKernelMatrix( ); - public SVGAnimatedNumber getDivisor( ); - public SVGAnimatedNumber getBias( ); - public SVGAnimatedInteger getTargetX( ); - public SVGAnimatedInteger getTargetY( ); - public SVGAnimatedEnumeration getEdgeMode( ); - public SVGAnimatedNumber getKernelUnitLengthX( ); - public SVGAnimatedNumber getKernelUnitLengthY( ); - public SVGAnimatedBoolean getPreserveAlpha( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEDiffuseLightingElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEDiffuseLightingElement.java deleted file mode 100644 index e5c01e87c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEDiffuseLightingElement.java +++ /dev/null @@ -1,12 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEDiffuseLightingElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); - public SVGAnimatedNumber getSurfaceScale( ); - public SVGAnimatedNumber getDiffuseConstant( ); - public SVGAnimatedNumber getKernelUnitLengthX( ); - public SVGAnimatedNumber getKernelUnitLengthY( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEDisplacementMapElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEDisplacementMapElement.java deleted file mode 100644 index 4c82fd85a..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEDisplacementMapElement.java +++ /dev/null @@ -1,19 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEDisplacementMapElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Channel Selectors - public static final short SVG_CHANNEL_UNKNOWN = 0; - public static final short SVG_CHANNEL_R = 1; - public static final short SVG_CHANNEL_G = 2; - public static final short SVG_CHANNEL_B = 3; - public static final short SVG_CHANNEL_A = 4; - - public SVGAnimatedString getIn1( ); - public SVGAnimatedString getIn2( ); - public SVGAnimatedNumber getScale( ); - public SVGAnimatedEnumeration getXChannelSelector( ); - public SVGAnimatedEnumeration getYChannelSelector( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEDistantLightElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEDistantLightElement.java deleted file mode 100644 index a96a1e15d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEDistantLightElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEDistantLightElement extends - SVGElement { - public SVGAnimatedNumber getAzimuth( ); - public SVGAnimatedNumber getElevation( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEFloodElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEFloodElement.java deleted file mode 100644 index 313097a2f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEFloodElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEFloodElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEFuncAElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEFuncAElement.java deleted file mode 100644 index fa9773524..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEFuncAElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEFuncAElement extends - SVGComponentTransferFunctionElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEFuncBElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEFuncBElement.java deleted file mode 100644 index 17733d62b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEFuncBElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEFuncBElement extends - SVGComponentTransferFunctionElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEFuncGElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEFuncGElement.java deleted file mode 100644 index 5078436f1..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEFuncGElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEFuncGElement extends - SVGComponentTransferFunctionElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEFuncRElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEFuncRElement.java deleted file mode 100644 index 72efaac9d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEFuncRElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEFuncRElement extends - SVGComponentTransferFunctionElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEGaussianBlurElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEGaussianBlurElement.java deleted file mode 100644 index b3385fa4b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEGaussianBlurElement.java +++ /dev/null @@ -1,12 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEGaussianBlurElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); - public SVGAnimatedNumber getStdDeviationX( ); - public SVGAnimatedNumber getStdDeviationY( ); - - public void setStdDeviation ( float stdDeviationX, float stdDeviationY ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEImageElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEImageElement.java deleted file mode 100644 index b74daa7d2..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEImageElement.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEImageElement extends - SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGFilterPrimitiveStandardAttributes { - - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); - -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEMergeElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEMergeElement.java deleted file mode 100644 index cea3d6fa9..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEMergeElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEMergeElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEMergeNodeElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEMergeNodeElement.java deleted file mode 100644 index e0ae4c402..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEMergeNodeElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEMergeNodeElement extends - SVGElement { - public SVGAnimatedString getIn1( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEMorphologyElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEMorphologyElement.java deleted file mode 100644 index b04c80c84..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEMorphologyElement.java +++ /dev/null @@ -1,16 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEMorphologyElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Morphology Operators - public static final short SVG_MORPHOLOGY_OPERATOR_UNKNOWN = 0; - public static final short SVG_MORPHOLOGY_OPERATOR_ERODE = 1; - public static final short SVG_MORPHOLOGY_OPERATOR_DILATE = 2; - - public SVGAnimatedString getIn1( ); - public SVGAnimatedEnumeration getOperator( ); - public SVGAnimatedNumber getRadiusX( ); - public SVGAnimatedNumber getRadiusY( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEOffsetElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEOffsetElement.java deleted file mode 100644 index 6a76b8d42..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEOffsetElement.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEOffsetElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); - public SVGAnimatedNumber getDx( ); - public SVGAnimatedNumber getDy( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFEPointLightElement.java b/src/bind/java/org/w3c/dom/svg/SVGFEPointLightElement.java deleted file mode 100644 index cec24b204..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFEPointLightElement.java +++ /dev/null @@ -1,9 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFEPointLightElement extends - SVGElement { - public SVGAnimatedNumber getX( ); - public SVGAnimatedNumber getY( ); - public SVGAnimatedNumber getZ( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFESpecularLightingElement.java b/src/bind/java/org/w3c/dom/svg/SVGFESpecularLightingElement.java deleted file mode 100644 index 2070f72dc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFESpecularLightingElement.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFESpecularLightingElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); - public SVGAnimatedNumber getSurfaceScale( ); - public SVGAnimatedNumber getSpecularConstant( ); - public SVGAnimatedNumber getSpecularExponent( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFESpotLightElement.java b/src/bind/java/org/w3c/dom/svg/SVGFESpotLightElement.java deleted file mode 100644 index 2beaaf55d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFESpotLightElement.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFESpotLightElement extends - SVGElement { - public SVGAnimatedNumber getX( ); - public SVGAnimatedNumber getY( ); - public SVGAnimatedNumber getZ( ); - public SVGAnimatedNumber getPointsAtX( ); - public SVGAnimatedNumber getPointsAtY( ); - public SVGAnimatedNumber getPointsAtZ( ); - public SVGAnimatedNumber getSpecularExponent( ); - public SVGAnimatedNumber getLimitingConeAngle( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFETileElement.java b/src/bind/java/org/w3c/dom/svg/SVGFETileElement.java deleted file mode 100644 index 4c281292b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFETileElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFETileElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - public SVGAnimatedString getIn1( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFETurbulenceElement.java b/src/bind/java/org/w3c/dom/svg/SVGFETurbulenceElement.java deleted file mode 100644 index f8badaafc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFETurbulenceElement.java +++ /dev/null @@ -1,22 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFETurbulenceElement extends - SVGElement, - SVGFilterPrimitiveStandardAttributes { - // Turbulence Types - public static final short SVG_TURBULENCE_TYPE_UNKNOWN = 0; - public static final short SVG_TURBULENCE_TYPE_FRACTALNOISE = 1; - public static final short SVG_TURBULENCE_TYPE_TURBULENCE = 2; - // Stitch Options - public static final short SVG_STITCHTYPE_UNKNOWN = 0; - public static final short SVG_STITCHTYPE_STITCH = 1; - public static final short SVG_STITCHTYPE_NOSTITCH = 2; - - public SVGAnimatedNumber getBaseFrequencyX( ); - public SVGAnimatedNumber getBaseFrequencyY( ); - public SVGAnimatedInteger getNumOctaves( ); - public SVGAnimatedNumber getSeed( ); - public SVGAnimatedEnumeration getStitchTiles( ); - public SVGAnimatedEnumeration getType( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFilterElement.java b/src/bind/java/org/w3c/dom/svg/SVGFilterElement.java deleted file mode 100644 index 01e57fdf2..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFilterElement.java +++ /dev/null @@ -1,21 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFilterElement extends - SVGElement, - SVGURIReference, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - public SVGAnimatedEnumeration getFilterUnits( ); - public SVGAnimatedEnumeration getPrimitiveUnits( ); - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public SVGAnimatedInteger getFilterResX( ); - public SVGAnimatedInteger getFilterResY( ); - - public void setFilterRes ( int filterResX, int filterResY ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFilterPrimitiveStandardAttributes.java b/src/bind/java/org/w3c/dom/svg/SVGFilterPrimitiveStandardAttributes.java deleted file mode 100644 index cd7ed6276..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFilterPrimitiveStandardAttributes.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFilterPrimitiveStandardAttributes extends - SVGStylable { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public SVGAnimatedString getResult( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFitToViewBox.java b/src/bind/java/org/w3c/dom/svg/SVGFitToViewBox.java deleted file mode 100644 index d40c6a1a4..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFitToViewBox.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFitToViewBox { - public SVGAnimatedRect getViewBox( ); - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontElement.java deleted file mode 100644 index e11dc355e..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontElement extends - SVGElement, - SVGExternalResourcesRequired, - SVGStylable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontFaceElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontFaceElement.java deleted file mode 100644 index b201c9456..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontFaceElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontFaceElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontFaceFormatElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontFaceFormatElement.java deleted file mode 100644 index 895cd6c77..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontFaceFormatElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontFaceFormatElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontFaceNameElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontFaceNameElement.java deleted file mode 100644 index 723370a07..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontFaceNameElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontFaceNameElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontFaceSrcElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontFaceSrcElement.java deleted file mode 100644 index dcc898b6f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontFaceSrcElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontFaceSrcElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGFontFaceUriElement.java b/src/bind/java/org/w3c/dom/svg/SVGFontFaceUriElement.java deleted file mode 100644 index 39dd039e9..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGFontFaceUriElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGFontFaceUriElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGForeignObjectElement.java b/src/bind/java/org/w3c/dom/svg/SVGForeignObjectElement.java deleted file mode 100644 index 49e37af09..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGForeignObjectElement.java +++ /dev/null @@ -1,18 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGForeignObjectElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGGElement.java b/src/bind/java/org/w3c/dom/svg/SVGGElement.java deleted file mode 100644 index e9a78190e..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGGElement.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGGElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGGlyphElement.java b/src/bind/java/org/w3c/dom/svg/SVGGlyphElement.java deleted file mode 100644 index 9354bb74d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGGlyphElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGGlyphElement extends - SVGElement, - SVGStylable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGGlyphRefElement.java b/src/bind/java/org/w3c/dom/svg/SVGGlyphRefElement.java deleted file mode 100644 index c16aaa1cb..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGGlyphRefElement.java +++ /dev/null @@ -1,28 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGGlyphRefElement extends - SVGElement, - SVGURIReference, - SVGStylable { - public String getGlyphRef( ); - public void setGlyphRef( String glyphRef ) - throws DOMException; - public String getFormat( ); - public void setFormat( String format ) - throws DOMException; - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getDx( ); - public void setDx( float dx ) - throws DOMException; - public float getDy( ); - public void setDy( float dy ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGGradientElement.java b/src/bind/java/org/w3c/dom/svg/SVGGradientElement.java deleted file mode 100644 index 8cbc03f1c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGGradientElement.java +++ /dev/null @@ -1,19 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGGradientElement extends - SVGElement, - SVGURIReference, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - // Spread Method Types - public static final short SVG_SPREADMETHOD_UNKNOWN = 0; - public static final short SVG_SPREADMETHOD_PAD = 1; - public static final short SVG_SPREADMETHOD_REFLECT = 2; - public static final short SVG_SPREADMETHOD_REPEAT = 3; - - public SVGAnimatedEnumeration getGradientUnits( ); - public SVGAnimatedTransformList getGradientTransform( ); - public SVGAnimatedEnumeration getSpreadMethod( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGHKernElement.java b/src/bind/java/org/w3c/dom/svg/SVGHKernElement.java deleted file mode 100644 index ca527b67c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGHKernElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGHKernElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGICCColor.java b/src/bind/java/org/w3c/dom/svg/SVGICCColor.java deleted file mode 100644 index e04962838..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGICCColor.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGICCColor { - public String getColorProfile( ); - public void setColorProfile( String colorProfile ) - throws DOMException; - public SVGNumberList getColors( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGImageElement.java b/src/bind/java/org/w3c/dom/svg/SVGImageElement.java deleted file mode 100644 index f77101f91..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGImageElement.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGImageElement extends - SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public SVGAnimatedPreserveAspectRatio getPreserveAspectRatio( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLangSpace.java b/src/bind/java/org/w3c/dom/svg/SVGLangSpace.java deleted file mode 100644 index 300d52725..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLangSpace.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGLangSpace { - public String getXMLlang( ); - public void setXMLlang( String xmllang ) - throws DOMException; - public String getXMLspace( ); - public void setXMLspace( String xmlspace ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLength.java b/src/bind/java/org/w3c/dom/svg/SVGLength.java deleted file mode 100644 index 88b7bdd38..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLength.java +++ /dev/null @@ -1,32 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; -public interface SVGLength { - // Length Unit Types - public static final short SVG_LENGTHTYPE_UNKNOWN = 0; - public static final short SVG_LENGTHTYPE_NUMBER = 1; - public static final short SVG_LENGTHTYPE_PERCENTAGE = 2; - public static final short SVG_LENGTHTYPE_EMS = 3; - public static final short SVG_LENGTHTYPE_EXS = 4; - public static final short SVG_LENGTHTYPE_PX = 5; - public static final short SVG_LENGTHTYPE_CM = 6; - public static final short SVG_LENGTHTYPE_MM = 7; - public static final short SVG_LENGTHTYPE_IN = 8; - public static final short SVG_LENGTHTYPE_PT = 9; - public static final short SVG_LENGTHTYPE_PC = 10; - - public short getUnitType( ); - public float getValue( ); - public void setValue( float value ) - throws DOMException; - public float getValueInSpecifiedUnits( ); - public void setValueInSpecifiedUnits( float valueInSpecifiedUnits ) - throws DOMException; - public String getValueAsString( ); - public void setValueAsString( String valueAsString ) - throws DOMException; - - public void newValueSpecifiedUnits ( short unitType, float valueInSpecifiedUnits ); - public void convertToSpecifiedUnits ( short unitType ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLengthList.java b/src/bind/java/org/w3c/dom/svg/SVGLengthList.java deleted file mode 100644 index ba4c259e8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLengthList.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGLengthList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public SVGLength initialize ( SVGLength newItem ) - throws DOMException, SVGException; - public SVGLength getItem ( int index ) - throws DOMException; - public SVGLength insertItemBefore ( SVGLength newItem, int index ) - throws DOMException, SVGException; - public SVGLength replaceItem ( SVGLength newItem, int index ) - throws DOMException, SVGException; - public SVGLength removeItem ( int index ) - throws DOMException; - public SVGLength appendItem ( SVGLength newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLineElement.java b/src/bind/java/org/w3c/dom/svg/SVGLineElement.java deleted file mode 100644 index 45b947cbc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLineElement.java +++ /dev/null @@ -1,18 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGLineElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getX1( ); - public SVGAnimatedLength getY1( ); - public SVGAnimatedLength getX2( ); - public SVGAnimatedLength getY2( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLinearGradientElement.java b/src/bind/java/org/w3c/dom/svg/SVGLinearGradientElement.java deleted file mode 100644 index 189eda2cb..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLinearGradientElement.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGLinearGradientElement extends - SVGGradientElement { - public SVGAnimatedLength getX1( ); - public SVGAnimatedLength getY1( ); - public SVGAnimatedLength getX2( ); - public SVGAnimatedLength getY2( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGLocatable.java b/src/bind/java/org/w3c/dom/svg/SVGLocatable.java deleted file mode 100644 index 618b955eb..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGLocatable.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGLocatable { - public SVGElement getNearestViewportElement( ); - public SVGElement getFarthestViewportElement( ); - - public SVGRect getBBox ( ); - public SVGMatrix getCTM ( ); - public SVGMatrix getScreenCTM ( ); - public SVGMatrix getTransformToElement ( SVGElement element ) - throws SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMPathElement.java b/src/bind/java/org/w3c/dom/svg/SVGMPathElement.java deleted file mode 100644 index 36032385b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMPathElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGMPathElement extends - SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMarkerElement.java b/src/bind/java/org/w3c/dom/svg/SVGMarkerElement.java deleted file mode 100644 index 810ce56f4..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMarkerElement.java +++ /dev/null @@ -1,29 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGMarkerElement extends - SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox { - // Marker Unit Types - public static final short SVG_MARKERUNITS_UNKNOWN = 0; - public static final short SVG_MARKERUNITS_USERSPACEONUSE = 1; - public static final short SVG_MARKERUNITS_STROKEWIDTH = 2; - // Marker Orientation Types - public static final short SVG_MARKER_ORIENT_UNKNOWN = 0; - public static final short SVG_MARKER_ORIENT_AUTO = 1; - public static final short SVG_MARKER_ORIENT_ANGLE = 2; - - public SVGAnimatedLength getRefX( ); - public SVGAnimatedLength getRefY( ); - public SVGAnimatedEnumeration getMarkerUnits( ); - public SVGAnimatedLength getMarkerWidth( ); - public SVGAnimatedLength getMarkerHeight( ); - public SVGAnimatedEnumeration getOrientType( ); - public SVGAnimatedAngle getOrientAngle( ); - - public void setOrientToAuto ( ); - public void setOrientToAngle ( SVGAngle angle ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMaskElement.java b/src/bind/java/org/w3c/dom/svg/SVGMaskElement.java deleted file mode 100644 index bb3a8651f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMaskElement.java +++ /dev/null @@ -1,17 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGMaskElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGUnitTypes { - public SVGAnimatedEnumeration getMaskUnits( ); - public SVGAnimatedEnumeration getMaskContentUnits( ); - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMatrix.java b/src/bind/java/org/w3c/dom/svg/SVGMatrix.java deleted file mode 100644 index 652b4e1b0..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMatrix.java +++ /dev/null @@ -1,39 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGMatrix { - public float getA( ); - public void setA( float a ) - throws DOMException; - public float getB( ); - public void setB( float b ) - throws DOMException; - public float getC( ); - public void setC( float c ) - throws DOMException; - public float getD( ); - public void setD( float d ) - throws DOMException; - public float getE( ); - public void setE( float e ) - throws DOMException; - public float getF( ); - public void setF( float f ) - throws DOMException; - - public SVGMatrix multiply ( SVGMatrix secondMatrix ); - public SVGMatrix inverse ( ) - throws SVGException; - public SVGMatrix translate ( float x, float y ); - public SVGMatrix scale ( float scaleFactor ); - public SVGMatrix scaleNonUniform ( float scaleFactorX, float scaleFactorY ); - public SVGMatrix rotate ( float angle ); - public SVGMatrix rotateFromVector ( float x, float y ) - throws SVGException; - public SVGMatrix flipX ( ); - public SVGMatrix flipY ( ); - public SVGMatrix skewX ( float angle ); - public SVGMatrix skewY ( float angle ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMetadataElement.java b/src/bind/java/org/w3c/dom/svg/SVGMetadataElement.java deleted file mode 100644 index d8485d124..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMetadataElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGMetadataElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGMissingGlyphElement.java b/src/bind/java/org/w3c/dom/svg/SVGMissingGlyphElement.java deleted file mode 100644 index 8c777fb2a..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGMissingGlyphElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGMissingGlyphElement extends - SVGElement, - SVGStylable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGNumber.java b/src/bind/java/org/w3c/dom/svg/SVGNumber.java deleted file mode 100644 index 1dcdc8a23..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGNumber.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGNumber { - public float getValue( ); - public void setValue( float value ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGNumberList.java b/src/bind/java/org/w3c/dom/svg/SVGNumberList.java deleted file mode 100644 index a2db146fc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGNumberList.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGNumberList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public SVGNumber initialize ( SVGNumber newItem ) - throws DOMException, SVGException; - public SVGNumber getItem ( int index ) - throws DOMException; - public SVGNumber insertItemBefore ( SVGNumber newItem, int index ) - throws DOMException, SVGException; - public SVGNumber replaceItem ( SVGNumber newItem, int index ) - throws DOMException, SVGException; - public SVGNumber removeItem ( int index ) - throws DOMException; - public SVGNumber appendItem ( SVGNumber newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPaint.java b/src/bind/java/org/w3c/dom/svg/SVGPaint.java deleted file mode 100644 index 66d54c668..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPaint.java +++ /dev/null @@ -1,26 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.css.RGBColor; - -public interface SVGPaint extends - SVGColor { - // Paint Types - public static final short SVG_PAINTTYPE_UNKNOWN = 0; - public static final short SVG_PAINTTYPE_RGBCOLOR = 1; - public static final short SVG_PAINTTYPE_RGBCOLOR_ICCCOLOR = 2; - public static final short SVG_PAINTTYPE_NONE = 101; - public static final short SVG_PAINTTYPE_CURRENTCOLOR = 102; - public static final short SVG_PAINTTYPE_URI_NONE = 103; - public static final short SVG_PAINTTYPE_URI_CURRENTCOLOR = 104; - public static final short SVG_PAINTTYPE_URI_RGBCOLOR = 105; - public static final short SVG_PAINTTYPE_URI_RGBCOLOR_ICCCOLOR = 106; - public static final short SVG_PAINTTYPE_URI = 107; - - public short getPaintType( ); - public String getUri( ); - - public void setUri ( String uri ); - public void setPaint ( short paintType, String uri, String rgbColor, String iccColor ) - throws SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathElement.java b/src/bind/java/org/w3c/dom/svg/SVGPathElement.java deleted file mode 100644 index 71efe6d69..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathElement.java +++ /dev/null @@ -1,39 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGPathElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget, - SVGAnimatedPathData { - public SVGAnimatedNumber getPathLength( ); - - public float getTotalLength ( ); - public SVGPoint getPointAtLength ( float distance ); - public int getPathSegAtLength ( float distance ); - public SVGPathSegClosePath createSVGPathSegClosePath ( ); - public SVGPathSegMovetoAbs createSVGPathSegMovetoAbs ( float x, float y ); - public SVGPathSegMovetoRel createSVGPathSegMovetoRel ( float x, float y ); - public SVGPathSegLinetoAbs createSVGPathSegLinetoAbs ( float x, float y ); - public SVGPathSegLinetoRel createSVGPathSegLinetoRel ( float x, float y ); - public SVGPathSegCurvetoCubicAbs createSVGPathSegCurvetoCubicAbs ( float x, float y, float x1, float y1, float x2, float y2 ); - public SVGPathSegCurvetoCubicRel createSVGPathSegCurvetoCubicRel ( float x, float y, float x1, float y1, float x2, float y2 ); - public SVGPathSegCurvetoQuadraticAbs createSVGPathSegCurvetoQuadraticAbs ( float x, float y, float x1, float y1 ); - public SVGPathSegCurvetoQuadraticRel createSVGPathSegCurvetoQuadraticRel ( float x, float y, float x1, float y1 ); - public SVGPathSegArcAbs createSVGPathSegArcAbs ( float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag ); - public SVGPathSegArcRel createSVGPathSegArcRel ( float x, float y, float r1, float r2, float angle, boolean largeArcFlag, boolean sweepFlag ); - public SVGPathSegLinetoHorizontalAbs createSVGPathSegLinetoHorizontalAbs ( float x ); - public SVGPathSegLinetoHorizontalRel createSVGPathSegLinetoHorizontalRel ( float x ); - public SVGPathSegLinetoVerticalAbs createSVGPathSegLinetoVerticalAbs ( float y ); - public SVGPathSegLinetoVerticalRel createSVGPathSegLinetoVerticalRel ( float y ); - public SVGPathSegCurvetoCubicSmoothAbs createSVGPathSegCurvetoCubicSmoothAbs ( float x, float y, float x2, float y2 ); - public SVGPathSegCurvetoCubicSmoothRel createSVGPathSegCurvetoCubicSmoothRel ( float x, float y, float x2, float y2 ); - public SVGPathSegCurvetoQuadraticSmoothAbs createSVGPathSegCurvetoQuadraticSmoothAbs ( float x, float y ); - public SVGPathSegCurvetoQuadraticSmoothRel createSVGPathSegCurvetoQuadraticSmoothRel ( float x, float y ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSeg.java b/src/bind/java/org/w3c/dom/svg/SVGPathSeg.java deleted file mode 100644 index dea607e41..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSeg.java +++ /dev/null @@ -1,29 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGPathSeg { - // Path Segment Types - public static final short PATHSEG_UNKNOWN = 0; - public static final short PATHSEG_CLOSEPATH = 1; - public static final short PATHSEG_MOVETO_ABS = 2; - public static final short PATHSEG_MOVETO_REL = 3; - public static final short PATHSEG_LINETO_ABS = 4; - public static final short PATHSEG_LINETO_REL = 5; - public static final short PATHSEG_CURVETO_CUBIC_ABS = 6; - public static final short PATHSEG_CURVETO_CUBIC_REL = 7; - public static final short PATHSEG_CURVETO_QUADRATIC_ABS = 8; - public static final short PATHSEG_CURVETO_QUADRATIC_REL = 9; - public static final short PATHSEG_ARC_ABS = 10; - public static final short PATHSEG_ARC_REL = 11; - public static final short PATHSEG_LINETO_HORIZONTAL_ABS = 12; - public static final short PATHSEG_LINETO_HORIZONTAL_REL = 13; - public static final short PATHSEG_LINETO_VERTICAL_ABS = 14; - public static final short PATHSEG_LINETO_VERTICAL_REL = 15; - public static final short PATHSEG_CURVETO_CUBIC_SMOOTH_ABS = 16; - public static final short PATHSEG_CURVETO_CUBIC_SMOOTH_REL = 17; - public static final short PATHSEG_CURVETO_QUADRATIC_SMOOTH_ABS = 18; - public static final short PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL = 19; - - public short getPathSegType( ); - public String getPathSegTypeAsLetter( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegArcAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegArcAbs.java deleted file mode 100644 index 84c2e7e2b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegArcAbs.java +++ /dev/null @@ -1,29 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegArcAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getR1( ); - public void setR1( float r1 ) - throws DOMException; - public float getR2( ); - public void setR2( float r2 ) - throws DOMException; - public float getAngle( ); - public void setAngle( float angle ) - throws DOMException; - public boolean getLargeArcFlag( ); - public void setLargeArcFlag( boolean largeArcFlag ) - throws DOMException; - public boolean getSweepFlag( ); - public void setSweepFlag( boolean sweepFlag ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegArcRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegArcRel.java deleted file mode 100644 index 074bb799c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegArcRel.java +++ /dev/null @@ -1,29 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegArcRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getR1( ); - public void setR1( float r1 ) - throws DOMException; - public float getR2( ); - public void setR2( float r2 ) - throws DOMException; - public float getAngle( ); - public void setAngle( float angle ) - throws DOMException; - public boolean getLargeArcFlag( ); - public void setLargeArcFlag( boolean largeArcFlag ) - throws DOMException; - public boolean getSweepFlag( ); - public void setSweepFlag( boolean sweepFlag ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegClosePath.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegClosePath.java deleted file mode 100644 index 9beb4667d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegClosePath.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGPathSegClosePath extends - SVGPathSeg { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicAbs.java deleted file mode 100644 index 9aeec16d6..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicAbs.java +++ /dev/null @@ -1,26 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoCubicAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX1( ); - public void setX1( float x1 ) - throws DOMException; - public float getY1( ); - public void setY1( float y1 ) - throws DOMException; - public float getX2( ); - public void setX2( float x2 ) - throws DOMException; - public float getY2( ); - public void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicRel.java deleted file mode 100644 index 890d98ef7..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicRel.java +++ /dev/null @@ -1,26 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoCubicRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX1( ); - public void setX1( float x1 ) - throws DOMException; - public float getY1( ); - public void setY1( float y1 ) - throws DOMException; - public float getX2( ); - public void setX2( float x2 ) - throws DOMException; - public float getY2( ); - public void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothAbs.java deleted file mode 100644 index ede2644d8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothAbs.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoCubicSmoothAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX2( ); - public void setX2( float x2 ) - throws DOMException; - public float getY2( ); - public void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothRel.java deleted file mode 100644 index 2336ad699..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoCubicSmoothRel.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoCubicSmoothRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX2( ); - public void setX2( float x2 ) - throws DOMException; - public float getY2( ); - public void setY2( float y2 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticAbs.java deleted file mode 100644 index 9e3d742da..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticAbs.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoQuadraticAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX1( ); - public void setX1( float x1 ) - throws DOMException; - public float getY1( ); - public void setY1( float y1 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticRel.java deleted file mode 100644 index bf2add7f4..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticRel.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoQuadraticRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getX1( ); - public void setX1( float x1 ) - throws DOMException; - public float getY1( ); - public void setY1( float y1 ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java deleted file mode 100644 index de08156cc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothAbs.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoQuadraticSmoothAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothRel.java deleted file mode 100644 index 2e434493e..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegCurvetoQuadraticSmoothRel.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegCurvetoQuadraticSmoothRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoAbs.java deleted file mode 100644 index e9d666f6c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoAbs.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalAbs.java deleted file mode 100644 index 6a30564d8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalAbs.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoHorizontalAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalRel.java deleted file mode 100644 index 353dd607e..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoHorizontalRel.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoHorizontalRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoRel.java deleted file mode 100644 index f41da3905..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoRel.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalAbs.java deleted file mode 100644 index 77d4e70fe..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalAbs.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoVerticalAbs extends - SVGPathSeg { - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalRel.java deleted file mode 100644 index fc46adcfe..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegLinetoVerticalRel.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegLinetoVerticalRel extends - SVGPathSeg { - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegList.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegList.java deleted file mode 100644 index f5005e7c3..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegList.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public SVGPathSeg initialize ( SVGPathSeg newItem ) - throws DOMException, SVGException; - public SVGPathSeg getItem ( int index ) - throws DOMException; - public SVGPathSeg insertItemBefore ( SVGPathSeg newItem, int index ) - throws DOMException, SVGException; - public SVGPathSeg replaceItem ( SVGPathSeg newItem, int index ) - throws DOMException, SVGException; - public SVGPathSeg removeItem ( int index ) - throws DOMException; - public SVGPathSeg appendItem ( SVGPathSeg newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoAbs.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoAbs.java deleted file mode 100644 index 80642f5b3..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoAbs.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegMovetoAbs extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoRel.java b/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoRel.java deleted file mode 100644 index 405c56fbc..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPathSegMovetoRel.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPathSegMovetoRel extends - SVGPathSeg { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPatternElement.java b/src/bind/java/org/w3c/dom/svg/SVGPatternElement.java deleted file mode 100644 index cfa147173..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPatternElement.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGPatternElement extends - SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox, - SVGUnitTypes { - public SVGAnimatedEnumeration getPatternUnits( ); - public SVGAnimatedEnumeration getPatternContentUnits( ); - public SVGAnimatedTransformList getPatternTransform( ); - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPoint.java b/src/bind/java/org/w3c/dom/svg/SVGPoint.java deleted file mode 100644 index 982576cd2..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPoint.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPoint { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - - public SVGPoint matrixTransform ( SVGMatrix matrix ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPointList.java b/src/bind/java/org/w3c/dom/svg/SVGPointList.java deleted file mode 100644 index 8fe262a9e..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPointList.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPointList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public SVGPoint initialize ( SVGPoint newItem ) - throws DOMException, SVGException; - public SVGPoint getItem ( int index ) - throws DOMException; - public SVGPoint insertItemBefore ( SVGPoint newItem, int index ) - throws DOMException, SVGException; - public SVGPoint replaceItem ( SVGPoint newItem, int index ) - throws DOMException, SVGException; - public SVGPoint removeItem ( int index ) - throws DOMException; - public SVGPoint appendItem ( SVGPoint newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPolygonElement.java b/src/bind/java/org/w3c/dom/svg/SVGPolygonElement.java deleted file mode 100644 index 6171fb69c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPolygonElement.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGPolygonElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget, - SVGAnimatedPoints { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPolylineElement.java b/src/bind/java/org/w3c/dom/svg/SVGPolylineElement.java deleted file mode 100644 index 9fad2ab31..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPolylineElement.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGPolylineElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget, - SVGAnimatedPoints { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGPreserveAspectRatio.java b/src/bind/java/org/w3c/dom/svg/SVGPreserveAspectRatio.java deleted file mode 100644 index 919569dac..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGPreserveAspectRatio.java +++ /dev/null @@ -1,30 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGPreserveAspectRatio { - // Alignment Types - public static final short SVG_PRESERVEASPECTRATIO_UNKNOWN = 0; - public static final short SVG_PRESERVEASPECTRATIO_NONE = 1; - public static final short SVG_PRESERVEASPECTRATIO_XMINYMIN = 2; - public static final short SVG_PRESERVEASPECTRATIO_XMIDYMIN = 3; - public static final short SVG_PRESERVEASPECTRATIO_XMAXYMIN = 4; - public static final short SVG_PRESERVEASPECTRATIO_XMINYMID = 5; - public static final short SVG_PRESERVEASPECTRATIO_XMIDYMID = 6; - public static final short SVG_PRESERVEASPECTRATIO_XMAXYMID = 7; - public static final short SVG_PRESERVEASPECTRATIO_XMINYMAX = 8; - public static final short SVG_PRESERVEASPECTRATIO_XMIDYMAX = 9; - public static final short SVG_PRESERVEASPECTRATIO_XMAXYMAX = 10; - // Meet-or-slice Types - public static final short SVG_MEETORSLICE_UNKNOWN = 0; - public static final short SVG_MEETORSLICE_MEET = 1; - public static final short SVG_MEETORSLICE_SLICE = 2; - - public short getAlign( ); - public void setAlign( short align ) - throws DOMException; - public short getMeetOrSlice( ); - public void setMeetOrSlice( short meetOrSlice ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGRadialGradientElement.java b/src/bind/java/org/w3c/dom/svg/SVGRadialGradientElement.java deleted file mode 100644 index 6c8af9294..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGRadialGradientElement.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGRadialGradientElement extends - SVGGradientElement { - public SVGAnimatedLength getCx( ); - public SVGAnimatedLength getCy( ); - public SVGAnimatedLength getR( ); - public SVGAnimatedLength getFx( ); - public SVGAnimatedLength getFy( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGRect.java b/src/bind/java/org/w3c/dom/svg/SVGRect.java deleted file mode 100644 index fd6de0603..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGRect.java +++ /dev/null @@ -1,19 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGRect { - public float getX( ); - public void setX( float x ) - throws DOMException; - public float getY( ); - public void setY( float y ) - throws DOMException; - public float getWidth( ); - public void setWidth( float width ) - throws DOMException; - public float getHeight( ); - public void setHeight( float height ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGRectElement.java b/src/bind/java/org/w3c/dom/svg/SVGRectElement.java deleted file mode 100644 index 4c79150f3..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGRectElement.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGRectElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public SVGAnimatedLength getRx( ); - public SVGAnimatedLength getRy( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGRenderingIntent.java b/src/bind/java/org/w3c/dom/svg/SVGRenderingIntent.java deleted file mode 100644 index fc46f9f79..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGRenderingIntent.java +++ /dev/null @@ -1,12 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGRenderingIntent { - // Rendering Intent Types - public static final short RENDERING_INTENT_UNKNOWN = 0; - public static final short RENDERING_INTENT_AUTO = 1; - public static final short RENDERING_INTENT_PERCEPTUAL = 2; - public static final short RENDERING_INTENT_RELATIVE_COLORIMETRIC = 3; - public static final short RENDERING_INTENT_SATURATION = 4; - public static final short RENDERING_INTENT_ABSOLUTE_COLORIMETRIC = 5; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGSVGElement.java b/src/bind/java/org/w3c/dom/svg/SVGSVGElement.java deleted file mode 100644 index 6507a1304..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGSVGElement.java +++ /dev/null @@ -1,74 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.DocumentEvent; -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.DOMException; -import org.w3c.dom.NodeList; -import org.w3c.dom.Element; -import org.w3c.dom.css.ViewCSS; -import org.w3c.dom.css.DocumentCSS; -import org.w3c.dom.css.RGBColor; - -public interface SVGSVGElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGLocatable, - SVGFitToViewBox, - SVGZoomAndPan, - EventTarget, - DocumentEvent, - ViewCSS, - DocumentCSS { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public String getContentScriptType( ); - public void setContentScriptType( String contentScriptType ) - throws DOMException; - public String getContentStyleType( ); - public void setContentStyleType( String contentStyleType ) - throws DOMException; - public SVGRect getViewport( ); - public float getPixelUnitToMillimeterX( ); - public float getPixelUnitToMillimeterY( ); - public float getScreenPixelToMillimeterX( ); - public float getScreenPixelToMillimeterY( ); - public boolean getUseCurrentView( ); - public void setUseCurrentView( boolean useCurrentView ) - throws DOMException; - public SVGViewSpec getCurrentView( ); - public float getCurrentScale( ); - public void setCurrentScale( float currentScale ) - throws DOMException; - public SVGPoint getCurrentTranslate( ); - - public int suspendRedraw ( int max_wait_milliseconds ); - public void unsuspendRedraw ( int suspend_handle_id ) - throws DOMException; - public void unsuspendRedrawAll ( ); - public void forceRedraw ( ); - public void pauseAnimations ( ); - public void unpauseAnimations ( ); - public boolean animationsPaused ( ); - public float getCurrentTime ( ); - public void setCurrentTime ( float seconds ); - public NodeList getIntersectionList ( SVGRect rect, SVGElement referenceElement ); - public NodeList getEnclosureList ( SVGRect rect, SVGElement referenceElement ); - public boolean checkIntersection ( SVGElement element, SVGRect rect ); - public boolean checkEnclosure ( SVGElement element, SVGRect rect ); - public void deselectAll ( ); - public SVGNumber createSVGNumber ( ); - public SVGLength createSVGLength ( ); - public SVGAngle createSVGAngle ( ); - public SVGPoint createSVGPoint ( ); - public SVGMatrix createSVGMatrix ( ); - public SVGRect createSVGRect ( ); - public SVGTransform createSVGTransform ( ); - public SVGTransform createSVGTransformFromMatrix ( SVGMatrix matrix ); - public Element getElementById ( String elementId ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGScriptElement.java b/src/bind/java/org/w3c/dom/svg/SVGScriptElement.java deleted file mode 100644 index 14863e6eb..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGScriptElement.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGScriptElement extends - SVGElement, - SVGURIReference, - SVGExternalResourcesRequired { - public String getType( ); - public void setType( String type ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGSetElement.java b/src/bind/java/org/w3c/dom/svg/SVGSetElement.java deleted file mode 100644 index 0ca9c09ef..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGSetElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGSetElement extends - SVGAnimationElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGStopElement.java b/src/bind/java/org/w3c/dom/svg/SVGStopElement.java deleted file mode 100644 index 5865e6e60..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGStopElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGStopElement extends - SVGElement, - SVGStylable { - public SVGAnimatedNumber getOffset( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGStringList.java b/src/bind/java/org/w3c/dom/svg/SVGStringList.java deleted file mode 100644 index d0fa0df9c..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGStringList.java +++ /dev/null @@ -1,23 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGStringList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public String initialize ( String newItem ) - throws DOMException, SVGException; - public String getItem ( int index ) - throws DOMException; - public String insertItemBefore ( String newItem, int index ) - throws DOMException, SVGException; - public String replaceItem ( String newItem, int index ) - throws DOMException, SVGException; - public String removeItem ( int index ) - throws DOMException; - public String appendItem ( String newItem ) - throws DOMException, SVGException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGStylable.java b/src/bind/java/org/w3c/dom/svg/SVGStylable.java deleted file mode 100644 index 82c4913f8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGStylable.java +++ /dev/null @@ -1,12 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.css.CSSStyleDeclaration; -import org.w3c.dom.css.CSSValue; - -public interface SVGStylable { - public SVGAnimatedString getClassName( ); - public CSSStyleDeclaration getStyle( ); - - public CSSValue getPresentationAttribute ( String name ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGStyleElement.java b/src/bind/java/org/w3c/dom/svg/SVGStyleElement.java deleted file mode 100644 index 1051ef67f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGStyleElement.java +++ /dev/null @@ -1,20 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGStyleElement extends - SVGElement { - public String getXMLspace( ); - public void setXMLspace( String xmlspace ) - throws DOMException; - public String getType( ); - public void setType( String type ) - throws DOMException; - public String getMedia( ); - public void setMedia( String media ) - throws DOMException; - public String getTitle( ); - public void setTitle( String title ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGSwitchElement.java b/src/bind/java/org/w3c/dom/svg/SVGSwitchElement.java deleted file mode 100644 index c5187563b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGSwitchElement.java +++ /dev/null @@ -1,14 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGSwitchElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGSymbolElement.java b/src/bind/java/org/w3c/dom/svg/SVGSymbolElement.java deleted file mode 100644 index ee288bc92..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGSymbolElement.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGSymbolElement extends - SVGElement, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGFitToViewBox, - EventTarget { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTRefElement.java b/src/bind/java/org/w3c/dom/svg/SVGTRefElement.java deleted file mode 100644 index 2d8202ede..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTRefElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTRefElement extends - SVGTextPositioningElement, - SVGURIReference { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTSpanElement.java b/src/bind/java/org/w3c/dom/svg/SVGTSpanElement.java deleted file mode 100644 index 729b857db..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTSpanElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTSpanElement extends - SVGTextPositioningElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTests.java b/src/bind/java/org/w3c/dom/svg/SVGTests.java deleted file mode 100644 index a7026a5b0..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTests.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTests { - public SVGStringList getRequiredFeatures( ); - public SVGStringList getRequiredExtensions( ); - public SVGStringList getSystemLanguage( ); - - public boolean hasExtension ( String extension ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTextContentElement.java b/src/bind/java/org/w3c/dom/svg/SVGTextContentElement.java deleted file mode 100644 index c7c212961..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTextContentElement.java +++ /dev/null @@ -1,37 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; -import org.w3c.dom.DOMException; - -public interface SVGTextContentElement extends - SVGElement, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - EventTarget { - // lengthAdjust Types - public static final short LENGTHADJUST_UNKNOWN = 0; - public static final short LENGTHADJUST_SPACING = 1; - public static final short LENGTHADJUST_SPACINGANDGLYPHS = 2; - - public SVGAnimatedLength getTextLength( ); - public SVGAnimatedEnumeration getLengthAdjust( ); - - public int getNumberOfChars ( ); - public float getComputedTextLength ( ); - public float getSubStringLength ( int charnum, int nchars ) - throws DOMException; - public SVGPoint getStartPositionOfChar ( int charnum ) - throws DOMException; - public SVGPoint getEndPositionOfChar ( int charnum ) - throws DOMException; - public SVGRect getExtentOfChar ( int charnum ) - throws DOMException; - public float getRotationOfChar ( int charnum ) - throws DOMException; - public int getCharNumAtPosition ( SVGPoint point ); - public void selectSubString ( int charnum, int nchars ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTextElement.java b/src/bind/java/org/w3c/dom/svg/SVGTextElement.java deleted file mode 100644 index f25cc3c20..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTextElement.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTextElement extends - SVGTextPositioningElement, - SVGTransformable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTextPathElement.java b/src/bind/java/org/w3c/dom/svg/SVGTextPathElement.java deleted file mode 100644 index 0a8a256ad..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTextPathElement.java +++ /dev/null @@ -1,19 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTextPathElement extends - SVGTextContentElement, - SVGURIReference { - // textPath Method Types - public static final short TEXTPATH_METHODTYPE_UNKNOWN = 0; - public static final short TEXTPATH_METHODTYPE_ALIGN = 1; - public static final short TEXTPATH_METHODTYPE_STRETCH = 2; - // textPath Spacing Types - public static final short TEXTPATH_SPACINGTYPE_UNKNOWN = 0; - public static final short TEXTPATH_SPACINGTYPE_AUTO = 1; - public static final short TEXTPATH_SPACINGTYPE_EXACT = 2; - - public SVGAnimatedLength getStartOffset( ); - public SVGAnimatedEnumeration getMethod( ); - public SVGAnimatedEnumeration getSpacing( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTextPositioningElement.java b/src/bind/java/org/w3c/dom/svg/SVGTextPositioningElement.java deleted file mode 100644 index d47887b8d..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTextPositioningElement.java +++ /dev/null @@ -1,11 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTextPositioningElement extends - SVGTextContentElement { - public SVGAnimatedLengthList getX( ); - public SVGAnimatedLengthList getY( ); - public SVGAnimatedLengthList getDx( ); - public SVGAnimatedLengthList getDy( ); - public SVGAnimatedNumberList getRotate( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTitleElement.java b/src/bind/java/org/w3c/dom/svg/SVGTitleElement.java deleted file mode 100644 index cbf45fe2a..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTitleElement.java +++ /dev/null @@ -1,8 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTitleElement extends - SVGElement, - SVGLangSpace, - SVGStylable { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTransform.java b/src/bind/java/org/w3c/dom/svg/SVGTransform.java deleted file mode 100644 index 16df6080f..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTransform.java +++ /dev/null @@ -1,24 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTransform { - // Transform Types - public static final short SVG_TRANSFORM_UNKNOWN = 0; - public static final short SVG_TRANSFORM_MATRIX = 1; - public static final short SVG_TRANSFORM_TRANSLATE = 2; - public static final short SVG_TRANSFORM_SCALE = 3; - public static final short SVG_TRANSFORM_ROTATE = 4; - public static final short SVG_TRANSFORM_SKEWX = 5; - public static final short SVG_TRANSFORM_SKEWY = 6; - - public short getType( ); - public SVGMatrix getMatrix( ); - public float getAngle( ); - - public void setMatrix ( SVGMatrix matrix ); - public void setTranslate ( float tx, float ty ); - public void setScale ( float sx, float sy ); - public void setRotate ( float angle, float cx, float cy ); - public void setSkewX ( float angle ); - public void setSkewY ( float angle ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTransformList.java b/src/bind/java/org/w3c/dom/svg/SVGTransformList.java deleted file mode 100644 index 3e3a4c217..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTransformList.java +++ /dev/null @@ -1,25 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGTransformList { - public int getNumberOfItems( ); - - public void clear ( ) - throws DOMException; - public SVGTransform initialize ( SVGTransform newItem ) - throws DOMException, SVGException; - public SVGTransform getItem ( int index ) - throws DOMException; - public SVGTransform insertItemBefore ( SVGTransform newItem, int index ) - throws DOMException, SVGException; - public SVGTransform replaceItem ( SVGTransform newItem, int index ) - throws DOMException, SVGException; - public SVGTransform removeItem ( int index ) - throws DOMException; - public SVGTransform appendItem ( SVGTransform newItem ) - throws DOMException, SVGException; - public SVGTransform createSVGTransformFromMatrix ( SVGMatrix matrix ); - public SVGTransform consolidate ( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGTransformable.java b/src/bind/java/org/w3c/dom/svg/SVGTransformable.java deleted file mode 100644 index 9abaaf0b1..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGTransformable.java +++ /dev/null @@ -1,7 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGTransformable extends - SVGLocatable { - public SVGAnimatedTransformList getTransform( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGURIReference.java b/src/bind/java/org/w3c/dom/svg/SVGURIReference.java deleted file mode 100644 index 3f2f784df..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGURIReference.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGURIReference { - public SVGAnimatedString getHref( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGUnitTypes.java b/src/bind/java/org/w3c/dom/svg/SVGUnitTypes.java deleted file mode 100644 index 9fc7685e9..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGUnitTypes.java +++ /dev/null @@ -1,9 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGUnitTypes { - // Unit Types - public static final short SVG_UNIT_TYPE_UNKNOWN = 0; - public static final short SVG_UNIT_TYPE_USERSPACEONUSE = 1; - public static final short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGUseElement.java b/src/bind/java/org/w3c/dom/svg/SVGUseElement.java deleted file mode 100644 index 3ce448141..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGUseElement.java +++ /dev/null @@ -1,21 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.EventTarget; - -public interface SVGUseElement extends - SVGElement, - SVGURIReference, - SVGTests, - SVGLangSpace, - SVGExternalResourcesRequired, - SVGStylable, - SVGTransformable, - EventTarget { - public SVGAnimatedLength getX( ); - public SVGAnimatedLength getY( ); - public SVGAnimatedLength getWidth( ); - public SVGAnimatedLength getHeight( ); - public SVGElementInstance getInstanceRoot( ); - public SVGElementInstance getAnimatedInstanceRoot( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGVKernElement.java b/src/bind/java/org/w3c/dom/svg/SVGVKernElement.java deleted file mode 100644 index cc2e4f4f1..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGVKernElement.java +++ /dev/null @@ -1,6 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGVKernElement extends - SVGElement { -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGViewElement.java b/src/bind/java/org/w3c/dom/svg/SVGViewElement.java deleted file mode 100644 index 08adbecd8..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGViewElement.java +++ /dev/null @@ -1,10 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGViewElement extends - SVGElement, - SVGExternalResourcesRequired, - SVGFitToViewBox, - SVGZoomAndPan { - public SVGStringList getViewTarget( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGViewSpec.java b/src/bind/java/org/w3c/dom/svg/SVGViewSpec.java deleted file mode 100644 index 97ef6bad9..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGViewSpec.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -public interface SVGViewSpec extends - SVGZoomAndPan, - SVGFitToViewBox { - public SVGTransformList getTransform( ); - public SVGElement getViewTarget( ); - public String getViewBoxString( ); - public String getPreserveAspectRatioString( ); - public String getTransformString( ); - public String getViewTargetString( ); -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGZoomAndPan.java b/src/bind/java/org/w3c/dom/svg/SVGZoomAndPan.java deleted file mode 100644 index f8f910eb4..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGZoomAndPan.java +++ /dev/null @@ -1,15 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.DOMException; - -public interface SVGZoomAndPan { - // Zoom and Pan Types - public static final short SVG_ZOOMANDPAN_UNKNOWN = 0; - public static final short SVG_ZOOMANDPAN_DISABLE = 1; - public static final short SVG_ZOOMANDPAN_MAGNIFY = 2; - - public short getZoomAndPan( ); - public void setZoomAndPan( short zoomAndPan ) - throws DOMException; -} diff --git a/src/bind/java/org/w3c/dom/svg/SVGZoomEvent.java b/src/bind/java/org/w3c/dom/svg/SVGZoomEvent.java deleted file mode 100644 index 7ab430d2b..000000000 --- a/src/bind/java/org/w3c/dom/svg/SVGZoomEvent.java +++ /dev/null @@ -1,13 +0,0 @@ - -package org.w3c.dom.svg; - -import org.w3c.dom.events.UIEvent; - -public interface SVGZoomEvent extends - UIEvent { - public SVGRect getZoomRectScreen( ); - public float getPreviousScale( ); - public SVGPoint getPreviousTranslate( ); - public float getNewScale( ); - public SVGPoint getNewTranslate( ); -} diff --git a/src/bind/java/org/w3c/dom/views/AbstractView.java b/src/bind/java/org/w3c/dom/views/AbstractView.java deleted file mode 100644 index 97e8f0e2b..000000000 --- a/src/bind/java/org/w3c/dom/views/AbstractView.java +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.views; - -/** - * A base interface that all views shall derive from. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>. - * @since DOM Level 2 - */ -public interface AbstractView { - /** - * The source <code>DocumentView</code> of which this is an - * <code>AbstractView</code>. - */ - public DocumentView getDocument(); - -} diff --git a/src/bind/java/org/w3c/dom/views/DocumentView.java b/src/bind/java/org/w3c/dom/views/DocumentView.java deleted file mode 100644 index 2cb9eebb8..000000000 --- a/src/bind/java/org/w3c/dom/views/DocumentView.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (c) 2000 World Wide Web Consortium, - * (Massachusetts Institute of Technology, Institut National de - * Recherche en Informatique et en Automatique, Keio University). All - * Rights Reserved. This program is distributed under the W3C's Software - * Intellectual Property License. This program 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 W3C License http://www.w3.org/Consortium/Legal/ for more details. - */ - -package org.w3c.dom.views; - -/** - * The <code>DocumentView</code> interface is implemented by - * <code>Document</code> objects in DOM implementations supporting DOM - * Views. It provides an attribute to retrieve the default view of a - * document. - * <p>See also the <a href='http://www.w3.org/TR/2000/REC-DOM-Level-2-Views-20001113'>Document Object Model (DOM) Level 2 Views Specification</a>. - * @since DOM Level 2 - */ -public interface DocumentView { - /** - * The default <code>AbstractView</code> for this <code>Document</code>, - * or <code>null</code> if none available. - */ - public AbstractView getDefaultView(); - -} diff --git a/src/bind/javabind-private.h b/src/bind/javabind-private.h deleted file mode 100644 index 56ff2e2ff..000000000 --- a/src/bind/javabind-private.h +++ /dev/null @@ -1,147 +0,0 @@ -/** - * @file - * @brief This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - */ -/* - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef SEEN_JAVABIND_PRIVATE_H -#define SEEN_JAVABIND_PRIVATE_H - -#include <jni.h> -#include "javabind.h" - -namespace Inkscape -{ - -namespace Bind -{ - - -class JavaBinderyImpl : public JavaBindery -{ -public: - - JavaBinderyImpl(); - - virtual ~JavaBinderyImpl(); - - virtual bool loadJVM(); - - virtual bool callStatic(int type, - const String &className, - const String &methodName, - const String &signature, - const std::vector<Value> ¶ms, - Value &retval); - - virtual bool callInstance( - int type, - const jobject obj, - const String &methodName, - const String &signature, - const std::vector<Value> ¶ms, - Value &retval); - - virtual bool callMain(const String &className, - const std::vector<String> &args); - - virtual bool isLoaded(); - - /** - * - */ - virtual bool scriptRun(const String &lang, const String &script); - - /** - * - */ - virtual bool scriptRunFile(const String &lang, const String &fileName); - - virtual bool showConsole(); - - virtual bool registerNatives(const String &className, - const JNINativeMethod *methods); - - virtual bool doBinding(); - - virtual String getException(); - - virtual bool setupGateway(); - - static JavaBinderyImpl *getInstance(); - - -private: - - JavaVM *jvm; - JNIEnv *env; - jobject gatewayObj; -}; - - -//######################################################################## -//# MESSAGES -//######################################################################## - -void err(const char *fmt, ...); - -void msg(const char *fmt, ...); - -//######################################################################## -//# UTILITY -//######################################################################## - -String normalizePath(const String &str); - -String getExceptionString(JNIEnv *env); - -jint getInt(JNIEnv *env, jobject obj, const char *name); - -void setInt(JNIEnv *env, jobject obj, const char *name, jint val); - -jlong getLong(JNIEnv *env, jobject obj, const char *name); - -void setLong(JNIEnv *env, jobject obj, const char *name, jlong val); - -jfloat getFloat(JNIEnv *env, jobject obj, const char *name); - -void setFloat(JNIEnv *env, jobject obj, const char *name, jfloat val); - -jdouble getDouble(JNIEnv *env, jobject obj, const char *name); - -void setDouble(JNIEnv *env, jobject obj, const char *name, jdouble val); - -String getString(JNIEnv *env, jobject obj, const char *name); - -void setString(JNIEnv *env, jobject obj, const char *name, const String &val); - - - -} // namespace Bind -} // namespace Inkscape - -#endif // SEEN_JAVABIND_PRIVATE_H -//######################################################################## -//# E N D O F F I L E -//######################################################################## - diff --git a/src/bind/javabind.cpp b/src/bind/javabind.cpp deleted file mode 100644 index 8a66bac59..000000000 --- a/src/bind/javabind.cpp +++ /dev/null @@ -1,1209 +0,0 @@ -/** - * @file - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Note: We must limit Java or JVM-specific code to this file - * and to dobinding.cpp. It should be hidden from javabind.h - * - * This file is mostly about getting things up and running, and - * providing the basic C-to-Java hooks. - * - * dobinding.cpp will have the rote and repetitious - * class-by-class binding - */ -/* - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include <stdio.h> -#include <stdlib.h> -#include <stdarg.h> -#include <string.h> -#include <jni.h> - -#include <sys/types.h> -#include <dirent.h> - - -#ifdef __WIN32__ -#include <windows.h> -#else -#include <dlfcn.h> -#include <errno.h> -#endif - -#if HAVE_SYS_STAT_H -#include <sys/stat.h> -#endif - -#include "javabind.h" -#include "javabind-private.h" -#include <path-prefix.h> -#include <prefix.h> -#include <glib.h> - -//For repr and document -#include <document.h> -#include <inkscape.h> -#include <xml/repr.h> - - - -namespace Inkscape -{ - -namespace Bind -{ - - -//######################################################################## -//# DEFINITIONS -//######################################################################## - -typedef jint (*CreateVMFunc)(JavaVM **, JNIEnv **, void *); - - - -//######################################################################## -//# UTILITY -//######################################################################## - -/** - * Normalize path. Java wants '/', even on Windows - */ -String normalizePath(const String &str) -{ - String buf; - for (unsigned int i=0 ; i<str.size() ; i++) - { - char ch = str[i]; - if (ch == '\\') - buf.push_back('/'); - else - buf.push_back(ch); - } - return buf; -} - - -/** - * Convert a java string to a C++ string - */ -static String getString(JNIEnv *env, jstring jstr) -{ - const char *chars = env->GetStringUTFChars(jstr, JNI_FALSE); - String str = chars; - env->ReleaseStringUTFChars(jstr, chars); - return str; -} - - -/** - * Check if the VM has encountered an Exception. If so, get the String for it - * and clear the exception - */ -String getExceptionString(JNIEnv *env) -{ - String buf; - jthrowable exc = env->ExceptionOccurred(); - if (!exc) - return buf; - jclass cls = env->GetObjectClass(exc); - jmethodID mid = env->GetMethodID(cls, "toString", "()Ljava/lang/String;"); - jstring jstr = (jstring) env->CallObjectMethod(exc, mid); - buf.append(getString(env, jstr)); - env->ExceptionClear(); - return buf; -} - -//######################################################################## -//# CONSTRUCTOR/DESTRUCTOR -//######################################################################## - -static JavaBinderyImpl *_instance = NULL; - -JavaBindery *JavaBindery::getInstance() -{ - return JavaBinderyImpl::getInstance(); -} - -JavaBinderyImpl *JavaBinderyImpl::getInstance() -{ - if (!_instance) - { - _instance = new JavaBinderyImpl(); - } - return _instance; -} - -JavaBinderyImpl::JavaBinderyImpl() -{ - jvm = NULL; - env = NULL; - gatewayObj = NULL; -} - -JavaBinderyImpl::~JavaBinderyImpl() -{ -} - - -//######################################################################## -//# MESSAGES -//######################################################################## - -void err(const char *fmt, ...) -{ - va_list args; - g_warning("JavaBinderyImpl err:"); - va_start(args, fmt); - g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_WARNING, fmt, args); - va_end(args); - g_warning("\n"); -} - -void msg(const char *fmt, ...) -{ - va_list args; - g_message("JavaBinderyImpl:"); - va_start(args, fmt); - g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, fmt, args); - va_end(args); - g_message("\n"); -} - - - -//######################################################################## -//# W I N 3 2 S T Y L E -//######################################################################## -#ifdef __WIN32__ - - -#define DIR_SEPARATOR "\\" -#define PATH_SEPARATOR ";" - - - -static bool getRegistryString(HKEY /*root*/, const char *keyName, - const char *valName, char *buf, int buflen) -{ - HKEY key; - DWORD bufsiz = buflen; - RegOpenKeyEx(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &key); - int ret = RegQueryValueEx(key, TEXT(valName), - NULL, NULL, (BYTE *)buf, &bufsiz); - if (ret != ERROR_SUCCESS) - { - err("Key '%s\\%s not found\n", keyName, valName); - return false; - } - RegCloseKey(key); - return true; -} - - -static String cleanPath(const String &s) -{ - String buf; - for (unsigned int i=0 ; i<s.size() ; i++) - { - char ch = s[i]; - if (ch != '"') - buf.push_back(ch); - } - return buf; -} - - -/** - * Common places to find jvm.dll under JAVA_HOME - */ -static const char *commonJavaPaths[] = -{ - "\\jre\\bin\\client\\jvm.dll", - "\\bin\\client\\jvm.dll", - "\\jvm.dll", - NULL -}; - - -/** - * Return the directory of the .exe that is currently running - */ -static String getExePath() -{ - char exeName[MAX_PATH+1]; - GetModuleFileName(NULL, exeName, MAX_PATH); - char *slashPos = strrchr(exeName, '\\'); - if (slashPos) - *slashPos = '\0'; - String s = exeName; - return s; -} - - -/** - * Check a directory for several possibilities of sub-locations - * under it, where a jvm might exist. - */ -static String checkPathUnderRoot(const String &root) -{ - for (const char **path = commonJavaPaths ; *path ; path++) - { - String jpath = root; - jpath.append(*path); - //msg("trying '%s'", jpath.c_str()); - struct stat finfo; - if (stat(jpath.c_str(), &finfo)>=0) - { - //msg("found"); - return jpath; - } - } - return ""; -} - - - -/** - * Attempt to find and load a jvm.dll file. Find the createVM() - * function's address and return it - */ -static CreateVMFunc getCreateVMFunc() -{ - bool found = false; - String libname; - - /** - * First, look for an embedded jre in the .exe's dir. - * This allows us to package our own JRE if we want to. - */ - String inkscapeHome = getExePath(); - inkscapeHome.append("\\jre"); - msg("INKSCAPE_HOME='%s'", inkscapeHome.c_str()); - String path = checkPathUnderRoot(inkscapeHome); - if (path.size() > 0) - { - libname = path; - found = true; - } - - /** - * Next, look for JAVA_HOME. This will allow the user - * to override what's in the registry - */ - if (!found) - { - const char *envStr = getenv("JAVA_HOME"); - if (envStr) - { - String javaHome = cleanPath(envStr); - msg("JAVA_HOME='%s'", javaHome.c_str()); - path = checkPathUnderRoot(javaHome); - if (path.size() > 0) - { - libname = path; - found = true; - } - } - } - - //not at JAVA_HOME. check the registry - if (!found) - { - char verbuf[16]; - char regpath[80]; - strcpy(regpath, "SOFTWARE\\JavaSoft\\Java Runtime Environment"); - bool ret = getRegistryString(HKEY_LOCAL_MACHINE, - regpath, "CurrentVersion", verbuf, 15); - if (!ret) - { - msg("JVM CurrentVersion not found in registry at '%s'", regpath); - } - else - { - strcat(regpath, "\\"); - strcat(regpath, verbuf); - //msg("reg path: %s\n", regpath); - char valbuf[80]; - ret = getRegistryString(HKEY_LOCAL_MACHINE, - regpath, "RuntimeLib", valbuf, 79); - if (ret) - { - found = true; - libname = valbuf; - } - else - { - msg("JVM RuntimeLib not found in registry at '%s'", - regpath); - } - } - } - - if (!found) - { - err("JVM not found at JAVA_HOME or in registry"); - return NULL; - } - - /** - * If we are here, then we seem to have a valid path for jvm.dll - * Give it a try - */ - msg("getCreateVMFunc: Loading JVM: %s", libname.c_str()); - HMODULE lib = LoadLibrary(libname.c_str()); - if (!lib) - { - err("Java VM not found at '%s'", libname.c_str()); - return NULL; - } - CreateVMFunc createVM = (CreateVMFunc)GetProcAddress(lib, "JNI_CreateJavaVM"); - if (!createVM) - { - err("Could not find 'JNI_CreateJavaVM' in shared library '%s'", - libname.c_str()); - return NULL; - } - return createVM; -} - -/** - * Return the directory where the Java classes/libs/resources are - * located - */ -static void getJavaRoot(String &javaroot) -{ - /* - javaroot = getExePath(); - javaroot.append("\\"); - javaroot.append(INKSCAPE_BINDDIR); - javaroot.append("\\java"); - */ - javaroot = INKSCAPE_BINDDIR; - javaroot.append("\\java"); -} - - - - -//######################################################################## -//# U N I X S T Y L E -//######################################################################## -#else /* !__WIN32__ */ - - -#define DIR_SEPARATOR "/" -#define PATH_SEPARATOR ":" - - -/** - * Recursively descend into a directory looking for libjvm.so - */ -static bool findJVMRecursive(const String &dirpath, - std::vector<String> &results) -{ - DIR *dir = opendir(dirpath.c_str()); - if (!dir) - return false; - bool ret = false; - while (true) - { - struct dirent *de = readdir(dir); - if (!de) - break; - String fname = de->d_name; - if (fname == "." || fname == "..") - continue; - String path = dirpath; - path.push_back('/'); - path.append(fname); - if (fname == "libjvm.so") - { - ret = true; - results.push_back(path); - continue; - } - struct stat finfo; - if (lstat(path.c_str(), &finfo)<0) - { - break; - } - if (finfo.st_mode & S_IFDIR) - { - ret |= findJVMRecursive(path, results); - } - } - closedir(dir); - return ret; -} - - -/** - * Some common places on a Unix filesystem where JVMs are - * often found. - */ -static const char *commonJavaPaths[] = -{ - "/usr/lib/jvm/jre", - "/usr/lib/jvm", - "/usr/local/lib/jvm/jre", - "/usr/local/lib/jvm", - "/usr/java", - "/usr/local/java", - NULL -}; - - - -/** - * Look for a Java VM (libjvm.so) in several Unix places - */ -static bool findJVM(String &result) -{ - std::vector<String> results; - bool found = false; - - /* Is there one specified by the user? */ - const char *javaHome = getenv("JAVA_HOME"); - if (javaHome && findJVMRecursive(javaHome, results)) - found = true; - else for (const char **path = commonJavaPaths ; *path ; path++) - { - if (findJVMRecursive(*path, results)) - { - found = true; - break; - } - } - if (!found) - { - return false; - } - if (results.empty()) - return false; - //Look first for a Client VM - for (unsigned int i=0 ; i<results.size() ; i++) - { - String s = results[i]; - if (s.find("client") != s.npos) - { - result = s; - return true; - } - } - //else default to the first - result = results[0]; - return true; -} - - - -/** - * Attempt to find and load a jvm.dll file. Find the createVM() - * function's address and return it - */ -static CreateVMFunc getCreateVMFunc() -{ - String libname; - if (!findJVM(libname)) - { - err("No Java VM found. Is JAVA_HOME defined? Need to find 'libjvm.so'"); - return NULL; - } - msg("getCreateVMFunc: Loading JVM: %s", libname.c_str()); - void *lib = dlopen(libname.c_str(), RTLD_NOW); - if (!lib) - { - err("Java VM not found at '%s' : %s", libname.c_str(), strerror(errno)); - return NULL; - } - CreateVMFunc createVM = (CreateVMFunc)dlsym(lib, "JNI_CreateJavaVM"); - if (!createVM) - { - err("Could not find 'JNI_CreateJavaVM' in shared library"); - return NULL; - } - return createVM; -} - - -/** - * Return the directory where the Java classes/libs/resources are - * located - */ -static void getJavaRoot(String &javaroot) -{ - javaroot = INKSCAPE_BINDDIR; - javaroot.append("/java"); -} - -#endif /* !__WIN32__ */ - - -//######################################################################## -//# COMMON -//######################################################################## - - -bool JavaBinderyImpl::isLoaded() -{ - return (jvm != (void *)0); -} - - - -/** - * This will set up the classpath for the launched VM. - * We will add two things: - * 1. INKSCAPE_JAVADIR/classes -- path to loose classes - * 2. A concatenation of all jar files in INKSCAPE_JAVADIR/lib - * - * This will allow people to add classes and jars to the JVM without - * needing to state them explicitly. - * - * @param javaroot. Should be INKSCAPE_JAVADIR - * @param result a string buffer to hold the result of this method - */ -static void populateClassPath(const String &javaroot, - String &result) -{ - String classdir = javaroot; - classdir.append(DIR_SEPARATOR); - classdir.append("classes"); - - String cp = classdir; - - String libdir = javaroot; - libdir.append(DIR_SEPARATOR); - libdir.append("lib"); - - DIR *dir = opendir(libdir.c_str()); - if (!dir) - { - result = cp; - return; - } - - while (true) - { - struct dirent *de = readdir(dir); - if (!de) - break; - String fname = de->d_name; - if (fname == "." || fname == "..") - continue; - if (fname.size()<5) //x.jar - continue; - if (fname.compare(fname.size()-4, 4, ".jar") != 0) - continue; - - String path = libdir; - path.append(DIR_SEPARATOR); - path.append(fname); - - cp.append(PATH_SEPARATOR); - cp.append(path); - } - closedir(dir); - - result = cp; -} - - - -//======================================================================== -// Gateway -//======================================================================== -/** - * This is provided to scripts can grab the current copy or the - * repr tree. If anyone has a smarter way of doing this, please implement. - */ -static jstring JNICALL documentGet(JNIEnv *env, jobject /*obj*/, jlong /*ptr*/) -{ - //JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr; - String buf = sp_repr_save_buf((SP_ACTIVE_DOCUMENT)->rdoc); - jstring jstr = env->NewStringUTF(buf.c_str()); - return jstr; -} - -/** - * This is provided to scripts can load an XML tree into Inkscape. - * If anyone has a smarter way of doing this, please implement. - */ -static jboolean JNICALL documentSet(JNIEnv */*env*/, jobject /*obj*/, jlong /*ptr*/, jstring /*jstr*/) -{ - /* - JavaBinderyImpl *bind = (JavaBinderyImpl *)ptr; - String s = getString(env, jstr); - SPDocument *doc = sp_document_new_from_mem(s.c_str(), s.size(), true); - */ - return JNI_TRUE; -} - -/** - * This method is used to allow the gateway class to - * redirect its logging stream here. - * For the main C++/Java bindings, see dobinding.cpp - */ -static void JNICALL logWrite(JNIEnv */*env*/, jobject /*obj*/, jlong ptr, jint ch) -{ - JavaBinderyImpl *bind = reinterpret_cast<JavaBinderyImpl *>(ptr); - bind->log(ch); -} - - -static JNINativeMethod gatewayMethods[] = -{ -{ (char *)"documentGet", (char *)"(J)Ljava/lang/String;", (void *)documentGet }, -{ (char *)"documentSet", (char *)"(JLjava/lang/String;)Z", (void *)documentSet }, -{ (char *)"logWrite", (char *)"(JI)V", (void *)logWrite }, -{ NULL, NULL, NULL } -}; - - -/** - * This sets up the 'Gateway' java class for execution of - * scripts. The class's constructor takes a jlong. This java long - * is used to store the pointer to 'this'. When ScriptRunner makes - * native calls, it passes that jlong back, so that it can call the - * methods of this C++ class. - */ -bool JavaBinderyImpl::setupGateway() -{ - String className = "org/inkscape/cmn/Gateway"; - if (!registerNatives(className, gatewayMethods)) - { - return false; - } - jclass cls = env->FindClass(className.c_str()); - if (!cls) - { - err("setupGateway: cannot find class '%s' : %s", - className.c_str(), getException().c_str()); - return false; - } - jmethodID mid = env->GetMethodID(cls, "<init>", "(J)V"); - if (!mid) - { - err("setupGateway: cannot find constructor for '%s' : %s", - className.c_str(), getException().c_str()); - return false; - } - gatewayObj = env->NewObject(cls, mid, ((jlong)this)); - if (!gatewayObj) - { - err("setupGateway: cannot construct '%s' : %s", - className.c_str(), getException().c_str()); - return false; - } - - msg("Gateway ready"); - return true; -} - -bool JavaBinderyImpl::scriptRun(const String &lang, const String &script) -{ - if (!loadJVM()) - return false; - - std::vector<Value> params; - Value langParm(lang); - params.push_back(langParm); - Value scriptParm(script); - params.push_back(scriptParm); - Value retval; - callInstance(Value::BIND_VOID, gatewayObj, "scriptRun", - "(Ljava/lang/String;Ljava/lang/String;)Z", params, retval); - return retval.getBoolean(); -} - -bool JavaBinderyImpl::scriptRunFile(const String &lang, const String &fname) -{ - if (!loadJVM()) - return false; - - std::vector<Value> params; - Value langParm(lang); - params.push_back(langParm); - Value fnameParm(fname); - params.push_back(fnameParm); - Value retval; - callInstance(Value::BIND_VOID, gatewayObj, "scriptRunFile", - "(Ljava/lang/String;Ljava/lang/String;)Z", params, retval); - return retval.getBoolean(); -} - -bool JavaBinderyImpl::showConsole() -{ - if (!loadJVM()) - return false; - - std::vector<Value> params; - Value retval; - callInstance(Value::BIND_VOID, gatewayObj, "showConsole", - "()Z", params, retval); - return retval.getBoolean(); -} - - -//======================================================================== -// End Gateway -//======================================================================== - - -/** - * This is used to grab output from the VM itself. See 'options' below. - */ -static int JNICALL vfprintfHook(FILE* /*f*/, const char *fmt, va_list args) -{ - g_logv(G_LOG_DOMAIN, G_LOG_LEVEL_MESSAGE, fmt, args); - return JNI_TRUE; -} - - -/** - * This is the most important part of this class. Here we - * attempt to find, load, and initialize a java (or mlvm?) virtual - * machine. - * - * @return true if successful, else false - */ -bool JavaBinderyImpl::loadJVM() -{ - if (jvm) - return true; - - CreateVMFunc createVM = getCreateVMFunc(); - if (!createVM) - { - err("Could not find 'JNI_CreateJavaVM' in shared library"); - return false; - } - - String javaroot; - getJavaRoot(javaroot); - String cp; - populateClassPath(javaroot, cp); - String classpath = "-Djava.class.path="; - classpath.append(normalizePath(cp)); - msg("Class path is: '%s'", classpath.c_str()); - - String libpath = "-Djava.library.path="; - libpath.append(javaroot); - libpath.append(DIR_SEPARATOR); - libpath.append("libm"); - libpath = normalizePath(libpath); - msg("Lib path is: '%s'", libpath.c_str()); - - JavaVMInitArgs vm_args; - JavaVMOption options[10];//should be enough - int nOptions = 0; - options[nOptions++].optionString = (char *)classpath.c_str(); - options[nOptions++].optionString = (char *)libpath.c_str(); - //options[nOptions++].optionString = (char *)"-verbose:jni"; - options[nOptions ].optionString = (char *)"vfprintf"; - options[nOptions++].extraInfo = (void *)vfprintfHook; - vm_args.version = JNI_VERSION_1_4; - vm_args.options = options; - vm_args.nOptions = nOptions; - vm_args.ignoreUnrecognized = true; - - if (createVM(&jvm, &env, &vm_args) < 0) - { - err("JNI_CreateJavaVM() failed"); - return false; - } - - //get jvm version - jint vers = env->GetVersion(); - int versionMajor = (vers>>16) & 0xffff; - int versionMinor = (vers ) & 0xffff; - msg("Loaded JVM version %d.%d", versionMajor, versionMinor); - - if (!setupGateway()) { - // set jvm = NULL, otherwise, this method will return true when called for the second time while the gateway might not have been created! - jvm->DestroyJavaVM(); - jvm = NULL; - env = NULL; - err("Java bindings: setupGateway() failed"); - return false; - } - - return true; -} - - -/** - * This is a difficult method. What we are doing is trying to - * call a static method with a list of arguments. Similar to - * a varargs call, we need to marshal the Values into their - * Java equivalents and make the proper call. - * - * @param type the return type of the method - * @param className the full (package / name) name of the java class - * @param methodName the name of the method being invoked - * @param signature the method signature (ex: "(Ljava/lang/String;I)V" ) - * that describes the param and return types of the method. - * @param retval the return value of the java method - * @return true if the call was successful, else false. This is not - * the return value of the method. - */ -bool JavaBinderyImpl::callStatic(int type, - const String &className, - const String &methodName, - const String &signature, - const std::vector<Value> ¶ms, - Value &retval) -{ - jclass cls = env->FindClass(className.c_str()); - if (!cls) - { - err("Could not find class '%s' : %s", - className.c_str(), getException().c_str()); - return false; - } - jmethodID mid = env->GetStaticMethodID(cls, - methodName.c_str(), signature.c_str()); - if (!mid) - { - err("Could not find method '%s:%s/%s' : %s", - className.c_str(), methodName.c_str(), - signature.c_str(), getException().c_str()); - return false; - } - /** - * Assemble your parameters into a form usable by JNI - */ - jvalue *jvals = new jvalue[params.size()]; - for (unsigned int i=0 ; i<params.size() ; i++) - { - Value v = params[i]; - switch (v.getType()) - { - case Value::BIND_BOOLEAN: - { - jvals[i].z = (jboolean)v.getBoolean(); - break; - } - case Value::BIND_INT: - { - jvals[i].i = (jint)v.getInt(); - break; - } - case Value::BIND_DOUBLE: - { - jvals[i].d = (jdouble)v.getDouble(); - break; - } - case Value::BIND_STRING: - { - jvals[i].l = (jobject) env->NewStringUTF(v.getString().c_str()); - break; - } - default: - { - err("Unknown value type: %d", v.getType()); - delete [] jvals; - return false; - } - } - } - switch (type) - { - case Value::BIND_VOID: - { - env->CallStaticVoidMethodA(cls, mid, jvals); - break; - } - case Value::BIND_BOOLEAN: - { - jboolean ret = env->CallStaticBooleanMethodA(cls, mid, jvals); - if (ret == JNI_TRUE) //remember, don't truncate - retval.setBoolean(true); - else - retval.setBoolean(false); - break; - } - case Value::BIND_INT: - { - jint ret = env->CallStaticIntMethodA(cls, mid, jvals); - retval.setInt(ret); - break; - } - case Value::BIND_DOUBLE: - { - jdouble ret = env->CallStaticDoubleMethodA(cls, mid, jvals); - retval.setDouble(ret); - break; - } - case Value::BIND_STRING: - { - jobject ret = env->CallStaticObjectMethodA(cls, mid, jvals); - jstring jstr = (jstring) ret; - const char *str = env->GetStringUTFChars(jstr, JNI_FALSE); - retval.setString(str); - env->ReleaseStringUTFChars(jstr, str); - break; - } - default: - { - err("Unknown return type: %d", type); - return false; - } - } - delete [] jvals; - String errStr = getException(); - if (errStr.size()>0) - { - err("callStatic: %s", errStr.c_str()); - return false; - } - return true; -} - - - -/** - * Another difficult method. However, this time we are operating - * on an existing instance jobject. - * - * @param type the return type of the method - * @param obj the instance upon which to make the call - * @param methodName the name of the method being invoked - * @param signature the method signature (ex: "(Ljava/lang/String;I)V" ) - * that describes the param and return types of the method. - * @param retval the return value of the java method - * @return true if the call was successful, else false. This is not - * the return value of the method. - */ -bool JavaBinderyImpl::callInstance( - int type, - const jobject obj, - const String &methodName, - const String &signature, - const std::vector<Value> ¶ms, - Value &retval) -{ - jmethodID mid = env->GetMethodID(env->GetObjectClass(obj), - methodName.c_str(), signature.c_str()); - if (!mid) - { - err("Could not find method '%s/%s' : %s", - methodName.c_str(), - signature.c_str(), getException().c_str()); - return false; - } - /** - * Assemble your parameters into a form usable by JNI - */ - jvalue *jvals = new jvalue[params.size()]; - for (unsigned int i=0 ; i<params.size() ; i++) - { - Value v = params[i]; - switch (v.getType()) - { - case Value::BIND_BOOLEAN: - { - jvals[i].z = (jboolean)v.getBoolean(); - break; - } - case Value::BIND_INT: - { - jvals[i].i = (jint)v.getInt(); - break; - } - case Value::BIND_DOUBLE: - { - jvals[i].d = (jdouble)v.getDouble(); - break; - } - case Value::BIND_STRING: - { - jvals[i].l = (jobject) env->NewStringUTF(v.getString().c_str()); - break; - } - default: - { - err("Unknown value type: %d", v.getType()); - delete [] jvals; - return false; - } - } - } - switch (type) - { - case Value::BIND_VOID: - { - env->CallVoidMethodA(obj, mid, jvals); - break; - } - case Value::BIND_BOOLEAN: - { - jboolean ret = env->CallBooleanMethodA(obj, mid, jvals); - if (ret == JNI_TRUE) //remember, don't truncate - retval.setBoolean(true); - else - retval.setBoolean(false); - break; - } - case Value::BIND_INT: - { - jint ret = env->CallIntMethodA(obj, mid, jvals); - retval.setInt(ret); - break; - } - case Value::BIND_DOUBLE: - { - jdouble ret = env->CallDoubleMethodA(obj, mid, jvals); - retval.setDouble(ret); - break; - } - case Value::BIND_STRING: - { - jobject ret = env->CallObjectMethodA(obj, mid, jvals); - jstring jstr = (jstring) ret; - const char *str = env->GetStringUTFChars(jstr, JNI_FALSE); - retval.setString(str); - env->ReleaseStringUTFChars(jstr, str); - break; - } - default: - { - err("Unknown return type: %d", type); - return false; - } - } - delete [] jvals; - String errStr = getException(); - if (errStr.size()>0) - { - err("callStatic: %s", errStr.c_str()); - return false; - } - return true; -} - - - - -/** - * Fetch the last exception from the JVM, if any. Clear it to - * continue processing - * - * @return the exception's descriptio,if any. Else "" - */ -String JavaBinderyImpl::getException() -{ - return getExceptionString(env); -} - - - -/** - * Convenience method to call the static void main(String argv[]) - * method of a given class - * - * @param className full name of the java class - * @args the argument strings to the method - * @return true if successful, else false - */ -bool JavaBinderyImpl::callMain(const String &className, - const std::vector<String> &args) -{ - std::vector<Value> parms; - for (unsigned int i=0 ; i<args.size() ; i++) - { - Value v; - v.setString(args[i]); - parms.push_back(v); - } - Value retval; - return callStatic(Value::BIND_VOID, className, "main", - "([Ljava/lang/String;)V", parms, retval); -} - - -/** - * Used to register an array of native methods for a named class - * - * @param className the full name of the java class - * @param the method array - * @return true if successful, else false - */ -bool JavaBinderyImpl::registerNatives(const String &className, - const JNINativeMethod *methods) -{ - jclass cls = env->FindClass(className.c_str()); - if (!cls) - { - err("Could not find class '%s'", className.c_str()); - return false; - } - //msg("registerNatives: class '%s' found", className.c_str()); - - /** - * hack for JDK bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6493522 - */ - jmethodID mid = env->GetMethodID(env->GetObjectClass(cls), "getConstructors", - "()[Ljava/lang/reflect/Constructor;"); - if (!mid) - { - err("Could not get reflect mid for 'getConstructors' : %s", - getException().c_str()); - return false; - } - jobject res = env->CallObjectMethod(cls, mid); - if (!res) - { - err("Could not get constructors : %s", getException().c_str()); - return false; - } - /** - * end hack - */ - jint nrMethods = 0; - for (const JNINativeMethod *m = methods ; m->name ; m++) - nrMethods++; - jint ret = env->RegisterNatives(cls, methods, nrMethods); - if (ret < 0) - { - err("Could not register %d native methods for '%s' : %s", - nrMethods, className.c_str(), getException().c_str()); - return false; - } - return true; -} - - - - -} // namespace Bind -} // namespace Inkscape - -//######################################################################## -//# E N D O F F I L E -//######################################################################## diff --git a/src/bind/javabind.h b/src/bind/javabind.h deleted file mode 100644 index c11656a66..000000000 --- a/src/bind/javabind.h +++ /dev/null @@ -1,405 +0,0 @@ -/** - * @file - * @brief This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - */ -/* - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef SEEN_JAVABIND_H -#define SEEN_JAVABIND_H - -#include <vector> -#include <glibmm/ustring.h> - - -namespace Inkscape -{ - -namespace Bind -{ - - -/** - * Select which String implementation we want to use - */ -typedef Glib::ustring String; - - -/** - * This is the base class of all things which will be C++ object - * instances - */ -class BaseObject -{ -public: - - /** - * Simple constructor - */ - BaseObject() - {} - - /** - * Destructor - */ - virtual ~BaseObject() - {} - -}; - - -/** - * - */ -class Value -{ -public: - - /** - * Types for this value - */ - typedef enum - { - BIND_VOID, - BIND_INT, - BIND_BOOLEAN, - BIND_DOUBLE, - BIND_STRING, - BIND_OBJECT - } ValueType; - - /** - * - */ - Value() - { - init(); - } - - /** - * - */ - Value(int ival) - { - init(); - setInt(ival); - } - - /** - * - */ - Value(bool bval) - { - init(); - setBoolean(bval); - } - - /** - * - */ - Value(double dval) - { - init(); - setDouble(dval); - } - - /** - * - */ - Value(const String &sval) - { - init(); - setString(sval); - } - - /** - * - */ - Value(const Value &other) - { - assign(other); - } - - /** - * - */ - Value &operator=(const Value &other) - { - assign(other); - return *this; - } - - /** - * - */ - virtual ~Value() - { - } - - /** - * - */ - int getType() - { return type; } - - /** - * - */ - void setBoolean(bool val) - { type = BIND_BOOLEAN; ival = (int)val; } - - /** - * - */ - bool getBoolean() - { - if (type == BIND_BOOLEAN) - return (bool)ival; - else - return false; - } - - /** - * - */ - void setInt(int val) - { type = BIND_INT; ival = val; } - - /** - * - */ - bool getInt() - { - if (type == BIND_INT) - return ival; - else - return 0; - } - - /** - * - */ - void setDouble(double val) - { type = BIND_DOUBLE; dval = val; } - - /** - * - */ - double getDouble() - { - if (type == BIND_DOUBLE) - return dval; - else - return 0.0; - } - - /** - * - */ - void setString(const String &val) - { type = BIND_STRING; sval = val; } - - /** - * - */ - String getString() - { - if (type == BIND_STRING) - return sval; - else - return ""; - } - - -private: - - void init() - { - type = BIND_INT; - ival = 0; - dval = 0.0; - sval = ""; - } - - void assign(const Value &other) - { - type = other.type; - ival = other.ival; - dval = other.dval; - sval = other.sval; - } - - int type; - long ival; - double dval; - String sval; - -}; - - - - - -/** - * - */ -class JavaBindery -{ -public: - - /** - * - */ - JavaBindery() - {} - - /** - * - */ - virtual ~JavaBindery() - {} - - /** - * - */ - virtual bool loadJVM() - { - return false; - } - - /** - * - */ - virtual bool callStatic(int /*type*/, - const String &/*className*/, - const String &/*methodName*/, - const String &/*signature*/, - const std::vector<Value> &/*params*/, - Value &/*retval*/) - { - return false; - } - - /** - * - */ - virtual bool callMain(const String &/*className*/, - const std::vector<String> &/*args*/) - { - return false; - } - - /** - * - */ - virtual bool isLoaded() - { - return false; - } - - /** - * - */ - virtual bool scriptRun(const String &/*lang*/, const String &/*script*/) - { - return false; - } - - /** - * - */ - virtual bool scriptRunFile(const String &/*lang*/, const String &/*fileName*/) - { - return false; - } - - /** - * - */ - virtual bool showConsole() - { - return false; - } - - /** - * - */ - virtual bool doBinding() - { - return false; - } - - /** - * - */ - virtual String getException() - { - return ""; - } - - virtual String logGet() - { - return logBuf; - } - - virtual void logClear() - { - logBuf.clear(); - } - - virtual void log(int ch) - { - logBuf.push_back((char)ch); - if (ch == '\n' || ch == '\r') - { - g_message("%s", logBuf.c_str()); - logBuf.clear(); - } - } - - - /** - * Return a singleton instance of this bindery - */ - static JavaBindery *getInstance(); - -protected: - - - String stdOutBuf; - String stdErrBuf; - String logBuf; - -}; - - - - - -} // namespace Bind -} // namespace Inkscape - -#endif // SEEN_JAVABIND_H -//######################################################################## -//# E N D O F F I L E -//######################################################################## - diff --git a/src/bind/javainc/jni.h b/src/bind/javainc/jni.h deleted file mode 100644 index 5989c043f..000000000 --- a/src/bind/javainc/jni.h +++ /dev/null @@ -1,1959 +0,0 @@ -/* - * Copyright 1996-2006 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -/* - * We used part of Netscape's Java Runtime Interface (JRI) as the starting - * point of our design and implementation. - */ - -/* *************************************************************************** - * Java Runtime Interface - * Copyright (c) 1996 Netscape Communications Corporation. All rights reserved. - *****************************************************************************/ - -#ifndef _JAVASOFT_JNI_H_ -#define _JAVASOFT_JNI_H_ - -#include <stdio.h> -#include <stdarg.h> - -/* jni_md.h contains the machine-dependent typedefs for jbyte, jint - and jlong */ - -#include "jni_md.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/* - * JNI Types - */ - -#ifndef JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H - -typedef unsigned char jboolean; -typedef unsigned short jchar; -typedef short jshort; -typedef float jfloat; -typedef double jdouble; - -typedef jint jsize; - -#ifdef __cplusplus - -class _jobject {}; -class _jclass : public _jobject {}; -class _jthrowable : public _jobject {}; -class _jstring : public _jobject {}; -class _jarray : public _jobject {}; -class _jbooleanArray : public _jarray {}; -class _jbyteArray : public _jarray {}; -class _jcharArray : public _jarray {}; -class _jshortArray : public _jarray {}; -class _jintArray : public _jarray {}; -class _jlongArray : public _jarray {}; -class _jfloatArray : public _jarray {}; -class _jdoubleArray : public _jarray {}; -class _jobjectArray : public _jarray {}; - -typedef _jobject *jobject; -typedef _jclass *jclass; -typedef _jthrowable *jthrowable; -typedef _jstring *jstring; -typedef _jarray *jarray; -typedef _jbooleanArray *jbooleanArray; -typedef _jbyteArray *jbyteArray; -typedef _jcharArray *jcharArray; -typedef _jshortArray *jshortArray; -typedef _jintArray *jintArray; -typedef _jlongArray *jlongArray; -typedef _jfloatArray *jfloatArray; -typedef _jdoubleArray *jdoubleArray; -typedef _jobjectArray *jobjectArray; - -#else - -struct _jobject; - -typedef struct _jobject *jobject; -typedef jobject jclass; -typedef jobject jthrowable; -typedef jobject jstring; -typedef jobject jarray; -typedef jarray jbooleanArray; -typedef jarray jbyteArray; -typedef jarray jcharArray; -typedef jarray jshortArray; -typedef jarray jintArray; -typedef jarray jlongArray; -typedef jarray jfloatArray; -typedef jarray jdoubleArray; -typedef jarray jobjectArray; - -#endif - -typedef jobject jweak; - -typedef union jvalue { - jboolean z; - jbyte b; - jchar c; - jshort s; - jint i; - jlong j; - jfloat f; - jdouble d; - jobject l; -} jvalue; - -struct _jfieldID; -typedef struct _jfieldID *jfieldID; - -struct _jmethodID; -typedef struct _jmethodID *jmethodID; - -/* Return values from jobjectRefType */ -typedef enum _jobjectType { - JNIInvalidRefType = 0, - JNILocalRefType = 1, - JNIGlobalRefType = 2, - JNIWeakGlobalRefType = 3 -} jobjectRefType; - - -#endif /* JNI_TYPES_ALREADY_DEFINED_IN_JNI_MD_H */ - -/* - * jboolean constants - */ - -#define JNI_FALSE 0 -#define JNI_TRUE 1 - -/* - * possible return values for JNI functions. - */ - -#define JNI_OK 0 /* success */ -#define JNI_ERR (-1) /* unknown error */ -#define JNI_EDETACHED (-2) /* thread detached from the VM */ -#define JNI_EVERSION (-3) /* JNI version error */ -#define JNI_ENOMEM (-4) /* not enough memory */ -#define JNI_EEXIST (-5) /* VM already created */ -#define JNI_EINVAL (-6) /* invalid arguments */ - -/* - * used in ReleaseScalarArrayElements - */ - -#define JNI_COMMIT 1 -#define JNI_ABORT 2 - -/* - * used in RegisterNatives to describe native method name, signature, - * and function pointer. - */ - -typedef struct { - char *name; - char *signature; - void *fnPtr; -} JNINativeMethod; - -/* - * JNI Native Method Interface. - */ - -struct JNINativeInterface_; - -struct JNIEnv_; - -#ifdef __cplusplus -typedef JNIEnv_ JNIEnv; -#else -typedef const struct JNINativeInterface_ *JNIEnv; -#endif - -/* - * JNI Invocation Interface. - */ - -struct JNIInvokeInterface_; - -struct JavaVM_; - -#ifdef __cplusplus -typedef JavaVM_ JavaVM; -#else -typedef const struct JNIInvokeInterface_ *JavaVM; -#endif - -struct JNINativeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - void *reserved3; - jint (JNICALL *GetVersion)(JNIEnv *env); - - jclass (JNICALL *DefineClass) - (JNIEnv *env, const char *name, jobject loader, const jbyte *buf, - jsize len); - jclass (JNICALL *FindClass) - (JNIEnv *env, const char *name); - - jmethodID (JNICALL *FromReflectedMethod) - (JNIEnv *env, jobject method); - jfieldID (JNICALL *FromReflectedField) - (JNIEnv *env, jobject field); - - jobject (JNICALL *ToReflectedMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, jboolean isStatic); - - jclass (JNICALL *GetSuperclass) - (JNIEnv *env, jclass sub); - jboolean (JNICALL *IsAssignableFrom) - (JNIEnv *env, jclass sub, jclass sup); - - jobject (JNICALL *ToReflectedField) - (JNIEnv *env, jclass cls, jfieldID fieldID, jboolean isStatic); - - jint (JNICALL *Throw) - (JNIEnv *env, jthrowable obj); - jint (JNICALL *ThrowNew) - (JNIEnv *env, jclass clazz, const char *msg); - jthrowable (JNICALL *ExceptionOccurred) - (JNIEnv *env); - void (JNICALL *ExceptionDescribe) - (JNIEnv *env); - void (JNICALL *ExceptionClear) - (JNIEnv *env); - void (JNICALL *FatalError) - (JNIEnv *env, const char *msg); - - jint (JNICALL *PushLocalFrame) - (JNIEnv *env, jint capacity); - jobject (JNICALL *PopLocalFrame) - (JNIEnv *env, jobject result); - - jobject (JNICALL *NewGlobalRef) - (JNIEnv *env, jobject lobj); - void (JNICALL *DeleteGlobalRef) - (JNIEnv *env, jobject gref); - void (JNICALL *DeleteLocalRef) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsSameObject) - (JNIEnv *env, jobject obj1, jobject obj2); - jobject (JNICALL *NewLocalRef) - (JNIEnv *env, jobject ref); - jint (JNICALL *EnsureLocalCapacity) - (JNIEnv *env, jint capacity); - - jobject (JNICALL *AllocObject) - (JNIEnv *env, jclass clazz); - jobject (JNICALL *NewObject) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *NewObjectV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *NewObjectA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jclass (JNICALL *GetObjectClass) - (JNIEnv *env, jobject obj); - jboolean (JNICALL *IsInstanceOf) - (JNIEnv *env, jobject obj, jclass clazz); - - jmethodID (JNICALL *GetMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallObjectMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jobject (JNICALL *CallObjectMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jobject (JNICALL *CallObjectMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jboolean (JNICALL *CallBooleanMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jboolean (JNICALL *CallBooleanMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jboolean (JNICALL *CallBooleanMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jbyte (JNICALL *CallByteMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jbyte (JNICALL *CallByteMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jbyte (JNICALL *CallByteMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallCharMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jchar (JNICALL *CallCharMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jchar (JNICALL *CallCharMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallShortMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jshort (JNICALL *CallShortMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jshort (JNICALL *CallShortMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallIntMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jint (JNICALL *CallIntMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jint (JNICALL *CallIntMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallLongMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jlong (JNICALL *CallLongMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jlong (JNICALL *CallLongMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallFloatMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jfloat (JNICALL *CallFloatMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jfloat (JNICALL *CallFloatMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallDoubleMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - jdouble (JNICALL *CallDoubleMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - jdouble (JNICALL *CallDoubleMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallVoidMethod) - (JNIEnv *env, jobject obj, jmethodID methodID, ...); - void (JNICALL *CallVoidMethodV) - (JNIEnv *env, jobject obj, jmethodID methodID, va_list args); - void (JNICALL *CallVoidMethodA) - (JNIEnv *env, jobject obj, jmethodID methodID, const jvalue * args); - - jobject (JNICALL *CallNonvirtualObjectMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallNonvirtualObjectMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jobject (JNICALL *CallNonvirtualObjectMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jboolean (JNICALL *CallNonvirtualBooleanMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallNonvirtualBooleanMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jboolean (JNICALL *CallNonvirtualBooleanMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jbyte (JNICALL *CallNonvirtualByteMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallNonvirtualByteMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jbyte (JNICALL *CallNonvirtualByteMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jchar (JNICALL *CallNonvirtualCharMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallNonvirtualCharMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jchar (JNICALL *CallNonvirtualCharMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jshort (JNICALL *CallNonvirtualShortMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallNonvirtualShortMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jshort (JNICALL *CallNonvirtualShortMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jint (JNICALL *CallNonvirtualIntMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallNonvirtualIntMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jint (JNICALL *CallNonvirtualIntMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jlong (JNICALL *CallNonvirtualLongMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallNonvirtualLongMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jlong (JNICALL *CallNonvirtualLongMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jfloat (JNICALL *CallNonvirtualFloatMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallNonvirtualFloatMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jfloat (JNICALL *CallNonvirtualFloatMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - jdouble (JNICALL *CallNonvirtualDoubleMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallNonvirtualDoubleMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - jdouble (JNICALL *CallNonvirtualDoubleMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue *args); - - void (JNICALL *CallNonvirtualVoidMethod) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...); - void (JNICALL *CallNonvirtualVoidMethodV) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - va_list args); - void (JNICALL *CallNonvirtualVoidMethodA) - (JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, - const jvalue * args); - - jfieldID (JNICALL *GetFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *GetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jboolean (JNICALL *GetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jbyte (JNICALL *GetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jchar (JNICALL *GetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jshort (JNICALL *GetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jint (JNICALL *GetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jlong (JNICALL *GetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jfloat (JNICALL *GetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - jdouble (JNICALL *GetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID); - - void (JNICALL *SetObjectField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jobject val); - void (JNICALL *SetBooleanField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jboolean val); - void (JNICALL *SetByteField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jbyte val); - void (JNICALL *SetCharField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jchar val); - void (JNICALL *SetShortField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jshort val); - void (JNICALL *SetIntField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jint val); - void (JNICALL *SetLongField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jlong val); - void (JNICALL *SetFloatField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jfloat val); - void (JNICALL *SetDoubleField) - (JNIEnv *env, jobject obj, jfieldID fieldID, jdouble val); - - jmethodID (JNICALL *GetStaticMethodID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - - jobject (JNICALL *CallStaticObjectMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jobject (JNICALL *CallStaticObjectMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jobject (JNICALL *CallStaticObjectMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jboolean (JNICALL *CallStaticBooleanMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jboolean (JNICALL *CallStaticBooleanMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jboolean (JNICALL *CallStaticBooleanMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jbyte (JNICALL *CallStaticByteMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jbyte (JNICALL *CallStaticByteMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jbyte (JNICALL *CallStaticByteMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jchar (JNICALL *CallStaticCharMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jchar (JNICALL *CallStaticCharMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jchar (JNICALL *CallStaticCharMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jshort (JNICALL *CallStaticShortMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jshort (JNICALL *CallStaticShortMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jshort (JNICALL *CallStaticShortMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jint (JNICALL *CallStaticIntMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jint (JNICALL *CallStaticIntMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jint (JNICALL *CallStaticIntMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jlong (JNICALL *CallStaticLongMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jlong (JNICALL *CallStaticLongMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jlong (JNICALL *CallStaticLongMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jfloat (JNICALL *CallStaticFloatMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jfloat (JNICALL *CallStaticFloatMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jfloat (JNICALL *CallStaticFloatMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - jdouble (JNICALL *CallStaticDoubleMethod) - (JNIEnv *env, jclass clazz, jmethodID methodID, ...); - jdouble (JNICALL *CallStaticDoubleMethodV) - (JNIEnv *env, jclass clazz, jmethodID methodID, va_list args); - jdouble (JNICALL *CallStaticDoubleMethodA) - (JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args); - - void (JNICALL *CallStaticVoidMethod) - (JNIEnv *env, jclass cls, jmethodID methodID, ...); - void (JNICALL *CallStaticVoidMethodV) - (JNIEnv *env, jclass cls, jmethodID methodID, va_list args); - void (JNICALL *CallStaticVoidMethodA) - (JNIEnv *env, jclass cls, jmethodID methodID, const jvalue * args); - - jfieldID (JNICALL *GetStaticFieldID) - (JNIEnv *env, jclass clazz, const char *name, const char *sig); - jobject (JNICALL *GetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jboolean (JNICALL *GetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jbyte (JNICALL *GetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jchar (JNICALL *GetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jshort (JNICALL *GetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jint (JNICALL *GetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jlong (JNICALL *GetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jfloat (JNICALL *GetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - jdouble (JNICALL *GetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID); - - void (JNICALL *SetStaticObjectField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jobject value); - void (JNICALL *SetStaticBooleanField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jboolean value); - void (JNICALL *SetStaticByteField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jbyte value); - void (JNICALL *SetStaticCharField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jchar value); - void (JNICALL *SetStaticShortField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jshort value); - void (JNICALL *SetStaticIntField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jint value); - void (JNICALL *SetStaticLongField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jlong value); - void (JNICALL *SetStaticFloatField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jfloat value); - void (JNICALL *SetStaticDoubleField) - (JNIEnv *env, jclass clazz, jfieldID fieldID, jdouble value); - - jstring (JNICALL *NewString) - (JNIEnv *env, const jchar *unicode, jsize len); - jsize (JNICALL *GetStringLength) - (JNIEnv *env, jstring str); - const jchar *(JNICALL *GetStringChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringChars) - (JNIEnv *env, jstring str, const jchar *chars); - - jstring (JNICALL *NewStringUTF) - (JNIEnv *env, const char *utf); - jsize (JNICALL *GetStringUTFLength) - (JNIEnv *env, jstring str); - const char* (JNICALL *GetStringUTFChars) - (JNIEnv *env, jstring str, jboolean *isCopy); - void (JNICALL *ReleaseStringUTFChars) - (JNIEnv *env, jstring str, const char* chars); - - - jsize (JNICALL *GetArrayLength) - (JNIEnv *env, jarray array); - - jobjectArray (JNICALL *NewObjectArray) - (JNIEnv *env, jsize len, jclass clazz, jobject init); - jobject (JNICALL *GetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index); - void (JNICALL *SetObjectArrayElement) - (JNIEnv *env, jobjectArray array, jsize index, jobject val); - - jbooleanArray (JNICALL *NewBooleanArray) - (JNIEnv *env, jsize len); - jbyteArray (JNICALL *NewByteArray) - (JNIEnv *env, jsize len); - jcharArray (JNICALL *NewCharArray) - (JNIEnv *env, jsize len); - jshortArray (JNICALL *NewShortArray) - (JNIEnv *env, jsize len); - jintArray (JNICALL *NewIntArray) - (JNIEnv *env, jsize len); - jlongArray (JNICALL *NewLongArray) - (JNIEnv *env, jsize len); - jfloatArray (JNICALL *NewFloatArray) - (JNIEnv *env, jsize len); - jdoubleArray (JNICALL *NewDoubleArray) - (JNIEnv *env, jsize len); - - jboolean * (JNICALL *GetBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *isCopy); - jbyte * (JNICALL *GetByteArrayElements) - (JNIEnv *env, jbyteArray array, jboolean *isCopy); - jchar * (JNICALL *GetCharArrayElements) - (JNIEnv *env, jcharArray array, jboolean *isCopy); - jshort * (JNICALL *GetShortArrayElements) - (JNIEnv *env, jshortArray array, jboolean *isCopy); - jint * (JNICALL *GetIntArrayElements) - (JNIEnv *env, jintArray array, jboolean *isCopy); - jlong * (JNICALL *GetLongArrayElements) - (JNIEnv *env, jlongArray array, jboolean *isCopy); - jfloat * (JNICALL *GetFloatArrayElements) - (JNIEnv *env, jfloatArray array, jboolean *isCopy); - jdouble * (JNICALL *GetDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jboolean *isCopy); - - void (JNICALL *ReleaseBooleanArrayElements) - (JNIEnv *env, jbooleanArray array, jboolean *elems, jint mode); - void (JNICALL *ReleaseByteArrayElements) - (JNIEnv *env, jbyteArray array, jbyte *elems, jint mode); - void (JNICALL *ReleaseCharArrayElements) - (JNIEnv *env, jcharArray array, jchar *elems, jint mode); - void (JNICALL *ReleaseShortArrayElements) - (JNIEnv *env, jshortArray array, jshort *elems, jint mode); - void (JNICALL *ReleaseIntArrayElements) - (JNIEnv *env, jintArray array, jint *elems, jint mode); - void (JNICALL *ReleaseLongArrayElements) - (JNIEnv *env, jlongArray array, jlong *elems, jint mode); - void (JNICALL *ReleaseFloatArrayElements) - (JNIEnv *env, jfloatArray array, jfloat *elems, jint mode); - void (JNICALL *ReleaseDoubleArrayElements) - (JNIEnv *env, jdoubleArray array, jdouble *elems, jint mode); - - void (JNICALL *GetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, jboolean *buf); - void (JNICALL *GetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, jbyte *buf); - void (JNICALL *GetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, jchar *buf); - void (JNICALL *GetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, jshort *buf); - void (JNICALL *GetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, jint *buf); - void (JNICALL *GetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, jlong *buf); - void (JNICALL *GetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, jfloat *buf); - void (JNICALL *GetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, jdouble *buf); - - void (JNICALL *SetBooleanArrayRegion) - (JNIEnv *env, jbooleanArray array, jsize start, jsize l, const jboolean *buf); - void (JNICALL *SetByteArrayRegion) - (JNIEnv *env, jbyteArray array, jsize start, jsize len, const jbyte *buf); - void (JNICALL *SetCharArrayRegion) - (JNIEnv *env, jcharArray array, jsize start, jsize len, const jchar *buf); - void (JNICALL *SetShortArrayRegion) - (JNIEnv *env, jshortArray array, jsize start, jsize len, const jshort *buf); - void (JNICALL *SetIntArrayRegion) - (JNIEnv *env, jintArray array, jsize start, jsize len, const jint *buf); - void (JNICALL *SetLongArrayRegion) - (JNIEnv *env, jlongArray array, jsize start, jsize len, const jlong *buf); - void (JNICALL *SetFloatArrayRegion) - (JNIEnv *env, jfloatArray array, jsize start, jsize len, const jfloat *buf); - void (JNICALL *SetDoubleArrayRegion) - (JNIEnv *env, jdoubleArray array, jsize start, jsize len, const jdouble *buf); - - jint (JNICALL *RegisterNatives) - (JNIEnv *env, jclass clazz, const JNINativeMethod *methods, - jint nMethods); - jint (JNICALL *UnregisterNatives) - (JNIEnv *env, jclass clazz); - - jint (JNICALL *MonitorEnter) - (JNIEnv *env, jobject obj); - jint (JNICALL *MonitorExit) - (JNIEnv *env, jobject obj); - - jint (JNICALL *GetJavaVM) - (JNIEnv *env, JavaVM **vm); - - void (JNICALL *GetStringRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, jchar *buf); - void (JNICALL *GetStringUTFRegion) - (JNIEnv *env, jstring str, jsize start, jsize len, char *buf); - - void * (JNICALL *GetPrimitiveArrayCritical) - (JNIEnv *env, jarray array, jboolean *isCopy); - void (JNICALL *ReleasePrimitiveArrayCritical) - (JNIEnv *env, jarray array, void *carray, jint mode); - - const jchar * (JNICALL *GetStringCritical) - (JNIEnv *env, jstring string, jboolean *isCopy); - void (JNICALL *ReleaseStringCritical) - (JNIEnv *env, jstring string, const jchar *cstring); - - jweak (JNICALL *NewWeakGlobalRef) - (JNIEnv *env, jobject obj); - void (JNICALL *DeleteWeakGlobalRef) - (JNIEnv *env, jweak ref); - - jboolean (JNICALL *ExceptionCheck) - (JNIEnv *env); - - jobject (JNICALL *NewDirectByteBuffer) - (JNIEnv* env, void* address, jlong capacity); - void* (JNICALL *GetDirectBufferAddress) - (JNIEnv* env, jobject buf); - jlong (JNICALL *GetDirectBufferCapacity) - (JNIEnv* env, jobject buf); - - /* New JNI 1.6 Features */ - - jobjectRefType (JNICALL *GetObjectRefType) - (JNIEnv* env, jobject obj); -}; - -/* - * We use inlined functions for C++ so that programmers can write: - * - * env->FindClass("java/lang/String") - * - * in C++ rather than: - * - * (*env)->FindClass(env, "java/lang/String") - * - * in C. - */ - -struct JNIEnv_ { - const struct JNINativeInterface_ *functions; -#ifdef __cplusplus - - jint GetVersion() { - return functions->GetVersion(this); - } - jclass DefineClass(const char *name, jobject loader, const jbyte *buf, - jsize len) { - return functions->DefineClass(this, name, loader, buf, len); - } - jclass FindClass(const char *name) { - return functions->FindClass(this, name); - } - jmethodID FromReflectedMethod(jobject method) { - return functions->FromReflectedMethod(this,method); - } - jfieldID FromReflectedField(jobject field) { - return functions->FromReflectedField(this,field); - } - - jobject ToReflectedMethod(jclass cls, jmethodID methodID, jboolean isStatic) { - return functions->ToReflectedMethod(this, cls, methodID, isStatic); - } - - jclass GetSuperclass(jclass sub) { - return functions->GetSuperclass(this, sub); - } - jboolean IsAssignableFrom(jclass sub, jclass sup) { - return functions->IsAssignableFrom(this, sub, sup); - } - - jobject ToReflectedField(jclass cls, jfieldID fieldID, jboolean isStatic) { - return functions->ToReflectedField(this,cls,fieldID,isStatic); - } - - jint Throw(jthrowable obj) { - return functions->Throw(this, obj); - } - jint ThrowNew(jclass clazz, const char *msg) { - return functions->ThrowNew(this, clazz, msg); - } - jthrowable ExceptionOccurred() { - return functions->ExceptionOccurred(this); - } - void ExceptionDescribe() { - functions->ExceptionDescribe(this); - } - void ExceptionClear() { - functions->ExceptionClear(this); - } - void FatalError(const char *msg) { - functions->FatalError(this, msg); - } - - jint PushLocalFrame(jint capacity) { - return functions->PushLocalFrame(this,capacity); - } - jobject PopLocalFrame(jobject result) { - return functions->PopLocalFrame(this,result); - } - - jobject NewGlobalRef(jobject lobj) { - return functions->NewGlobalRef(this,lobj); - } - void DeleteGlobalRef(jobject gref) { - functions->DeleteGlobalRef(this,gref); - } - void DeleteLocalRef(jobject obj) { - functions->DeleteLocalRef(this, obj); - } - - jboolean IsSameObject(jobject obj1, jobject obj2) { - return functions->IsSameObject(this,obj1,obj2); - } - - jobject NewLocalRef(jobject ref) { - return functions->NewLocalRef(this,ref); - } - jint EnsureLocalCapacity(jint capacity) { - return functions->EnsureLocalCapacity(this,capacity); - } - - jobject AllocObject(jclass clazz) { - return functions->AllocObject(this,clazz); - } - jobject NewObject(jclass clazz, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args, methodID); - result = functions->NewObjectV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject NewObjectV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->NewObjectV(this,clazz,methodID,args); - } - jobject NewObjectA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->NewObjectA(this,clazz,methodID,args); - } - - jclass GetObjectClass(jobject obj) { - return functions->GetObjectClass(this,obj); - } - jboolean IsInstanceOf(jobject obj, jclass clazz) { - return functions->IsInstanceOf(this,obj,clazz); - } - - jmethodID GetMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetMethodID(this,clazz,name,sig); - } - - jobject CallObjectMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallObjectMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jobject CallObjectMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallObjectMethodV(this,obj,methodID,args); - } - jobject CallObjectMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallObjectMethodA(this,obj,methodID,args); - } - - jboolean CallBooleanMethod(jobject obj, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallBooleanMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jboolean CallBooleanMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallBooleanMethodV(this,obj,methodID,args); - } - jboolean CallBooleanMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallBooleanMethodA(this,obj,methodID, args); - } - - jbyte CallByteMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallByteMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jbyte CallByteMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallByteMethodV(this,obj,methodID,args); - } - jbyte CallByteMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallByteMethodA(this,obj,methodID,args); - } - - jchar CallCharMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallCharMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jchar CallCharMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallCharMethodV(this,obj,methodID,args); - } - jchar CallCharMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallCharMethodA(this,obj,methodID,args); - } - - jshort CallShortMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallShortMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jshort CallShortMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallShortMethodV(this,obj,methodID,args); - } - jshort CallShortMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallShortMethodA(this,obj,methodID,args); - } - - jint CallIntMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallIntMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jint CallIntMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallIntMethodV(this,obj,methodID,args); - } - jint CallIntMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallIntMethodA(this,obj,methodID,args); - } - - jlong CallLongMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallLongMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jlong CallLongMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallLongMethodV(this,obj,methodID,args); - } - jlong CallLongMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallLongMethodA(this,obj,methodID,args); - } - - jfloat CallFloatMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallFloatMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jfloat CallFloatMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallFloatMethodV(this,obj,methodID,args); - } - jfloat CallFloatMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallFloatMethodA(this,obj,methodID,args); - } - - jdouble CallDoubleMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallDoubleMethodV(this,obj,methodID,args); - va_end(args); - return result; - } - jdouble CallDoubleMethodV(jobject obj, jmethodID methodID, - va_list args) { - return functions->CallDoubleMethodV(this,obj,methodID,args); - } - jdouble CallDoubleMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - return functions->CallDoubleMethodA(this,obj,methodID,args); - } - - void CallVoidMethod(jobject obj, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallVoidMethodV(this,obj,methodID,args); - va_end(args); - } - void CallVoidMethodV(jobject obj, jmethodID methodID, - va_list args) { - functions->CallVoidMethodV(this,obj,methodID,args); - } - void CallVoidMethodA(jobject obj, jmethodID methodID, - const jvalue * args) { - functions->CallVoidMethodA(this,obj,methodID,args); - } - - jobject CallNonvirtualObjectMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jobject CallNonvirtualObjectMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualObjectMethodV(this,obj,clazz, - methodID,args); - } - jobject CallNonvirtualObjectMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualObjectMethodA(this,obj,clazz, - methodID,args); - } - - jboolean CallNonvirtualBooleanMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jboolean CallNonvirtualBooleanMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualBooleanMethodV(this,obj,clazz, - methodID,args); - } - jboolean CallNonvirtualBooleanMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualBooleanMethodA(this,obj,clazz, - methodID, args); - } - - jbyte CallNonvirtualByteMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jbyte CallNonvirtualByteMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualByteMethodV(this,obj,clazz, - methodID,args); - } - jbyte CallNonvirtualByteMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualByteMethodA(this,obj,clazz, - methodID,args); - } - - jchar CallNonvirtualCharMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jchar CallNonvirtualCharMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualCharMethodV(this,obj,clazz, - methodID,args); - } - jchar CallNonvirtualCharMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualCharMethodA(this,obj,clazz, - methodID,args); - } - - jshort CallNonvirtualShortMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jshort CallNonvirtualShortMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualShortMethodV(this,obj,clazz, - methodID,args); - } - jshort CallNonvirtualShortMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualShortMethodA(this,obj,clazz, - methodID,args); - } - - jint CallNonvirtualIntMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jint CallNonvirtualIntMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualIntMethodV(this,obj,clazz, - methodID,args); - } - jint CallNonvirtualIntMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualIntMethodA(this,obj,clazz, - methodID,args); - } - - jlong CallNonvirtualLongMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jlong CallNonvirtualLongMethodV(jobject obj, jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallNonvirtualLongMethodV(this,obj,clazz, - methodID,args); - } - jlong CallNonvirtualLongMethodA(jobject obj, jclass clazz, - jmethodID methodID, const jvalue * args) { - return functions->CallNonvirtualLongMethodA(this,obj,clazz, - methodID,args); - } - - jfloat CallNonvirtualFloatMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jfloat CallNonvirtualFloatMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualFloatMethodV(this,obj,clazz, - methodID,args); - } - jfloat CallNonvirtualFloatMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualFloatMethodA(this,obj,clazz, - methodID,args); - } - - jdouble CallNonvirtualDoubleMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - va_end(args); - return result; - } - jdouble CallNonvirtualDoubleMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - return functions->CallNonvirtualDoubleMethodV(this,obj,clazz, - methodID,args); - } - jdouble CallNonvirtualDoubleMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - return functions->CallNonvirtualDoubleMethodA(this,obj,clazz, - methodID,args); - } - - void CallNonvirtualVoidMethod(jobject obj, jclass clazz, - jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - va_end(args); - } - void CallNonvirtualVoidMethodV(jobject obj, jclass clazz, - jmethodID methodID, - va_list args) { - functions->CallNonvirtualVoidMethodV(this,obj,clazz,methodID,args); - } - void CallNonvirtualVoidMethodA(jobject obj, jclass clazz, - jmethodID methodID, - const jvalue * args) { - functions->CallNonvirtualVoidMethodA(this,obj,clazz,methodID,args); - } - - jfieldID GetFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetFieldID(this,clazz,name,sig); - } - - jobject GetObjectField(jobject obj, jfieldID fieldID) { - return functions->GetObjectField(this,obj,fieldID); - } - jboolean GetBooleanField(jobject obj, jfieldID fieldID) { - return functions->GetBooleanField(this,obj,fieldID); - } - jbyte GetByteField(jobject obj, jfieldID fieldID) { - return functions->GetByteField(this,obj,fieldID); - } - jchar GetCharField(jobject obj, jfieldID fieldID) { - return functions->GetCharField(this,obj,fieldID); - } - jshort GetShortField(jobject obj, jfieldID fieldID) { - return functions->GetShortField(this,obj,fieldID); - } - jint GetIntField(jobject obj, jfieldID fieldID) { - return functions->GetIntField(this,obj,fieldID); - } - jlong GetLongField(jobject obj, jfieldID fieldID) { - return functions->GetLongField(this,obj,fieldID); - } - jfloat GetFloatField(jobject obj, jfieldID fieldID) { - return functions->GetFloatField(this,obj,fieldID); - } - jdouble GetDoubleField(jobject obj, jfieldID fieldID) { - return functions->GetDoubleField(this,obj,fieldID); - } - - void SetObjectField(jobject obj, jfieldID fieldID, jobject val) { - functions->SetObjectField(this,obj,fieldID,val); - } - void SetBooleanField(jobject obj, jfieldID fieldID, - jboolean val) { - functions->SetBooleanField(this,obj,fieldID,val); - } - void SetByteField(jobject obj, jfieldID fieldID, - jbyte val) { - functions->SetByteField(this,obj,fieldID,val); - } - void SetCharField(jobject obj, jfieldID fieldID, - jchar val) { - functions->SetCharField(this,obj,fieldID,val); - } - void SetShortField(jobject obj, jfieldID fieldID, - jshort val) { - functions->SetShortField(this,obj,fieldID,val); - } - void SetIntField(jobject obj, jfieldID fieldID, - jint val) { - functions->SetIntField(this,obj,fieldID,val); - } - void SetLongField(jobject obj, jfieldID fieldID, - jlong val) { - functions->SetLongField(this,obj,fieldID,val); - } - void SetFloatField(jobject obj, jfieldID fieldID, - jfloat val) { - functions->SetFloatField(this,obj,fieldID,val); - } - void SetDoubleField(jobject obj, jfieldID fieldID, - jdouble val) { - functions->SetDoubleField(this,obj,fieldID,val); - } - - jmethodID GetStaticMethodID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticMethodID(this,clazz,name,sig); - } - - jobject CallStaticObjectMethod(jclass clazz, jmethodID methodID, - ...) { - va_list args; - jobject result; - va_start(args,methodID); - result = functions->CallStaticObjectMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jobject CallStaticObjectMethodV(jclass clazz, jmethodID methodID, - va_list args) { - return functions->CallStaticObjectMethodV(this,clazz,methodID,args); - } - jobject CallStaticObjectMethodA(jclass clazz, jmethodID methodID, - const jvalue *args) { - return functions->CallStaticObjectMethodA(this,clazz,methodID,args); - } - - jboolean CallStaticBooleanMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jboolean result; - va_start(args,methodID); - result = functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jboolean CallStaticBooleanMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticBooleanMethodV(this,clazz,methodID,args); - } - jboolean CallStaticBooleanMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticBooleanMethodA(this,clazz,methodID,args); - } - - jbyte CallStaticByteMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jbyte result; - va_start(args,methodID); - result = functions->CallStaticByteMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jbyte CallStaticByteMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticByteMethodV(this,clazz,methodID,args); - } - jbyte CallStaticByteMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticByteMethodA(this,clazz,methodID,args); - } - - jchar CallStaticCharMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jchar result; - va_start(args,methodID); - result = functions->CallStaticCharMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jchar CallStaticCharMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticCharMethodV(this,clazz,methodID,args); - } - jchar CallStaticCharMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticCharMethodA(this,clazz,methodID,args); - } - - jshort CallStaticShortMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jshort result; - va_start(args,methodID); - result = functions->CallStaticShortMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jshort CallStaticShortMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticShortMethodV(this,clazz,methodID,args); - } - jshort CallStaticShortMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticShortMethodA(this,clazz,methodID,args); - } - - jint CallStaticIntMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jint result; - va_start(args,methodID); - result = functions->CallStaticIntMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jint CallStaticIntMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticIntMethodV(this,clazz,methodID,args); - } - jint CallStaticIntMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticIntMethodA(this,clazz,methodID,args); - } - - jlong CallStaticLongMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jlong result; - va_start(args,methodID); - result = functions->CallStaticLongMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jlong CallStaticLongMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticLongMethodV(this,clazz,methodID,args); - } - jlong CallStaticLongMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticLongMethodA(this,clazz,methodID,args); - } - - jfloat CallStaticFloatMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jfloat result; - va_start(args,methodID); - result = functions->CallStaticFloatMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jfloat CallStaticFloatMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticFloatMethodV(this,clazz,methodID,args); - } - jfloat CallStaticFloatMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticFloatMethodA(this,clazz,methodID,args); - } - - jdouble CallStaticDoubleMethod(jclass clazz, - jmethodID methodID, ...) { - va_list args; - jdouble result; - va_start(args,methodID); - result = functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - va_end(args); - return result; - } - jdouble CallStaticDoubleMethodV(jclass clazz, - jmethodID methodID, va_list args) { - return functions->CallStaticDoubleMethodV(this,clazz,methodID,args); - } - jdouble CallStaticDoubleMethodA(jclass clazz, - jmethodID methodID, const jvalue *args) { - return functions->CallStaticDoubleMethodA(this,clazz,methodID,args); - } - - void CallStaticVoidMethod(jclass cls, jmethodID methodID, ...) { - va_list args; - va_start(args,methodID); - functions->CallStaticVoidMethodV(this,cls,methodID,args); - va_end(args); - } - void CallStaticVoidMethodV(jclass cls, jmethodID methodID, - va_list args) { - functions->CallStaticVoidMethodV(this,cls,methodID,args); - } - void CallStaticVoidMethodA(jclass cls, jmethodID methodID, - const jvalue * args) { - functions->CallStaticVoidMethodA(this,cls,methodID,args); - } - - jfieldID GetStaticFieldID(jclass clazz, const char *name, - const char *sig) { - return functions->GetStaticFieldID(this,clazz,name,sig); - } - jobject GetStaticObjectField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticObjectField(this,clazz,fieldID); - } - jboolean GetStaticBooleanField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticBooleanField(this,clazz,fieldID); - } - jbyte GetStaticByteField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticByteField(this,clazz,fieldID); - } - jchar GetStaticCharField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticCharField(this,clazz,fieldID); - } - jshort GetStaticShortField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticShortField(this,clazz,fieldID); - } - jint GetStaticIntField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticIntField(this,clazz,fieldID); - } - jlong GetStaticLongField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticLongField(this,clazz,fieldID); - } - jfloat GetStaticFloatField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticFloatField(this,clazz,fieldID); - } - jdouble GetStaticDoubleField(jclass clazz, jfieldID fieldID) { - return functions->GetStaticDoubleField(this,clazz,fieldID); - } - - void SetStaticObjectField(jclass clazz, jfieldID fieldID, - jobject value) { - functions->SetStaticObjectField(this,clazz,fieldID,value); - } - void SetStaticBooleanField(jclass clazz, jfieldID fieldID, - jboolean value) { - functions->SetStaticBooleanField(this,clazz,fieldID,value); - } - void SetStaticByteField(jclass clazz, jfieldID fieldID, - jbyte value) { - functions->SetStaticByteField(this,clazz,fieldID,value); - } - void SetStaticCharField(jclass clazz, jfieldID fieldID, - jchar value) { - functions->SetStaticCharField(this,clazz,fieldID,value); - } - void SetStaticShortField(jclass clazz, jfieldID fieldID, - jshort value) { - functions->SetStaticShortField(this,clazz,fieldID,value); - } - void SetStaticIntField(jclass clazz, jfieldID fieldID, - jint value) { - functions->SetStaticIntField(this,clazz,fieldID,value); - } - void SetStaticLongField(jclass clazz, jfieldID fieldID, - jlong value) { - functions->SetStaticLongField(this,clazz,fieldID,value); - } - void SetStaticFloatField(jclass clazz, jfieldID fieldID, - jfloat value) { - functions->SetStaticFloatField(this,clazz,fieldID,value); - } - void SetStaticDoubleField(jclass clazz, jfieldID fieldID, - jdouble value) { - functions->SetStaticDoubleField(this,clazz,fieldID,value); - } - - jstring NewString(const jchar *unicode, jsize len) { - return functions->NewString(this,unicode,len); - } - jsize GetStringLength(jstring str) { - return functions->GetStringLength(this,str); - } - const jchar *GetStringChars(jstring str, jboolean *isCopy) { - return functions->GetStringChars(this,str,isCopy); - } - void ReleaseStringChars(jstring str, const jchar *chars) { - functions->ReleaseStringChars(this,str,chars); - } - - jstring NewStringUTF(const char *utf) { - return functions->NewStringUTF(this,utf); - } - jsize GetStringUTFLength(jstring str) { - return functions->GetStringUTFLength(this,str); - } - const char* GetStringUTFChars(jstring str, jboolean *isCopy) { - return functions->GetStringUTFChars(this,str,isCopy); - } - void ReleaseStringUTFChars(jstring str, const char* chars) { - functions->ReleaseStringUTFChars(this,str,chars); - } - - jsize GetArrayLength(jarray array) { - return functions->GetArrayLength(this,array); - } - - jobjectArray NewObjectArray(jsize len, jclass clazz, - jobject init) { - return functions->NewObjectArray(this,len,clazz,init); - } - jobject GetObjectArrayElement(jobjectArray array, jsize index) { - return functions->GetObjectArrayElement(this,array,index); - } - void SetObjectArrayElement(jobjectArray array, jsize index, - jobject val) { - functions->SetObjectArrayElement(this,array,index,val); - } - - jbooleanArray NewBooleanArray(jsize len) { - return functions->NewBooleanArray(this,len); - } - jbyteArray NewByteArray(jsize len) { - return functions->NewByteArray(this,len); - } - jcharArray NewCharArray(jsize len) { - return functions->NewCharArray(this,len); - } - jshortArray NewShortArray(jsize len) { - return functions->NewShortArray(this,len); - } - jintArray NewIntArray(jsize len) { - return functions->NewIntArray(this,len); - } - jlongArray NewLongArray(jsize len) { - return functions->NewLongArray(this,len); - } - jfloatArray NewFloatArray(jsize len) { - return functions->NewFloatArray(this,len); - } - jdoubleArray NewDoubleArray(jsize len) { - return functions->NewDoubleArray(this,len); - } - - jboolean * GetBooleanArrayElements(jbooleanArray array, jboolean *isCopy) { - return functions->GetBooleanArrayElements(this,array,isCopy); - } - jbyte * GetByteArrayElements(jbyteArray array, jboolean *isCopy) { - return functions->GetByteArrayElements(this,array,isCopy); - } - jchar * GetCharArrayElements(jcharArray array, jboolean *isCopy) { - return functions->GetCharArrayElements(this,array,isCopy); - } - jshort * GetShortArrayElements(jshortArray array, jboolean *isCopy) { - return functions->GetShortArrayElements(this,array,isCopy); - } - jint * GetIntArrayElements(jintArray array, jboolean *isCopy) { - return functions->GetIntArrayElements(this,array,isCopy); - } - jlong * GetLongArrayElements(jlongArray array, jboolean *isCopy) { - return functions->GetLongArrayElements(this,array,isCopy); - } - jfloat * GetFloatArrayElements(jfloatArray array, jboolean *isCopy) { - return functions->GetFloatArrayElements(this,array,isCopy); - } - jdouble * GetDoubleArrayElements(jdoubleArray array, jboolean *isCopy) { - return functions->GetDoubleArrayElements(this,array,isCopy); - } - - void ReleaseBooleanArrayElements(jbooleanArray array, - jboolean *elems, - jint mode) { - functions->ReleaseBooleanArrayElements(this,array,elems,mode); - } - void ReleaseByteArrayElements(jbyteArray array, - jbyte *elems, - jint mode) { - functions->ReleaseByteArrayElements(this,array,elems,mode); - } - void ReleaseCharArrayElements(jcharArray array, - jchar *elems, - jint mode) { - functions->ReleaseCharArrayElements(this,array,elems,mode); - } - void ReleaseShortArrayElements(jshortArray array, - jshort *elems, - jint mode) { - functions->ReleaseShortArrayElements(this,array,elems,mode); - } - void ReleaseIntArrayElements(jintArray array, - jint *elems, - jint mode) { - functions->ReleaseIntArrayElements(this,array,elems,mode); - } - void ReleaseLongArrayElements(jlongArray array, - jlong *elems, - jint mode) { - functions->ReleaseLongArrayElements(this,array,elems,mode); - } - void ReleaseFloatArrayElements(jfloatArray array, - jfloat *elems, - jint mode) { - functions->ReleaseFloatArrayElements(this,array,elems,mode); - } - void ReleaseDoubleArrayElements(jdoubleArray array, - jdouble *elems, - jint mode) { - functions->ReleaseDoubleArrayElements(this,array,elems,mode); - } - - void GetBooleanArrayRegion(jbooleanArray array, - jsize start, jsize len, jboolean *buf) { - functions->GetBooleanArrayRegion(this,array,start,len,buf); - } - void GetByteArrayRegion(jbyteArray array, - jsize start, jsize len, jbyte *buf) { - functions->GetByteArrayRegion(this,array,start,len,buf); - } - void GetCharArrayRegion(jcharArray array, - jsize start, jsize len, jchar *buf) { - functions->GetCharArrayRegion(this,array,start,len,buf); - } - void GetShortArrayRegion(jshortArray array, - jsize start, jsize len, jshort *buf) { - functions->GetShortArrayRegion(this,array,start,len,buf); - } - void GetIntArrayRegion(jintArray array, - jsize start, jsize len, jint *buf) { - functions->GetIntArrayRegion(this,array,start,len,buf); - } - void GetLongArrayRegion(jlongArray array, - jsize start, jsize len, jlong *buf) { - functions->GetLongArrayRegion(this,array,start,len,buf); - } - void GetFloatArrayRegion(jfloatArray array, - jsize start, jsize len, jfloat *buf) { - functions->GetFloatArrayRegion(this,array,start,len,buf); - } - void GetDoubleArrayRegion(jdoubleArray array, - jsize start, jsize len, jdouble *buf) { - functions->GetDoubleArrayRegion(this,array,start,len,buf); - } - - void SetBooleanArrayRegion(jbooleanArray array, jsize start, jsize len, - const jboolean *buf) { - functions->SetBooleanArrayRegion(this,array,start,len,buf); - } - void SetByteArrayRegion(jbyteArray array, jsize start, jsize len, - const jbyte *buf) { - functions->SetByteArrayRegion(this,array,start,len,buf); - } - void SetCharArrayRegion(jcharArray array, jsize start, jsize len, - const jchar *buf) { - functions->SetCharArrayRegion(this,array,start,len,buf); - } - void SetShortArrayRegion(jshortArray array, jsize start, jsize len, - const jshort *buf) { - functions->SetShortArrayRegion(this,array,start,len,buf); - } - void SetIntArrayRegion(jintArray array, jsize start, jsize len, - const jint *buf) { - functions->SetIntArrayRegion(this,array,start,len,buf); - } - void SetLongArrayRegion(jlongArray array, jsize start, jsize len, - const jlong *buf) { - functions->SetLongArrayRegion(this,array,start,len,buf); - } - void SetFloatArrayRegion(jfloatArray array, jsize start, jsize len, - const jfloat *buf) { - functions->SetFloatArrayRegion(this,array,start,len,buf); - } - void SetDoubleArrayRegion(jdoubleArray array, jsize start, jsize len, - const jdouble *buf) { - functions->SetDoubleArrayRegion(this,array,start,len,buf); - } - - jint RegisterNatives(jclass clazz, const JNINativeMethod *methods, - jint nMethods) { - return functions->RegisterNatives(this,clazz,methods,nMethods); - } - jint UnregisterNatives(jclass clazz) { - return functions->UnregisterNatives(this,clazz); - } - - jint MonitorEnter(jobject obj) { - return functions->MonitorEnter(this,obj); - } - jint MonitorExit(jobject obj) { - return functions->MonitorExit(this,obj); - } - - jint GetJavaVM(JavaVM **vm) { - return functions->GetJavaVM(this,vm); - } - - void GetStringRegion(jstring str, jsize start, jsize len, jchar *buf) { - functions->GetStringRegion(this,str,start,len,buf); - } - void GetStringUTFRegion(jstring str, jsize start, jsize len, char *buf) { - functions->GetStringUTFRegion(this,str,start,len,buf); - } - - void * GetPrimitiveArrayCritical(jarray array, jboolean *isCopy) { - return functions->GetPrimitiveArrayCritical(this,array,isCopy); - } - void ReleasePrimitiveArrayCritical(jarray array, void *carray, jint mode) { - functions->ReleasePrimitiveArrayCritical(this,array,carray,mode); - } - - const jchar * GetStringCritical(jstring string, jboolean *isCopy) { - return functions->GetStringCritical(this,string,isCopy); - } - void ReleaseStringCritical(jstring string, const jchar *cstring) { - functions->ReleaseStringCritical(this,string,cstring); - } - - jweak NewWeakGlobalRef(jobject obj) { - return functions->NewWeakGlobalRef(this,obj); - } - void DeleteWeakGlobalRef(jweak ref) { - functions->DeleteWeakGlobalRef(this,ref); - } - - jboolean ExceptionCheck() { - return functions->ExceptionCheck(this); - } - - jobject NewDirectByteBuffer(void* address, jlong capacity) { - return functions->NewDirectByteBuffer(this, address, capacity); - } - void* GetDirectBufferAddress(jobject buf) { - return functions->GetDirectBufferAddress(this, buf); - } - jlong GetDirectBufferCapacity(jobject buf) { - return functions->GetDirectBufferCapacity(this, buf); - } - jobjectRefType GetObjectRefType(jobject obj) { - return functions->GetObjectRefType(this, obj); - } - -#endif /* __cplusplus */ -}; - -typedef struct JavaVMOption { - char *optionString; - void *extraInfo; -} JavaVMOption; - -typedef struct JavaVMInitArgs { - jint version; - - jint nOptions; - JavaVMOption *options; - jboolean ignoreUnrecognized; -} JavaVMInitArgs; - -typedef struct JavaVMAttachArgs { - jint version; - - char *name; - jobject group; -} JavaVMAttachArgs; - -/* These will be VM-specific. */ - -#define JDK1_2 -#define JDK1_4 - -/* End VM-specific. */ - -struct JNIInvokeInterface_ { - void *reserved0; - void *reserved1; - void *reserved2; - - jint (JNICALL *DestroyJavaVM)(JavaVM *vm); - - jint (JNICALL *AttachCurrentThread)(JavaVM *vm, void **penv, void *args); - - jint (JNICALL *DetachCurrentThread)(JavaVM *vm); - - jint (JNICALL *GetEnv)(JavaVM *vm, void **penv, jint version); - - jint (JNICALL *AttachCurrentThreadAsDaemon)(JavaVM *vm, void **penv, void *args); -}; - -struct JavaVM_ { - const struct JNIInvokeInterface_ *functions; -#ifdef __cplusplus - - jint DestroyJavaVM() { - return functions->DestroyJavaVM(this); - } - jint AttachCurrentThread(void **penv, void *args) { - return functions->AttachCurrentThread(this, penv, args); - } - jint DetachCurrentThread() { - return functions->DetachCurrentThread(this); - } - - jint GetEnv(void **penv, jint version) { - return functions->GetEnv(this, penv, version); - } - jint AttachCurrentThreadAsDaemon(void **penv, void *args) { - return functions->AttachCurrentThreadAsDaemon(this, penv, args); - } -#endif -}; - -#ifdef _JNI_IMPLEMENTATION_ -#define _JNI_IMPORT_OR_EXPORT_ JNIEXPORT -#else -#define _JNI_IMPORT_OR_EXPORT_ JNIIMPORT -#endif -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetDefaultJavaVMInitArgs(void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_CreateJavaVM(JavaVM **pvm, void **penv, void *args); - -_JNI_IMPORT_OR_EXPORT_ jint JNICALL -JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); - -/* Defined by native libraries. */ -JNIEXPORT jint JNICALL -JNI_OnLoad(JavaVM *vm, void *reserved); - -JNIEXPORT void JNICALL -JNI_OnUnload(JavaVM *vm, void *reserved); - -#define JNI_VERSION_1_1 0x00010001 -#define JNI_VERSION_1_2 0x00010002 -#define JNI_VERSION_1_4 0x00010004 -#define JNI_VERSION_1_6 0x00010006 - -#ifdef __cplusplus -} /* extern "C" */ -#endif /* __cplusplus */ - -#endif /* !_JAVASOFT_JNI_H_ */ diff --git a/src/bind/javainc/linux/jni_md.h b/src/bind/javainc/linux/jni_md.h deleted file mode 100644 index d8c88574a..000000000 --- a/src/bind/javainc/linux/jni_md.h +++ /dev/null @@ -1,26 +0,0 @@ -/** - * This file should be replaced by the "official" jni_md.h - * for linux - */ -#ifndef __JNI_MD_H__ -#define __JNI_MD_H__ - -/** - * Nothing special for these declspecs for Linux. Leave alone. - */ -#define JNIEXPORT -#define JNIIMPORT -#define JNICALL - -typedef signed char jbyte; -typedef int jint; - -/* 64 bit? */ -#ifdef _LP64 -typedef long jlong; -#else -typedef long long jlong; -#endif - - -#endif /* __JNI_MD_H__ */ diff --git a/src/bind/javainc/solaris/jni_md.h b/src/bind/javainc/solaris/jni_md.h deleted file mode 100644 index 688d573a7..000000000 --- a/src/bind/javainc/solaris/jni_md.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright 1996-2000 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#ifndef _JAVASOFT_JNI_MD_H_ -#define _JAVASOFT_JNI_MD_H_ - -#define JNIEXPORT -#define JNIIMPORT -#define JNICALL - -typedef int jint; -#ifdef _LP64 /* 64-bit Solaris */ -typedef long jlong; -#else -typedef long long jlong; -#endif - -typedef signed char jbyte; - -#endif /* !_JAVASOFT_JNI_MD_H_ */ diff --git a/src/bind/javainc/win32/jni_md.h b/src/bind/javainc/win32/jni_md.h deleted file mode 100644 index 4ae350658..000000000 --- a/src/bind/javainc/win32/jni_md.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 1996-1998 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 only, as - * published by the Free Software Foundation. Sun designates this - * particular file as subject to the "Classpath" exception as provided - * by Sun in the LICENSE file that accompanied this code. - * - * This code 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 General Public License - * version 2 for more details (a copy is included in the LICENSE file that - * accompanied this code). - * - * You should have received a copy of the GNU General Public License version - * 2 along with this work; if not, write to the Free Software Foundation, - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - */ - -#ifndef _JAVASOFT_JNI_MD_H_ -#define _JAVASOFT_JNI_MD_H_ - -#define JNIEXPORT __declspec(dllexport) -#define JNIIMPORT __declspec(dllimport) -#define JNICALL __stdcall - -typedef long jint; -typedef __int64 jlong; -typedef signed char jbyte; - -#endif /* !_JAVASOFT_JNI_MD_H_ */ diff --git a/src/bind/makefile.in b/src/bind/makefile.in deleted file mode 100644 index 90ed85bb4..000000000 --- a/src/bind/makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Convenience stub makefile to call the real Makefile. - -@SET_MAKE@ - -OBJEXT = @OBJEXT@ - -# Explicit so that it's the default rule. -all: - cd .. && $(MAKE) bind/all - -clean %.a %.$(OBJEXT): - cd .. && $(MAKE) bind/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/box3d-context.cpp b/src/box3d-context.cpp index a55aba00d..7491520de 100644 --- a/src/box3d-context.cpp +++ b/src/box3d-context.cpp @@ -35,7 +35,6 @@ #include "pixmaps/cursor-3dbox.xpm" #include "box3d.h" #include "box3d-context.h" -#include "sp-metrics.h" #include <glibmm/i18n.h> #include "xml/repr.h" #include "xml/node-event-vector.h" diff --git a/src/check-header-compile.in b/src/check-header-compile.in index ca9eb6a62..2295dcf91 100755 --- a/src/check-header-compile.in +++ b/src/check-header-compile.in @@ -26,7 +26,6 @@ if [ $# = 0 ]; then -o -name ecma -prune \ -o -name render -prune \ -o -name xpath -prune \ - -o -path '*/extension/script/js' -prune \ -o -name '*.h' \ \! -name gnome.h \! -name nr-type-gnome.h \! -name Livarot.h \! -name radial.h \ \! -name '*-test.h' \ diff --git a/src/color-profile.cpp b/src/color-profile.cpp index 5fb84d8ac..01e6d7062 100644 --- a/src/color-profile.cpp +++ b/src/color-profile.cpp @@ -5,6 +5,7 @@ #define noDEBUG_LCMS #include <gdkmm/color.h> +#include <glibmm/checksum.h> #include <glib/gstdio.h> #include <fcntl.h> #include <glib/gi18n.h> @@ -41,7 +42,6 @@ #include "preferences.h" #include "dom/uri.h" -#include "dom/util/digest.h" #ifdef WIN32 #include <icm.h> @@ -1285,8 +1285,6 @@ Glib::ustring Inkscape::CMSSystem::getDisplayId( int screen, int monitor ) Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, int screen, int monitor ) { - Glib::ustring id; - while ( static_cast<int>(perMonitorProfiles.size()) <= screen ) { std::vector<MemProfile> tmp; perMonitorProfiles.push_back(tmp); @@ -1302,11 +1300,13 @@ Glib::ustring Inkscape::CMSSystem::setDisplayPer( gpointer buf, guint bufLen, in cmsCloseProfile( item.hprof ); item.hprof = 0; } - id.clear(); + + Glib::ustring id; if ( buf && bufLen ) { - id = Digest::hashHex(Digest::HASH_MD5, - reinterpret_cast<unsigned char*>(buf), bufLen); + gsize len = bufLen; // len is an inout parameter + id = Glib::Checksum::compute_checksum(Glib::Checksum::CHECKSUM_MD5, + reinterpret_cast<guchar*>(buf), len); // Note: if this is not a valid profile, item.hprof will be set to null. item.hprof = cmsOpenProfileFromMem(buf, bufLen); diff --git a/src/desktop-events.cpp b/src/desktop-events.cpp index 217187553..5cb26abc0 100644 --- a/src/desktop-events.cpp +++ b/src/desktop-events.cpp @@ -34,14 +34,11 @@ #include "document-undo.h" #include "event-context.h" #include "helper/action.h" -#include "helper/unit-menu.h" -#include "helper/units.h" #include "message-context.h" #include "preferences.h" #include "snap.h" #include "display/sp-canvas.h" #include "sp-guide.h" -#include "sp-metrics.h" #include "sp-namedview.h" #include "tools-switch.h" #include "verbs.h" diff --git a/src/desktop.cpp b/src/desktop.cpp index ce740f76f..13e339abe 100644 --- a/src/desktop.cpp +++ b/src/desktop.cpp @@ -54,7 +54,6 @@ #include "document.h" #include "event-log.h" #include "helper/action-context.h" -#include "helper/units.h" #include "interface.h" #include "inkscape-private.h" #include "layer-fns.h" diff --git a/src/display/canvas-axonomgrid.cpp b/src/display/canvas-axonomgrid.cpp index 1eadd3fd2..f7a7cb39a 100644 --- a/src/display/canvas-axonomgrid.cpp +++ b/src/display/canvas-axonomgrid.cpp @@ -51,8 +51,9 @@ #include "2geom/angle.h" #include "util/mathfns.h" #include "round.h" -#include "helper/units.h" +#include "util/units.h" +using Inkscape::Util::unit_table; enum Dim3 { X=0, Y, Z }; @@ -160,15 +161,15 @@ CanvasAxonomGrid::CanvasAxonomGrid (SPNamedView * nv, Inkscape::XML::Node * in_r : CanvasGrid(nv, in_repr, in_doc, GRID_AXONOMETRIC) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - gridunit = sp_unit_get_by_abbreviation( prefs->getString("/options/grids/axonom/units").data() ); + gridunit = new Inkscape::Util::Unit(unit_table.getUnit(prefs->getString("/options/grids/axonom/units"))); if (!gridunit) - gridunit = &sp_unit_get_by_id(SP_UNIT_PX); - origin[Geom::X] = sp_units_get_pixels( prefs->getDouble("/options/grids/axonom/origin_x", 0.0), *gridunit ); - origin[Geom::Y] = sp_units_get_pixels( prefs->getDouble("/options/grids/axonom/origin_y", 0.0), *gridunit ); + gridunit = new Inkscape::Util::Unit(unit_table.getUnit("px")); + origin[Geom::X] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/axonom/origin_x", 0.0), *gridunit, "px"); + origin[Geom::Y] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/axonom/origin_y", 0.0), *gridunit, "px"); color = prefs->getInt("/options/grids/axonom/color", 0x0000ff20); empcolor = prefs->getInt("/options/grids/axonom/empcolor", 0x0000ff40); empspacing = prefs->getInt("/options/grids/axonom/empspacing", 5); - lengthy = sp_units_get_pixels( prefs->getDouble("/options/grids/axonom/spacing_y", 1.0), *gridunit ); + lengthy = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/axonom/spacing_y", 1.0), *gridunit, "px"); angle_deg[X] = prefs->getDouble("/options/grids/axonom/angle_x", 30.0); angle_deg[Z] = prefs->getDouble("/options/grids/axonom/angle_z", 30.0); angle_deg[Y] = 0; @@ -188,63 +189,6 @@ CanvasAxonomGrid::~CanvasAxonomGrid () if (snapper) delete snapper; } - -/* fixme: Collect all these length parsing methods and think common sane API */ - -static gboolean sp_nv_read_length(gchar const *str, guint base, gdouble *val, SPUnit const **unit) -{ - if (!str) { - return FALSE; - } - - gchar *u; - gdouble v = g_ascii_strtod(str, &u); - if (!u) { - return FALSE; - } - while (isspace(*u)) { - u += 1; - } - - if (!*u) { - /* No unit specified - keep default */ - *val = v; - return TRUE; - } - - if (base & SP_UNIT_DEVICE) { - if (u[0] && u[1] && !isalnum(u[2]) && !strncmp(u, "px", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PX); - *val = v; - return TRUE; - } - } - - if (base & SP_UNIT_ABSOLUTE) { - if (!strncmp(u, "pt", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PT); - } else if (!strncmp(u, "mm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_MM); - } else if (!strncmp(u, "cm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_CM); - } else if (!strncmp(u, "m", 1)) { - *unit = &sp_unit_get_by_id(SP_UNIT_M); - } else if (!strncmp(u, "in", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_IN); - } else if (!strncmp(u, "ft", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_FT); - } else if (!strncmp(u, "pc", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PC); - } else { - return FALSE; - } - *val = v; - return TRUE; - } - - return FALSE; -} - static gboolean sp_nv_read_opacity(gchar const *str, guint32 *color) { if (!str) { @@ -270,17 +214,20 @@ CanvasAxonomGrid::readRepr() { gchar const *value; if ( (value = repr->attribute("originx")) ) { - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[Geom::X], &gridunit); - origin[Geom::X] = sp_units_get_pixels(origin[Geom::X], *(gridunit)); + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + origin[Geom::X] = unit_table.getQuantity(value).value("px"); } if ( (value = repr->attribute("originy")) ) { - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[Geom::Y], &gridunit); - origin[Geom::Y] = sp_units_get_pixels(origin[Geom::Y], *(gridunit)); + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + origin[Geom::Y] = unit_table.getQuantity(value).value("px"); } if ( (value = repr->attribute("spacingy")) ) { - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &lengthy, &gridunit); - lengthy = sp_units_get_pixels(lengthy, *(gridunit)); + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + lengthy = q.value("px"); if (lengthy < 0.0500) lengthy = 0.0500; } @@ -419,17 +366,17 @@ _wr.setUpdating (false); attach_all (*table, widget_array, sizeof(widget_array)); // set widget values - _rumg->setUnit (gridunit); + _rumg->setUnit (gridunit->abbr); gdouble val; val = origin[Geom::X]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_ox->setValue (val); val = origin[Geom::Y]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_oy->setValue (val); val = lengthy; - double gridy = sp_pixels_get_units (val, *(gridunit)); + double gridy = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_sy->setValue (gridy); _rsu_ax->setValue(angle_deg[X]); @@ -458,17 +405,17 @@ CanvasAxonomGrid::updateWidgets() _rcb_enabled.setActive(snapper->getEnabled()); } - _rumg.setUnit (gridunit); + _rumg.setUnit (gridunit->abbr); gdouble val; val = origin[Geom::X]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, &px, gridunit); _rsu_ox.setValue (val); val = origin[Geom::Y]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, &px, gridunit); _rsu_oy.setValue (val); val = lengthy; - double gridy = sp_pixels_get_units (val, *(gridunit)); + double gridy = Inkscape::Util::Quantity::convert(val, &px, gridunit); _rsu_sy.setValue (gridy); _rsu_ax.setValue(angle_deg[X]); diff --git a/src/display/canvas-grid.cpp b/src/display/canvas-grid.cpp index ee5ad0945..ef32c113b 100644 --- a/src/display/canvas-grid.cpp +++ b/src/display/canvas-grid.cpp @@ -42,7 +42,7 @@ #include "display/canvas-grid.h" #include "display/sp-canvas-group.h" #include "document.h" -#include "helper/units.h" +#include "util/units.h" #include "inkscape.h" #include "preferences.h" #include "sp-namedview.h" @@ -55,6 +55,7 @@ #include "display/sp-canvas.h" using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; namespace Inkscape { @@ -398,11 +399,11 @@ void CanvasGrid::setOrigin(Geom::Point const &origin_px) gdouble val; val = origin_px[Geom::X]; - val = sp_pixels_get_units (val, *gridunit); - os_x << val << sp_unit_get_abbreviation(gridunit); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); + os_x << val << gridunit->abbr; val = origin_px[Geom::Y]; - val = sp_pixels_get_units (val, *gridunit); - os_y << val << sp_unit_get_abbreviation(gridunit); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); + os_y << val << gridunit->abbr; repr->setAttribute("originx", os_x.str().c_str()); repr->setAttribute("originy", os_y.str().c_str()); } @@ -488,17 +489,17 @@ CanvasXYGrid::CanvasXYGrid (SPNamedView * nv, Inkscape::XML::Node * in_repr, SPD : CanvasGrid(nv, in_repr, in_doc, GRID_RECTANGULAR) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - gridunit = sp_unit_get_by_abbreviation( prefs->getString("/options/grids/xy/units").data() ); + gridunit = new Inkscape::Util::Unit(unit_table.getUnit(prefs->getString("/options/grids/xy/units"))); if (!gridunit) { - gridunit = &sp_unit_get_by_id(SP_UNIT_PX); + gridunit = new Inkscape::Util::Unit(unit_table.getUnit("px")); } - origin[Geom::X] = sp_units_get_pixels(prefs->getDouble("/options/grids/xy/origin_x", 0.0), *gridunit); - origin[Geom::Y] = sp_units_get_pixels(prefs->getDouble("/options/grids/xy/origin_y", 0.0), *gridunit); + origin[Geom::X] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/xy/origin_x", 0.0), *gridunit, "px"); + origin[Geom::Y] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/xy/origin_y", 0.0), *gridunit, "px"); color = prefs->getInt("/options/grids/xy/color", 0x0000ff20); empcolor = prefs->getInt("/options/grids/xy/empcolor", 0x0000ff40); empspacing = prefs->getInt("/options/grids/xy/empspacing", 5); - spacing[Geom::X] = sp_units_get_pixels(prefs->getDouble("/options/grids/xy/spacing_x", 0.0), *gridunit); - spacing[Geom::Y] = sp_units_get_pixels(prefs->getDouble("/options/grids/xy/spacing_y", 0.0), *gridunit); + spacing[Geom::X] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/xy/spacing_x", 0.0), *gridunit, "px"); + spacing[Geom::Y] = Inkscape::Util::Quantity::convert(prefs->getDouble("/options/grids/xy/spacing_y", 0.0), *gridunit, "px"); render_dotted = prefs->getBool("/options/grids/xy/dotted", false); snapper = new CanvasXYGridSnapper(this, &namedview->snap_manager, 0); @@ -511,64 +512,6 @@ CanvasXYGrid::~CanvasXYGrid () if (snapper) delete snapper; } - -/* fixme: Collect all these length parsing methods and think common sane API */ - -static gboolean -sp_nv_read_length(gchar const *str, guint base, gdouble *val, SPUnit const **unit) -{ - if (!str) { - return FALSE; - } - - gchar *u; - gdouble v = g_ascii_strtod(str, &u); - if (!u) { - return FALSE; - } - while (isspace(*u)) { - u += 1; - } - - if (!*u) { - /* No unit specified - keep default */ - *val = v; - return TRUE; - } - - if (base & SP_UNIT_DEVICE) { - if (u[0] && u[1] && !isalnum(u[2]) && !strncmp(u, "px", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PX); - *val = v; - return TRUE; - } - } - - if (base & SP_UNIT_ABSOLUTE) { - if (!strncmp(u, "pt", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PT); - } else if (!strncmp(u, "mm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_MM); - } else if (!strncmp(u, "cm", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_CM); - } else if (!strncmp(u, "m", 1)) { - *unit = &sp_unit_get_by_id(SP_UNIT_M); - } else if (!strncmp(u, "in", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_IN); - } else if (!strncmp(u, "ft", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_FT); - } else if (!strncmp(u, "pc", 2)) { - *unit = &sp_unit_get_by_id(SP_UNIT_PC); - } else { - return FALSE; - } - *val = v; - return TRUE; - } - - return FALSE; -} - static gboolean sp_nv_read_opacity(gchar const *str, guint32 *color) { if (!str) { @@ -645,28 +588,32 @@ CanvasXYGrid::readRepr() { gchar const *value; if ( (value = repr->attribute("originx")) ) { - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[Geom::X], &gridunit); - origin[Geom::X] = sp_units_get_pixels(origin[Geom::X], *(gridunit)); + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + origin[Geom::X] = unit_table.getQuantity(value).value("px"); } if ( (value = repr->attribute("originy")) ) { - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[Geom::Y], &gridunit); - origin[Geom::Y] = sp_units_get_pixels(origin[Geom::Y], *(gridunit)); + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + origin[Geom::Y] = unit_table.getQuantity(value).value("px"); } if ( (value = repr->attribute("spacingx")) ) { double oldVal = spacing[Geom::X]; - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &spacing[Geom::X], &gridunit); - validateScalar( oldVal, &spacing[Geom::X]); - spacing[Geom::X] = sp_units_get_pixels(spacing[Geom::X], *(gridunit)); - + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + spacing[Geom::X] = q.quantity; + validateScalar(oldVal, &spacing[Geom::X]); + spacing[Geom::X] = Inkscape::Util::Quantity::convert(spacing[Geom::X], *gridunit, "px"); } if ( (value = repr->attribute("spacingy")) ) { double oldVal = spacing[Geom::Y]; - sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &spacing[Geom::Y], &gridunit); - validateScalar( oldVal, &spacing[Geom::Y]); - spacing[Geom::Y] = sp_units_get_pixels(spacing[Geom::Y], *(gridunit)); - + Inkscape::Util::Quantity q = unit_table.getQuantity(value); + gridunit = q.unit; + spacing[Geom::Y] = q.quantity; + validateScalar(oldVal, &spacing[Geom::Y]); + spacing[Geom::Y] = Inkscape::Util::Quantity::convert(spacing[Geom::Y], *gridunit, "px"); } if ( (value = repr->attribute("color")) ) { @@ -802,20 +749,20 @@ CanvasXYGrid::newSpecificWidget() attach_all (*table, widget_array, sizeof(widget_array)); // set widget values - _rumg->setUnit (gridunit); + _rumg->setUnit (gridunit->abbr); gdouble val; val = origin[Geom::X]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_ox->setValue (val); val = origin[Geom::Y]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_oy->setValue (val); val = spacing[Geom::X]; - double gridx = sp_pixels_get_units (val, *(gridunit)); + double gridx = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_sx->setValue (gridx); val = spacing[Geom::Y]; - double gridy = sp_pixels_get_units (val, *(gridunit)); + double gridy = Inkscape::Util::Quantity::convert(val, "px", *gridunit); _rsu_sy->setValue (gridy); _rcp_gcol->setRgba32 (color); @@ -851,20 +798,20 @@ CanvasXYGrid::updateWidgets() _rcb_enabled.setActive(snapper->getEnabled()); } - _rumg.setUnit (gridunit); + _rumg.setUnit (gridunit->abbr); gdouble val; val = origin[Geom::X]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Quantity::convert(val, "px", *gridunit); _rsu_ox.setValue (val); val = origin[Geom::Y]; - val = sp_pixels_get_units (val, *(gridunit)); + val = Inkscape::Quantity::convert(val, "px", *gridunit); _rsu_oy.setValue (val); val = spacing[Geom::X]; - double gridx = sp_pixels_get_units (val, *(gridunit)); + double gridx = Inkscape::Quantity::convert(val, "px", *gridunit); _rsu_sx.setValue (gridx); val = spacing[Geom::Y]; - double gridy = sp_pixels_get_units (val, *(gridunit)); + double gridy = Inkscape::Quantity::convert(val, "px", *gridunit); _rsu_sy.setValue (gridy); _rcp_gcol.setRgba32 (color); diff --git a/src/display/canvas-grid.h b/src/display/canvas-grid.h index 7eaef407f..70b4bf744 100644 --- a/src/display/canvas-grid.h +++ b/src/display/canvas-grid.h @@ -28,6 +28,10 @@ namespace XML { class Node; } +namespace Util { +class Unit; +} + enum GridType { GRID_RECTANGULAR = 0, GRID_AXONOMETRIC = 1 @@ -88,7 +92,7 @@ public: guint32 empcolor; /**< Color for emphasis lines */ gint empspacing; /**< Spacing between emphasis lines */ - SPUnit const* gridunit; + Inkscape::Util::Unit const* gridunit; Inkscape::XML::Node * repr; SPDocument *doc; diff --git a/src/display/drawing-image.cpp b/src/display/drawing-image.cpp index 753249e60..bdb7c15b0 100644 --- a/src/display/drawing-image.cpp +++ b/src/display/drawing-image.cpp @@ -9,6 +9,7 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ +#include <2geom/bezier-curve.h> #include "display/cairo-utils.h" #include "display/drawing.h" #include "display/drawing-context.h" @@ -287,21 +288,9 @@ unsigned DrawingImage::_renderItem(DrawingContext &ct, Geom::IntRect const &/*ar static double distance_to_segment (Geom::Point const &p, Geom::Point const &a1, Geom::Point const &a2) { - // calculate sides of the triangle and their squares - double d1 = Geom::L2(p - a1); - double d1_2 = d1 * d1; - double d2 = Geom::L2(p - a2); - double d2_2 = d2 * d2; - double a = Geom::L2(a1 - a2); - double a_2 = a * a; - - // if one of the angles at the base is > 90, return the corresponding side - if (d1_2 + a_2 <= d2_2) return d1; - if (d2_2 + a_2 <= d1_2) return d2; - - // otherwise calculate the height to the base - double peri = (a + d1 + d2)/2; - return (2*sqrt(peri * (peri - a) * (peri - d1) * (peri - d2))/a); + Geom::LineSegment l(a1, a2); + Geom::Point np = l.pointAt(l.nearestPoint(p)); + return Geom::distance(np, p); } DrawingItem * @@ -313,22 +302,17 @@ DrawingImage::_pickItem(Geom::Point const &p, double delta, unsigned /*sticky*/) if (outline) { Geom::Rect r = bounds(); - - Geom::Point c00 = r.corner(0); - Geom::Point c01 = r.corner(3); - Geom::Point c11 = r.corner(2); - Geom::Point c10 = r.corner(1); - - // frame - if (distance_to_segment (p, c00, c10) < delta) return this; - if (distance_to_segment (p, c10, c11) < delta) return this; - if (distance_to_segment (p, c11, c01) < delta) return this; - if (distance_to_segment (p, c01, c00) < delta) return this; - - // diagonals - if (distance_to_segment (p, c00, c11) < delta) return this; - if (distance_to_segment (p, c10, c01) < delta) return this; - + Geom::Point pick = p * _ctm.inverse(); + + // find whether any side or diagonal is within delta + // to do so, iterate over all pairs of corners + for (unsigned i = 0; i < 3; ++i) { // for i=3, there is nothing to do + for (unsigned j = i+1; j < 4; ++j) { + if (distance_to_segment(pick, r.corner(i), r.corner(j)) < delta) { + return this; + } + } + } return NULL; } else { diff --git a/src/document.cpp b/src/document.cpp index 0e9c43fe4..0b742e491 100644 --- a/src/document.cpp +++ b/src/document.cpp @@ -49,7 +49,6 @@ #include "display/drawing-item.h" #include "document-private.h" #include "document-undo.h" -#include "helper/units.h" #include "id-clash.h" #include "inkscape-private.h" #include "inkscape-version.h" @@ -63,12 +62,13 @@ #include "sp-object-repr.h" #include "sp-symbol.h" #include "transf_mat_3x4.h" -#include "unit-constants.h" +#include "util/units.h" #include "xml/repr.h" #include "xml/rebase-hrefs.h" #include "libcroco/cr-cascade.h" using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; // Higher number means lower priority. #define SP_DOCUMENT_UPDATE_PRIORITY (G_PRIORITY_HIGH_IDLE - 2) @@ -546,21 +546,21 @@ gdouble SPDocument::getWidth() const return result; } -void SPDocument::setWidth(gdouble width, const SPUnit *unit) +void SPDocument::setWidth(const Inkscape::Util::Quantity &width) { if (root->width.unit == SVGLength::PERCENT && root->viewBox_set) { // set to viewBox= - root->viewBox.setMax(Geom::Point(root->viewBox.left() + sp_units_get_pixels (width, *unit), root->viewBox.bottom())); + root->viewBox.setMax(Geom::Point(root->viewBox.left() + width.value("px"), root->viewBox.bottom())); } else { // set to width= gdouble old_computed = root->width.computed; - root->width.computed = sp_units_get_pixels (width, *unit); + root->width.computed = width.value("px"); /* SVG does not support meters as a unit, so we must translate meters to * cm when writing */ - if (!strcmp(unit->abbr, "m")) { - root->width.value = 100*width; + if (*width.unit == unit_table.getUnit("m")) { + root->width.value = width.value("cm"); root->width.unit = SVGLength::CM; } else { - root->width.value = width; - root->width.unit = (SVGLength::Unit) sp_unit_get_svg_unit(unit); + root->width.value = width.quantity; + root->width.unit = (SVGLength::Unit) width.unit->svgUnit(); } if (root->viewBox_set) @@ -582,21 +582,21 @@ gdouble SPDocument::getHeight() const return result; } -void SPDocument::setHeight(gdouble height, const SPUnit *unit) +void SPDocument::setHeight(const Inkscape::Util::Quantity &height) { if (root->height.unit == SVGLength::PERCENT && root->viewBox_set) { // set to viewBox= - root->viewBox.setMax(Geom::Point(root->viewBox.right(), root->viewBox.top() + sp_units_get_pixels (height, *unit))); + root->viewBox.setMax(Geom::Point(root->viewBox.right(), root->viewBox.top() + height.value("px"))); } else { // set to height= gdouble old_computed = root->height.computed; - root->height.computed = sp_units_get_pixels (height, *unit); + root->height.computed = height.value("px"); /* SVG does not support meters as a unit, so we must translate meters to * cm when writing */ - if (!strcmp(unit->abbr, "m")) { - root->height.value = 100*height; + if (*height.unit == unit_table.getUnit("m")) { + root->height.value = height.value("cm"); root->height.unit = SVGLength::CM; } else { - root->height.value = height; - root->height.unit = (SVGLength::Unit) sp_unit_get_svg_unit(unit); + root->height.value = height.quantity; + root->height.unit = (SVGLength::Unit) height.unit->svgUnit(); } if (root->viewBox_set) @@ -631,7 +631,7 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins) double const h = rect.height(); double const old_height = getHeight(); - SPUnit const &px(sp_unit_get_by_id(SP_UNIT_PX)); + Inkscape::Util::Unit const px = unit_table.getUnit("px"); /* in px */ double margin_top = 0.0; @@ -644,9 +644,10 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins) if (with_margins && nv) { if (nv != NULL) { gchar const * const units_abbr = nv->getAttribute("units"); - SPUnit const *margin_units = NULL; + Inkscape::Util::Unit const *margin_units = NULL; if (units_abbr != NULL) { - margin_units = sp_unit_get_by_abbreviation(units_abbr); + Inkscape::Util::Unit mu = unit_table.getUnit(units_abbr); + margin_units = μ } if (margin_units == NULL) { margin_units = &px; @@ -663,8 +664,8 @@ void SPDocument::fitToRect(Geom::Rect const &rect, bool with_margins) rect.max() + Geom::Point(margin_right, margin_top)); - setWidth(rect_with_margins.width(), &px); - setHeight(rect_with_margins.height(), &px); + setWidth(Inkscape::Util::Quantity(rect_with_margins.width(), "px")); + setHeight(Inkscape::Util::Quantity(rect_with_margins.height(), "px")); Geom::Translate const tr( Geom::Point(0, old_height - rect_with_margins.height()) @@ -964,7 +965,7 @@ void SPDocument::setupViewport(SPItemCtx *ctx) if (root->viewBox_set) { // if set, take from viewBox ctx->viewport = root->viewBox; } else { // as a last resort, set size to A4 - ctx->viewport = Geom::Rect::from_xywh(0, 0, 210 * PX_PER_MM, 297 * PX_PER_MM); + ctx->viewport = Geom::Rect::from_xywh(0, 0, 210 * Inkscape::Util::Quantity::convert(1, "mm", "px"), 297 * Inkscape::Util::Quantity::convert(1, "mm", "px")); } ctx->i2vp = Geom::identity(); } diff --git a/src/document.h b/src/document.h index d49067250..6782c6206 100644 --- a/src/document.h +++ b/src/document.h @@ -35,7 +35,6 @@ class SPItem; class SPObject; struct SPGroup; struct SPRoot; -struct SPUnit; namespace Inkscape { struct Application; @@ -47,6 +46,9 @@ namespace Inkscape { struct Document; class Node; } + namespace Util { + class Quantity; + } } class SPDefs; @@ -229,8 +231,8 @@ public: gdouble getHeight() const; Geom::Point getDimensions() const; Geom::OptRect preferredBounds() const; - void setWidth(gdouble width, const SPUnit *unit); - void setHeight(gdouble height, const SPUnit *unit); + void setWidth(const Inkscape::Util::Quantity &width); + void setHeight(const Inkscape::Util::Quantity &height); void requestModified(); gint ensureUpToDate(); bool addResource(const gchar *key, SPObject *object); @@ -254,8 +256,6 @@ private: void setupViewport(SPItemCtx *ctx); }; -struct SPUnit; - /* * Ideas: How to overcome style invalidation nightmare * diff --git a/src/dom/CMakeLists.txt b/src/dom/CMakeLists.txt index 74832a6f5..7c49466c2 100644 --- a/src/dom/CMakeLists.txt +++ b/src/dom/CMakeLists.txt @@ -20,7 +20,6 @@ set(dom_SRC io/domstream.cpp - util/digest.cpp util/ziptool.cpp @@ -57,7 +56,6 @@ set(dom_SRC io/domstream.h - util/digest.h util/ziptool.h ) diff --git a/src/dom/Makefile_insert b/src/dom/Makefile_insert index 4ed529a35..25629efb2 100644 --- a/src/dom/Makefile_insert +++ b/src/dom/Makefile_insert @@ -52,8 +52,6 @@ dom_libdom_a_SOURCES = \ dom/xpathtoken.cpp \ dom/io/domstream.cpp \ dom/io/domstream.h \ - dom/util/digest.h \ - dom/util/digest.cpp \ dom/util/ziptool.h \ dom/util/ziptool.cpp diff --git a/src/dom/cssreader.cpp b/src/dom/cssreader.cpp index db114ed8d..93473b229 100644 --- a/src/dom/cssreader.cpp +++ b/src/dom/cssreader.cpp @@ -393,7 +393,6 @@ int CssReader::getStyleSheet(int p0) { int p = p0; int p2 = p; - XMLCh ch; //# CHARSET 0 or 1 if (match(p, "@charset")) @@ -408,7 +407,7 @@ int CssReader::getStyleSheet(int p0) return -1; } p = skipwhite(p2); - ch = get(p); + XMLCh ch = get(p); if (ch !=';') { error("';' required after @charset declaration"); @@ -665,7 +664,7 @@ int CssReader::getPage(int p0) while (true) { p = skipwhite(p2); - ch = get(p); + XMLCh ch = get(p); if (ch != ';') break; p++; @@ -1249,7 +1248,7 @@ int CssReader::getTerm(int p0) { int p = p0; p = skipwhite(p); - int unitType = CSSPrimitiveValue::CSS_UNKNOWN; + int unitType = CSSPrimitiveValue::CSS_UNKNOWN; /// \fixme Why is this variable never used? //# Unary operator XMLCh ch = get(p); bool hasUnary = false; diff --git a/src/dom/util/digest.cpp b/src/dom/util/digest.cpp deleted file mode 100644 index 2baed4860..000000000 --- a/src/dom/util/digest.cpp +++ /dev/null @@ -1,1456 +0,0 @@ -/* - * Secure Hashing Tool - * * - * Authors: - * Bob Jamison - * - * Copyright (C) 2006-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#include "digest.h" - - -//######################################################################## -//## U T I L I T Y -//######################################################################## - -/** - * Use this to print out a 64-bit int when otherwise difficult - */ -/* -static void pl(uint64_t val) -{ - for (int shift=56 ; shift>=0 ; shift-=8) - { - int ch = (val >> shift) & 0xff; - printf("%02x", ch); - } -} -*/ - - - -/** - * 3These truncate their arguments to - * unsigned 32-bit or unsigned 64-bit. - */ -#define TR32(x) ((x) & 0xffffffffL) -#define TR64(x) ((x) & 0xffffffffffffffffLL) - - -static const char *hexDigits = "0123456789abcdef"; - -static std::string toHex(const std::vector<unsigned char> &bytes) -{ - std::string str; - std::vector<unsigned char>::const_iterator iter; - for (iter = bytes.begin() ; iter != bytes.end() ; ++iter) - { - unsigned char ch = *iter; - str.push_back(hexDigits[(ch>>4) & 0x0f]); - str.push_back(hexDigits[(ch ) & 0x0f]); - } - return str; -} - - -//######################################################################## -//## D I G E S T -//######################################################################## - - -/** - * - */ -std::string Digest::finishHex() -{ - std::vector<unsigned char> hash = finish(); - std::string str = toHex(hash); - return str; -} - -/** - * Convenience method. This is a simple way of getting a hash - */ -std::vector<unsigned char> Digest::hash(Digest::HashType typ, - unsigned char *buf, - int len) -{ - std::vector<unsigned char> ret; - switch (typ) - { - case HASH_MD5: - { - Md5 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - case HASH_SHA1: - { - Sha1 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - case HASH_SHA224: - { - Sha224 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - case HASH_SHA256: - { - Sha256 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - case HASH_SHA384: - { - Sha384 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - case HASH_SHA512: - { - Sha512 digest; - digest.append(buf, len); - ret = digest.finish(); - break; - } - default: - { - break; - } - } - return ret; -} - - -/** - * Convenience method. Same as above, but for a std::string - */ -std::vector<unsigned char> Digest::hash(Digest::HashType typ, - const std::string &str) -{ - return hash(typ, (unsigned char *)str.c_str(), str.size()); -} - -/** - * Convenience method. Return a hexidecimal string of the hash of the buffer. - */ -std::string Digest::hashHex(Digest::HashType typ, - unsigned char *buf, - int len) -{ - std::vector<unsigned char> dig = hash(typ, buf, len); - return toHex(dig); -} - -/** - * Convenience method. Return a hexidecimal string of the hash of the - * string argument - */ -std::string Digest::hashHex(Digest::HashType typ, - const std::string &str) -{ - std::vector<unsigned char> dig = hash(typ, str); - return toHex(dig); -} - - - -//4.1.1 and 4.1.2 -#define SHA_ROTL(X,n) ((((X) << (n)) & 0xffffffffL) | (((X) >> (32-(n))) & 0xffffffffL)) -#define SHA_Ch(x,y,z) ((z)^((x)&((y)^(z)))) -#define SHA_Maj(x,y,z) (((x)&(y))^((z)&((x)^(y)))) - - -//######################################################################## -//## S H A 1 -//######################################################################## - - -/** - * - */ -void Sha1::reset() -{ - longNr = 0; - byteNr = 0; - - // Initialize H with the magic constants (see FIPS180 for constants) - hashBuf[0] = 0x67452301L; - hashBuf[1] = 0xefcdab89L; - hashBuf[2] = 0x98badcfeL; - hashBuf[3] = 0x10325476L; - hashBuf[4] = 0xc3d2e1f0L; - - for (int i = 0; i < 4; i++) - inb[i] = 0; - - for (int i = 0; i < 80; i++) - inBuf[i] = 0; - - clearByteCount(); -} - - -/** - * - */ -void Sha1::update(unsigned char ch) -{ - incByteCount(); - - inb[byteNr++] = (uint32_t)ch; - if (byteNr >= 4) - { - inBuf[longNr++] = inb[0] << 24 | inb[1] << 16 | - inb[2] << 8 | inb[3]; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - -void Sha1::transform() -{ - uint32_t *W = inBuf; - uint32_t *H = hashBuf; - - //for (int t = 0; t < 16 ; t++) - // printf("%2d %08lx\n", t, W[t]); - - //see 6.1.2 - for (int t = 16; t < 80 ; t++) - W[t] = SHA_ROTL((W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16]), 1); - - uint32_t a = H[0]; - uint32_t b = H[1]; - uint32_t c = H[2]; - uint32_t d = H[3]; - uint32_t e = H[4]; - - uint32_t T; - - int t = 0; - for ( ; t < 20 ; t++) - { - //see 4.1.1 for the boolops on B,C, and D - T = TR32(SHA_ROTL(a,5) + ((b&c)|((~b)&d)) + //Ch(b,c,d)) - e + 0x5a827999L + W[t]); - e = d; d = c; c = SHA_ROTL(b, 30); b = a; a = T; - //printf("%2d %08lx %08lx %08lx %08lx %08lx\n", t, a, b, c, d, e); - } - for ( ; t < 40 ; t++) - { - T = TR32(SHA_ROTL(a,5) + (b^c^d) + e + 0x6ed9eba1L + W[t]); - e = d; d = c; c = SHA_ROTL(b, 30); b = a; a = T; - //printf("%2d %08lx %08lx %08lx %08lx %08lx\n", t, a, b, c, d, e); - } - for ( ; t < 60 ; t++) - { - T = TR32(SHA_ROTL(a,5) + ((b&c)^(b&d)^(c&d)) + - e + 0x8f1bbcdcL + W[t]); - e = d; d = c; c = SHA_ROTL(b, 30); b = a; a = T; - //printf("%2d %08lx %08lx %08lx %08lx %08lx\n", t, a, b, c, d, e); - } - for ( ; t < 80 ; t++) - { - T = TR32(SHA_ROTL(a,5) + (b^c^d) + - e + 0xca62c1d6L + W[t]); - e = d; d = c; c = SHA_ROTL(b, 30); b = a; a = T; - //printf("%2d %08lx %08lx %08lx %08lx %08lx\n", t, a, b, c, d, e); - } - - H[0] = TR32(H[0] + a); - H[1] = TR32(H[1] + b); - H[2] = TR32(H[2] + c); - H[3] = TR32(H[3] + d); - H[4] = TR32(H[4] + e); -} - - - - -/** - * - */ -std::vector<unsigned char> Sha1::finish() -{ - //snapshot the bit count now before padding - getBitCount(); - - //Append terminal char - update(0x80); - - //pad until we have a 56 of 64 bytes, allowing for 8 bytes at the end - while ((nrBytes & 63) != 56) - update(0); - - //##### Append length in bits - appendBitCount(); - - //copy out answer - std::vector<unsigned char> res; - for (int i=0 ; i<5 ; i++) - { - res.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - } - - // Re-initialize the context (also zeroizes contents) - reset(); - - return res; -} - - - - -//######################################################################## -//## SHA224 -//######################################################################## - - -/** - * SHA-224 and SHA-512 share the same operations and constants - */ - -#define SHA_Rot32(x,s) ((((x) >> s)&0xffffffffL) | (((x) << (32 - s))&0xffffffffL)) -#define SHA_SIGMA0(x) (SHA_Rot32(x, 2) ^ SHA_Rot32(x, 13) ^ SHA_Rot32(x, 22)) -#define SHA_SIGMA1(x) (SHA_Rot32(x, 6) ^ SHA_Rot32(x, 11) ^ SHA_Rot32(x, 25)) -#define SHA_sigma0(x) (SHA_Rot32(x, 7) ^ SHA_Rot32(x, 18) ^ ((x) >> 3)) -#define SHA_sigma1(x) (SHA_Rot32(x, 17) ^ SHA_Rot32(x, 19) ^ ((x) >> 10)) - - -static uint32_t sha256table[64] = -{ - 0x428a2f98UL, 0x71374491UL, 0xb5c0fbcfUL, 0xe9b5dba5UL, - 0x3956c25bUL, 0x59f111f1UL, 0x923f82a4UL, 0xab1c5ed5UL, - 0xd807aa98UL, 0x12835b01UL, 0x243185beUL, 0x550c7dc3UL, - 0x72be5d74UL, 0x80deb1feUL, 0x9bdc06a7UL, 0xc19bf174UL, - 0xe49b69c1UL, 0xefbe4786UL, 0x0fc19dc6UL, 0x240ca1ccUL, - 0x2de92c6fUL, 0x4a7484aaUL, 0x5cb0a9dcUL, 0x76f988daUL, - 0x983e5152UL, 0xa831c66dUL, 0xb00327c8UL, 0xbf597fc7UL, - 0xc6e00bf3UL, 0xd5a79147UL, 0x06ca6351UL, 0x14292967UL, - 0x27b70a85UL, 0x2e1b2138UL, 0x4d2c6dfcUL, 0x53380d13UL, - 0x650a7354UL, 0x766a0abbUL, 0x81c2c92eUL, 0x92722c85UL, - 0xa2bfe8a1UL, 0xa81a664bUL, 0xc24b8b70UL, 0xc76c51a3UL, - 0xd192e819UL, 0xd6990624UL, 0xf40e3585UL, 0x106aa070UL, - 0x19a4c116UL, 0x1e376c08UL, 0x2748774cUL, 0x34b0bcb5UL, - 0x391c0cb3UL, 0x4ed8aa4aUL, 0x5b9cca4fUL, 0x682e6ff3UL, - 0x748f82eeUL, 0x78a5636fUL, 0x84c87814UL, 0x8cc70208UL, - 0x90befffaUL, 0xa4506cebUL, 0xbef9a3f7UL, 0xc67178f2UL -}; - - - - - -/** - * - */ -void Sha224::reset() -{ - longNr = 0; - byteNr = 0; - - // Initialize H with the magic constants (see FIPS180 for constants) - hashBuf[0] = 0xc1059ed8L; - hashBuf[1] = 0x367cd507L; - hashBuf[2] = 0x3070dd17L; - hashBuf[3] = 0xf70e5939L; - hashBuf[4] = 0xffc00b31L; - hashBuf[5] = 0x68581511L; - hashBuf[6] = 0x64f98fa7L; - hashBuf[7] = 0xbefa4fa4L; - - for (int i = 0 ; i < 64 ; i++) - inBuf[i] = 0; - - for (int i = 0 ; i < 4 ; i++) - inb[i] = 0; - - clearByteCount(); -} - - -/** - * - */ -void Sha224::update(unsigned char ch) -{ - incByteCount(); - - inb[byteNr++] = (uint32_t)ch; - if (byteNr >= 4) - { - inBuf[longNr++] = inb[0] << 24 | inb[1] << 16 | - inb[2] << 8 | inb[3]; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - -void Sha224::transform() -{ - uint32_t *W = inBuf; - uint32_t *H = hashBuf; - - //for (int t = 0; t < 16 ; t++) - // printf("%2d %08lx\n", t, W[t]); - - //see 6.2.2 - for (int t = 16; t < 64 ; t++) - W[t] = TR32(SHA_sigma1(W[t-2]) + W[t-7] + SHA_sigma0(W[t-15]) + W[t-16]); - - uint32_t a = H[0]; - uint32_t b = H[1]; - uint32_t c = H[2]; - uint32_t d = H[3]; - uint32_t e = H[4]; - uint32_t f = H[5]; - uint32_t g = H[6]; - uint32_t h = H[7]; - - for (int t = 0 ; t < 64 ; t++) - { - //see 4.1.1 for the boolops - uint32_t T1 = TR32(h + SHA_SIGMA1(e) + SHA_Ch(e,f,g) + - sha256table[t] + W[t]); - uint32_t T2 = TR32(SHA_SIGMA0(a) + SHA_Maj(a,b,c)); - h = g; g = f; f = e; e = TR32(d + T1); d = c; c = b; b = a; a = TR32(T1 + T2); - //printf("%2d %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", - // t, a, b, c, d, e, f, g, h); - } - - H[0] = TR32(H[0] + a); - H[1] = TR32(H[1] + b); - H[2] = TR32(H[2] + c); - H[3] = TR32(H[3] + d); - H[4] = TR32(H[4] + e); - H[5] = TR32(H[5] + f); - H[6] = TR32(H[6] + g); - H[7] = TR32(H[7] + h); -} - - - -/** - * - */ -std::vector<unsigned char> Sha224::finish() -{ - //save our size before padding - getBitCount(); - - // Pad with a binary 1 (0x80) - update(0x80); - //append 0's to make a 56-byte buf. - while ((nrBytes & 63) != 56) - update(0); - - //##### Append length in bits - appendBitCount(); - - // Output hash - std::vector<unsigned char> ret; - for (int i = 0 ; i < 7 ; i++) - { - ret.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - } - - // Re-initialize the context (also zeroizes contents) - reset(); - - return ret; - -} - - - -//######################################################################## -//## SHA256 -//######################################################################## - - -/** - * - */ -void Sha256::reset() -{ - longNr = 0; - byteNr = 0; - - // Initialize H with the magic constants (see FIPS180 for constants) - hashBuf[0] = 0x6a09e667L; - hashBuf[1] = 0xbb67ae85L; - hashBuf[2] = 0x3c6ef372L; - hashBuf[3] = 0xa54ff53aL; - hashBuf[4] = 0x510e527fL; - hashBuf[5] = 0x9b05688cL; - hashBuf[6] = 0x1f83d9abL; - hashBuf[7] = 0x5be0cd19L; - - for (int i = 0 ; i < 64 ; i++) - inBuf[i] = 0; - for (int i = 0 ; i < 4 ; i++) - inb[i] = 0; - - clearByteCount(); -} - - -/** - * - */ -void Sha256::update(unsigned char ch) -{ - incByteCount(); - - inb[byteNr++] = (uint32_t)ch; - if (byteNr >= 4) - { - inBuf[longNr++] = inb[0] << 24 | inb[1] << 16 | - inb[2] << 8 | inb[3]; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - - - -void Sha256::transform() -{ - uint32_t *H = hashBuf; - uint32_t *W = inBuf; - - //for (int t = 0; t < 16 ; t++) - // printf("%2d %08lx\n", t, W[t]); - - //see 6.2.2 - for (int t = 16; t < 64 ; t++) - W[t] = TR32(SHA_sigma1(W[t-2]) + W[t-7] + SHA_sigma0(W[t-15]) + W[t-16]); - - uint32_t a = H[0]; - uint32_t b = H[1]; - uint32_t c = H[2]; - uint32_t d = H[3]; - uint32_t e = H[4]; - uint32_t f = H[5]; - uint32_t g = H[6]; - uint32_t h = H[7]; - - for (int t = 0 ; t < 64 ; t++) - { - //see 4.1.1 for the boolops - uint32_t T1 = TR32(h + SHA_SIGMA1(e) + SHA_Ch(e,f,g) + - sha256table[t] + W[t]); - uint32_t T2 = TR32(SHA_SIGMA0(a) + SHA_Maj(a,b,c)); - h = g; g = f; f = e; e = TR32(d + T1); d = c; c = b; b = a; a = TR32(T1 + T2); - //printf("%2d %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", - // t, a, b, c, d, e, f, g, h); - } - - H[0] = TR32(H[0] + a); - H[1] = TR32(H[1] + b); - H[2] = TR32(H[2] + c); - H[3] = TR32(H[3] + d); - H[4] = TR32(H[4] + e); - H[5] = TR32(H[5] + f); - H[6] = TR32(H[6] + g); - H[7] = TR32(H[7] + h); -} - - - -/** - * - */ -std::vector<unsigned char> Sha256::finish() -{ - //save our size before padding - getBitCount(); - - // Pad with a binary 1 (0x80) - update(0x80); - //append 0's to make a 56-byte buf. - while ((nrBytes & 63) != 56) - update(0); - - //##### Append length in bits - appendBitCount(); - - // Output hash - std::vector<unsigned char> ret; - for (int i = 0 ; i < 8 ; i++) - { - ret.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - } - - // Re-initialize the context (also zeroizes contents) - reset(); - - return ret; - -} - - - -//######################################################################## -//## SHA384 -//######################################################################## - - -/** - * SHA-384 and SHA-512 share the same operations and constants - */ - -#undef SHA_SIGMA0 -#undef SHA_SIGMA1 -#undef SHA_sigma0 -#undef SHA_sigma1 - -#define SHA_Rot64(x,s) (((x) >> s) | ((x) << (64 - s))) -#define SHA_SIGMA0(x) (SHA_Rot64(x, 28) ^ SHA_Rot64(x, 34) ^ SHA_Rot64(x, 39)) -#define SHA_SIGMA1(x) (SHA_Rot64(x, 14) ^ SHA_Rot64(x, 18) ^ SHA_Rot64(x, 41)) -#define SHA_sigma0(x) (SHA_Rot64(x, 1) ^ SHA_Rot64(x, 8) ^ ((x) >> 7)) -#define SHA_sigma1(x) (SHA_Rot64(x, 19) ^ SHA_Rot64(x, 61) ^ ((x) >> 6)) - - -static uint64_t sha512table[80] = -{ - 0x428a2f98d728ae22ULL, 0x7137449123ef65cdULL, - 0xb5c0fbcfec4d3b2fULL, 0xe9b5dba58189dbbcULL, - 0x3956c25bf348b538ULL, 0x59f111f1b605d019ULL, - 0x923f82a4af194f9bULL, 0xab1c5ed5da6d8118ULL, - 0xd807aa98a3030242ULL, 0x12835b0145706fbeULL, - 0x243185be4ee4b28cULL, 0x550c7dc3d5ffb4e2ULL, - 0x72be5d74f27b896fULL, 0x80deb1fe3b1696b1ULL, - 0x9bdc06a725c71235ULL, 0xc19bf174cf692694ULL, - 0xe49b69c19ef14ad2ULL, 0xefbe4786384f25e3ULL, - 0x0fc19dc68b8cd5b5ULL, 0x240ca1cc77ac9c65ULL, - 0x2de92c6f592b0275ULL, 0x4a7484aa6ea6e483ULL, - 0x5cb0a9dcbd41fbd4ULL, 0x76f988da831153b5ULL, - 0x983e5152ee66dfabULL, 0xa831c66d2db43210ULL, - 0xb00327c898fb213fULL, 0xbf597fc7beef0ee4ULL, - 0xc6e00bf33da88fc2ULL, 0xd5a79147930aa725ULL, - 0x06ca6351e003826fULL, 0x142929670a0e6e70ULL, - 0x27b70a8546d22ffcULL, 0x2e1b21385c26c926ULL, - 0x4d2c6dfc5ac42aedULL, 0x53380d139d95b3dfULL, - 0x650a73548baf63deULL, 0x766a0abb3c77b2a8ULL, - 0x81c2c92e47edaee6ULL, 0x92722c851482353bULL, - 0xa2bfe8a14cf10364ULL, 0xa81a664bbc423001ULL, - 0xc24b8b70d0f89791ULL, 0xc76c51a30654be30ULL, - 0xd192e819d6ef5218ULL, 0xd69906245565a910ULL, - 0xf40e35855771202aULL, 0x106aa07032bbd1b8ULL, - 0x19a4c116b8d2d0c8ULL, 0x1e376c085141ab53ULL, - 0x2748774cdf8eeb99ULL, 0x34b0bcb5e19b48a8ULL, - 0x391c0cb3c5c95a63ULL, 0x4ed8aa4ae3418acbULL, - 0x5b9cca4f7763e373ULL, 0x682e6ff3d6b2b8a3ULL, - 0x748f82ee5defb2fcULL, 0x78a5636f43172f60ULL, - 0x84c87814a1f0ab72ULL, 0x8cc702081a6439ecULL, - 0x90befffa23631e28ULL, 0xa4506cebde82bde9ULL, - 0xbef9a3f7b2c67915ULL, 0xc67178f2e372532bULL, - 0xca273eceea26619cULL, 0xd186b8c721c0c207ULL, - 0xeada7dd6cde0eb1eULL, 0xf57d4f7fee6ed178ULL, - 0x06f067aa72176fbaULL, 0x0a637dc5a2c898a6ULL, - 0x113f9804bef90daeULL, 0x1b710b35131c471bULL, - 0x28db77f523047d84ULL, 0x32caab7b40c72493ULL, - 0x3c9ebe0a15c9bebcULL, 0x431d67c49c100d4cULL, - 0x4cc5d4becb3e42b6ULL, 0x597f299cfc657e2aULL, - 0x5fcb6fab3ad6faecULL, 0x6c44198c4a475817ULL -}; - - - - -/** - * - */ -void Sha384::reset() -{ - longNr = 0; - byteNr = 0; - - // SHA-384 differs from SHA-512 by these constants - hashBuf[0] = 0xcbbb9d5dc1059ed8ULL; - hashBuf[1] = 0x629a292a367cd507ULL; - hashBuf[2] = 0x9159015a3070dd17ULL; - hashBuf[3] = 0x152fecd8f70e5939ULL; - hashBuf[4] = 0x67332667ffc00b31ULL; - hashBuf[5] = 0x8eb44a8768581511ULL; - hashBuf[6] = 0xdb0c2e0d64f98fa7ULL; - hashBuf[7] = 0x47b5481dbefa4fa4ULL; - - for (int i = 0 ; i < 80 ; i++) - inBuf[i] = 0; - for (int i = 0 ; i < 8 ; i++) - inb[i] = 0; - - clearByteCount(); -} - - -/** - * Note that this version of update() handles 64-bit inBuf - * values. - */ -void Sha384::update(unsigned char ch) -{ - incByteCount(); - - inb[byteNr++] = (uint64_t)ch; - if (byteNr >= 8) - { - inBuf[longNr++] = inb[0] << 56 | inb[1] << 48 | - inb[2] << 40 | inb[3] << 32 | - inb[4] << 24 | inb[5] << 16 | - inb[6] << 8 | inb[7]; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - - - -void Sha384::transform() -{ - uint64_t *H = hashBuf; - uint64_t *W = inBuf; - - /* - for (int t = 0; t < 16 ; t++) - { - printf("%2d ", t); - pl(W[t]); - printf("\n"); - } - */ - - //see 6.2.2 - for (int t = 16; t < 80 ; t++) - W[t] = TR64(SHA_sigma1(W[t-2]) + W[t-7] + SHA_sigma0(W[t-15]) + W[t-16]); - - uint64_t a = H[0]; - uint64_t b = H[1]; - uint64_t c = H[2]; - uint64_t d = H[3]; - uint64_t e = H[4]; - uint64_t f = H[5]; - uint64_t g = H[6]; - uint64_t h = H[7]; - - for (int t = 0 ; t < 80 ; t++) - { - //see 4.1.1 for the boolops - uint64_t T1 = TR64(h + SHA_SIGMA1(e) + SHA_Ch(e,f,g) + - sha512table[t] + W[t]); - uint64_t T2 = TR64(SHA_SIGMA0(a) + SHA_Maj(a,b,c)); - h = g; g = f; f = e; e = TR64(d + T1); d = c; c = b; b = a; a = TR64(T1 + T2); - } - - H[0] = TR64(H[0] + a); - H[1] = TR64(H[1] + b); - H[2] = TR64(H[2] + c); - H[3] = TR64(H[3] + d); - H[4] = TR64(H[4] + e); - H[5] = TR64(H[5] + f); - H[6] = TR64(H[6] + g); - H[7] = TR64(H[7] + h); -} - - - -/** - * - */ -std::vector<unsigned char> Sha384::finish() -{ - //save our size before padding - getBitCount(); - - // Pad with a binary 1 (0x80) - update((unsigned char)0x80); - //append 0's to make a 112-byte buf. - //we will loop around once if already over 112 - while ((nrBytes & 127) != 112) - update(0); - - //append 128-bit size - //64 upper bits - for (int i = 0 ; i < 8 ; i++) - update((unsigned char)0x00); - //64 lower bits - //##### Append length in bits - appendBitCount(); - - // Output hash - //for SHA-384, we use the left-most 6 64-bit words - std::vector<unsigned char> ret; - for (int i = 0 ; i < 6 ; i++) - { - ret.push_back((unsigned char)((hashBuf[i] >> 56) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 48) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 40) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 32) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - } - - // Re-initialize the context (also zeroizes contents) - reset(); - - return ret; - -} - - -//######################################################################## -//## SHA512 -//######################################################################## - - - - - -/** - * - */ -void Sha512::reset() -{ - longNr = 0; - byteNr = 0; - - // Initialize H with the magic constants (see FIPS180 for constants) - hashBuf[0] = 0x6a09e667f3bcc908ULL; - hashBuf[1] = 0xbb67ae8584caa73bULL; - hashBuf[2] = 0x3c6ef372fe94f82bULL; - hashBuf[3] = 0xa54ff53a5f1d36f1ULL; - hashBuf[4] = 0x510e527fade682d1ULL; - hashBuf[5] = 0x9b05688c2b3e6c1fULL; - hashBuf[6] = 0x1f83d9abfb41bd6bULL; - hashBuf[7] = 0x5be0cd19137e2179ULL; - - for (int i = 0 ; i < 80 ; i++) - inBuf[i] = 0; - for (int i = 0 ; i < 8 ; i++) - inb[i] = 0; - - clearByteCount(); -} - - -/** - * Note that this version of update() handles 64-bit inBuf - * values. - */ -void Sha512::update(unsigned char ch) -{ - incByteCount(); - - inb[byteNr++] = (uint64_t)ch; - if (byteNr >= 8) - { - inBuf[longNr++] = inb[0] << 56 | inb[1] << 48 | - inb[2] << 40 | inb[3] << 32 | - inb[4] << 24 | inb[5] << 16 | - inb[6] << 8 | inb[7]; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - - - -void Sha512::transform() -{ - uint64_t *W = inBuf; - uint64_t *H = hashBuf; - - /* - for (int t = 0; t < 16 ; t++) - { - printf("%2d ", t); - pl(W[t]); - printf("\n"); - } - */ - - //see 6.2.2 - for (int t = 16; t < 80 ; t++) - W[t] = TR64(SHA_sigma1(W[t-2]) + W[t-7] + SHA_sigma0(W[t-15]) + W[t-16]); - - uint64_t a = H[0]; - uint64_t b = H[1]; - uint64_t c = H[2]; - uint64_t d = H[3]; - uint64_t e = H[4]; - uint64_t f = H[5]; - uint64_t g = H[6]; - uint64_t h = H[7]; - - for (int t = 0 ; t < 80 ; t++) - { - //see 4.1.1 for the boolops - uint64_t T1 = TR64(h + SHA_SIGMA1(e) + SHA_Ch(e,f,g) + - sha512table[t] + W[t]); - uint64_t T2 = TR64(SHA_SIGMA0(a) + SHA_Maj(a,b,c)); - h = g; g = f; f = e; e = TR64(d + T1); d = c; c = b; b = a; a = TR64(T1 + T2); - } - - H[0] = TR64(H[0] + a); - H[1] = TR64(H[1] + b); - H[2] = TR64(H[2] + c); - H[3] = TR64(H[3] + d); - H[4] = TR64(H[4] + e); - H[5] = TR64(H[5] + f); - H[6] = TR64(H[6] + g); - H[7] = TR64(H[7] + h); -} - - - -/** - * - */ -std::vector<unsigned char> Sha512::finish() -{ - //save our size before padding - getBitCount(); - - // Pad with a binary 1 (0x80) - update(0x80); - //append 0's to make a 112-byte buf. - //we will loop around once if already over 112 - while ((nrBytes & 127) != 112) - update(0); - - //append 128-bit size - //64 upper bits - for (int i = 0 ; i < 8 ; i++) - update((unsigned char)0x00); - //64 lower bits - //##### Append length in bits - appendBitCount(); - - // Output hash - std::vector<unsigned char> ret; - for (int i = 0 ; i < 8 ; i++) - { - ret.push_back((unsigned char)((hashBuf[i] >> 56) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 48) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 40) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 32) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - ret.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - } - - // Re-initialize the context (also zeroizes contents) - reset(); - - return ret; - -} - - - -//######################################################################## -//## M D 5 -//######################################################################## - -/** - * - */ -void Md5::reset() -{ - hashBuf[0] = 0x67452301; - hashBuf[1] = 0xefcdab89; - hashBuf[2] = 0x98badcfe; - hashBuf[3] = 0x10325476; - - for (int i=0 ; i<16 ; i++) - inBuf[i] = 0; - for (int i=0 ; i<4 ; i++) - inb[i] = 0; - - clearByteCount(); - - byteNr = 0; - longNr = 0; -} - - -/** - * - */ -void Md5::update(unsigned char ch) -{ - incByteCount(); - - //pack 64 bytes into 16 longs - inb[byteNr++] = (uint32_t)ch; - if (byteNr >= 4) - { - //note the little-endianness - uint32_t val = - inb[3] << 24 | inb[2] << 16 | inb[1] << 8 | inb[0]; - inBuf[longNr++] = val; - byteNr = 0; - } - if (longNr >= 16) - { - transform(); - longNr = 0; - } -} - - - -//# The four core functions - F1 is optimized somewhat - -// #define F1(x, y, z) (x & y | ~x & z) -#define F1(x, y, z) (z ^ (x & (y ^ z))) -#define F2(x, y, z) F1(z, x, y) -#define F3(x, y, z) (x ^ y ^ z) -#define F4(x, y, z) (y ^ (x | ~z)) - -// ## This is the central step in the MD5 algorithm. -#define MD5STEP(f, w, x, y, z, data, s) \ - ( w = TR32(w + (f(x, y, z) + data)), w = w<<s | w>>(32-s), w = TR32(w + x) ) - -/* - * The core of the MD5 algorithm, this alters an existing MD5 hash to - * reflect the addition of 16 longwords of new data. MD5Update blocks - * the data and converts bytes into longwords for this routine. - * @parm buf points to an array of 4 unsigned 32bit (at least) integers - * @parm in points to an array of 16 unsigned 32bit (at least) integers - */ -void Md5::transform() -{ - uint32_t *i = inBuf; - uint32_t a = hashBuf[0]; - uint32_t b = hashBuf[1]; - uint32_t c = hashBuf[2]; - uint32_t d = hashBuf[3]; - - MD5STEP(F1, a, b, c, d, i[ 0] + 0xd76aa478, 7); - MD5STEP(F1, d, a, b, c, i[ 1] + 0xe8c7b756, 12); - MD5STEP(F1, c, d, a, b, i[ 2] + 0x242070db, 17); - MD5STEP(F1, b, c, d, a, i[ 3] + 0xc1bdceee, 22); - MD5STEP(F1, a, b, c, d, i[ 4] + 0xf57c0faf, 7); - MD5STEP(F1, d, a, b, c, i[ 5] + 0x4787c62a, 12); - MD5STEP(F1, c, d, a, b, i[ 6] + 0xa8304613, 17); - MD5STEP(F1, b, c, d, a, i[ 7] + 0xfd469501, 22); - MD5STEP(F1, a, b, c, d, i[ 8] + 0x698098d8, 7); - MD5STEP(F1, d, a, b, c, i[ 9] + 0x8b44f7af, 12); - MD5STEP(F1, c, d, a, b, i[10] + 0xffff5bb1, 17); - MD5STEP(F1, b, c, d, a, i[11] + 0x895cd7be, 22); - MD5STEP(F1, a, b, c, d, i[12] + 0x6b901122, 7); - MD5STEP(F1, d, a, b, c, i[13] + 0xfd987193, 12); - MD5STEP(F1, c, d, a, b, i[14] + 0xa679438e, 17); - MD5STEP(F1, b, c, d, a, i[15] + 0x49b40821, 22); - - MD5STEP(F2, a, b, c, d, i[ 1] + 0xf61e2562, 5); - MD5STEP(F2, d, a, b, c, i[ 6] + 0xc040b340, 9); - MD5STEP(F2, c, d, a, b, i[11] + 0x265e5a51, 14); - MD5STEP(F2, b, c, d, a, i[ 0] + 0xe9b6c7aa, 20); - MD5STEP(F2, a, b, c, d, i[ 5] + 0xd62f105d, 5); - MD5STEP(F2, d, a, b, c, i[10] + 0x02441453, 9); - MD5STEP(F2, c, d, a, b, i[15] + 0xd8a1e681, 14); - MD5STEP(F2, b, c, d, a, i[ 4] + 0xe7d3fbc8, 20); - MD5STEP(F2, a, b, c, d, i[ 9] + 0x21e1cde6, 5); - MD5STEP(F2, d, a, b, c, i[14] + 0xc33707d6, 9); - MD5STEP(F2, c, d, a, b, i[ 3] + 0xf4d50d87, 14); - MD5STEP(F2, b, c, d, a, i[ 8] + 0x455a14ed, 20); - MD5STEP(F2, a, b, c, d, i[13] + 0xa9e3e905, 5); - MD5STEP(F2, d, a, b, c, i[ 2] + 0xfcefa3f8, 9); - MD5STEP(F2, c, d, a, b, i[ 7] + 0x676f02d9, 14); - MD5STEP(F2, b, c, d, a, i[12] + 0x8d2a4c8a, 20); - - MD5STEP(F3, a, b, c, d, i[ 5] + 0xfffa3942, 4); - MD5STEP(F3, d, a, b, c, i[ 8] + 0x8771f681, 11); - MD5STEP(F3, c, d, a, b, i[11] + 0x6d9d6122, 16); - MD5STEP(F3, b, c, d, a, i[14] + 0xfde5380c, 23); - MD5STEP(F3, a, b, c, d, i[ 1] + 0xa4beea44, 4); - MD5STEP(F3, d, a, b, c, i[ 4] + 0x4bdecfa9, 11); - MD5STEP(F3, c, d, a, b, i[ 7] + 0xf6bb4b60, 16); - MD5STEP(F3, b, c, d, a, i[10] + 0xbebfbc70, 23); - MD5STEP(F3, a, b, c, d, i[13] + 0x289b7ec6, 4); - MD5STEP(F3, d, a, b, c, i[ 0] + 0xeaa127fa, 11); - MD5STEP(F3, c, d, a, b, i[ 3] + 0xd4ef3085, 16); - MD5STEP(F3, b, c, d, a, i[ 6] + 0x04881d05, 23); - MD5STEP(F3, a, b, c, d, i[ 9] + 0xd9d4d039, 4); - MD5STEP(F3, d, a, b, c, i[12] + 0xe6db99e5, 11); - MD5STEP(F3, c, d, a, b, i[15] + 0x1fa27cf8, 16); - MD5STEP(F3, b, c, d, a, i[ 2] + 0xc4ac5665, 23); - - MD5STEP(F4, a, b, c, d, i[ 0] + 0xf4292244, 6); - MD5STEP(F4, d, a, b, c, i[ 7] + 0x432aff97, 10); - MD5STEP(F4, c, d, a, b, i[14] + 0xab9423a7, 15); - MD5STEP(F4, b, c, d, a, i[ 5] + 0xfc93a039, 21); - MD5STEP(F4, a, b, c, d, i[12] + 0x655b59c3, 6); - MD5STEP(F4, d, a, b, c, i[ 3] + 0x8f0ccc92, 10); - MD5STEP(F4, c, d, a, b, i[10] + 0xffeff47d, 15); - MD5STEP(F4, b, c, d, a, i[ 1] + 0x85845dd1, 21); - MD5STEP(F4, a, b, c, d, i[ 8] + 0x6fa87e4f, 6); - MD5STEP(F4, d, a, b, c, i[15] + 0xfe2ce6e0, 10); - MD5STEP(F4, c, d, a, b, i[ 6] + 0xa3014314, 15); - MD5STEP(F4, b, c, d, a, i[13] + 0x4e0811a1, 21); - MD5STEP(F4, a, b, c, d, i[ 4] + 0xf7537e82, 6); - MD5STEP(F4, d, a, b, c, i[11] + 0xbd3af235, 10); - MD5STEP(F4, c, d, a, b, i[ 2] + 0x2ad7d2bb, 15); - MD5STEP(F4, b, c, d, a, i[ 9] + 0xeb86d391, 21); - - hashBuf[0] = TR32(hashBuf[0] + a); - hashBuf[1] = TR32(hashBuf[1] + b); - hashBuf[2] = TR32(hashBuf[2] + c); - hashBuf[3] = TR32(hashBuf[3] + d); -} - - -/** - * - */ -std::vector<unsigned char> Md5::finish() -{ - //snapshot the bit count now before padding - getBitCount(); - - //Append terminal char - update(0x80); - - //pad until we have a 56 of 64 bytes, allowing for 8 bytes at the end - while (longNr != 14) - update(0); - - //##### Append length in bits - // Don't use appendBitCount(), since md5 is little-endian - update((unsigned char)((nrBits ) & 0xff)); - update((unsigned char)((nrBits>> 8) & 0xff)); - update((unsigned char)((nrBits>>16) & 0xff)); - update((unsigned char)((nrBits>>24) & 0xff)); - update((unsigned char)((nrBits>>32) & 0xff)); - update((unsigned char)((nrBits>>40) & 0xff)); - update((unsigned char)((nrBits>>48) & 0xff)); - update((unsigned char)((nrBits>>56) & 0xff)); - - //copy out answer - std::vector<unsigned char> res; - for (int i=0 ; i<4 ; i++) - { - //note the little-endianness - res.push_back((unsigned char)((hashBuf[i] ) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] >> 8) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] >> 16) & 0xff)); - res.push_back((unsigned char)((hashBuf[i] >> 24) & 0xff)); - } - - reset(); // Security! ;-) - - return res; -} - - - - - - -//######################################################################## -//## T E S T S -//######################################################################## - -/** - * Compile this file alone with -DDIGEST_TEST to run the - * tests below: - * > gcc -DDIGEST_TEST digest.cpp -o testdigest - * > testdigest - * - * If you add any new algorithms to this suite, then it is highly - * recommended that you add it to these tests and run it. - */ - -#ifdef DIGEST_TEST - - -typedef struct -{ - const char *msg; - const char *val; -} TestPair; - -static TestPair md5tests[] = -{ - { - "", - "d41d8cd98f00b204e9800998ecf8427e" - }, - { - "a", - "0cc175b9c0f1b6a831c399e269772661" - }, - { - "abc", - "900150983cd24fb0d6963f7d28e17f72" - }, - { - "message digest", - "f96b697d7cb7938d525a2f31aaf161d0" - }, - { - "abcdefghijklmnopqrstuvwxyz", - "c3fcd3d76192e4007dfb496cca67e13b" - }, - { - "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", - "d174ab98d277d9f5a5611c2c9f419d9f" - }, - { - "12345678901234567890123456789012345678901234567890123456789012345678901234567890", - "57edf4a22be3c955ac49da2e2107b67a" - }, - { - NULL, - NULL - } -}; - - - -static TestPair sha1tests[] = -{ - { - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "84983e441c3bd26ebaae4aa1f95129e5e54670f1" - }, - { - NULL, - NULL - } -}; - -static TestPair sha224tests[] = -{ - { - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "75388b16512776cc5dba5da1fd890150b0c6455cb4f58b1952522525" - }, - { - NULL, - NULL - } -}; - -static TestPair sha256tests[] = -{ - { - "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq", - "248d6a61d20638b8e5c026930c3e6039a33ce45964ff2167f6ecedd419db06c1" - }, - { - NULL, - NULL - } -}; - -static TestPair sha384tests[] = -{ - { - "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" - "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", - "09330c33f71147e83d192fc782cd1b4753111b173b3b05d22fa08086e3b0f712" - "fcc7c71a557e2db966c3e9fa91746039" - }, - { - NULL, - NULL - } -}; - -static TestPair sha512tests[] = -{ - { - "abcdefghbcdefghicdefghijdefghijkefghijklfghijklmghijklmn" - "hijklmnoijklmnopjklmnopqklmnopqrlmnopqrsmnopqrstnopqrstu", - "8e959b75dae313da8cf4f72814fc143f8f7779c6eb9f7fa17299aeadb6889018" - "501d289e4900f7e4331b99dec4b5433ac7d329eeb6dd26545e96e55b874be909" - }, - { - NULL, - NULL - } -}; - - -bool hashTests(Digest &digest, TestPair *tp) -{ - for (TestPair *pair = tp ; pair->msg ; pair++) - { - digest.reset(); - std::string msg = pair->msg; - std::string val = pair->val; - digest.append(msg); - std::string res = digest.finishHex(); - printf("### Msg '%s':\n hash '%s'\n exp '%s'\n", - msg.c_str(), res.c_str(), val.c_str()); - if (res != val) - { - printf("ERROR: Hash mismatch\n"); - return false; - } - } - return true; -} - - -bool millionATest(Digest &digest, const std::string &exp) -{ - digest.reset(); - for (int i=0 ; i<1000000 ; i++) - digest.append('a'); - std::string res = digest.finishHex(); - printf("\nHash of 1,000,000 'a'\n calc %s\n exp %s\n", - res.c_str(), exp.c_str()); - if (res != exp) - { - printf("ERROR: Mismatch.\n"); - return false; - } - return true; -} - -static bool doTests() -{ - printf("##########################################\n"); - printf("## MD5\n"); - printf("##########################################\n"); - Md5 md5; - if (!hashTests(md5, md5tests)) - return false; - if (!millionATest(md5, "7707d6ae4e027c70eea2a935c2296f21")) - return false; - printf("\n\n\n"); - printf("##########################################\n"); - printf("## SHA1\n"); - printf("##########################################\n"); - Sha1 sha1; - if (!hashTests(sha1, sha1tests)) - return false; - if (!millionATest(sha1, "34aa973cd4c4daa4f61eeb2bdbad27316534016f")) - return false; - printf("\n\n\n"); - printf("##########################################\n"); - printf("## SHA224\n"); - printf("##########################################\n"); - Sha224 sha224; - if (!hashTests(sha224, sha224tests)) - return false; - if (!millionATest(sha224, - "20794655980c91d8bbb4c1ea97618a4bf03f42581948b2ee4ee7ad67")) - return false; - printf("\n\n\n"); - printf("##########################################\n"); - printf("## SHA256\n"); - printf("##########################################\n"); - Sha256 sha256; - if (!hashTests(sha256, sha256tests)) - return false; - if (!millionATest(sha256, - "cdc76e5c9914fb9281a1c7e284d73e67f1809a48a497200e046d39ccc7112cd0")) - return false; - printf("\n\n\n"); - printf("##########################################\n"); - printf("## SHA384\n"); - printf("##########################################\n"); - Sha384 sha384; - if (!hashTests(sha384, sha384tests)) - return false; - /**/ - if (!millionATest(sha384, - "9d0e1809716474cb086e834e310a4a1ced149e9c00f248527972cec5704c2a5b" - "07b8b3dc38ecc4ebae97ddd87f3d8985")) - return false; - /**/ - printf("\n\n\n"); - printf("##########################################\n"); - printf("## SHA512\n"); - printf("##########################################\n"); - Sha512 sha512; - if (!hashTests(sha512, sha512tests)) - return false; - if (!millionATest(sha512, - "e718483d0ce769644e2e42c7bc15b4638e1f98b13b2044285632a803afa973eb" - "de0ff244877ea60a4cb0432ce577c31beb009c5c2c49aa2e4eadb217ad8cc09b")) - return false; - return true; -} - - -int main(int argc, char **argv) -{ - doTests(); - printf("####### done ########\n"); - return 0; -} - - -#endif /* DIGEST_TEST */ - -//######################################################################## -//## E N D O F F I L E -//######################################################################## diff --git a/src/dom/util/digest.h b/src/dom/util/digest.h deleted file mode 100644 index c161b86bb..000000000 --- a/src/dom/util/digest.h +++ /dev/null @@ -1,654 +0,0 @@ -#ifndef SEEN_DIGEST_H -#define SEEN_DIGEST_H -/* - * - * Author: - * Bob Jamison - * - * Copyright (C) 2006-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - -/** - * @file - * This base class and its subclasses provide an easy API for providing - * several different types of secure hashing functions for whatever use - * a developer might need. This is not intended as a high-performance - * replacement for the fine implementations already available. Rather, it - * is a small and simple (and maybe a bit slow?) tool for moderate common - * hashing requirements, like for communications and authentication. - * - * These hashes are intended to be simple to use. For example: - * Sha256 digest; - * digest.append("The quick brown dog"); - * std::string result = digest.finishHex(); - * - * Or, use one of the static convenience methods: - * - * example: std::string digest = - * Digest::hashHex(Digest::HASH_XXX, str); - * - * ...where HASH_XXX represents one of the hash - * algorithms listed in HashType. - * - * There are several forms of append() for convenience. - * finish() and finishHex() call reset() for both security and - * to prepare for the next use. - * - * - * Much effort has been applied to make this code portable, and it - * has been tested on various 32- and 64-bit machines. If you - * add another algorithm, please test it likewise. - * - * - * The SHA algorithms are derived directly from FIPS-180-3. The - * SHA tests at the bottom of digest.cpp are also directly from - * that document. - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - * - * The MD5 algorithm is from RFC 1321 - * - * To run the tests, compile standalone with -DDIGEST_TEST. Example: - * - * g++ -DDIGEST_TEST digest.cpp -o testdigest - * or - * g++ -DDIGEST_TEST -m64 digest.cpp -o testdigest - * - */ - -#include <vector> -#include <string> - -#include <stdint.h> - - - -/** - * Base class. Do not use instantiate class directly. Rather, use of of the - * subclasses below, or call one of this class's static convenience methods. - * - * For all subclasses, overload reset(), update(unsigned char), - * transform(), and finish() - */ -class Digest -{ -public: - - /** - * Different types of hash algorithms. - */ - typedef enum - { - HASH_NONE, - HASH_SHA1, - HASH_SHA224, - HASH_SHA256, - HASH_SHA384, - HASH_SHA512, - HASH_MD5 - } HashType; - - /** - * Constructor, with no type - */ - Digest() : hashType(HASH_NONE) - { reset(); } - - /** - * Destructor - */ - virtual ~Digest() - { reset(); } - - /** - * Return one of the enumerated hash types above - */ - virtual int getType() - { return hashType; } - - /** - * Append a single byte to the hash - */ - void append(unsigned char ch) - { update(ch); } - - /** - * Append a string to the hash - */ - virtual void append(const std::string &str) - { - for (unsigned int i=0 ; i<str.size() ; i++) - update((unsigned char)str[i]); - } - - /** - * Append a byte buffer to the hash - */ - virtual void append(unsigned char *buf, int len) - { - for (int i=0 ; i<len ; i++) - update(buf[i]); - } - - /** - * Append a byte vector to the hash - */ - virtual void append(const std::vector<unsigned char> &buf) - { //NOTE: function seems to be unused - for (unsigned int i=0 ; i<buf.size() ; i++) - update(buf[i]); - } - - /** - * Finish the hash and return a hexidecimal version of the computed - * value - */ - virtual std::string finishHex(); - - /** - * Initialize the fields of this hash engine to its starting values. - * Overload this in every subclass - */ - virtual void reset() - { clearByteCount(); } - - /** - * Finish the hash and return its computed value - * Overload this in every subclass - */ - virtual std::vector<unsigned char> finish() - { - std::vector<unsigned char> ret; - return ret; - } - - - //######################## - //# Convenience methods - //######################## - - /** - * Convenience method. This is a simple way of getting a hash. - * Returns a byte buffer with the digest output. - * call with: std::vector<unsigned char> digest = - * Digest::hash(Digest::HASH_XXX, buf, len); - */ - static std::vector<unsigned char> hash(HashType typ, - unsigned char *buf, - int len); - /** - * Convenience method. This is a simple way of getting a hash. - * Returns a byte buffer with the digest output. - * call with: std::vector<unsigned char> digest = - * Digest::hash(Digest::HASH_XXX, str); - */ - static std::vector<unsigned char> hash(HashType typ, - const std::string &str); - - /** - * Convenience method. This is a simple way of getting a hash. - * Returns a string with the hexidecimal form of the digest output. - * call with: std::string digest = - * Digest::hash(Digest::HASH_XXX, buf, len); - */ - static std::string hashHex(HashType typ, - unsigned char *buf, - int len); - /** - * Convenience method. This is a simple way of getting a hash. - * Returns a string with the hexidecimal form of the digest output. - * call with: std::string digest = - * Digest::hash(Digest::HASH_XXX, str); - */ - static std::string hashHex(HashType typ, - const std::string &str); - -protected: - - /** - * Update the hash with a given byte - * Overload this in every subclass - */ - virtual void update(unsigned char /*ch*/) - {} - - /** - * Perform the particular block hashing algorithm for a - * particular type of hash. - * Overload this in every subclass - */ - virtual void transform() - {} - - - /** - * The enumerated type of the hash - */ - int hashType; - - /** - * Increment the count of bytes processed so far. Should be called - * in update() - */ - void incByteCount() - { - nrBytes++; - } - - /** - * Clear the byte / bit count information. Both for processing - * another message, also for security. Should be called in reset() - */ - void clearByteCount() - { - nrBytes = nrBits = 0; - } - - /** - * Calculates the bit count from the current byte count. Should be called - * in finish(), before any padding is added. This basically does a - * snapshot of the bitcount value before the padding. - */ - void getBitCount() - { - nrBits = (nrBytes << 3) & 0xFFFFFFFFFFFFFFFFLL; - } - - /** - * Common code for appending the 64-bit bitcount to the end of the - * message, after the padding. Should be called after padding, just - * before outputting the result. - */ - void appendBitCount() - { - update((unsigned char)((nrBits>>56) & 0xff)); - update((unsigned char)((nrBits>>48) & 0xff)); - update((unsigned char)((nrBits>>40) & 0xff)); - update((unsigned char)((nrBits>>32) & 0xff)); - update((unsigned char)((nrBits>>24) & 0xff)); - update((unsigned char)((nrBits>>16) & 0xff)); - update((unsigned char)((nrBits>> 8) & 0xff)); - update((unsigned char)((nrBits ) & 0xff)); - } - - /** - * Bit and byte counts - */ - uint64_t nrBytes; - uint64_t nrBits; -}; - - - - - -/** - * SHA-1, - * Section 6.1, SECURE HASH STANDARD - * Federal Information Processing Standards Publication 180-2 - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - */ -class Sha1 : public Digest -{ -public: - - /** - * Constructor - */ - Sha1() - { hashType = HASH_SHA1; reset(); } - - /** - * Destructor - */ - virtual ~Sha1() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - -private: - - uint32_t hashBuf[5]; - uint32_t inBuf[80]; - - int longNr; - int byteNr; - uint32_t inb[4]; - -}; - - - - - - -/** - * SHA-224, - * Section 6.1, SECURE HASH STANDARD - * Federal Information Processing Standards Publication 180-2 - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - */ -class Sha224 : public Digest -{ -public: - - /** - * Constructor - */ - Sha224() - { hashType = HASH_SHA224; reset(); } - - /** - * Destructor - */ - virtual ~Sha224() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - -private: - - uint32_t hashBuf[8]; - uint32_t inBuf[64]; - int longNr; - int byteNr; - uint32_t inb[4]; - -}; - - - -/** - * SHA-256, - * Section 6.1, SECURE HASH STANDARD - * Federal Information Processing Standards Publication 180-2 - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - */ -class Sha256 : public Digest -{ -public: - - /** - * Constructor - */ - Sha256() - { hashType = HASH_SHA256; reset(); } - - /** - * Destructor - */ - virtual ~Sha256() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - -private: - - uint32_t hashBuf[8]; - uint32_t inBuf[64]; - int longNr; - int byteNr; - uint32_t inb[4]; - -}; - - - -/** - * SHA-384, - * Section 6.1, SECURE HASH STANDARD - * Federal Information Processing Standards Publication 180-2 - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - */ -class Sha384 : public Digest -{ -public: - - /** - * Constructor - */ - Sha384() - { hashType = HASH_SHA384; reset(); } - - /** - * Destructor - */ - virtual ~Sha384() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - - - -private: - - uint64_t hashBuf[8]; - uint64_t inBuf[80]; - int longNr; - int byteNr; - uint64_t inb[8]; - -}; - - - - -/** - * SHA-512, - * Section 6.1, SECURE HASH STANDARD - * Federal Information Processing Standards Publication 180-2 - * http://csrc.nist.gov/publications/drafts/fips_180-3/draft_fips-180-3_June-08-2007.pdf - */ -class Sha512 : public Digest -{ -public: - - /** - * Constructor - */ - Sha512() - { hashType = HASH_SHA512; reset(); } - - /** - * Destructor - */ - virtual ~Sha512() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - -private: - - uint64_t hashBuf[8]; - uint64_t inBuf[80]; - int longNr; - int byteNr; - uint64_t inb[8]; - -}; - - - - - - - - - -/** - * IETF RFC 1321, MD5 Specification - * http://www.ietf.org/rfc/rfc1321.txt - */ -class Md5 : public Digest -{ -public: - - /** - * Constructor - */ - Md5() - { hashType = HASH_MD5; reset(); } - - /** - * Destructor - */ - virtual ~Md5() - { reset(); } - - /** - * Overloaded from Digest - */ - virtual void reset(); - - /** - * Overloaded from Digest - */ - virtual std::vector<unsigned char> finish(); - -protected: - - /** - * Overloaded from Digest - */ - virtual void update(unsigned char val); - - /** - * Overloaded from Digest - */ - virtual void transform(); - -private: - - uint32_t hashBuf[4]; - uint32_t inBuf[16]; - - uint32_t inb[4]; // Buffer for input bytes as longs - int byteNr; // which byte in long - int longNr; // which long in 16-long buffer - -}; - - - - - - - - - -#endif /* __DIGEST_H__ */ - - diff --git a/src/doxygen-main.cpp b/src/doxygen-main.cpp index 04e5ab33e..a1d3f3604 100644 --- a/src/doxygen-main.cpp +++ b/src/doxygen-main.cpp @@ -334,8 +334,6 @@ namespace XML {} * * Inkscape::GC * - * [\ref sp-metrics.cpp, \ref sp-metrics.h] - * * [\ref prefs-utils.cpp] [\ref print.cpp] * * - Inkscape::GZipBuffer [\ref streams-gzip.h] @@ -350,7 +348,7 @@ namespace XML {} * Inkscape::Whiteboard::UndoStackObserver [\ref undo-stack-observer.cpp, \ref composite-undo-stack-observer.cpp] * [\ref document-undo.cpp] * - * {\ref dialogs/} [\ref approx-equal.h] [\ref decimal-round.h] [\ref enums.h] [\ref unit-constants.h] + * {\ref dialogs/} [\ref decimal-round.h] [\ref enums.h] */ diff --git a/src/ege-select-one-action.cpp b/src/ege-select-one-action.cpp index 871b961bd..184d1afb4 100644 --- a/src/ege-select-one-action.cpp +++ b/src/ege-select-one-action.cpp @@ -640,7 +640,6 @@ GtkWidget* create_tool_item( GtkAction* action ) #endif GtkRadioAction* ract = 0; - GtkWidget* sub = 0; GSList* group = 0; GtkTreeIter iter; gboolean valid = FALSE; @@ -727,7 +726,7 @@ GtkWidget* create_tool_item( GtkAction* action ) } g_signal_connect( G_OBJECT(ract), "changed", G_CALLBACK( proxy_action_chagned_cb ), act ); - sub = gtk_action_create_tool_item( GTK_ACTION(ract) ); + GtkWidget* sub = gtk_action_create_tool_item( GTK_ACTION(ract) ); gtk_activatable_set_related_action( GTK_ACTIVATABLE (sub), GTK_ACTION(ract) ); gtk_tool_item_set_tooltip_text( GTK_TOOL_ITEM(sub), tip ); diff --git a/src/extension/CMakeLists.txt b/src/extension/CMakeLists.txt index fa4fdd740..4507d9ce2 100644 --- a/src/extension/CMakeLists.txt +++ b/src/extension/CMakeLists.txt @@ -62,8 +62,6 @@ set(extension_SRC internal/pdfinput/pdf-parser.cpp internal/pdfinput/svg-builder.cpp - script/InkscapeScript.cpp - # ------ # Header db.h @@ -136,8 +134,6 @@ set(extension_SRC internal/svg.h internal/svgz.h internal/vsd-input.h - - script/InkscapeScript.h ) if(WIN32) diff --git a/src/extension/internal/cairo-ps-out.cpp b/src/extension/internal/cairo-ps-out.cpp index 5ce9a21f3..bfbdd8149 100644 --- a/src/extension/internal/cairo-ps-out.cpp +++ b/src/extension/internal/cairo-ps-out.cpp @@ -136,12 +136,12 @@ CairoPsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar con if (ext == NULL) return; - const gchar *new_level = NULL; int level = CAIRO_PS_LEVEL_2; try { - new_level = mod->get_param_enum("PSlevel"); - if((new_level != NULL) && (g_ascii_strcasecmp("PS3", new_level) == 0)) + const gchar *new_level = mod->get_param_enum("PSlevel"); + if((new_level != NULL) && (g_ascii_strcasecmp("PS3", new_level) == 0)) { level = CAIRO_PS_LEVEL_3; + } } catch(...) {} bool new_textToPath = FALSE; @@ -225,12 +225,12 @@ CairoEpsOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, gchar co if (ext == NULL) return; - const gchar *new_level = NULL; int level = CAIRO_PS_LEVEL_2; try { - new_level = mod->get_param_enum("PSlevel"); - if((new_level != NULL) && (g_ascii_strcasecmp("PS3", new_level) == 0)) + const gchar *new_level = mod->get_param_enum("PSlevel"); + if((new_level != NULL) && (g_ascii_strcasecmp("PS3", new_level) == 0)) { level = CAIRO_PS_LEVEL_3; + } } catch(...) {} bool new_textToPath = FALSE; diff --git a/src/extension/internal/cairo-render-context.cpp b/src/extension/internal/cairo-render-context.cpp index d7a560f04..0ea1fd591 100644 --- a/src/extension/internal/cairo-render-context.cpp +++ b/src/extension/internal/cairo-render-context.cpp @@ -44,12 +44,11 @@ #include "sp-pattern.h" #include "sp-mask.h" #include "sp-clippath.h" +#include "util/units.h" #ifdef WIN32 #include "libnrtype/FontFactory.h" // USE_PANGO_WIN32 #endif -#include <unit-constants.h> - #include "cairo-render-context.h" #include "cairo-renderer.h" #include "extension/system.h" @@ -855,7 +854,7 @@ CairoRenderContext::_finishSurfaceSetup(cairo_surface_t *surface, cairo_matrix_t _surface = surface; if (_vector_based_target) { - cairo_scale(_cr, PT_PER_PX, PT_PER_PX); + cairo_scale(_cr, Inkscape::Util::Quantity::convert(1, "px", "pt"), Inkscape::Util::Quantity::convert(1, "px", "pt")); } else if (cairo_surface_get_content(_surface) != CAIRO_CONTENT_ALPHA) { // set background color on non-alpha surfaces // TODO: bgcolor should be derived from SPDocument @@ -1492,7 +1491,7 @@ CairoRenderContext::renderGlyphtext(PangoFont *font, Geom::Affine const &font_ma std::vector<CairoGlyphInfo> const &glyphtext, SPStyle const *style) { // create a cairo_font_face from PangoFont - double size = style->font_size.computed; + double size = style->font_size.computed; /// \fixme why is this variable never used? gpointer fonthash = (gpointer)font; cairo_font_face_t *font_face = (cairo_font_face_t *)g_hash_table_lookup(font_table, fonthash); diff --git a/src/extension/internal/cairo-renderer-pdf-out.cpp b/src/extension/internal/cairo-renderer-pdf-out.cpp index 6f641fd36..0a0c3f44a 100644 --- a/src/extension/internal/cairo-renderer-pdf-out.cpp +++ b/src/extension/internal/cairo-renderer-pdf-out.cpp @@ -39,7 +39,7 @@ #include <2geom/affine.h> #include "document.h" -#include "unit-constants.h" +#include "util/units.h" namespace Inkscape { namespace Extension { @@ -136,12 +136,12 @@ CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, if (ext == NULL) return; - const gchar *new_level = NULL; int level = 0; try { - new_level = mod->get_param_enum("PDFversion"); - if((new_level != NULL) && (g_ascii_strcasecmp("PDF-1.5", new_level) == 0)) + const gchar *new_level = mod->get_param_enum("PDFversion"); + if((new_level != NULL) && (g_ascii_strcasecmp("PDF-1.5", new_level) == 0)) { level = 1; + } } catch(...) { g_warning("Parameter <PDFversion> might not exist"); @@ -197,7 +197,7 @@ CairoRendererPdfOutput::save(Inkscape::Extension::Output *mod, SPDocument *doc, float new_bleedmargin_px = 0.; try { - new_bleedmargin_px = mod->get_param_float("bleed") * PX_PER_MM; + new_bleedmargin_px = mod->get_param_float("bleed") * Inkscape::Util::Quantity::convert(1, "mm", "px"); } catch(...) { g_warning("Parameter <bleed> might not exist"); diff --git a/src/extension/internal/cairo-renderer.cpp b/src/extension/internal/cairo-renderer.cpp index 0a3cff26a..f7ab63c98 100644 --- a/src/extension/internal/cairo-renderer.cpp +++ b/src/extension/internal/cairo-renderer.cpp @@ -55,7 +55,7 @@ #include "sp-mask.h" #include "sp-clippath.h" -#include <unit-constants.h> +#include "util/units.h" #include "helper/png-write.h" #include "helper/pixbuf-ops.h" @@ -442,7 +442,7 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx) */ res = ctx->getBitmapResolution(); if(res == 0) { - res = PX_PER_IN; + res = Inkscape::Util::Quantity::convert(1, "in", "px"); } TRACE(("sp_asbitmap_render: resolution: %f\n", res )); @@ -463,8 +463,8 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx) } // The width and height of the bitmap in pixels - unsigned width = ceil(bbox->width() * (res / PX_PER_IN)); - unsigned height = ceil(bbox->height() * (res / PX_PER_IN)); + unsigned width = ceil(bbox->width() * (res / Inkscape::Util::Quantity::convert(1, "in", "px"))); + unsigned height = ceil(bbox->height() * (res / Inkscape::Util::Quantity::convert(1, "in", "px"))); if (width == 0 || height == 0) return; @@ -477,7 +477,7 @@ static void sp_asbitmap_render(SPItem *item, CairoRenderContext *ctx) double shift_y = bbox->max()[Geom::Y]; // For default 90 dpi, snap bitmap to pixel grid - if (res == PX_PER_IN) { + if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { shift_x = round (shift_x); shift_y = -round (-shift_y); // Correct rounding despite coordinate inversion. // Remove the negations when the inversion is gone. @@ -629,7 +629,7 @@ CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool page if (ctx->_vector_based_target) { // convert from px to pt - d *= Geom::Scale(PT_PER_PX); + d *= Geom::Scale(Inkscape::Util::Quantity::convert(1, "px", "pt")); } ctx->_width = d.width(); @@ -647,11 +647,11 @@ CairoRenderer::setupDocument(CairoRenderContext *ctx, SPDocument *doc, bool page } else { double high = doc->getHeight(); if (ctx->_vector_based_target) - high *= PT_PER_PX; + high *= Inkscape::Util::Quantity::convert(1, "px", "pt"); // this transform translates the export drawing to a virtual page (0,0)-(width,height) - Geom::Affine tp(Geom::Translate(-d.left() * (ctx->_vector_based_target ? PX_PER_PT : 1.0), - (d.bottom() - high) * (ctx->_vector_based_target ? PX_PER_PT : 1.0))); + Geom::Affine tp(Geom::Translate(-d.left() * (ctx->_vector_based_target ? Inkscape::Util::Quantity::convert(1, "pt", "px") : 1.0), + (d.bottom() - high) * (ctx->_vector_based_target ? Inkscape::Util::Quantity::convert(1, "pt", "px") : 1.0))); ctx->transform(tp); } } diff --git a/src/extension/internal/emf-win32-inout.cpp b/src/extension/internal/emf-win32-inout.cpp index e9360a0ea..60385f455 100644 --- a/src/extension/internal/emf-win32-inout.cpp +++ b/src/extension/internal/emf-win32-inout.cpp @@ -37,9 +37,9 @@ #include "extension/output.h" #include "display/drawing.h" #include "display/drawing-item.h" -#include "unit-constants.h" #include "clear-n_.h" #include "document.h" +#include "util/units.h" #define WIN32_LEAN_AND_MEAN #include <windows.h> @@ -60,7 +60,7 @@ namespace Inkscape { namespace Extension { namespace Internal { -static float device_scale = DEVICESCALE; +static float device_scale = Inkscape::Util::Quantity::convert(1, "px", "pt"); static float device_x; static float device_y; static RECTL rc_old; @@ -120,6 +120,10 @@ emf_print_document_to_file(SPDocument *doc, gchar const *filename) } mod->base->invoke_print(&context); ret = mod->finish(); + if (ret) { + g_free(oldoutput); + throw Inkscape::Extension::Output::save_failed(); + } /* Release arena */ mod->base->invoke_hide(mod->dkey); mod->base = NULL; @@ -777,18 +781,18 @@ myEnhMetaFileProc(HDC /*hDC*/, HANDLETABLE * /*lpHTable*/, ENHMETARECORD const * d->dc[d->level].PixelsInX = pEmr->rclFrame.right - pEmr->rclFrame.left; d->dc[d->level].PixelsInY = pEmr->rclFrame.bottom - pEmr->rclFrame.top; - device_x = pEmr->rclFrame.left/100.0*PX_PER_MM; - device_y = pEmr->rclFrame.top/100.0*PX_PER_MM; + device_x = pEmr->rclFrame.left/100.0*Inkscape::Util::Quantity::convert(1, "mm", "px"); + device_y = pEmr->rclFrame.top/100.0*Inkscape::Util::Quantity::convert(1, "mm", "px"); d->MMX = d->dc[d->level].PixelsInX / 100.0; d->MMY = d->dc[d->level].PixelsInY / 100.0; - d->dc[d->level].PixelsOutX = d->MMX * PX_PER_MM; - d->dc[d->level].PixelsOutY = d->MMY * PX_PER_MM; + d->dc[d->level].PixelsOutX = d->MMX * Inkscape::Util::Quantity::convert(1, "mm", "px"); + d->dc[d->level].PixelsOutY = d->MMY * Inkscape::Util::Quantity::convert(1, "mm", "px"); // calculate ratio of Inkscape dpi/device dpi if (pEmr->szlMillimeters.cx && pEmr->szlDevice.cx) - device_scale = PX_PER_MM*pEmr->szlMillimeters.cx/pEmr->szlDevice.cx; + device_scale = Inkscape::Util::Quantity::convert(1, "mm", "px")*pEmr->szlMillimeters.cx/pEmr->szlDevice.cx; tmp_outdef << " width=\"" << d->MMX << "mm\"\n" << diff --git a/src/extension/internal/emf-win32-print.cpp b/src/extension/internal/emf-win32-print.cpp index 2b79fd5a4..621954f68 100644 --- a/src/extension/internal/emf-win32-print.cpp +++ b/src/extension/internal/emf-win32-print.cpp @@ -36,6 +36,7 @@ #include "helper/geom.h" #include "helper/geom-curves.h" #include "sp-item.h" +#include "util/units.h" #include "style.h" #include "inkscape-version.h" @@ -43,8 +44,6 @@ #include "emf-win32-print.h" -#include "unit-constants.h" - #include "extension/system.h" #include "extension/print.h" #include "document.h" @@ -129,7 +128,7 @@ unsigned int PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument * if (bbox) d = *bbox; } - d *= Geom::Scale(IN_PER_PX); + d *= Geom::Scale(Inkscape::Util::Quantity::convert(1, "px", "in")); float dwInchesX = d.width(); float dwInchesY = d.height(); @@ -196,7 +195,7 @@ unsigned int PrintEmfWin32::begin (Inkscape::Extension::Print *mod, SPDocument * snprintf(buff, sizeof(buff)-1, "Screen=%dx%dpx, %dx%dmm", PixelsX, PixelsY, MMX, MMY); GdiComment(hdc, strlen(buff), (BYTE*) buff); - snprintf(buff, sizeof(buff)-1, "Drawing=%.1lfx%.1lfpx, %.1lfx%.1lfmm", _width, _height, dwInchesX * MM_PER_IN, dwInchesY * MM_PER_IN); + snprintf(buff, sizeof(buff)-1, "Drawing=%.1lfx%.1lfpx, %.1lfx%.1lfmm", _width, _height, dwInchesX * Inkscape::Util::Quantity::convert(1, "in", "mm"), dwInchesY * Inkscape::Util::Quantity::convert(1, "in", "mm")); GdiComment(hdc, strlen(buff), (BYTE*) buff); } @@ -242,13 +241,12 @@ unsigned int PrintEmfWin32::comment (Inkscape::Extension::Print * /*module*/, int PrintEmfWin32::create_brush(SPStyle const *style) { - float rgb[3]; - if (style) { float opacity = SP_SCALE24_TO_FLOAT(style->fill_opacity.value); if (opacity <= 0.0) return 1; + float rgb[3]; sp_color_get_rgb_floatv( &style->fill.value.color, rgb ); hbrush = CreateSolidBrush( RGB(255*rgb[0], 255*rgb[1], 255*rgb[2]) ); hbrushOld = (HBRUSH) SelectObject( hdc, hbrush ); @@ -305,7 +303,7 @@ void PrintEmfWin32::create_pen(SPStyle const *style, const Geom::Affine &transfo double scale = sqrt( (p[X]*p[X]) + (p[Y]*p[Y]) ) / sqrt(2); - DWORD linewidth = MAX( 1, (DWORD) (scale * style->stroke_width.computed * IN_PER_PX * dwDPI) ); + DWORD linewidth = MAX( 1, (DWORD) (scale * style->stroke_width.computed * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI) ); if (style->stroke_linecap.computed == 0) { linecap = PS_ENDCAP_FLAT; @@ -342,7 +340,7 @@ void PrintEmfWin32::create_pen(SPStyle const *style, const Geom::Affine &transfo n_dash = style->stroke_dash.n_dash; dash = new DWORD[n_dash]; for (i = 0; i < style->stroke_dash.n_dash; i++) { - dash[i] = (DWORD) (style->stroke_dash.dash[i] * IN_PER_PX * dwDPI); + dash[i] = (DWORD) (style->stroke_dash.dash[i] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); } } } @@ -545,8 +543,8 @@ bool PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom Geom::Point p0 = pit->initialPoint(); - p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); + p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); LONG const x0 = (LONG) round(p0[X]); LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -565,10 +563,10 @@ bool PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom //Geom::Point p0 = cit->initialPoint(); Geom::Point p1 = cit->finalPoint(); - //p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p1[X] = (p1[X] * IN_PER_PX * dwDPI); - //p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); - p1[Y] = (p1[Y] * IN_PER_PX * dwDPI); + //p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + //p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); //LONG const x0 = (LONG) round(p0[X]); //LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -587,14 +585,14 @@ bool PrintEmfWin32::print_simple_shape(Geom::PathVector const &pathv, const Geom Geom::Point p2 = points[2]; Geom::Point p3 = points[3]; - //p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p1[X] = (p1[X] * IN_PER_PX * dwDPI); - p2[X] = (p2[X] * IN_PER_PX * dwDPI); - p3[X] = (p3[X] * IN_PER_PX * dwDPI); - //p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); - p1[Y] = (p1[Y] * IN_PER_PX * dwDPI); - p2[Y] = (p2[Y] * IN_PER_PX * dwDPI); - p3[Y] = (p3[Y] * IN_PER_PX * dwDPI); + //p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p2[X] = (p2[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p3[X] = (p3[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + //p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p2[Y] = (p2[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p3[Y] = (p3[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); //LONG const x0 = (LONG) round(p0[X]); //LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -717,8 +715,8 @@ unsigned int PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geo Geom::Point p0 = pit->initialPoint(); - p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); + p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); LONG const x0 = (LONG) round(p0[X]); LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -735,10 +733,10 @@ unsigned int PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geo //Geom::Point p0 = cit->initialPoint(); Geom::Point p1 = cit->finalPoint(); - //p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p1[X] = (p1[X] * IN_PER_PX * dwDPI); - //p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); - p1[Y] = (p1[Y] * IN_PER_PX * dwDPI); + //p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + //p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); //LONG const x0 = (LONG) round(p0[X]); //LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -755,14 +753,14 @@ unsigned int PrintEmfWin32::print_pathv(Geom::PathVector const &pathv, const Geo Geom::Point p2 = points[2]; Geom::Point p3 = points[3]; - //p0[X] = (p0[X] * IN_PER_PX * dwDPI); - p1[X] = (p1[X] * IN_PER_PX * dwDPI); - p2[X] = (p2[X] * IN_PER_PX * dwDPI); - p3[X] = (p3[X] * IN_PER_PX * dwDPI); - //p0[Y] = (p0[Y] * IN_PER_PX * dwDPI); - p1[Y] = (p1[Y] * IN_PER_PX * dwDPI); - p2[Y] = (p2[Y] * IN_PER_PX * dwDPI); - p3[Y] = (p3[Y] * IN_PER_PX * dwDPI); + //p0[X] = (p0[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[X] = (p1[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p2[X] = (p2[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p3[X] = (p3[X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + //p0[Y] = (p0[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p1[Y] = (p1[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p2[Y] = (p2[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p3[Y] = (p3[Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); //LONG const x0 = (LONG) round(p0[X]); //LONG const y0 = (LONG) round(rc.bottom-p0[Y]); @@ -830,7 +828,7 @@ unsigned int PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char cons LOGFONTW *lf = (LOGFONTW*)g_malloc(sizeof(LOGFONTW)); g_assert(lf != NULL); - lf->lfHeight = -style->font_size.computed * IN_PER_PX * dwDPI; + lf->lfHeight = -style->font_size.computed * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI; lf->lfWidth = 0; lf->lfEscapement = rot; lf->lfOrientation = rot; @@ -879,8 +877,8 @@ unsigned int PrintEmfWin32::text(Inkscape::Extension::Print * /*mod*/, char cons SetBkMode(hdc, TRANSPARENT); Geom::Point p2 = p * tf; - p2[Geom::X] = (p2[Geom::X] * IN_PER_PX * dwDPI); - p2[Geom::Y] = (p2[Geom::Y] * IN_PER_PX * dwDPI); + p2[Geom::X] = (p2[Geom::X] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); + p2[Geom::Y] = (p2[Geom::Y] * Inkscape::Util::Quantity::convert(1, "px", "in") * dwDPI); LONG const xpos = (LONG) round(p2[Geom::X]); LONG const ypos = (LONG) round(rc.bottom - p2[Geom::Y]); diff --git a/src/extension/internal/filter/paint.h b/src/extension/internal/filter/paint.h index d99d1e0e2..941177f39 100644 --- a/src/extension/internal/filter/paint.h +++ b/src/extension/internal/filter/paint.h @@ -999,9 +999,8 @@ PosterizeBasic::get_filter_text (Inkscape::Extension::Extension * ext) transf << "0"; int levels = ext->get_param_int("levels") + 1; - float val = 0.0; for ( int step = 1 ; step <= levels ; step++ ) { - val = (float) step / levels; + const float val = (float) step / levels; transf << " " << val; } transf << " 1"; diff --git a/src/extension/internal/gdkpixbuf-input.cpp b/src/extension/internal/gdkpixbuf-input.cpp index abfad518f..994258ccc 100644 --- a/src/extension/internal/gdkpixbuf-input.cpp +++ b/src/extension/internal/gdkpixbuf-input.cpp @@ -12,7 +12,7 @@ #include "selection-chemistry.h" #include "sp-image.h" #include "document-undo.h" -#include "unit-constants.h" +#include "util/units.h" #include "image-resolution.h" #include <set> @@ -79,7 +79,7 @@ GdkpixbufInput::open(Inkscape::Extension::Input *mod, char const *uri) double width = gdk_pixbuf_get_width(pb); double height = gdk_pixbuf_get_height(pb); - double defaultxdpi = prefs->getDouble("/dialogs/import/defaultxdpi/value", PX_PER_IN); + double defaultxdpi = prefs->getDouble("/dialogs/import/defaultxdpi/value", Inkscape::Util::Quantity::convert(1, "in", "px")); bool forcexdpi = prefs->getBool("/dialogs/import/forcexdpi"); ImageResolution *ir = 0; double xscale = 1; diff --git a/src/extension/internal/latex-pstricks.cpp b/src/extension/internal/latex-pstricks.cpp index c1eddf539..2ece1ba87 100644 --- a/src/extension/internal/latex-pstricks.cpp +++ b/src/extension/internal/latex-pstricks.cpp @@ -21,7 +21,7 @@ #include <2geom/hvlinesegment.h> #include <errno.h> #include <signal.h> -#include <unit-constants.h> +#include "util/units.h" #include "helper/geom-curves.h" #include "extension/print.h" @@ -117,8 +117,8 @@ unsigned int PrintLatex::begin (Inkscape::Extension::Print *mod, SPDocument *doc } // width and height in pt - _width = doc->getWidth() * PT_PER_PX; - _height = doc->getHeight() * PT_PER_PX; + _width = doc->getWidth() * Inkscape::Util::Quantity::convert(1, "px", "pt"); + _height = doc->getHeight() * Inkscape::Util::Quantity::convert(1, "px", "pt"); if (res >= 0) { diff --git a/src/extension/internal/latex-text-renderer.cpp b/src/extension/internal/latex-text-renderer.cpp index ecc201733..57a71b467 100644 --- a/src/extension/internal/latex-text-renderer.cpp +++ b/src/extension/internal/latex-text-renderer.cpp @@ -39,7 +39,7 @@ #include "sp-rect.h" #include "text-editing.h" -#include <unit-constants.h> +#include "util/units.h" #include "extension/system.h" @@ -611,7 +611,7 @@ LaTeXTextRenderer::setupDocument(SPDocument *doc, bool pageBoundingBox, float bl // scaling of the image when including it in LaTeX os << " \\ifx\\svgwidth\\undefined%\n"; - os << " \\setlength{\\unitlength}{" << d.width() * PT_PER_PX << "bp}%\n"; // note: 'bp' is the Postscript pt unit in LaTeX, see LP bug #792384 + os << " \\setlength{\\unitlength}{" << d.width() * Inkscape::Util::Quantity::convert(1, "px", "pt") << "bp}%\n"; // note: 'bp' is the Postscript pt unit in LaTeX, see LP bug #792384 os << " \\ifx\\svgscale\\undefined%\n"; os << " \\relax%\n"; os << " \\else%\n"; diff --git a/src/extension/internal/pdfinput/pdf-parser.cpp b/src/extension/internal/pdfinput/pdf-parser.cpp index 3be7af34f..6e57f6278 100644 --- a/src/extension/internal/pdfinput/pdf-parser.cpp +++ b/src/extension/internal/pdfinput/pdf-parser.cpp @@ -34,7 +34,7 @@ extern "C" { #include "svg-builder.h" #include "Gfx.h" #include "pdf-parser.h" -#include "unit-constants.h" +#include "util/units.h" #include "goo/gmem.h" #include "goo/GooTimer.h" @@ -279,14 +279,14 @@ PdfParser::PdfParser(XRef *xrefA, Inkscape::Extension::Internal::SvgBuilder *bui ignoreUndef = 0; operatorHistory = NULL; builder = builderA; - builder->setDocumentSize(state->getPageWidth()*PX_PER_PT, - state->getPageHeight()*PX_PER_PT); + builder->setDocumentSize(state->getPageWidth()*Inkscape::Util::Quantity::convert(1, "pt", "px"), + state->getPageHeight()*Inkscape::Util::Quantity::convert(1, "pt", "px")); double *ctm = state->getCTM(); double scaledCTM[6]; for (int i = 0; i < 6; ++i) { baseMatrix[i] = ctm[i]; - scaledCTM[i] = PX_PER_PT * ctm[i]; + scaledCTM[i] = Inkscape::Util::Quantity::convert(1, "pt", "px") * ctm[i]; } saveState(); builder->setTransform((double*)&scaledCTM); @@ -579,14 +579,13 @@ void PdfParser::execOp(Object *cmd, Object args[], int numArgs) { (this->*op->func)(argPtr, numArgs); } -PdfOperator *PdfParser::findOp(char *name) { - int a, b, m, cmp; - - a = -1; - b = numOps; +PdfOperator* PdfParser::findOp(char *name) { + int a = -1; + int b = numOps; + int cmp = -1; // invariant: opTab[a] < name < opTab[b] while (b - a > 1) { - m = (a + b) / 2; + const int m = (a + b) / 2; cmp = strcmp(opTab[m].name, name); if (cmp < 0) a = m; diff --git a/src/extension/internal/pdfinput/svg-builder.cpp b/src/extension/internal/pdfinput/svg-builder.cpp index 75849f6cc..a1a309a87 100644 --- a/src/extension/internal/pdfinput/svg-builder.cpp +++ b/src/extension/internal/pdfinput/svg-builder.cpp @@ -33,7 +33,7 @@ #include "svg/css-ostringstream.h" #include "svg/svg-color.h" #include "color.h" -#include "unit-constants.h" +#include "util/units.h" #include "io/stringstream.h" #include "io/base64stream.h" #include "display/nr-filter-utils.h" @@ -266,14 +266,12 @@ static void svgSetTransform(Inkscape::XML::Node *node, double c0, double c1, * \brief Generates a SVG path string from poppler's data structure */ static gchar *svgInterpretPath(GfxPath *path) { - GfxSubpath *subpath; Inkscape::SVG::PathString pathString; - int i, j; - for ( i = 0 ; i < path->getNumSubpaths() ; ++i ) { - subpath = path->getSubpath(i); + for (int i = 0 ; i < path->getNumSubpaths() ; ++i ) { + GfxSubpath *subpath = path->getSubpath(i); if (subpath->getNumPoints() > 0) { pathString.moveTo(subpath->getX(0), subpath->getY(0)); - j = 1; + int j = 1; while (j < subpath->getNumPoints()) { if (subpath->getCurve(j)) { pathString.curveTo(subpath->getX(j), subpath->getY(j), @@ -676,7 +674,25 @@ gchar *SvgBuilder::_createTilingPattern(GfxTilingPattern *tiling_pattern, Inkscape::XML::Node *pattern_node = _xml_doc->createElement("svg:pattern"); // Set pattern transform matrix double *p2u = tiling_pattern->getMatrix(); - Geom::Affine pat_matrix(p2u[0], p2u[1], p2u[2], p2u[3], p2u[4], p2u[5]); + double m[6] = {1, 0, 0, 1, 0, 0}; + double det; + det = ttm[0] * ttm[3] - ttm[1] * ttm[2]; // see LP Bug 1168908 + if (det) { + double ittm[6]; // invert ttm + ittm[0] = ttm[3] / det; + ittm[1] = -ttm[1] / det; + ittm[2] = -ttm[2] / det; + ittm[3] = ttm[0] / det; + ittm[4] = (ttm[2] * ttm[5] - ttm[3] * ttm[4]) / det; + ittm[5] = (ttm[1] * ttm[4] - ttm[0] * ttm[5]) / det; + m[0] = p2u[0] * ittm[0] + p2u[1] * ittm[2]; + m[1] = p2u[0] * ittm[1] + p2u[1] * ittm[3]; + m[2] = p2u[2] * ittm[0] + p2u[3] * ittm[2]; + m[3] = p2u[2] * ittm[1] + p2u[3] * ittm[3]; + m[4] = p2u[4] * ittm[0] + p2u[5] * ittm[2] + ittm[4]; + m[5] = p2u[4] * ittm[1] + p2u[5] * ittm[3] + ittm[5]; + } + Geom::Affine pat_matrix(m[0], m[1], m[2], m[3], m[4], m[5]); gchar *transform_text = sp_svg_transform_write(pat_matrix); pattern_node->setAttribute("patternTransform", transform_text); g_free(transform_text); @@ -777,7 +793,7 @@ gchar *SvgBuilder::_createGradient(GfxShading *shading, double *matrix, bool for Geom::Affine pat_matrix(matrix[0], matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); if ( !for_shading && _is_top_level ) { - Geom::Affine flip(1.0, 0.0, 0.0, -1.0, 0.0, _height * PT_PER_PX); + Geom::Affine flip(1.0, 0.0, 0.0, -1.0, 0.0, _height * Inkscape::Util::Quantity::convert(1, "px", "pt")); pat_matrix *= flip; } gchar *transform_text = sp_svg_transform_write(pat_matrix); diff --git a/src/extension/script/InkscapeScript.cpp b/src/extension/script/InkscapeScript.cpp deleted file mode 100644 index 02cd28fa5..000000000 --- a/src/extension/script/InkscapeScript.cpp +++ /dev/null @@ -1,223 +0,0 @@ -/* - * This is a simple mechanism to bind Inkscape to Java, and thence - * to all of the nice things that can be layered upon that. - * - * Authors: - * Bob Jamison - * - * Copyright (C) 2007-2008 Bob Jamison - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 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 - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - */ - - -#include "InkscapeScript.h" - - -#include <bind/javabind.h> - - -namespace Inkscape -{ -namespace Extension -{ -namespace Script -{ - - -typedef Inkscape::Bind::Value Value; - - -/** - * - */ -InkscapeScript::InkscapeScript() -{ -} - - - - -/** - * - */ -InkscapeScript::~InkscapeScript() -{ -} - - - - -/** - * Interprets the script in the 'script' buffer, - * storing the stdout output in 'output', and any - * error messages in 'error.' Language is one of the - * enumerated types in ScriptLanguage above. - */ -bool InkscapeScript::interpretScript(const Glib::ustring &script, - Glib::ustring & /*output*/, - Glib::ustring & /*error*/, - ScriptLanguage language) -{ - const char *langname=NULL; - //if() instead of switch() lets us scope vars - if (language == InkscapeScript::JAVASCRIPT) - { - langname="javascript"; - } - else if (language == InkscapeScript::PYTHON) - { - langname="python"; - } - else if (language == InkscapeScript::RUBY) - { - langname="ruby"; - } - else - { - g_warning("interpretScript: Unknown Script Language type: %d\n", - language); - return false; - } - - Inkscape::Bind::JavaBindery *binder = - Inkscape::Bind::JavaBindery::getInstance(); - if (!binder->loadJVM()) //idempotent - { - g_warning("interpretScript: unable to start JVM\n"); - return false; - } - std::vector<Value> parms; - Value retval; - Value parm; - parm.setString(langname); - parms.push_back(parm); - parm.setString(script); - parms.push_back(parm); - - //binder->stdOutClear(); - //binder->stdErrClear(); - bool ret = binder->callStatic(Value::BIND_BOOLEAN, - "org/inkscape/cmn/ScriptRunner", - "run", - "(Ljava/lang/String;Ljava/lang/String;)Z", - parms, - retval); - //output = binder->stdOutGet(); - //error = binder->stdErrGet(); - - if (!ret) - { - g_warning("interpretScript: failed\n"); - return false; - } - - return true; -} - - -/** - * Interprets the script in the named file, - * storing the stdout output in 'output', and any - * error messages in 'error.' Language is one of the - * enumerated types in ScriptLanguage above. - */ -bool InkscapeScript::interpretFile(const Glib::ustring &fname, - Glib::ustring & /*output*/, - Glib::ustring & /*error*/, - ScriptLanguage language) -{ - const char *langname=NULL; - //if() instead of switch() lets us scope vars - if (language == InkscapeScript::JAVASCRIPT) - { - langname="Javascript"; - } - else if (language == InkscapeScript::PYTHON) - { - langname="Python"; - } - else if (language == InkscapeScript::RUBY) - { - langname="Ruby"; - } - else - { - g_warning("interpretFile: Unknown Script Language type: %d\n", - language); - return false; - } - - Inkscape::Bind::JavaBindery *binder = - Inkscape::Bind::JavaBindery::getInstance(); - if (!binder->loadJVM()) //idempotent - { - g_warning("interpretFile: unable to start JVM\n"); - return false; - } - std::vector<Value> parms; - Value retval; - Value parm; - parm.setString(langname); - parms.push_back(parm); - parm.setString(fname); - parms.push_back(parm); - - //binder->stdOutClear(); - //binder->stdErrClear(); - bool ret = binder->callStatic(Value::BIND_BOOLEAN, - "org/inkscape/cmn/ScriptRunner", - "runFile", - "(Ljava/lang/String;Ljava/lang/String;)Z", - parms, - retval); - //output = binder->stdOutGet(); - //error = binder->stdErrGet(); - - if (!ret) - { - g_warning("interpretFile: failed\n"); - return false; - } - - return true; -} - - - - - - - - - -} // namespace Script -} // namespace Extension -} // namespace Inkscape - -//######################################################################### -//# E N D O F F I L E -//######################################################################### - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/extension/script/InkscapeScript.h b/src/extension/script/InkscapeScript.h deleted file mode 100644 index 8d6346582..000000000 --- a/src/extension/script/InkscapeScript.h +++ /dev/null @@ -1,102 +0,0 @@ -#ifndef SEEN_INKSCAPE_SCRIPT_H -#define SEEN_INKSCAPE_SCRIPT_H - -/* - * Authors: - * Bob Jamison <rjamison@titan.com> - * - * Copyright (C) 2004-2008 Bob Jamison - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include "config.h" - -namespace Glib { -class ustring; -} - -namespace Inkscape -{ -namespace Extension -{ -namespace Script -{ - - - -/** - * Inkscape Scripting container. - * This class is used to run scripts, either from a file or buffer. - */ -class InkscapeScript -{ -public: - - /** - * Which type of language? - */ - typedef enum - { - JAVASCRIPT, - PYTHON, - RUBY - } ScriptLanguage; - - /** - * Creates a generic script interpreter. - */ - InkscapeScript(); - - /** - * Destructor - */ - virtual ~InkscapeScript(); - - /** - * Interprets the script in the 'script' buffer, - * storing the stdout output in 'output', and any - * error messages in 'error.' Language is one of the - * enumerated types in ScriptLanguage above. - */ - bool interpretScript(const Glib::ustring &script, - Glib::ustring &output, - Glib::ustring &error, - ScriptLanguage language); - - /** - * Interprets the script in the named file, - * storing the stdout output in 'output', and any - * error messages in 'error.' Language is one of the - * enumerated types in ScriptLanguage above. - */ - bool interpretFile(const Glib::ustring &fname, - Glib::ustring &output, - Glib::ustring &error, - ScriptLanguage language); - - - -}; //class InkscapeScript - - - - -} // namespace Script -} // namespace Extension -} // namespace Inkscape - - - -#endif /* __INKSCAPE_SCRIPT_H__ */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/extension/script/Makefile_insert b/src/extension/script/Makefile_insert deleted file mode 100644 index c0bd91e81..000000000 --- a/src/extension/script/Makefile_insert +++ /dev/null @@ -1,6 +0,0 @@ -## Makefile.am fragment sourced by src/Makefile.am. - -ink_common_sources += \ - extension/script/InkscapeScript.h \ - extension/script/InkscapeScript.cpp - diff --git a/src/extension/script/makefile.in b/src/extension/script/makefile.in deleted file mode 100644 index f4857a9e3..000000000 --- a/src/extension/script/makefile.in +++ /dev/null @@ -1,17 +0,0 @@ -# Convenience stub makefile to call the real Makefile. - -@SET_MAKE@ - -OBJEXT = @OBJEXT@ - -# Explicit so that it's the default rule. -all: - cd ../.. && $(MAKE) extension/script/all - -clean %.a %.$(OBJEXT): - cd ../.. && $(MAKE) extension/script/$@ - -.PHONY: all clean - -.SUFFIXES: -.SUFFIXES: .a .$(OBJEXT) diff --git a/src/fixes.cpp b/src/fixes.cpp deleted file mode 100644 index 4aed2c313..000000000 --- a/src/fixes.cpp +++ /dev/null @@ -1,194 +0,0 @@ -/* - * - * This is the header file to include to fix any broken definitions or funcs - * - * $Id$ - * - * 2004 Kees Cook - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * as published by the Free Software Foundation; either version 2 - * of the License, or (at your option) any later version. - * - * This program 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -//#if defined(g_ascii_strtod) -#if 0 -/* - * until 2004-04-22, g_ascii_strtod could not handle having a locale-based - * decimal separator immediately following the number ("5,4" would - * parse to "5,4" instead of "5.0" in fr_FR) - * - * This is the corrected function, lifted from 1.107 gstrfuncs.c in glib - */ -extern "C" { -#include <glib.h> -#include <locale.h> -#include <string.h> -#include <errno.h> -#include <stdlib.h> - -gdouble -fixed_g_ascii_strtod (const gchar *nptr, - gchar **endptr) -{ - gchar *fail_pos; - gdouble val; - struct lconv *locale_data; - const char *decimal_point; - int decimal_point_len; - const char *p, *decimal_point_pos; - const char *end = NULL; /* Silence gcc */ - - g_return_val_if_fail (nptr != NULL, 0); - - fail_pos = NULL; - - locale_data = localeconv (); - decimal_point = locale_data->decimal_point; - decimal_point_len = strlen (decimal_point); - - g_assert (decimal_point_len != 0); - - decimal_point_pos = NULL; - if (decimal_point[0] != '.' || - decimal_point[1] != 0) - { - p = nptr; - /* Skip leading space */ - while (g_ascii_isspace (*p)) - p++; - - /* Skip leading optional sign */ - if (*p == '+' || *p == '-') - p++; - - if (p[0] == '0' && - (p[1] == 'x' || p[1] == 'X')) - { - p += 2; - /* HEX - find the (optional) decimal point */ - - while (g_ascii_isxdigit (*p)) - p++; - - if (*p == '.') - { - decimal_point_pos = p++; - - while (g_ascii_isxdigit (*p)) - p++; - - if (*p == 'p' || *p == 'P') - p++; - if (*p == '+' || *p == '-') - p++; - while (g_ascii_isdigit (*p)) - p++; - } - } - else - { - while (g_ascii_isdigit (*p)) - p++; - - if (*p == '.') - { - decimal_point_pos = p++; - - while (g_ascii_isdigit (*p)) - p++; - - if (*p == 'e' || *p == 'E') - p++; - if (*p == '+' || *p == '-') - p++; - while (g_ascii_isdigit (*p)) - p++; - } - } - /* For the other cases, we need not convert the decimal point */ - end = p; - } - - /* Set errno to zero, so that we can distinguish zero results - and underflows */ - errno = 0; - - if (decimal_point_pos) - { - char *copy, *c; - - /* We need to convert the '.' to the locale specific decimal point */ - copy = (char*)g_malloc (end - nptr + 1 + decimal_point_len); - - c = copy; - memcpy (c, nptr, decimal_point_pos - nptr); - c += decimal_point_pos - nptr; - memcpy (c, decimal_point, decimal_point_len); - c += decimal_point_len; - memcpy (c, decimal_point_pos + 1, end - (decimal_point_pos + 1)); - c += end - (decimal_point_pos + 1); - *c = 0; - - val = strtod (copy, &fail_pos); - - if (fail_pos) - { - if (fail_pos - copy > decimal_point_pos - nptr) - fail_pos = (char *)nptr + (fail_pos - copy) - (decimal_point_len - 1); - else - fail_pos = (char *)nptr + (fail_pos - copy); - } - - g_free (copy); - - } - else if (decimal_point[0] != '.' || - decimal_point[1] != 0) - { - char *copy; - - copy = (char*)g_malloc (end - (char *)nptr + 1); - memcpy (copy, nptr, end - nptr); - *(copy + (end - (char *)nptr)) = 0; - - val = strtod (copy, &fail_pos); - - if (fail_pos) - { - fail_pos = (char *)nptr + (fail_pos - copy); - } - - g_free (copy); - } - else - { - val = strtod (nptr, &fail_pos); - } - - if (endptr) - *endptr = fail_pos; - - return val; -} -} - -#endif /* BROKEN_G_ASCII_STRTOD */ - - diff --git a/src/flood-context.cpp b/src/flood-context.cpp index 8fde11f88..a719f1202 100644 --- a/src/flood-context.cpp +++ b/src/flood-context.cpp @@ -54,7 +54,6 @@ #include "sp-defs.h" #include "sp-item.h" #include "splivarot.h" -#include "sp-metrics.h" #include "sp-namedview.h" #include "sp-object.h" #include "sp-path.h" diff --git a/src/flood-context.h b/src/flood-context.h index 3e81cd01e..810a3b48f 100644 --- a/src/flood-context.h +++ b/src/flood-context.h @@ -15,8 +15,6 @@ #include <sigc++/sigc++.h> #include <gtk/gtk.h> #include "event-context.h" -#include "helper/unit-menu.h" -#include "helper/units.h" #define SP_TYPE_FLOOD_CONTEXT (sp_flood_context_get_type ()) #define SP_FLOOD_CONTEXT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SP_TYPE_FLOOD_CONTEXT, SPFloodContext)) diff --git a/src/helper/Makefile_insert b/src/helper/Makefile_insert index 790d87b14..4c6437f13 100644 --- a/src/helper/Makefile_insert +++ b/src/helper/Makefile_insert @@ -18,12 +18,6 @@ ink_common_sources += \ helper/png-write.h \ helper/sp-marshal.cpp \ helper/sp-marshal.h \ - helper/unit-menu.cpp \ - helper/unit-menu.h \ - helper/unit-tracker.cpp \ - helper/unit-tracker.h \ - helper/units.cpp \ - helper/units.h \ helper/window.cpp \ helper/window.h \ helper/stock-items.cpp \ @@ -46,9 +40,3 @@ helper/sp-marshal.cpp: helper/sp-marshal.list helper/sp-marshal.h else mv helper/tmp.sp-marshal.cpp helper/sp-marshal.cpp; fi helper/sp-marshal.cpp helper/sp-marshal.h: helper/sp-marshal.list - -# ###################### -# ### CxxTest stuff #### -# ###################### -CXXTEST_TESTSUITES += \ - $(srcdir)/helper/units-test.h diff --git a/src/helper/gnome-utils.cpp b/src/helper/gnome-utils.cpp index d0bcaf8cd..957b7ea5e 100644 --- a/src/helper/gnome-utils.cpp +++ b/src/helper/gnome-utils.cpp @@ -83,17 +83,15 @@ gnome_uri_list_extract_uris (const gchar* uri_list) GList* gnome_uri_list_extract_filenames (const gchar* uri_list) { - GList *tmp_list, *node, *result; - g_return_val_if_fail (uri_list != NULL, NULL); - result = gnome_uri_list_extract_uris (uri_list); + GList *result = gnome_uri_list_extract_uris (uri_list); - tmp_list = result; + GList *tmp_list = result; while (tmp_list) { gchar *s = (gchar*)tmp_list->data; - node = tmp_list; + GList *node = tmp_list; tmp_list = tmp_list->next; if (!strncmp (s, "file:", 5)) { diff --git a/src/helper/pixbuf-ops.cpp b/src/helper/pixbuf-ops.cpp index 9cd1967d8..75c002c57 100644 --- a/src/helper/pixbuf-ops.cpp +++ b/src/helper/pixbuf-ops.cpp @@ -29,7 +29,7 @@ #include "sp-root.h" #include "sp-use.h" #include "sp-defs.h" -#include "unit-constants.h" +#include "util/units.h" #include "helper/pixbuf-ops.h" @@ -121,7 +121,7 @@ GdkPixbuf *sp_generate_internal_bitmap(SPDocument *doc, gchar const */*filename* origin[Geom::X] = origin[Geom::X] + (screen[Geom::X].extent() * ((1 - padding) / 2)); origin[Geom::Y] = origin[Geom::Y] + (screen[Geom::Y].extent() * ((1 - padding) / 2)); - Geom::Scale scale( (xdpi / PX_PER_IN), (ydpi / PX_PER_IN)); + Geom::Scale scale( (xdpi / Inkscape::Util::Quantity::convert(1, "in", "px")), (ydpi / Inkscape::Util::Quantity::convert(1, "in", "px"))); Geom::Affine affine = scale * Geom::Translate(-origin * scale); /* Create ArenaItems and set transform */ diff --git a/src/helper/unit-menu.cpp b/src/helper/unit-menu.cpp deleted file mode 100644 index af07c03c1..000000000 --- a/src/helper/unit-menu.cpp +++ /dev/null @@ -1,360 +0,0 @@ -#define __SP_UNIT_MENU_C__ - -/* - * Unit selector with autupdate capability - * - * Authors: - * Lauris Kaplinski <lauris@kaplinski.com> - * bulia byak <buliabyak@users.sf.net> - * - * Copyright (C) 2000-2002 Authors - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#define noUNIT_SELECTOR_VERBOSE - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif -#include <gtk/gtk.h> -#include "helper/sp-marshal.h" -#include "helper/units.h" -#include "helper/unit-menu.h" -#include "widgets/spw-utilities.h" - -struct SPUnitSelector { - GtkHBox box; - - GtkWidget *combo_box; - GtkListStore *store; - - - guint bases; - GSList *units; - SPUnit const *unit; - gdouble ctmscale; - guint plural : 1; - guint abbr : 1; - - guint update : 1; - - GSList *adjustments; -}; - -enum {COMBO_COL_LABEL=0, COMBO_COL_UNIT}; - -struct SPUnitSelectorClass { - GtkHBoxClass parent_class; - - gboolean (* set_unit)(SPUnitSelector *us, SPUnit const *old, SPUnit const *new_unit); -}; - -enum {SET_UNIT, LAST_SIGNAL}; - -static void sp_unit_selector_finalize(GObject *object); - -static guint signals[LAST_SIGNAL] = {0}; - -G_DEFINE_TYPE(SPUnitSelector, sp_unit_selector, GTK_TYPE_HBOX); - -static void -sp_unit_selector_class_init(SPUnitSelectorClass *klass) -{ - GObjectClass *object_class = G_OBJECT_CLASS(klass); - - signals[SET_UNIT] = g_signal_new("set_unit", - G_TYPE_FROM_CLASS(klass), - G_SIGNAL_RUN_LAST, - G_STRUCT_OFFSET(SPUnitSelectorClass, set_unit), - NULL, NULL, - sp_marshal_BOOLEAN__POINTER_POINTER, - G_TYPE_BOOLEAN, 2, - G_TYPE_POINTER, G_TYPE_POINTER); - - object_class->finalize = sp_unit_selector_finalize; -} - -static void -sp_unit_selector_init(SPUnitSelector *us) -{ - us->ctmscale = 1.0; - us->abbr = FALSE; - us->plural = TRUE; - - /** - * Create a combo_box and store with 2 columns, - * a label and a pointer to a SPUnit - */ - us->store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); - us->combo_box = gtk_combo_box_new_with_model (GTK_TREE_MODEL (us->store)); - - GtkCellRenderer *renderer = gtk_cell_renderer_text_new (); - g_object_set (renderer, "scale", 0.8, "scale-set", TRUE, NULL); - gtk_cell_renderer_set_padding (renderer, 2, 0); - gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (us->combo_box), renderer, TRUE); - gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (us->combo_box), renderer, "text", COMBO_COL_LABEL, NULL); - - gtk_widget_show (us->combo_box); - gtk_box_pack_start (GTK_BOX(us), us->combo_box, TRUE, TRUE, 0); -} - -static void -sp_unit_selector_finalize(GObject *object) -{ - SPUnitSelector *selector = SP_UNIT_SELECTOR(object); - - if (selector->combo_box) { - selector->combo_box = NULL; - } - - while (selector->adjustments) { - g_object_unref(selector->adjustments->data); - selector->adjustments = g_slist_remove(selector->adjustments, selector->adjustments->data); - } - - if (selector->units) { - sp_unit_free_list(selector->units); - } - - selector->unit = NULL; - - G_OBJECT_CLASS(sp_unit_selector_parent_class)->finalize(object); -} - -GtkWidget * -sp_unit_selector_new(guint bases) -{ - SPUnitSelector *us = SP_UNIT_SELECTOR(g_object_new(SP_TYPE_UNIT_SELECTOR, NULL)); - - sp_unit_selector_set_bases(us, bases); - - return GTK_WIDGET(us); -} - -void -sp_unit_selector_setsize(GtkWidget *us, guint w, guint h) -{ - gtk_widget_set_size_request((SP_UNIT_SELECTOR(us))->combo_box, w, h); -} - -SPUnit const * -sp_unit_selector_get_unit(SPUnitSelector const *us) -{ - g_return_val_if_fail(us != NULL, NULL); - g_return_val_if_fail(SP_IS_UNIT_SELECTOR(us), NULL); - - return us->unit; -} - - -static void -on_combo_box_changed (GtkComboBox *widget, SPUnitSelector *us) -{ - GtkTreeIter iter; - if (!gtk_combo_box_get_active_iter (widget, &iter)) { - return; - } - - SPUnit const *unit = NULL; - gtk_tree_model_get (GTK_TREE_MODEL(us->store), &iter, COMBO_COL_UNIT, &unit, -1); - - g_return_if_fail(unit != NULL); - -#ifdef UNIT_SELECTOR_VERBOSE - g_print("Old unit %s new unit %s\n", us->unit->name, unit->name); -#endif - - SPUnit const *old = us->unit; - us->unit = unit; - - us->update = TRUE; - - gboolean consumed = FALSE; - g_signal_emit(G_OBJECT(us), signals[SET_UNIT], 0, old, unit, &consumed); - - if ( !consumed - && ( unit->base == old->base - || ( unit->base == SP_UNIT_ABSOLUTE && old->base == SP_UNIT_DEVICE ) - || ( old->base == SP_UNIT_ABSOLUTE && unit->base == SP_UNIT_DEVICE ) ) ) { - // Either the same base, or absolute<->device: - /* Recalculate adjustments. */ - for (GSList *l = us->adjustments; l != NULL; l = g_slist_next(l)) { - GtkAdjustment *adj = GTK_ADJUSTMENT(l->data); - gdouble val = gtk_adjustment_get_value (adj); -#ifdef UNIT_SELECTOR_VERBOSE - g_print("Old val %g ... ", val); -#endif - val = sp_convert_distance_full(val, *old, *unit); -#ifdef UNIT_SELECTOR_VERBOSE - g_print("new val %g\n", val); -#endif - gtk_adjustment_set_value (adj, val); - } - /* need to separate the value changing from the notification - * or else the unit changes can break the calculations */ - for (GSList *l = us->adjustments; l != NULL; l = g_slist_next(l)) { - gtk_adjustment_value_changed(GTK_ADJUSTMENT(l->data)); - } - } else if (!consumed && unit->base != old->base) { - /* when the base changes, signal all the adjustments to get them - * to recalculate */ - for (GSList *l = us->adjustments; l != NULL; l = g_slist_next(l)) { - g_signal_emit_by_name(G_OBJECT(l->data), "value_changed"); - } - } - - us->update = FALSE; - -} - -static void -spus_rebuild_menu(SPUnitSelector *us) -{ - - gtk_list_store_clear(us->store); - - GtkTreeIter iter; - - gint pos = 0; - gint p = 0; - for (GSList *l = us->units; l != NULL; l = l->next) { - SPUnit const *u = static_cast<SPUnit const*>(l->data); - - // use only abbreviations in the menu - // i = gtk_menu_item_new_with_label((us->abbr) ? (us->plural) ? u->abbr_plural : u->abbr : (us->plural) ? u->plural : u->name); - gtk_list_store_append (us->store, &iter); - gtk_list_store_set (us->store, &iter, COMBO_COL_LABEL, u->abbr, COMBO_COL_UNIT, (gpointer) u, -1); - - if (u == us->unit) { - pos = p; - } - - p += 1; - } - - gtk_combo_box_set_active(GTK_COMBO_BOX(us->combo_box), pos); - g_signal_connect (G_OBJECT (us->combo_box), "changed", G_CALLBACK (on_combo_box_changed), us); -} - -void -sp_unit_selector_set_bases(SPUnitSelector *us, guint bases) -{ - g_return_if_fail(us != NULL); - g_return_if_fail(SP_IS_UNIT_SELECTOR(us)); - - if (bases == us->bases) return; - - GSList *units = sp_unit_get_list(bases); - g_return_if_fail(units != NULL); - sp_unit_free_list(us->units); - us->units = units; - us->unit = static_cast<SPUnit *>(units->data); - - spus_rebuild_menu(us); -} - -void -sp_unit_selector_add_unit(SPUnitSelector *us, SPUnit const *unit, int position) -{ - if (!g_slist_find(us->units, (gpointer) unit)) { - us->units = g_slist_insert(us->units, (gpointer) unit, position); - - spus_rebuild_menu(us); - } -} - -void -sp_unit_selector_set_unit(SPUnitSelector *us, SPUnit const *unit) -{ - g_return_if_fail(us != NULL); - g_return_if_fail(SP_IS_UNIT_SELECTOR(us)); - - if (unit == NULL) { - return; // silently return, by default a newly created selector uses pt - } - if (unit == us->unit) { - return; - } - - gint const pos = g_slist_index(us->units, (gpointer) unit); - g_return_if_fail(pos >= 0); - - gtk_combo_box_set_active(GTK_COMBO_BOX(us->combo_box), pos); - - SPUnit const *old = us->unit; - us->unit = unit; - - /* Recalculate adjustments */ - for (GSList *l = us->adjustments; l != NULL; l = l->next) { - GtkAdjustment *adj = GTK_ADJUSTMENT(l->data); - gdouble const val = sp_convert_distance_full(gtk_adjustment_get_value (adj), *old, *unit); - gtk_adjustment_set_value(adj, val); - } -} - -void -sp_unit_selector_add_adjustment(SPUnitSelector *us, GtkAdjustment *adj) -{ - g_return_if_fail(us != NULL); - g_return_if_fail(SP_IS_UNIT_SELECTOR(us)); - g_return_if_fail(adj != NULL); - g_return_if_fail(GTK_IS_ADJUSTMENT(adj)); - - g_return_if_fail(!g_slist_find(us->adjustments, adj)); - - g_object_ref(adj); - us->adjustments = g_slist_prepend(us->adjustments, adj); -} - -void -sp_unit_selector_remove_adjustment(SPUnitSelector *us, GtkAdjustment *adj) -{ - g_return_if_fail(us != NULL); - g_return_if_fail(SP_IS_UNIT_SELECTOR(us)); - g_return_if_fail(adj != NULL); - g_return_if_fail(GTK_IS_ADJUSTMENT(adj)); - - g_return_if_fail(g_slist_find(us->adjustments, adj)); - - us->adjustments = g_slist_remove(us->adjustments, adj); - g_object_unref(adj); -} - -gboolean -sp_unit_selector_update_test(SPUnitSelector const *selector) -{ - g_return_val_if_fail(selector != NULL, FALSE); - g_return_val_if_fail(SP_IS_UNIT_SELECTOR(selector), FALSE); - - return selector->update; -} - -double -sp_unit_selector_get_value_in_pixels(SPUnitSelector const *selector, GtkAdjustment *adj) -{ - g_return_val_if_fail(selector != NULL, gtk_adjustment_get_value (adj)); - g_return_val_if_fail(SP_IS_UNIT_SELECTOR(selector), gtk_adjustment_get_value (adj)); - - return sp_units_get_pixels(gtk_adjustment_get_value (adj), *(selector->unit)); -} - -void -sp_unit_selector_set_value_in_pixels(SPUnitSelector *selector, GtkAdjustment *adj, double value) -{ - g_return_if_fail(selector != NULL); - g_return_if_fail(SP_IS_UNIT_SELECTOR(selector)); - - gtk_adjustment_set_value(adj, sp_pixels_get_units(value, *(selector->unit))); -} - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/unit-menu.h b/src/helper/unit-menu.h deleted file mode 100644 index b3ee6bcd1..000000000 --- a/src/helper/unit-menu.h +++ /dev/null @@ -1,60 +0,0 @@ -#ifndef SP_UNIT_MENU_H -#define SP_UNIT_MENU_H - -/* - * SPUnitMenu - * - * Generic (and quite unintelligent) grid item for gnome canvas - * - * Copyright (C) Lauris Kaplinski 2000 - * - */ - -#include <glib.h> -#include <gtk/gtk.h> - -struct SPUnit; -struct SPUnitSelector; -struct SPUnitSelectorClass; - -/* Unit selector Widget */ - -#define SP_TYPE_UNIT_SELECTOR (sp_unit_selector_get_type()) -#define SP_UNIT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_UNIT_SELECTOR, SPUnitSelector)) -#define SP_UNIT_SELECTOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), SP_TYPE_UNIT_SELECTOR, SPUnitSelectorClass)) -#define SP_IS_UNIT_SELECTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE((o), SP_TYPE_UNIT_SELECTOR)) -#define SP_IS_UNIT_SELECTOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE((k), SP_TYPE_UNIT_SELECTOR)) - -GType sp_unit_selector_get_type(void); - -GtkWidget *sp_unit_selector_new(guint bases); -void sp_unit_selector_setsize(GtkWidget *us, guint w, guint h); - -SPUnit const *sp_unit_selector_get_unit(SPUnitSelector const *selector); - -void sp_unit_selector_set_bases(SPUnitSelector *selector, guint bases); -void sp_unit_selector_add_unit(SPUnitSelector *selector, SPUnit const *unit, int position); - -void sp_unit_selector_set_unit(SPUnitSelector *selector, SPUnit const *unit); -void sp_unit_selector_add_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment); -void sp_unit_selector_remove_adjustment(SPUnitSelector *selector, GtkAdjustment *adjustment); - -gboolean sp_unit_selector_update_test(SPUnitSelector const *selector); - -double sp_unit_selector_get_value_in_pixels(SPUnitSelector const *selector, GtkAdjustment *adj); -void sp_unit_selector_set_value_in_pixels(SPUnitSelector *selector, GtkAdjustment *adj, double value); - - - -#endif // SP_UNIT_MENU_H - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/unit-tracker.cpp b/src/helper/unit-tracker.cpp deleted file mode 100644 index 609c2f292..000000000 --- a/src/helper/unit-tracker.cpp +++ /dev/null @@ -1,267 +0,0 @@ -/* - * Inkscape::UnitTracker - Simple mediator to synchronize changes to a set - * of possible units - * - * Authors: - * Jon A. Cruz <jon@joncruz.org> - * - * Copyright (C) 2007 Jon A. Cruz - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include <gtk/gtk.h> - -#include "unit-tracker.h" -#include "ege-select-one-action.h" - -namespace Inkscape { - -enum { - COLUMN_STRING, - COLUMN_SPUNIT, - N_COLUMNS -}; - -UnitTracker::UnitTracker( guint bases ) : - _active(0), - _isUpdating(false), - _activeUnit(0), - _store(0), - _unitList(0), - _actionList(0), - _adjList(0), - _priorValues() -{ - _store = gtk_list_store_new( N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER ); - setBase( bases ); -} - -UnitTracker::~UnitTracker() -{ - if ( _unitList ) { - sp_unit_free_list( _unitList ); - } - - // Unhook weak references to GtkActions - while ( _actionList ) { - g_signal_handlers_disconnect_by_func( G_OBJECT(_actionList->data), (gpointer)_unitChangedCB, this ); - g_object_weak_unref( G_OBJECT(_actionList->data), _actionFinalizedCB, this ); - _actionList = g_slist_delete_link( _actionList, _actionList ); - } - - // Unhook wek references to GtkAdjustments - while ( _adjList ) { - g_object_weak_unref( G_OBJECT(_adjList->data), _adjustmentFinalizedCB, this ); - _adjList = g_slist_delete_link( _adjList, _adjList ); - } -} - -void UnitTracker::setBase( guint bases ) -{ - GtkTreeIter iter; - _unitList = sp_unit_get_list( bases ); - for ( GSList* cur = _unitList; cur; cur = g_slist_next(cur) ) { - SPUnit* unit = static_cast<SPUnit*>(cur->data); - gtk_list_store_append( _store, &iter ); - gtk_list_store_set( _store, &iter, COLUMN_STRING, unit->abbr, COLUMN_SPUNIT, unit, -1 ); - } - gint count = gtk_tree_model_iter_n_children( GTK_TREE_MODEL(_store), 0 ); - if ( (count > 0) && (_active > count) ) { - _setActive( count - 1 ); - } else { - _setActive( _active ); - } -} - -void UnitTracker::addUnit( SPUnitId id, gint index ) -{ - GtkTreeIter iter; - const SPUnit* percentUnit = &sp_unit_get_by_id( id ); - gtk_list_store_insert( _store, &iter, index ); - gtk_list_store_set( _store, &iter, COLUMN_STRING, percentUnit->abbr, COLUMN_SPUNIT, percentUnit, -1 ); -} - -bool UnitTracker::isUpdating() const -{ - return _isUpdating; -} - -SPUnit const* UnitTracker::getActiveUnit() const -{ - return _activeUnit; -} - -void UnitTracker::setActiveUnit( SPUnit const *unit ) -{ - if ( unit ) { - GtkTreeIter iter; - int index = 0; - gboolean found = gtk_tree_model_get_iter_first( GTK_TREE_MODEL(_store), &iter ); - while ( found ) { - SPUnit* storedUnit = 0; - gtk_tree_model_get( GTK_TREE_MODEL(_store), &iter, COLUMN_SPUNIT, &storedUnit, -1 ); - if ( storedUnit && (storedUnit->unit_id == unit->unit_id) ) { - _setActive(index); - break; - } - - found = gtk_tree_model_iter_next( GTK_TREE_MODEL(_store), &iter ); - index++; - } - } -} - -void UnitTracker::addAdjustment( GtkAdjustment* adj ) -{ - if ( !g_slist_find( _adjList, adj ) ) { - g_object_weak_ref( G_OBJECT(adj), _adjustmentFinalizedCB, this ); - _adjList = g_slist_append( _adjList, adj ); - } -} - -void UnitTracker::setFullVal( GtkAdjustment* adj, gdouble val ) -{ - _priorValues[adj] = val; -} - -GtkAction* UnitTracker::createAction( gchar const* name, gchar const* label, gchar const* tooltip ) -{ - EgeSelectOneAction* act1 = ege_select_one_action_new( name, label, tooltip, NULL, GTK_TREE_MODEL(_store) ); - ege_select_one_action_set_label_column( act1, COLUMN_STRING ); - if ( _active ) { - ege_select_one_action_set_active( act1, _active ); - } - - ege_select_one_action_set_appearance( act1, "minimal" ); - g_object_weak_ref( G_OBJECT(act1), _actionFinalizedCB, this ); - g_signal_connect( G_OBJECT(act1), "changed", G_CALLBACK( _unitChangedCB ), this ); - _actionList = g_slist_append( _actionList, act1 ); - - return GTK_ACTION(act1); -} - -void UnitTracker::_unitChangedCB( GtkAction* action, gpointer data ) -{ - if ( action && data ) { - EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION(action); - gint active = ege_select_one_action_get_active( act ); - UnitTracker* self = reinterpret_cast<UnitTracker*>(data); - self->_setActive(active); - } -} - -void UnitTracker::_actionFinalizedCB( gpointer data, GObject *where_the_object_was ) -{ - if ( data && where_the_object_was ) { - UnitTracker* self = reinterpret_cast<UnitTracker*>(data); - self->_actionFinalized( where_the_object_was ); - } -} - -void UnitTracker::_adjustmentFinalizedCB( gpointer data, GObject *where_the_object_was ) -{ - if ( data && where_the_object_was ) { - UnitTracker* self = reinterpret_cast<UnitTracker*>(data); - self->_adjustmentFinalized( where_the_object_was ); - } -} - -void UnitTracker::_actionFinalized( GObject *where_the_object_was ) -{ - GSList* target = g_slist_find( _actionList, where_the_object_was ); - if ( target ) { - _actionList = g_slist_remove( _actionList, where_the_object_was ); - } else { - g_warning("Received a finalization callback for unknown object %p", where_the_object_was ); - } -} - -void UnitTracker::_adjustmentFinalized( GObject *where_the_object_was ) -{ - GSList* target = g_slist_find( _adjList, where_the_object_was ); - if ( target ) { - _adjList = g_slist_remove( _adjList, where_the_object_was ); - } else { - g_warning("Received a finalization callback for unknown object %p", where_the_object_was ); - } -} - -void UnitTracker::_setActive( gint active ) -{ - if ( active != _active || (_activeUnit == 0) ) { - gint oldActive = _active; - - GtkTreeIter iter; - gboolean found = gtk_tree_model_iter_nth_child( GTK_TREE_MODEL(_store), &iter, NULL, oldActive ); - if ( found ) { - SPUnit* unit = 0; - gtk_tree_model_get( GTK_TREE_MODEL(_store), &iter, COLUMN_SPUNIT, &unit, -1 ); - - found = gtk_tree_model_iter_nth_child( GTK_TREE_MODEL(_store), &iter, NULL, active ); - if ( found ) { - SPUnit* newUnit = 0; - gtk_tree_model_get( GTK_TREE_MODEL(_store), &iter, COLUMN_SPUNIT, &newUnit, -1 ); - _activeUnit = newUnit; - - if ( _adjList ) { - _fixupAdjustments( unit, newUnit ); - } - - } else { - g_warning("Did not find new unit"); - } - } else { - g_warning("Did not find old unit"); - } - - _active = active; - - for ( GSList* cur = _actionList; cur; cur = g_slist_next(cur) ) { - if ( IS_EGE_SELECT_ONE_ACTION( cur->data ) ) { - EgeSelectOneAction* act = EGE_SELECT_ONE_ACTION( cur->data ); - ege_select_one_action_set_active( act, active ); - } - } - } -} - -void UnitTracker::_fixupAdjustments( SPUnit const* oldUnit, SPUnit const *newUnit ) -{ - _isUpdating = true; - for ( GSList* cur = _adjList; cur; cur = g_slist_next(cur) ) { - GtkAdjustment* adj = GTK_ADJUSTMENT(cur->data); - gdouble oldVal = gtk_adjustment_get_value(adj); - gdouble val = oldVal; - - if ((oldUnit->base == SP_UNIT_ABSOLUTE || oldUnit->base == SP_UNIT_DEVICE) - && (newUnit->base == SP_UNIT_DIMENSIONLESS)) - { - val = 1.0 / newUnit->unittobase; - _priorValues[adj] = sp_units_get_pixels( oldVal, *oldUnit ); - } else if ((oldUnit->base == SP_UNIT_DIMENSIONLESS) - && (newUnit->base == SP_UNIT_ABSOLUTE || newUnit->base == SP_UNIT_DEVICE)) { - if ( _priorValues.find(adj) != _priorValues.end() ) { - val = sp_pixels_get_units( _priorValues[adj], *newUnit ); - } - } else { - val = sp_convert_distance_full( oldVal, *oldUnit, *newUnit ); - } - - gtk_adjustment_set_value( adj, val ); - } - _isUpdating = false; -} - -} - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/unit-tracker.h b/src/helper/unit-tracker.h deleted file mode 100644 index a15a0a6ca..000000000 --- a/src/helper/unit-tracker.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Inkscape::UnitTracker - Simple mediator to synchronize changes to a set - * of possible units - * - * Authors: - * Jon A. Cruz <jon@joncruz.org> - * - * Copyright (C) 2007 Jon A. Cruz - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef SEEN_INKSCAPE_UNIT_TRACKER_H -#define SEEN_INKSCAPE_UNIT_TRACKER_H - -#include <map> - -#include <gtk/gtk.h> - -#include "helper/units.h" - -namespace Inkscape { - -class UnitTracker -{ -public: - UnitTracker( guint bases = (SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE) ); - virtual ~UnitTracker(); - - void setBase( guint bases ); // SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE - void addUnit( SPUnitId id, gint index ); - - bool isUpdating() const; - - void setActiveUnit( SPUnit const *unit ); - SPUnit const* getActiveUnit() const; - - void addAdjustment( GtkAdjustment* adj ); - void setFullVal( GtkAdjustment* adj, gdouble val ); - - GtkAction* createAction( gchar const* name, gchar const* label, gchar const* tooltip ); - -private: - static void _unitChangedCB( GtkAction* action, gpointer data ); - static void _actionFinalizedCB( gpointer data, GObject *where_the_object_was ); - static void _adjustmentFinalizedCB( gpointer data, GObject *where_the_object_was ); - void _setActive( gint index ); - void _fixupAdjustments( SPUnit const* oldUnit, SPUnit const *newUnit ); - void _actionFinalized( GObject *where_the_object_was ); - void _adjustmentFinalized( GObject *where_the_object_was ); - - gint _active; - bool _isUpdating; - SPUnit* _activeUnit; - GtkListStore* _store; - GSList* _unitList; - GSList* _actionList; - GSList* _adjList; - std::map <GtkAdjustment*, gdouble> _priorValues; -}; - -} - -#endif // SEEN_INKSCAPE_UNIT_TRACKER_H - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/units-test.h b/src/helper/units-test.h deleted file mode 100644 index 05bc75eff..000000000 --- a/src/helper/units-test.h +++ /dev/null @@ -1,90 +0,0 @@ -#include <cxxtest/TestSuite.h> - -#include <helper/units.h> -#include <glibmm/i18n.h> -#include <math.h> - -class UnitsTest : public CxxTest::TestSuite { -public: - - UnitsTest() - { - } - virtual ~UnitsTest() {} - -// createSuite and destroySuite get us per-suite setup and teardown -// without us having to worry about static initialization order, etc. - static UnitsTest *createSuite() { return new UnitsTest(); } - static void destroySuite( UnitsTest *suite ) { delete suite; } - - void testConversions() - { - struct Case { double x; char const *abbr; double pts; } const tests[] = { - { 1.0, "pt", 1.0 }, - { 5.0, "pt", 5.0 }, - { 1.0, "in", 72.0 }, - { 2.0, "in", 144.0 }, - { 254., "mm", 720.0 }, - { 254., "cm", 7200. }, - { 254., "m", 720000. }, - { 1.5, "mm", (15 * 72. / 254) } - }; - for (unsigned i = 0; i < G_N_ELEMENTS(tests); ++i) { - Case const &c = tests[i]; - SPUnit const &unit = *sp_unit_get_by_abbreviation(N_(c.abbr)); - - double const calc_pts = sp_units_get_points(c.x, unit); - TS_ASSERT(approx_equal(calc_pts, c.pts)); - - double const calc_x = sp_points_get_units(c.pts, unit); - TS_ASSERT(approx_equal(calc_x, c.x)); - - double tmp = c.x; - bool const converted_to_pts = sp_convert_distance(&tmp, &unit, SP_PS_UNIT); - TS_ASSERT(converted_to_pts); - TS_ASSERT(approx_equal(tmp, c.pts)); - - tmp = c.pts; - bool const converted_from_pts = sp_convert_distance(&tmp, SP_PS_UNIT, &unit); - TS_ASSERT(converted_from_pts); - TS_ASSERT(approx_equal(tmp, c.x)); - } - } - - void testUnitTable() - { - TS_ASSERT(sp_units_table_sane()); - } - -private: - /* N.B. Wrongly returns false if both near 0. (Not a problem for current users.) */ - bool approx_equal(double const x, double const y) - { - return fabs(x / y - 1) < 1e-15; - } - - double sp_units_get_points(double const x, SPUnit const &unit) - { - SPUnit const &pt_unit = sp_unit_get_by_id(SP_UNIT_PT); - double const px = sp_units_get_pixels(x, unit); - return sp_pixels_get_units(px, pt_unit); - } - - double sp_points_get_units(double const pts, SPUnit const &unit) - { - SPUnit const &pt_unit = sp_unit_get_by_id(SP_UNIT_PT); - double const px = sp_units_get_pixels(pts, pt_unit); - return sp_pixels_get_units(px, unit); - } -}; - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/units.cpp b/src/helper/units.cpp deleted file mode 100644 index 1593fc131..000000000 --- a/src/helper/units.cpp +++ /dev/null @@ -1,261 +0,0 @@ -#define __SP_PAPER_C__ - -/* - * SPUnit - * - * Ported from libgnomeprint - * - * Authors: - * Dirk Luetjens <dirk@luedi.oche.de> - * Yves Arrouye <Yves.Arrouye@marin.fdn.fr> - * Lauris Kaplinski <lauris@ximian.com> - * bulia byak <buliabyak@users.sf.net> - * - * Copyright 1999-2001 Ximian, Inc. and authors - * - */ - -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include "helper/units.h" -#include <glib.h> // g_assert() -#include <glibmm/i18n.h> -#include "unit-constants.h" -#include "svg/svg-length.h" - -/* todo: use some fancy unit program */ - -/* The order determines the order of the list returned by sp_unit_get_list. - * (It can also affect string lookups if there are any duplicates in the - * current locale... hopefully none.) If you re-order this list, then you must - * also re-order the SPUnitId enum values accordingly. Run `make check' (which - * calls sp_unit_table_sane) to ensure that the two are in sync. - */ -SPUnit const sp_units[] = { - {SP_UNIT_SCALE, SP_UNIT_DIMENSIONLESS, 1.0, SP_NONE, SVGLength::NONE, N_("Unit"), "", N_("Units"), ""}, - {SP_UNIT_PT, SP_UNIT_ABSOLUTE, PX_PER_PT, SP_PT, SVGLength::PT, N_("Point"), N_("pt"), N_("Points"), N_("Pt")}, - {SP_UNIT_PC, SP_UNIT_ABSOLUTE, PX_PER_PC, SP_PC, SVGLength::PC, N_("Pica"), N_("pc"), N_("Picas"), N_("Pc")}, - {SP_UNIT_PX, SP_UNIT_DEVICE, PX_PER_PX, SP_PX, SVGLength::PX, N_("Pixel"), N_("px"), N_("Pixels"), N_("Px")}, - /* You can add new elements from this point forward */ - {SP_UNIT_PERCENT, SP_UNIT_DIMENSIONLESS, 0.01, SP_NONE, SVGLength::PERCENT, N_("Percent"), N_("%"), N_("Percents"), N_("%")}, - {SP_UNIT_MM, SP_UNIT_ABSOLUTE, PX_PER_MM, SP_MM, SVGLength::MM, N_("Millimeter"), N_("mm"), N_("Millimeters"), N_("mm")}, - {SP_UNIT_CM, SP_UNIT_ABSOLUTE, PX_PER_CM, SP_CM, SVGLength::CM, N_("Centimeter"), N_("cm"), N_("Centimeters"), N_("cm")}, - {SP_UNIT_M, SP_UNIT_ABSOLUTE, PX_PER_M, SP_M, SVGLength::NONE, N_("Meter"), N_("m"), N_("Meters"), N_("m")}, // no svg_unit - {SP_UNIT_IN, SP_UNIT_ABSOLUTE, PX_PER_IN, SP_IN, SVGLength::INCH, N_("Inch"), N_("in"), N_("Inches"), N_("in")}, - {SP_UNIT_FT, SP_UNIT_ABSOLUTE, PX_PER_FT, SP_FT, SVGLength::FOOT, N_("Foot"), N_("ft"), N_("Feet"), N_("ft")}, - /* Volatiles do not have default, so there are none here */ - // TRANSLATORS: for info, see http://www.w3.org/TR/REC-CSS2/syndata.html#length-units - {SP_UNIT_EM, SP_UNIT_VOLATILE, 1.0, SP_NONE, SVGLength::EM, N_("Em square"), N_("em"), N_("Em squares"), N_("em")}, - // TRANSLATORS: for info, see http://www.w3.org/TR/REC-CSS2/syndata.html#length-units - {SP_UNIT_EX, SP_UNIT_VOLATILE, 1.0, SP_NONE, SVGLength::EX, N_("Ex square"), N_("ex"), N_("Ex squares"), N_("ex")}, -}; - -#define sp_num_units G_N_ELEMENTS(sp_units) - -SPUnit const * -sp_unit_get_by_abbreviation(gchar const *abbreviation) -{ - g_return_val_if_fail(abbreviation != NULL, NULL); - - for (unsigned i = 0 ; i < sp_num_units ; i++) { - if (!g_ascii_strcasecmp(abbreviation, sp_units[i].abbr)) return &sp_units[i]; - if (!g_ascii_strcasecmp(abbreviation, sp_units[i].abbr_plural)) return &sp_units[i]; - } - - return NULL; -} - -gchar const * -sp_unit_get_abbreviation(SPUnit const *unit) -{ - g_return_val_if_fail(unit != NULL, NULL); - - return unit->abbr; -} - -gchar const * -sp_unit_get_plural (SPUnit const *unit) -{ - g_return_val_if_fail(unit != NULL, NULL); - - return unit->plural; -} - -SPMetric sp_unit_get_metric(SPUnit const *unit) -{ - g_return_val_if_fail(unit != NULL, SP_NONE); - - return unit->metric; -} - -guint sp_unit_get_svg_unit(SPUnit const *unit) -{ - g_return_val_if_fail(unit != NULL, SP_NONE); - - return unit->svg_unit; -} - -GSList * -sp_unit_get_list(guint bases) -{ - g_return_val_if_fail((bases & ~SP_UNITS_ALL) == 0, NULL); - - GSList *units = NULL; - for (unsigned i = sp_num_units ; i--; ) { - if (bases & sp_units[i].base) { - units = g_slist_prepend(units, (gpointer) &sp_units[i]); - } - } - - return units; -} - -void -sp_unit_free_list(GSList *units) -{ - g_slist_free(units); -} - -/* These are pure utility */ -/* Return TRUE if conversion is possible */ -gboolean -sp_convert_distance(gdouble *distance, SPUnit const *from, SPUnit const *to) -{ - g_return_val_if_fail(distance != NULL, FALSE); - g_return_val_if_fail(from != NULL, FALSE); - g_return_val_if_fail(to != NULL, FALSE); - - if (from == to) return TRUE; - if ((from->base == SP_UNIT_DIMENSIONLESS) || (to->base == SP_UNIT_DIMENSIONLESS)) { - *distance = *distance * from->unittobase / to->unittobase; - return TRUE; - } - if ((from->base == SP_UNIT_VOLATILE) || (to->base == SP_UNIT_VOLATILE)) return FALSE; - - if ((from->base == to->base) - || ((from->base == SP_UNIT_DEVICE) && (to->base == SP_UNIT_ABSOLUTE)) - || ((from->base == SP_UNIT_ABSOLUTE) && (to->base == SP_UNIT_DEVICE))) - { - *distance = *distance * from->unittobase / to->unittobase; - return TRUE; - } - - return FALSE; -} - -/** @param devicetransform for device units. */ -/* TODO: Remove the ctmscale parameter given that we no longer have SP_UNIT_USERSPACE. */ -gdouble -sp_convert_distance_full(gdouble const from_dist, SPUnit const &from, SPUnit const &to) -{ - if (&from == &to) { - return from_dist; - } - if (from.base == to.base) { - gdouble ret = from_dist; - bool const succ = sp_convert_distance(&ret, &from, &to); - g_assert(succ); - return ret; - } - if ((from.base == SP_UNIT_DIMENSIONLESS) - || (to.base == SP_UNIT_DIMENSIONLESS)) - { - return from_dist * from.unittobase / to.unittobase; - } - g_return_val_if_fail(((from.base != SP_UNIT_VOLATILE) - && (to.base != SP_UNIT_VOLATILE)), - from_dist); - - gdouble absolute; - switch (from.base) { - case SP_UNIT_ABSOLUTE: - case SP_UNIT_DEVICE: - absolute = from_dist * from.unittobase; - break; - default: - g_warning("file %s: line %d: Illegal unit (base 0x%x)", __FILE__, __LINE__, from.base); - return from_dist; - } - - gdouble ret; - switch (to.base) { - default: - g_warning("file %s: line %d: Illegal unit (base 0x%x)", __FILE__, __LINE__, to.base); - /* FALL-THROUGH */ - case SP_UNIT_ABSOLUTE: - case SP_UNIT_DEVICE: - ret = absolute / to.unittobase; - break; - } - - return ret; -} - -/* Some more convenience */ - -gdouble -sp_units_get_pixels(gdouble const units, SPUnit const &unit) -{ - if (unit.base == SP_UNIT_ABSOLUTE || unit.base == SP_UNIT_DEVICE) { - return units * unit.unittobase; - } else { - g_warning("Different unit bases: No exact unit conversion available"); - return units * unit.unittobase; - } -} - -gdouble -sp_pixels_get_units(gdouble const pixels, SPUnit const &unit) -{ - if (unit.base == SP_UNIT_ABSOLUTE || unit.base == SP_UNIT_DEVICE) { - return pixels / unit.unittobase; - } else { - g_warning("Different unit bases: No exact unit conversion available"); - return pixels / unit.unittobase; - } -} - -bool -sp_units_table_sane() -{ - for (unsigned i = 0; i < G_N_ELEMENTS(sp_units); ++i) { - if (unsigned(sp_units[i].unit_id) != i) { - return false; - } - } - return true; -} - -/** Converts angle (in deg) to compass display */ -double -angle_to_compass(double angle) -{ - double ret = 90 - angle; - if (ret < 0) - ret = 360 + ret; - return ret; -} - -/** Converts angle (in deg) to compass display */ -double -angle_from_compass(double angle) -{ - double ret = 90 - angle; - if (ret > 180) - ret = ret - 180; - return ret; -} - - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/helper/units.h b/src/helper/units.h deleted file mode 100644 index 93bd70615..000000000 --- a/src/helper/units.h +++ /dev/null @@ -1,146 +0,0 @@ -#ifndef __SP_UNIT_H__ -#define __SP_UNIT_H__ - -/* - * SPUnit - * - * Ported from libgnomeprint - * - * Authors: - * Dirk Luetjens <dirk@luedi.oche.de> - * Yves Arrouye <Yves.Arrouye@marin.fdn.fr> - * Lauris Kaplinski <lauris@ximian.com> - * - * Copyright 1999-2001 Ximian, Inc. and authors - * - */ - -#include <glib.h> -#include "sp-metric.h" - - -/* - * Units and conversion methods used by libgnomeprint. - * - * You need those for certain config keys (like paper size), if you are - * interested in using these (look at gnome-print-config.h for discussion, - * why you may NOT be interested in paper size). - * - * Unit bases define set of mutually unrelated measuring systems (numbers, - * paper, screen and dimesionless user coordinates). Still, you can convert - * between those, specifying scaling factors explicitly. - * - * Paper (i.e. output) coordinates are taken as absolute real world units. - * It has some justification, because screen unit (pixel) size changes, - * if you change screen resolution, while you cannot change output on paper - * as easily (unless you have thermally contracting paper, of course). - * - */ - -struct SPUnit; -struct SPDistance; - -/* - * The base linear ("absolute") unit is 1/72th of an inch, i.e. the base unit of postscript. - */ - -/* - * Unit bases - */ -enum SPUnitBase { - SP_UNIT_DIMENSIONLESS = (1 << 0), /* For percentages and like */ - SP_UNIT_ABSOLUTE = (1 << 1), /* Real world distances - i.e. mm, cm... */ - SP_UNIT_DEVICE = (1 << 2), /* Pixels in the SVG/CSS sense. */ - SP_UNIT_VOLATILE = (1 << 3) /* em and ex */ -}; - -/* - * Units: indexes into sp_units. - */ -enum SPUnitId { - SP_UNIT_SCALE, // 1.0 == 100% - SP_UNIT_PT, // Postscript points: exactly 72 per inch - SP_UNIT_PC, // Pica; there are 12 points per pica - SP_UNIT_PX, // "Pixels" in the CSS sense; though Inkscape assumes a constant 90 per inch. - SP_UNIT_PERCENT, /* Note: In Inkscape this often means "relative to current value" (for - users to edit a value), rather than the SVG/CSS use of percentages. */ - SP_UNIT_MM, // millimetres - SP_UNIT_CM, // centimetres - SP_UNIT_M, // metres - SP_UNIT_IN, // inches - SP_UNIT_FT, // foot - SP_UNIT_EM, // font-size of relevant font - SP_UNIT_EX, // x-height of relevant font - sp_max_unit_id = SP_UNIT_EX // For bounds-checking in sp_unit_get_by_id. -}; - -/* - * Notice, that for correct menus etc. you have to use - * ngettext method family yourself. For that reason we - * do not provide translations in unit names. - * I also do not know, whether to allow user-created units, - * because this would certainly confuse textdomain. - */ - -struct SPUnit { - SPUnitId unit_id; /* used as sanity check */ - SPUnitBase base; - gdouble unittobase; /* how many base units in this unit */ - SPMetric metric; // the corresponding SPMetric from sp-metrics.h - guint svg_unit; // the corresponding SVGLengthUnit - - /* When using, you must call "gettext" on them so they're translated */ - gchar const *name; - gchar const *abbr; - gchar const *plural; - gchar const *abbr_plural; -}; - -const SPUnit *sp_unit_get_by_abbreviation (const gchar *abbreviation); -/* When using, you must call "gettext" on them so they're translated */ -const gchar *sp_unit_get_abbreviation (const SPUnit *unit); -gchar const *sp_unit_get_plural (SPUnit const *unit); - -SPMetric sp_unit_get_metric(SPUnit const *unit); -guint sp_unit_get_svg_unit(SPUnit const *unit); - -extern SPUnit const sp_units[]; - -inline SPUnit const & -sp_unit_get_by_id(SPUnitId const id) -{ - /* inline because the compiler should optimize away the g_return_val_if_fail test in the - usual case that the argument value is known at compile-time, leaving just - "return sp_units[constant]". */ - unsigned const ix = unsigned(id); - g_return_val_if_fail(ix <= sp_max_unit_id, sp_units[SP_UNIT_PX]); - return sp_units[ix]; -} - -#define SP_PS_UNIT (&sp_unit_get_by_id(SP_UNIT_PT)) - - -/** Used solely by units-test.cpp. */ -bool sp_units_table_sane(); - -#define SP_UNITS_ALL (SP_UNIT_DIMENSIONLESS | SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE | SP_UNIT_VOLATILE) - -GSList *sp_unit_get_list (guint bases); -void sp_unit_free_list (GSList *units); - -/* These are pure utility */ -/* Return TRUE if conversion is possible, FALSE if unit bases differ */ -gboolean sp_convert_distance (gdouble *distance, const SPUnit *from, const SPUnit *to); - -/* If either one is NULL, transconverting to/from that base fails */ -/* Generic conversion between volatile units would be useless anyways */ -gdouble sp_convert_distance_full(gdouble const from_dist, SPUnit const &from, SPUnit const &to); - -/* Some more convenience */ -gdouble sp_units_get_pixels(gdouble const units, SPUnit const &unit); -gdouble sp_pixels_get_units(gdouble const pixels, SPUnit const &unit); - -double angle_to_compass(double angle); -double angle_from_compass(double angle); - -#endif diff --git a/src/io/CMakeLists.txt b/src/io/CMakeLists.txt index 34502d3db..8f8355c03 100644 --- a/src/io/CMakeLists.txt +++ b/src/io/CMakeLists.txt @@ -7,7 +7,6 @@ set(io_SRC inkjar.cpp inkscapestream.cpp resource.cpp - simple-sax.cpp stringstream.cpp sys.cpp uristream.cpp @@ -22,7 +21,6 @@ set(io_SRC inkjar.h inkscapestream.h resource.h - simple-sax.h stringstream.h sys.h uristream.h diff --git a/src/io/Makefile_insert b/src/io/Makefile_insert index 935c0cc07..804c9575a 100644 --- a/src/io/Makefile_insert +++ b/src/io/Makefile_insert @@ -15,8 +15,6 @@ ink_common_sources += \ io/inkscapestream.h \ io/resource.cpp \ io/resource.h \ - io/simple-sax.cpp \ - io/simple-sax.h \ io/stringstream.cpp \ io/stringstream.h \ io/sys.h \ diff --git a/src/io/simple-sax.cpp b/src/io/simple-sax.cpp deleted file mode 100644 index 33e7b72bf..000000000 --- a/src/io/simple-sax.cpp +++ /dev/null @@ -1,1494 +0,0 @@ -/* - * SimpleSAX - * - * Authors: - * Jon A. Cruz <jon@joncruz.org> - * - * Copyright (C) 2004 AUTHORS - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include <string> -#include <cstring> -#include "simple-sax.h" - -namespace Inkscape { -namespace IO { - -SaxHandler::SaxHandler() -{ - memset( &sax, 0, sizeof(sax) ); - sax.startDocument = startDocument; - sax.endDocument = endDocument; - sax.startElement = startElement; - sax.endElement = endElement; - sax.characters = characters; -} - -SaxHandler::~SaxHandler() -{ -} - - -static int xmlErrorVals[] = { - XML_ERR_OK, - XML_ERR_INTERNAL_ERROR, - XML_ERR_NO_MEMORY, - XML_ERR_DOCUMENT_START, - XML_ERR_DOCUMENT_EMPTY, - XML_ERR_DOCUMENT_END, - XML_ERR_INVALID_HEX_CHARREF, - XML_ERR_INVALID_DEC_CHARREF, - XML_ERR_INVALID_CHARREF, - XML_ERR_INVALID_CHAR, - XML_ERR_CHARREF_AT_EOF, - XML_ERR_CHARREF_IN_PROLOG, - XML_ERR_CHARREF_IN_EPILOG, - XML_ERR_CHARREF_IN_DTD, - XML_ERR_ENTITYREF_AT_EOF, - XML_ERR_ENTITYREF_IN_PROLOG, - XML_ERR_ENTITYREF_IN_EPILOG, - XML_ERR_ENTITYREF_IN_DTD, - XML_ERR_PEREF_AT_EOF, - XML_ERR_PEREF_IN_PROLOG, - XML_ERR_PEREF_IN_EPILOG, - XML_ERR_PEREF_IN_INT_SUBSET, - XML_ERR_ENTITYREF_NO_NAME, - XML_ERR_ENTITYREF_SEMICOL_MISSING, - XML_ERR_PEREF_NO_NAME, - XML_ERR_PEREF_SEMICOL_MISSING, - XML_ERR_UNDECLARED_ENTITY, - XML_WAR_UNDECLARED_ENTITY, - XML_ERR_UNPARSED_ENTITY, - XML_ERR_ENTITY_IS_EXTERNAL, - XML_ERR_ENTITY_IS_PARAMETER, - XML_ERR_UNKNOWN_ENCODING, - XML_ERR_UNSUPPORTED_ENCODING, - XML_ERR_STRING_NOT_STARTED, - XML_ERR_STRING_NOT_CLOSED, - XML_ERR_NS_DECL_ERROR, - XML_ERR_ENTITY_NOT_STARTED, - XML_ERR_ENTITY_NOT_FINISHED, - XML_ERR_LT_IN_ATTRIBUTE, - XML_ERR_ATTRIBUTE_NOT_STARTED, - XML_ERR_ATTRIBUTE_NOT_FINISHED, - XML_ERR_ATTRIBUTE_WITHOUT_VALUE, - XML_ERR_ATTRIBUTE_REDEFINED, - XML_ERR_LITERAL_NOT_STARTED, - XML_ERR_LITERAL_NOT_FINISHED, - XML_ERR_COMMENT_NOT_FINISHED, - XML_ERR_PI_NOT_STARTED, - XML_ERR_PI_NOT_FINISHED, - XML_ERR_NOTATION_NOT_STARTED, - XML_ERR_NOTATION_NOT_FINISHED, - XML_ERR_ATTLIST_NOT_STARTED, - XML_ERR_ATTLIST_NOT_FINISHED, - XML_ERR_MIXED_NOT_STARTED, - XML_ERR_MIXED_NOT_FINISHED, - XML_ERR_ELEMCONTENT_NOT_STARTED, - XML_ERR_ELEMCONTENT_NOT_FINISHED, - XML_ERR_XMLDECL_NOT_STARTED, - XML_ERR_XMLDECL_NOT_FINISHED, - XML_ERR_CONDSEC_NOT_STARTED, - XML_ERR_CONDSEC_NOT_FINISHED, - XML_ERR_EXT_SUBSET_NOT_FINISHED, - XML_ERR_DOCTYPE_NOT_FINISHED, - XML_ERR_MISPLACED_CDATA_END, - XML_ERR_CDATA_NOT_FINISHED, - XML_ERR_RESERVED_XML_NAME, - XML_ERR_SPACE_REQUIRED, - XML_ERR_SEPARATOR_REQUIRED, - XML_ERR_NMTOKEN_REQUIRED, - XML_ERR_NAME_REQUIRED, - XML_ERR_PCDATA_REQUIRED, - XML_ERR_URI_REQUIRED, - XML_ERR_PUBID_REQUIRED, - XML_ERR_LT_REQUIRED, - XML_ERR_GT_REQUIRED, - XML_ERR_LTSLASH_REQUIRED, - XML_ERR_EQUAL_REQUIRED, - XML_ERR_TAG_NAME_MISMATCH, - XML_ERR_TAG_NOT_FINISHED, - XML_ERR_STANDALONE_VALUE, - XML_ERR_ENCODING_NAME, - XML_ERR_HYPHEN_IN_COMMENT, - XML_ERR_INVALID_ENCODING, - XML_ERR_EXT_ENTITY_STANDALONE, - XML_ERR_CONDSEC_INVALID, - XML_ERR_VALUE_REQUIRED, - XML_ERR_NOT_WELL_BALANCED, - XML_ERR_EXTRA_CONTENT, - XML_ERR_ENTITY_CHAR_ERROR, - XML_ERR_ENTITY_PE_INTERNAL, - XML_ERR_ENTITY_LOOP, - XML_ERR_ENTITY_BOUNDARY, - XML_ERR_INVALID_URI, - XML_ERR_URI_FRAGMENT, - XML_WAR_CATALOG_PI, - XML_ERR_NO_DTD, - XML_ERR_CONDSEC_INVALID_KEYWORD, - XML_ERR_VERSION_MISSING, - XML_WAR_UNKNOWN_VERSION, - XML_WAR_LANG_VALUE, - XML_WAR_NS_URI, - XML_WAR_NS_URI_RELATIVE, - XML_ERR_MISSING_ENCODING, - XML_NS_ERR_XML_NAMESPACE, - XML_NS_ERR_UNDEFINED_NAMESPACE, - XML_NS_ERR_QNAME, - XML_NS_ERR_ATTRIBUTE_REDEFINED, - XML_DTD_ATTRIBUTE_DEFAULT, - XML_DTD_ATTRIBUTE_REDEFINED, - XML_DTD_ATTRIBUTE_VALUE, - XML_DTD_CONTENT_ERROR, - XML_DTD_CONTENT_MODEL, - XML_DTD_CONTENT_NOT_DETERMINIST, - XML_DTD_DIFFERENT_PREFIX, - XML_DTD_ELEM_DEFAULT_NAMESPACE, - XML_DTD_ELEM_NAMESPACE, - XML_DTD_ELEM_REDEFINED, - XML_DTD_EMPTY_NOTATION, - XML_DTD_ENTITY_TYPE, - XML_DTD_ID_FIXED, - XML_DTD_ID_REDEFINED, - XML_DTD_ID_SUBSET, - XML_DTD_INVALID_CHILD, - XML_DTD_INVALID_DEFAULT, - XML_DTD_LOAD_ERROR, - XML_DTD_MISSING_ATTRIBUTE, - XML_DTD_MIXED_CORRUPT, - XML_DTD_MULTIPLE_ID, - XML_DTD_NO_DOC, - XML_DTD_NO_DTD, - XML_DTD_NO_ELEM_NAME, - XML_DTD_NO_PREFIX, - XML_DTD_NO_ROOT, - XML_DTD_NOTATION_REDEFINED, - XML_DTD_NOTATION_VALUE, - XML_DTD_NOT_EMPTY, - XML_DTD_NOT_PCDATA, - XML_DTD_NOT_STANDALONE, - XML_DTD_ROOT_NAME, - XML_DTD_STANDALONE_WHITE_SPACE, - XML_DTD_UNKNOWN_ATTRIBUTE, - XML_DTD_UNKNOWN_ELEM, - XML_DTD_UNKNOWN_ENTITY, - XML_DTD_UNKNOWN_ID, - XML_DTD_UNKNOWN_NOTATION, - XML_DTD_STANDALONE_DEFAULTED, - XML_DTD_XMLID_VALUE, - XML_DTD_XMLID_TYPE, - XML_HTML_STRUCURE_ERROR, - XML_HTML_UNKNOWN_TAG, - XML_RNGP_ANYNAME_ATTR_ANCESTOR, - XML_RNGP_ATTR_CONFLICT, - XML_RNGP_ATTRIBUTE_CHILDREN, - XML_RNGP_ATTRIBUTE_CONTENT, - XML_RNGP_ATTRIBUTE_EMPTY, - XML_RNGP_ATTRIBUTE_NOOP, - XML_RNGP_CHOICE_CONTENT, - XML_RNGP_CHOICE_EMPTY, - XML_RNGP_CREATE_FAILURE, - XML_RNGP_DATA_CONTENT, - XML_RNGP_DEF_CHOICE_AND_INTERLEAVE, - XML_RNGP_DEFINE_CREATE_FAILED, - XML_RNGP_DEFINE_EMPTY, - XML_RNGP_DEFINE_MISSING, - XML_RNGP_DEFINE_NAME_MISSING, - XML_RNGP_ELEM_CONTENT_EMPTY, - XML_RNGP_ELEM_CONTENT_ERROR, - XML_RNGP_ELEMENT_EMPTY, - XML_RNGP_ELEMENT_CONTENT, - XML_RNGP_ELEMENT_NAME, - XML_RNGP_ELEMENT_NO_CONTENT, - XML_RNGP_ELEM_TEXT_CONFLICT, - XML_RNGP_EMPTY, - XML_RNGP_EMPTY_CONSTRUCT, - XML_RNGP_EMPTY_CONTENT, - XML_RNGP_EMPTY_NOT_EMPTY, - XML_RNGP_ERROR_TYPE_LIB, - XML_RNGP_EXCEPT_EMPTY, - XML_RNGP_EXCEPT_MISSING, - XML_RNGP_EXCEPT_MULTIPLE, - XML_RNGP_EXCEPT_NO_CONTENT, - XML_RNGP_EXTERNALREF_EMTPY, - XML_RNGP_EXTERNAL_REF_FAILURE, - XML_RNGP_EXTERNALREF_RECURSE, - XML_RNGP_FORBIDDEN_ATTRIBUTE, - XML_RNGP_FOREIGN_ELEMENT, - XML_RNGP_GRAMMAR_CONTENT, - XML_RNGP_GRAMMAR_EMPTY, - XML_RNGP_GRAMMAR_MISSING, - XML_RNGP_GRAMMAR_NO_START, - XML_RNGP_GROUP_ATTR_CONFLICT, - XML_RNGP_HREF_ERROR, - XML_RNGP_INCLUDE_EMPTY, - XML_RNGP_INCLUDE_FAILURE, - XML_RNGP_INCLUDE_RECURSE, - XML_RNGP_INTERLEAVE_ADD, - XML_RNGP_INTERLEAVE_CREATE_FAILED, - XML_RNGP_INTERLEAVE_EMPTY, - XML_RNGP_INTERLEAVE_NO_CONTENT, - XML_RNGP_INVALID_DEFINE_NAME, - XML_RNGP_INVALID_URI, - XML_RNGP_INVALID_VALUE, - XML_RNGP_MISSING_HREF, - XML_RNGP_NAME_MISSING, - XML_RNGP_NEED_COMBINE, - XML_RNGP_NOTALLOWED_NOT_EMPTY, - XML_RNGP_NSNAME_ATTR_ANCESTOR, - XML_RNGP_NSNAME_NO_NS, - XML_RNGP_PARAM_FORBIDDEN, - XML_RNGP_PARAM_NAME_MISSING, - XML_RNGP_PARENTREF_CREATE_FAILED, - XML_RNGP_PARENTREF_NAME_INVALID, - XML_RNGP_PARENTREF_NO_NAME, - XML_RNGP_PARENTREF_NO_PARENT, - XML_RNGP_PARENTREF_NOT_EMPTY, - XML_RNGP_PARSE_ERROR, - XML_RNGP_PAT_ANYNAME_EXCEPT_ANYNAME, - XML_RNGP_PAT_ATTR_ATTR, - XML_RNGP_PAT_ATTR_ELEM, - XML_RNGP_PAT_DATA_EXCEPT_ATTR, - XML_RNGP_PAT_DATA_EXCEPT_ELEM, - XML_RNGP_PAT_DATA_EXCEPT_EMPTY, - XML_RNGP_PAT_DATA_EXCEPT_GROUP, - XML_RNGP_PAT_DATA_EXCEPT_INTERLEAVE, - XML_RNGP_PAT_DATA_EXCEPT_LIST, - XML_RNGP_PAT_DATA_EXCEPT_ONEMORE, - XML_RNGP_PAT_DATA_EXCEPT_REF, - XML_RNGP_PAT_DATA_EXCEPT_TEXT, - XML_RNGP_PAT_LIST_ATTR, - XML_RNGP_PAT_LIST_ELEM, - XML_RNGP_PAT_LIST_INTERLEAVE, - XML_RNGP_PAT_LIST_LIST, - XML_RNGP_PAT_LIST_REF, - XML_RNGP_PAT_LIST_TEXT, - XML_RNGP_PAT_NSNAME_EXCEPT_ANYNAME, - XML_RNGP_PAT_NSNAME_EXCEPT_NSNAME, - XML_RNGP_PAT_ONEMORE_GROUP_ATTR, - XML_RNGP_PAT_ONEMORE_INTERLEAVE_ATTR, - XML_RNGP_PAT_START_ATTR, - XML_RNGP_PAT_START_DATA, - XML_RNGP_PAT_START_EMPTY, - XML_RNGP_PAT_START_GROUP, - XML_RNGP_PAT_START_INTERLEAVE, - XML_RNGP_PAT_START_LIST, - XML_RNGP_PAT_START_ONEMORE, - XML_RNGP_PAT_START_TEXT, - XML_RNGP_PAT_START_VALUE, - XML_RNGP_PREFIX_UNDEFINED, - XML_RNGP_REF_CREATE_FAILED, - XML_RNGP_REF_CYCLE, - XML_RNGP_REF_NAME_INVALID, - XML_RNGP_REF_NO_DEF, - XML_RNGP_REF_NO_NAME, - XML_RNGP_REF_NOT_EMPTY, - XML_RNGP_START_CHOICE_AND_INTERLEAVE, - XML_RNGP_START_CONTENT, - XML_RNGP_START_EMPTY, - XML_RNGP_START_MISSING, - XML_RNGP_TEXT_EXPECTED, - XML_RNGP_TEXT_HAS_CHILD, - XML_RNGP_TYPE_MISSING, - XML_RNGP_TYPE_NOT_FOUND, - XML_RNGP_TYPE_VALUE, - XML_RNGP_UNKNOWN_ATTRIBUTE, - XML_RNGP_UNKNOWN_COMBINE, - XML_RNGP_UNKNOWN_CONSTRUCT, - XML_RNGP_UNKNOWN_TYPE_LIB, - XML_RNGP_URI_FRAGMENT, - XML_RNGP_URI_NOT_ABSOLUTE, - XML_RNGP_VALUE_EMPTY, - XML_RNGP_VALUE_NO_CONTENT, - XML_RNGP_XMLNS_NAME, - XML_RNGP_XML_NS, - XML_XPATH_EXPRESSION_OK, - XML_XPATH_NUMBER_ERROR, - XML_XPATH_UNFINISHED_LITERAL_ERROR, - XML_XPATH_START_LITERAL_ERROR, - XML_XPATH_VARIABLE_REF_ERROR, - XML_XPATH_UNDEF_VARIABLE_ERROR, - XML_XPATH_INVALID_PREDICATE_ERROR, - XML_XPATH_EXPR_ERROR, - XML_XPATH_UNCLOSED_ERROR, - XML_XPATH_UNKNOWN_FUNC_ERROR, - XML_XPATH_INVALID_OPERAND, - XML_XPATH_INVALID_TYPE, - XML_XPATH_INVALID_ARITY, - XML_XPATH_INVALID_CTXT_SIZE, - XML_XPATH_INVALID_CTXT_POSITION, - XML_XPATH_MEMORY_ERROR, - XML_XPTR_SYNTAX_ERROR, - XML_XPTR_RESOURCE_ERROR, - XML_XPTR_SUB_RESOURCE_ERROR, - XML_XPATH_UNDEF_PREFIX_ERROR, - XML_XPATH_ENCODING_ERROR, - XML_XPATH_INVALID_CHAR_ERROR, - XML_TREE_INVALID_HEX, - XML_TREE_INVALID_DEC, - XML_TREE_UNTERMINATED_ENTITY, - XML_SAVE_NOT_UTF8, - XML_SAVE_CHAR_INVALID, - XML_SAVE_NO_DOCTYPE, - XML_SAVE_UNKNOWN_ENCODING, - XML_REGEXP_COMPILE_ERROR, - XML_IO_UNKNOWN, - XML_IO_EACCES, - XML_IO_EAGAIN, - XML_IO_EBADF, - XML_IO_EBADMSG, - XML_IO_EBUSY, - XML_IO_ECANCELED, - XML_IO_ECHILD, - XML_IO_EDEADLK, - XML_IO_EDOM, - XML_IO_EEXIST, - XML_IO_EFAULT, - XML_IO_EFBIG, - XML_IO_EINPROGRESS, - XML_IO_EINTR, - XML_IO_EINVAL, - XML_IO_EIO, - XML_IO_EISDIR, - XML_IO_EMFILE, - XML_IO_EMLINK, - XML_IO_EMSGSIZE, - XML_IO_ENAMETOOLONG, - XML_IO_ENFILE, - XML_IO_ENODEV, - XML_IO_ENOENT, - XML_IO_ENOEXEC, - XML_IO_ENOLCK, - XML_IO_ENOMEM, - XML_IO_ENOSPC, - XML_IO_ENOSYS, - XML_IO_ENOTDIR, - XML_IO_ENOTEMPTY, - XML_IO_ENOTSUP, - XML_IO_ENOTTY, - XML_IO_ENXIO, - XML_IO_EPERM, - XML_IO_EPIPE, - XML_IO_ERANGE, - XML_IO_EROFS, - XML_IO_ESPIPE, - XML_IO_ESRCH, - XML_IO_ETIMEDOUT, - XML_IO_EXDEV, - XML_IO_NETWORK_ATTEMPT, - XML_IO_ENCODER, - XML_IO_FLUSH, - XML_IO_WRITE, - XML_IO_NO_INPUT, - XML_IO_BUFFER_FULL, - XML_IO_LOAD_ERROR, - XML_IO_ENOTSOCK, - XML_IO_EISCONN, - XML_IO_ECONNREFUSED, - XML_IO_ENETUNREACH, - XML_IO_EADDRINUSE, - XML_IO_EALREADY, - XML_IO_EAFNOSUPPORT, - XML_XINCLUDE_RECURSION, - XML_XINCLUDE_PARSE_VALUE, - XML_XINCLUDE_ENTITY_DEF_MISMATCH, - XML_XINCLUDE_NO_HREF, - XML_XINCLUDE_NO_FALLBACK, - XML_XINCLUDE_HREF_URI, - XML_XINCLUDE_TEXT_FRAGMENT, - XML_XINCLUDE_TEXT_DOCUMENT, - XML_XINCLUDE_INVALID_CHAR, - XML_XINCLUDE_BUILD_FAILED, - XML_XINCLUDE_UNKNOWN_ENCODING, - XML_XINCLUDE_MULTIPLE_ROOT, - XML_XINCLUDE_XPTR_FAILED, - XML_XINCLUDE_XPTR_RESULT, - XML_XINCLUDE_INCLUDE_IN_INCLUDE, - XML_XINCLUDE_FALLBACKS_IN_INCLUDE, - XML_XINCLUDE_FALLBACK_NOT_IN_INCLUDE, - XML_XINCLUDE_DEPRECATED_NS, - XML_XINCLUDE_FRAGMENT_ID, - XML_CATALOG_MISSING_ATTR, - XML_CATALOG_ENTRY_BROKEN, - XML_CATALOG_PREFER_VALUE, - XML_CATALOG_NOT_CATALOG, - XML_CATALOG_RECURSION, - XML_SCHEMAP_PREFIX_UNDEFINED, - XML_SCHEMAP_ATTRFORMDEFAULT_VALUE, - XML_SCHEMAP_ATTRGRP_NONAME_NOREF, - XML_SCHEMAP_ATTR_NONAME_NOREF, - XML_SCHEMAP_COMPLEXTYPE_NONAME_NOREF, - XML_SCHEMAP_ELEMFORMDEFAULT_VALUE, - XML_SCHEMAP_ELEM_NONAME_NOREF, - XML_SCHEMAP_EXTENSION_NO_BASE, - XML_SCHEMAP_FACET_NO_VALUE, - XML_SCHEMAP_FAILED_BUILD_IMPORT, - XML_SCHEMAP_GROUP_NONAME_NOREF, - XML_SCHEMAP_IMPORT_NAMESPACE_NOT_URI, - XML_SCHEMAP_IMPORT_REDEFINE_NSNAME, - XML_SCHEMAP_IMPORT_SCHEMA_NOT_URI, - XML_SCHEMAP_INVALID_BOOLEAN, - XML_SCHEMAP_INVALID_ENUM, - XML_SCHEMAP_INVALID_FACET, - XML_SCHEMAP_INVALID_FACET_VALUE, - XML_SCHEMAP_INVALID_MAXOCCURS, - XML_SCHEMAP_INVALID_MINOCCURS, - XML_SCHEMAP_INVALID_REF_AND_SUBTYPE, - XML_SCHEMAP_INVALID_WHITE_SPACE, - XML_SCHEMAP_NOATTR_NOREF, - XML_SCHEMAP_NOTATION_NO_NAME, - XML_SCHEMAP_NOTYPE_NOREF, - XML_SCHEMAP_REF_AND_SUBTYPE, - XML_SCHEMAP_RESTRICTION_NONAME_NOREF, - XML_SCHEMAP_SIMPLETYPE_NONAME, - XML_SCHEMAP_TYPE_AND_SUBTYPE, - XML_SCHEMAP_UNKNOWN_ALL_CHILD, - XML_SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD, - XML_SCHEMAP_UNKNOWN_ATTR_CHILD, - XML_SCHEMAP_UNKNOWN_ATTRGRP_CHILD, - XML_SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP, - XML_SCHEMAP_UNKNOWN_BASE_TYPE, - XML_SCHEMAP_UNKNOWN_CHOICE_CHILD, - XML_SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD, - XML_SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD, - XML_SCHEMAP_UNKNOWN_ELEM_CHILD, - XML_SCHEMAP_UNKNOWN_EXTENSION_CHILD, - XML_SCHEMAP_UNKNOWN_FACET_CHILD, - XML_SCHEMAP_UNKNOWN_FACET_TYPE, - XML_SCHEMAP_UNKNOWN_GROUP_CHILD, - XML_SCHEMAP_UNKNOWN_IMPORT_CHILD, - XML_SCHEMAP_UNKNOWN_LIST_CHILD, - XML_SCHEMAP_UNKNOWN_NOTATION_CHILD, - XML_SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD, - XML_SCHEMAP_UNKNOWN_REF, - XML_SCHEMAP_UNKNOWN_RESTRICTION_CHILD, - XML_SCHEMAP_UNKNOWN_SCHEMAS_CHILD, - XML_SCHEMAP_UNKNOWN_SEQUENCE_CHILD, - XML_SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD, - XML_SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD, - XML_SCHEMAP_UNKNOWN_TYPE, - XML_SCHEMAP_UNKNOWN_UNION_CHILD, - XML_SCHEMAP_ELEM_DEFAULT_FIXED, - XML_SCHEMAP_REGEXP_INVALID, - XML_SCHEMAP_FAILED_LOAD, - XML_SCHEMAP_NOTHING_TO_PARSE, - XML_SCHEMAP_NOROOT, - XML_SCHEMAP_REDEFINED_GROUP, - XML_SCHEMAP_REDEFINED_TYPE, - XML_SCHEMAP_REDEFINED_ELEMENT, - XML_SCHEMAP_REDEFINED_ATTRGROUP, - XML_SCHEMAP_REDEFINED_ATTR, - XML_SCHEMAP_REDEFINED_NOTATION, - XML_SCHEMAP_FAILED_PARSE, - XML_SCHEMAP_UNKNOWN_PREFIX, - XML_SCHEMAP_DEF_AND_PREFIX, - XML_SCHEMAP_UNKNOWN_INCLUDE_CHILD, - XML_SCHEMAP_INCLUDE_SCHEMA_NOT_URI, - XML_SCHEMAP_INCLUDE_SCHEMA_NO_URI, - XML_SCHEMAP_NOT_SCHEMA, - XML_SCHEMAP_UNKNOWN_MEMBER_TYPE, - XML_SCHEMAP_INVALID_ATTR_USE, - XML_SCHEMAP_RECURSIVE, - XML_SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE, - XML_SCHEMAP_INVALID_ATTR_COMBINATION, - XML_SCHEMAP_INVALID_ATTR_INLINE_COMBINATION, - XML_SCHEMAP_MISSING_SIMPLETYPE_CHILD, - XML_SCHEMAP_INVALID_ATTR_NAME, - XML_SCHEMAP_REF_AND_CONTENT, - XML_SCHEMAP_CT_PROPS_CORRECT_1, - XML_SCHEMAP_CT_PROPS_CORRECT_2, - XML_SCHEMAP_CT_PROPS_CORRECT_3, - XML_SCHEMAP_CT_PROPS_CORRECT_4, - XML_SCHEMAP_CT_PROPS_CORRECT_5, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_1, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_2, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_3, - XML_SCHEMAP_WILDCARD_INVALID_NS_MEMBER, - XML_SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE, - XML_SCHEMAP_UNION_NOT_EXPRESSIBLE, - XML_SCHEMAP_SRC_IMPORT_3_1, - XML_SCHEMAP_SRC_IMPORT_3_2, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_1, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_2, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_4_3, - XML_SCHEMAP_COS_CT_EXTENDS_1_3, - XML_SCHEMAV_NOROOT, - XML_SCHEMAV_UNDECLAREDELEM, - XML_SCHEMAV_NOTTOPLEVEL, - XML_SCHEMAV_MISSING, - XML_SCHEMAV_WRONGELEM, - XML_SCHEMAV_NOTYPE, - XML_SCHEMAV_NOROLLBACK, - XML_SCHEMAV_ISABSTRACT, - XML_SCHEMAV_NOTEMPTY, - XML_SCHEMAV_ELEMCONT, - XML_SCHEMAV_HAVEDEFAULT, - XML_SCHEMAV_NOTNILLABLE, - XML_SCHEMAV_EXTRACONTENT, - XML_SCHEMAV_INVALIDATTR, - XML_SCHEMAV_INVALIDELEM, - XML_SCHEMAV_NOTDETERMINIST, - XML_SCHEMAV_CONSTRUCT, - XML_SCHEMAV_INTERNAL, - XML_SCHEMAV_NOTSIMPLE, - XML_SCHEMAV_ATTRUNKNOWN, - XML_SCHEMAV_ATTRINVALID, - XML_SCHEMAV_VALUE, - XML_SCHEMAV_FACET, - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_1, - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_2, - XML_SCHEMAV_CVC_DATATYPE_VALID_1_2_3, - XML_SCHEMAV_CVC_TYPE_3_1_1, - XML_SCHEMAV_CVC_TYPE_3_1_2, - XML_SCHEMAV_CVC_FACET_VALID, - XML_SCHEMAV_CVC_LENGTH_VALID, - XML_SCHEMAV_CVC_MINLENGTH_VALID, - XML_SCHEMAV_CVC_MAXLENGTH_VALID, - XML_SCHEMAV_CVC_MININCLUSIVE_VALID, - XML_SCHEMAV_CVC_MAXINCLUSIVE_VALID, - XML_SCHEMAV_CVC_MINEXCLUSIVE_VALID, - XML_SCHEMAV_CVC_MAXEXCLUSIVE_VALID, - XML_SCHEMAV_CVC_TOTALDIGITS_VALID, - XML_SCHEMAV_CVC_FRACTIONDIGITS_VALID, - XML_SCHEMAV_CVC_PATTERN_VALID, - XML_SCHEMAV_CVC_ENUMERATION_VALID, - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_1, - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_2, - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_3, - XML_SCHEMAV_CVC_COMPLEX_TYPE_2_4, - -#if defined XML_SCHEMAV_CVC_ELT_1 - XML_SCHEMAV_CVC_ELT_1, - XML_SCHEMAV_CVC_ELT_2, - XML_SCHEMAV_CVC_ELT_3_1, - XML_SCHEMAV_CVC_ELT_3_2_1, - XML_SCHEMAV_CVC_ELT_3_2_2, - XML_SCHEMAV_CVC_ELT_4_1, - XML_SCHEMAV_CVC_ELT_4_2, - XML_SCHEMAV_CVC_ELT_4_3, - XML_SCHEMAV_CVC_ELT_5_1_1, - XML_SCHEMAV_CVC_ELT_5_1_2, - XML_SCHEMAV_CVC_ELT_5_2_1, - XML_SCHEMAV_CVC_ELT_5_2_2_1, - XML_SCHEMAV_CVC_ELT_5_2_2_2_1, - XML_SCHEMAV_CVC_ELT_5_2_2_2_2, - XML_SCHEMAV_CVC_ELT_6, - XML_SCHEMAV_CVC_ELT_7, - XML_SCHEMAV_CVC_ATTRIBUTE_1, - XML_SCHEMAV_CVC_ATTRIBUTE_2, - XML_SCHEMAV_CVC_ATTRIBUTE_3, - XML_SCHEMAV_CVC_ATTRIBUTE_4, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_1, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_1, - XML_SCHEMAV_CVC_COMPLEX_TYPE_3_2_2, - XML_SCHEMAV_CVC_COMPLEX_TYPE_4, - XML_SCHEMAV_CVC_COMPLEX_TYPE_5_1, - XML_SCHEMAV_CVC_COMPLEX_TYPE_5_2, - XML_SCHEMAV_ELEMENT_CONTENT, - XML_SCHEMAV_DOCUMENT_ELEMENT_MISSING, -#endif - -#if defined XML_SCHEMAV_CVC_COMPLEX_TYPE_1 - XML_SCHEMAV_CVC_COMPLEX_TYPE_1, - XML_SCHEMAV_CVC_AU, - XML_SCHEMAV_CVC_TYPE_1, - XML_SCHEMAV_CVC_TYPE_2, -#endif - - XML_XPTR_UNKNOWN_SCHEME, - XML_XPTR_CHILDSEQ_START, - XML_XPTR_EVAL_FAILED, - XML_XPTR_EXTRA_OBJECTS, - XML_C14N_CREATE_CTXT, - XML_C14N_REQUIRES_UTF8, - XML_C14N_CREATE_STACK, - XML_C14N_INVALID_NODE, - XML_FTP_PASV_ANSWER, - XML_FTP_EPSV_ANSWER, - XML_FTP_ACCNT, - XML_HTTP_URL_SYNTAX, - XML_HTTP_USE_IP, - XML_HTTP_UNKNOWN_HOST, - XML_SCHEMAP_SRC_SIMPLE_TYPE_1, - XML_SCHEMAP_SRC_SIMPLE_TYPE_2, - XML_SCHEMAP_SRC_SIMPLE_TYPE_3, - XML_SCHEMAP_SRC_SIMPLE_TYPE_4, - XML_SCHEMAP_SRC_RESOLVE, - XML_SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE, - XML_SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE, - XML_SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES, - XML_SCHEMAP_ST_PROPS_CORRECT_1, - XML_SCHEMAP_ST_PROPS_CORRECT_2, - XML_SCHEMAP_ST_PROPS_CORRECT_3, - XML_SCHEMAP_COS_ST_RESTRICTS_1_1, - XML_SCHEMAP_COS_ST_RESTRICTS_1_2, - XML_SCHEMAP_COS_ST_RESTRICTS_1_3_1, - XML_SCHEMAP_COS_ST_RESTRICTS_1_3_2, - XML_SCHEMAP_COS_ST_RESTRICTS_2_1, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_1, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_1_2, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_1, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_2, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_3, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_4, - XML_SCHEMAP_COS_ST_RESTRICTS_2_3_2_5, - XML_SCHEMAP_COS_ST_RESTRICTS_3_1, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_1_2, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_2, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_1, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_3, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_4, - XML_SCHEMAP_COS_ST_RESTRICTS_3_3_2_5, - XML_SCHEMAP_COS_ST_DERIVED_OK_2_1, - XML_SCHEMAP_COS_ST_DERIVED_OK_2_2, - XML_SCHEMAP_S4S_ELEM_NOT_ALLOWED, - XML_SCHEMAP_S4S_ELEM_MISSING, - XML_SCHEMAP_S4S_ATTR_NOT_ALLOWED, - XML_SCHEMAP_S4S_ATTR_MISSING, - -#if defined XML_SCHEMAP_S4S_ATTR_INVALID_VALUE - XML_SCHEMAP_S4S_ATTR_INVALID_VALUE, - XML_SCHEMAP_SRC_ELEMENT_1, - XML_SCHEMAP_SRC_ELEMENT_2_1, - XML_SCHEMAP_SRC_ELEMENT_2_2, - XML_SCHEMAP_SRC_ELEMENT_3, - XML_SCHEMAP_P_PROPS_CORRECT_1, - XML_SCHEMAP_P_PROPS_CORRECT_2_1, - XML_SCHEMAP_P_PROPS_CORRECT_2_2, - XML_SCHEMAP_E_PROPS_CORRECT_2, - XML_SCHEMAP_E_PROPS_CORRECT_3, - XML_SCHEMAP_E_PROPS_CORRECT_4, - XML_SCHEMAP_E_PROPS_CORRECT_5, - XML_SCHEMAP_E_PROPS_CORRECT_6, - XML_SCHEMAP_SRC_INCLUDE, - XML_SCHEMAP_SRC_ATTRIBUTE_1, - XML_SCHEMAP_SRC_ATTRIBUTE_2, - XML_SCHEMAP_SRC_ATTRIBUTE_3_1, - XML_SCHEMAP_SRC_ATTRIBUTE_3_2, - XML_SCHEMAP_SRC_ATTRIBUTE_4, - XML_SCHEMAP_NO_XMLNS, - XML_SCHEMAP_NO_XSI, - XML_SCHEMAP_COS_VALID_DEFAULT_1, - XML_SCHEMAP_COS_VALID_DEFAULT_2_1, - XML_SCHEMAP_COS_VALID_DEFAULT_2_2_1, - XML_SCHEMAP_COS_VALID_DEFAULT_2_2_2, - XML_SCHEMAP_CVC_SIMPLE_TYPE, - XML_SCHEMAP_COS_CT_EXTENDS_1_1, - XML_SCHEMAP_SRC_IMPORT_1_1, - XML_SCHEMAP_SRC_IMPORT_1_2, - XML_SCHEMAP_SRC_IMPORT_2, - XML_SCHEMAP_SRC_IMPORT_2_1, - XML_SCHEMAP_SRC_IMPORT_2_2, -#endif - -#if defined XML_SCHEMAP_INTERNAL - XML_SCHEMAP_INTERNAL, - XML_SCHEMAP_NOT_DETERMINISTIC, -#endif - -#if defined XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 - XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1, - XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_2, - XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_3, - XML_SCHEMAP_MG_PROPS_CORRECT_1, - XML_SCHEMAP_MG_PROPS_CORRECT_2, - XML_SCHEMAP_SRC_CT_1, - XML_SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3, - XML_SCHEMAP_AU_PROPS_CORRECT_2, - XML_SCHEMAP_A_PROPS_CORRECT_2, -#endif - -1 -}; - - -static const char* xmlErrorStrs[] = { - "ERR_OK", - "ERR_INTERNAL_ERROR", - "ERR_NO_MEMORY", - "ERR_DOCUMENT_START", - "ERR_DOCUMENT_EMPTY", - "ERR_DOCUMENT_END", - "ERR_INVALID_HEX_CHARREF", - "ERR_INVALID_DEC_CHARREF", - "ERR_INVALID_CHARREF", - "ERR_INVALID_CHAR", - "ERR_CHARREF_AT_EOF", - "ERR_CHARREF_IN_PROLOG", - "ERR_CHARREF_IN_EPILOG", - "ERR_CHARREF_IN_DTD", - "ERR_ENTITYREF_AT_EOF", - "ERR_ENTITYREF_IN_PROLOG", - "ERR_ENTITYREF_IN_EPILOG", - "ERR_ENTITYREF_IN_DTD", - "ERR_PEREF_AT_EOF", - "ERR_PEREF_IN_PROLOG", - "ERR_PEREF_IN_EPILOG", - "ERR_PEREF_IN_INT_SUBSET", - "ERR_ENTITYREF_NO_NAME", - "ERR_ENTITYREF_SEMICOL_MISSING", - "ERR_PEREF_NO_NAME", - "ERR_PEREF_SEMICOL_MISSING", - "ERR_UNDECLARED_ENTITY", - "WAR_UNDECLARED_ENTITY", - "ERR_UNPARSED_ENTITY", - "ERR_ENTITY_IS_EXTERNAL", - "ERR_ENTITY_IS_PARAMETER", - "ERR_UNKNOWN_ENCODING", - "ERR_UNSUPPORTED_ENCODING", - "ERR_STRING_NOT_STARTED", - "ERR_STRING_NOT_CLOSED", - "ERR_NS_DECL_ERROR", - "ERR_ENTITY_NOT_STARTED", - "ERR_ENTITY_NOT_FINISHED", - "ERR_LT_IN_ATTRIBUTE", - "ERR_ATTRIBUTE_NOT_STARTED", - "ERR_ATTRIBUTE_NOT_FINISHED", - "ERR_ATTRIBUTE_WITHOUT_VALUE", - "ERR_ATTRIBUTE_REDEFINED", - "ERR_LITERAL_NOT_STARTED", - "ERR_LITERAL_NOT_FINISHED", - "ERR_COMMENT_NOT_FINISHED", - "ERR_PI_NOT_STARTED", - "ERR_PI_NOT_FINISHED", - "ERR_NOTATION_NOT_STARTED", - "ERR_NOTATION_NOT_FINISHED", - "ERR_ATTLIST_NOT_STARTED", - "ERR_ATTLIST_NOT_FINISHED", - "ERR_MIXED_NOT_STARTED", - "ERR_MIXED_NOT_FINISHED", - "ERR_ELEMCONTENT_NOT_STARTED", - "ERR_ELEMCONTENT_NOT_FINISHED", - "ERR_XMLDECL_NOT_STARTED", - "ERR_XMLDECL_NOT_FINISHED", - "ERR_CONDSEC_NOT_STARTED", - "ERR_CONDSEC_NOT_FINISHED", - "ERR_EXT_SUBSET_NOT_FINISHED", - "ERR_DOCTYPE_NOT_FINISHED", - "ERR_MISPLACED_CDATA_END", - "ERR_CDATA_NOT_FINISHED", - "ERR_RESERVED_XML_NAME", - "ERR_SPACE_REQUIRED", - "ERR_SEPARATOR_REQUIRED", - "ERR_NMTOKEN_REQUIRED", - "ERR_NAME_REQUIRED", - "ERR_PCDATA_REQUIRED", - "ERR_URI_REQUIRED", - "ERR_PUBID_REQUIRED", - "ERR_LT_REQUIRED", - "ERR_GT_REQUIRED", - "ERR_LTSLASH_REQUIRED", - "ERR_EQUAL_REQUIRED", - "ERR_TAG_NAME_MISMATCH", - "ERR_TAG_NOT_FINISHED", - "ERR_STANDALONE_VALUE", - "ERR_ENCODING_NAME", - "ERR_HYPHEN_IN_COMMENT", - "ERR_INVALID_ENCODING", - "ERR_EXT_ENTITY_STANDALONE", - "ERR_CONDSEC_INVALID", - "ERR_VALUE_REQUIRED", - "ERR_NOT_WELL_BALANCED", - "ERR_EXTRA_CONTENT", - "ERR_ENTITY_CHAR_ERROR", - "ERR_ENTITY_PE_INTERNAL", - "ERR_ENTITY_LOOP", - "ERR_ENTITY_BOUNDARY", - "ERR_INVALID_URI", - "ERR_URI_FRAGMENT", - "WAR_CATALOG_PI", - "ERR_NO_DTD", - "ERR_CONDSEC_INVALID_KEYWORD", - "ERR_VERSION_MISSING", - "WAR_UNKNOWN_VERSION", - "WAR_LANG_VALUE", - "WAR_NS_URI", - "WAR_NS_URI_RELATIVE", - "ERR_MISSING_ENCODING", - "NS_ERR_XML_NAMESPACE", - "NS_ERR_UNDEFINED_NAMESPACE", - "NS_ERR_QNAME", - "NS_ERR_ATTRIBUTE_REDEFINED", - "DTD_ATTRIBUTE_DEFAULT", - "DTD_ATTRIBUTE_REDEFINED", - "DTD_ATTRIBUTE_VALUE", - "DTD_CONTENT_ERROR", - "DTD_CONTENT_MODEL", - "DTD_CONTENT_NOT_DETERMINIST", - "DTD_DIFFERENT_PREFIX", - "DTD_ELEM_DEFAULT_NAMESPACE", - "DTD_ELEM_NAMESPACE", - "DTD_ELEM_REDEFINED", - "DTD_EMPTY_NOTATION", - "DTD_ENTITY_TYPE", - "DTD_ID_FIXED", - "DTD_ID_REDEFINED", - "DTD_ID_SUBSET", - "DTD_INVALID_CHILD", - "DTD_INVALID_DEFAULT", - "DTD_LOAD_ERROR", - "DTD_MISSING_ATTRIBUTE", - "DTD_MIXED_CORRUPT", - "DTD_MULTIPLE_ID", - "DTD_NO_DOC", - "DTD_NO_DTD", - "DTD_NO_ELEM_NAME", - "DTD_NO_PREFIX", - "DTD_NO_ROOT", - "DTD_NOTATION_REDEFINED", - "DTD_NOTATION_VALUE", - "DTD_NOT_EMPTY", - "DTD_NOT_PCDATA", - "DTD_NOT_STANDALONE", - "DTD_ROOT_NAME", - "DTD_STANDALONE_WHITE_SPACE", - "DTD_UNKNOWN_ATTRIBUTE", - "DTD_UNKNOWN_ELEM", - "DTD_UNKNOWN_ENTITY", - "DTD_UNKNOWN_ID", - "DTD_UNKNOWN_NOTATION", - "DTD_STANDALONE_DEFAULTED", - "DTD_XMLID_VALUE", - "DTD_XMLID_TYPE", - "HTML_STRUCURE_ERROR", - "HTML_UNKNOWN_TAG", - "RNGP_ANYNAME_ATTR_ANCESTOR", - "RNGP_ATTR_CONFLICT", - "RNGP_ATTRIBUTE_CHILDREN", - "RNGP_ATTRIBUTE_CONTENT", - "RNGP_ATTRIBUTE_EMPTY", - "RNGP_ATTRIBUTE_NOOP", - "RNGP_CHOICE_CONTENT", - "RNGP_CHOICE_EMPTY", - "RNGP_CREATE_FAILURE", - "RNGP_DATA_CONTENT", - "RNGP_DEF_CHOICE_AND_INTERLEAVE", - "RNGP_DEFINE_CREATE_FAILED", - "RNGP_DEFINE_EMPTY", - "RNGP_DEFINE_MISSING", - "RNGP_DEFINE_NAME_MISSING", - "RNGP_ELEM_CONTENT_EMPTY", - "RNGP_ELEM_CONTENT_ERROR", - "RNGP_ELEMENT_EMPTY", - "RNGP_ELEMENT_CONTENT", - "RNGP_ELEMENT_NAME", - "RNGP_ELEMENT_NO_CONTENT", - "RNGP_ELEM_TEXT_CONFLICT", - "RNGP_EMPTY", - "RNGP_EMPTY_CONSTRUCT", - "RNGP_EMPTY_CONTENT", - "RNGP_EMPTY_NOT_EMPTY", - "RNGP_ERROR_TYPE_LIB", - "RNGP_EXCEPT_EMPTY", - "RNGP_EXCEPT_MISSING", - "RNGP_EXCEPT_MULTIPLE", - "RNGP_EXCEPT_NO_CONTENT", - "RNGP_EXTERNALREF_EMTPY", - "RNGP_EXTERNAL_REF_FAILURE", - "RNGP_EXTERNALREF_RECURSE", - "RNGP_FORBIDDEN_ATTRIBUTE", - "RNGP_FOREIGN_ELEMENT", - "RNGP_GRAMMAR_CONTENT", - "RNGP_GRAMMAR_EMPTY", - "RNGP_GRAMMAR_MISSING", - "RNGP_GRAMMAR_NO_START", - "RNGP_GROUP_ATTR_CONFLICT", - "RNGP_HREF_ERROR", - "RNGP_INCLUDE_EMPTY", - "RNGP_INCLUDE_FAILURE", - "RNGP_INCLUDE_RECURSE", - "RNGP_INTERLEAVE_ADD", - "RNGP_INTERLEAVE_CREATE_FAILED", - "RNGP_INTERLEAVE_EMPTY", - "RNGP_INTERLEAVE_NO_CONTENT", - "RNGP_INVALID_DEFINE_NAME", - "RNGP_INVALID_URI", - "RNGP_INVALID_VALUE", - "RNGP_MISSING_HREF", - "RNGP_NAME_MISSING", - "RNGP_NEED_COMBINE", - "RNGP_NOTALLOWED_NOT_EMPTY", - "RNGP_NSNAME_ATTR_ANCESTOR", - "RNGP_NSNAME_NO_NS", - "RNGP_PARAM_FORBIDDEN", - "RNGP_PARAM_NAME_MISSING", - "RNGP_PARENTREF_CREATE_FAILED", - "RNGP_PARENTREF_NAME_INVALID", - "RNGP_PARENTREF_NO_NAME", - "RNGP_PARENTREF_NO_PARENT", - "RNGP_PARENTREF_NOT_EMPTY", - "RNGP_PARSE_ERROR", - "RNGP_PAT_ANYNAME_EXCEPT_ANYNAME", - "RNGP_PAT_ATTR_ATTR", - "RNGP_PAT_ATTR_ELEM", - "RNGP_PAT_DATA_EXCEPT_ATTR", - "RNGP_PAT_DATA_EXCEPT_ELEM", - "RNGP_PAT_DATA_EXCEPT_EMPTY", - "RNGP_PAT_DATA_EXCEPT_GROUP", - "RNGP_PAT_DATA_EXCEPT_INTERLEAVE", - "RNGP_PAT_DATA_EXCEPT_LIST", - "RNGP_PAT_DATA_EXCEPT_ONEMORE", - "RNGP_PAT_DATA_EXCEPT_REF", - "RNGP_PAT_DATA_EXCEPT_TEXT", - "RNGP_PAT_LIST_ATTR", - "RNGP_PAT_LIST_ELEM", - "RNGP_PAT_LIST_INTERLEAVE", - "RNGP_PAT_LIST_LIST", - "RNGP_PAT_LIST_REF", - "RNGP_PAT_LIST_TEXT", - "RNGP_PAT_NSNAME_EXCEPT_ANYNAME", - "RNGP_PAT_NSNAME_EXCEPT_NSNAME", - "RNGP_PAT_ONEMORE_GROUP_ATTR", - "RNGP_PAT_ONEMORE_INTERLEAVE_ATTR", - "RNGP_PAT_START_ATTR", - "RNGP_PAT_START_DATA", - "RNGP_PAT_START_EMPTY", - "RNGP_PAT_START_GROUP", - "RNGP_PAT_START_INTERLEAVE", - "RNGP_PAT_START_LIST", - "RNGP_PAT_START_ONEMORE", - "RNGP_PAT_START_TEXT", - "RNGP_PAT_START_VALUE", - "RNGP_PREFIX_UNDEFINED", - "RNGP_REF_CREATE_FAILED", - "RNGP_REF_CYCLE", - "RNGP_REF_NAME_INVALID", - "RNGP_REF_NO_DEF", - "RNGP_REF_NO_NAME", - "RNGP_REF_NOT_EMPTY", - "RNGP_START_CHOICE_AND_INTERLEAVE", - "RNGP_START_CONTENT", - "RNGP_START_EMPTY", - "RNGP_START_MISSING", - "RNGP_TEXT_EXPECTED", - "RNGP_TEXT_HAS_CHILD", - "RNGP_TYPE_MISSING", - "RNGP_TYPE_NOT_FOUND", - "RNGP_TYPE_VALUE", - "RNGP_UNKNOWN_ATTRIBUTE", - "RNGP_UNKNOWN_COMBINE", - "RNGP_UNKNOWN_CONSTRUCT", - "RNGP_UNKNOWN_TYPE_LIB", - "RNGP_URI_FRAGMENT", - "RNGP_URI_NOT_ABSOLUTE", - "RNGP_VALUE_EMPTY", - "RNGP_VALUE_NO_CONTENT", - "RNGP_XMLNS_NAME", - "RNGP_XML_NS", - "XPATH_EXPRESSION_OK", - "XPATH_NUMBER_ERROR", - "XPATH_UNFINISHED_LITERAL_ERROR", - "XPATH_START_LITERAL_ERROR", - "XPATH_VARIABLE_REF_ERROR", - "XPATH_UNDEF_VARIABLE_ERROR", - "XPATH_INVALID_PREDICATE_ERROR", - "XPATH_EXPR_ERROR", - "XPATH_UNCLOSED_ERROR", - "XPATH_UNKNOWN_FUNC_ERROR", - "XPATH_INVALID_OPERAND", - "XPATH_INVALID_TYPE", - "XPATH_INVALID_ARITY", - "XPATH_INVALID_CTXT_SIZE", - "XPATH_INVALID_CTXT_POSITION", - "XPATH_MEMORY_ERROR", - "XPTR_SYNTAX_ERROR", - "XPTR_RESOURCE_ERROR", - "XPTR_SUB_RESOURCE_ERROR", - "XPATH_UNDEF_PREFIX_ERROR", - "XPATH_ENCODING_ERROR", - "XPATH_INVALID_CHAR_ERROR", - "TREE_INVALID_HEX", - "TREE_INVALID_DEC", - "TREE_UNTERMINATED_ENTITY", - "SAVE_NOT_UTF8", - "SAVE_CHAR_INVALID", - "SAVE_NO_DOCTYPE", - "SAVE_UNKNOWN_ENCODING", - "REGEXP_COMPILE_ERROR", - "IO_UNKNOWN", - "IO_EACCES", - "IO_EAGAIN", - "IO_EBADF", - "IO_EBADMSG", - "IO_EBUSY", - "IO_ECANCELED", - "IO_ECHILD", - "IO_EDEADLK", - "IO_EDOM", - "IO_EEXIST", - "IO_EFAULT", - "IO_EFBIG", - "IO_EINPROGRESS", - "IO_EINTR", - "IO_EINVAL", - "IO_EIO", - "IO_EISDIR", - "IO_EMFILE", - "IO_EMLINK", - "IO_EMSGSIZE", - "IO_ENAMETOOLONG", - "IO_ENFILE", - "IO_ENODEV", - "IO_ENOENT", - "IO_ENOEXEC", - "IO_ENOLCK", - "IO_ENOMEM", - "IO_ENOSPC", - "IO_ENOSYS", - "IO_ENOTDIR", - "IO_ENOTEMPTY", - "IO_ENOTSUP", - "IO_ENOTTY", - "IO_ENXIO", - "IO_EPERM", - "IO_EPIPE", - "IO_ERANGE", - "IO_EROFS", - "IO_ESPIPE", - "IO_ESRCH", - "IO_ETIMEDOUT", - "IO_EXDEV", - "IO_NETWORK_ATTEMPT", - "IO_ENCODER", - "IO_FLUSH", - "IO_WRITE", - "IO_NO_INPUT", - "IO_BUFFER_FULL", - "IO_LOAD_ERROR", - "IO_ENOTSOCK", - "IO_EISCONN", - "IO_ECONNREFUSED", - "IO_ENETUNREACH", - "IO_EADDRINUSE", - "IO_EALREADY", - "IO_EAFNOSUPPORT", - "XINCLUDE_RECURSION", - "XINCLUDE_PARSE_VALUE", - "XINCLUDE_ENTITY_DEF_MISMATCH", - "XINCLUDE_NO_HREF", - "XINCLUDE_NO_FALLBACK", - "XINCLUDE_HREF_URI", - "XINCLUDE_TEXT_FRAGMENT", - "XINCLUDE_TEXT_DOCUMENT", - "XINCLUDE_INVALID_CHAR", - "XINCLUDE_BUILD_FAILED", - "XINCLUDE_UNKNOWN_ENCODING", - "XINCLUDE_MULTIPLE_ROOT", - "XINCLUDE_XPTR_FAILED", - "XINCLUDE_XPTR_RESULT", - "XINCLUDE_INCLUDE_IN_INCLUDE", - "XINCLUDE_FALLBACKS_IN_INCLUDE", - "XINCLUDE_FALLBACK_NOT_IN_INCLUDE", - "XINCLUDE_DEPRECATED_NS", - "XINCLUDE_FRAGMENT_ID", - "CATALOG_MISSING_ATTR", - "CATALOG_ENTRY_BROKEN", - "CATALOG_PREFER_VALUE", - "CATALOG_NOT_CATALOG", - "CATALOG_RECURSION", - "SCHEMAP_PREFIX_UNDEFINED", - "SCHEMAP_ATTRFORMDEFAULT_VALUE", - "SCHEMAP_ATTRGRP_NONAME_NOREF", - "SCHEMAP_ATTR_NONAME_NOREF", - "SCHEMAP_COMPLEXTYPE_NONAME_NOREF", - "SCHEMAP_ELEMFORMDEFAULT_VALUE", - "SCHEMAP_ELEM_NONAME_NOREF", - "SCHEMAP_EXTENSION_NO_BASE", - "SCHEMAP_FACET_NO_VALUE", - "SCHEMAP_FAILED_BUILD_IMPORT", - "SCHEMAP_GROUP_NONAME_NOREF", - "SCHEMAP_IMPORT_NAMESPACE_NOT_URI", - "SCHEMAP_IMPORT_REDEFINE_NSNAME", - "SCHEMAP_IMPORT_SCHEMA_NOT_URI", - "SCHEMAP_INVALID_BOOLEAN", - "SCHEMAP_INVALID_ENUM", - "SCHEMAP_INVALID_FACET", - "SCHEMAP_INVALID_FACET_VALUE", - "SCHEMAP_INVALID_MAXOCCURS", - "SCHEMAP_INVALID_MINOCCURS", - "SCHEMAP_INVALID_REF_AND_SUBTYPE", - "SCHEMAP_INVALID_WHITE_SPACE", - "SCHEMAP_NOATTR_NOREF", - "SCHEMAP_NOTATION_NO_NAME", - "SCHEMAP_NOTYPE_NOREF", - "SCHEMAP_REF_AND_SUBTYPE", - "SCHEMAP_RESTRICTION_NONAME_NOREF", - "SCHEMAP_SIMPLETYPE_NONAME", - "SCHEMAP_TYPE_AND_SUBTYPE", - "SCHEMAP_UNKNOWN_ALL_CHILD", - "SCHEMAP_UNKNOWN_ANYATTRIBUTE_CHILD", - "SCHEMAP_UNKNOWN_ATTR_CHILD", - "SCHEMAP_UNKNOWN_ATTRGRP_CHILD", - "SCHEMAP_UNKNOWN_ATTRIBUTE_GROUP", - "SCHEMAP_UNKNOWN_BASE_TYPE", - "SCHEMAP_UNKNOWN_CHOICE_CHILD", - "SCHEMAP_UNKNOWN_COMPLEXCONTENT_CHILD", - "SCHEMAP_UNKNOWN_COMPLEXTYPE_CHILD", - "SCHEMAP_UNKNOWN_ELEM_CHILD", - "SCHEMAP_UNKNOWN_EXTENSION_CHILD", - "SCHEMAP_UNKNOWN_FACET_CHILD", - "SCHEMAP_UNKNOWN_FACET_TYPE", - "SCHEMAP_UNKNOWN_GROUP_CHILD", - "SCHEMAP_UNKNOWN_IMPORT_CHILD", - "SCHEMAP_UNKNOWN_LIST_CHILD", - "SCHEMAP_UNKNOWN_NOTATION_CHILD", - "SCHEMAP_UNKNOWN_PROCESSCONTENT_CHILD", - "SCHEMAP_UNKNOWN_REF", - "SCHEMAP_UNKNOWN_RESTRICTION_CHILD", - "SCHEMAP_UNKNOWN_SCHEMAS_CHILD", - "SCHEMAP_UNKNOWN_SEQUENCE_CHILD", - "SCHEMAP_UNKNOWN_SIMPLECONTENT_CHILD", - "SCHEMAP_UNKNOWN_SIMPLETYPE_CHILD", - "SCHEMAP_UNKNOWN_TYPE", - "SCHEMAP_UNKNOWN_UNION_CHILD", - "SCHEMAP_ELEM_DEFAULT_FIXED", - "SCHEMAP_REGEXP_INVALID", - "SCHEMAP_FAILED_LOAD", - "SCHEMAP_NOTHING_TO_PARSE", - "SCHEMAP_NOROOT", - "SCHEMAP_REDEFINED_GROUP", - "SCHEMAP_REDEFINED_TYPE", - "SCHEMAP_REDEFINED_ELEMENT", - "SCHEMAP_REDEFINED_ATTRGROUP", - "SCHEMAP_REDEFINED_ATTR", - "SCHEMAP_REDEFINED_NOTATION", - "SCHEMAP_FAILED_PARSE", - "SCHEMAP_UNKNOWN_PREFIX", - "SCHEMAP_DEF_AND_PREFIX", - "SCHEMAP_UNKNOWN_INCLUDE_CHILD", - "SCHEMAP_INCLUDE_SCHEMA_NOT_URI", - "SCHEMAP_INCLUDE_SCHEMA_NO_URI", - "SCHEMAP_NOT_SCHEMA", - "SCHEMAP_UNKNOWN_MEMBER_TYPE", - "SCHEMAP_INVALID_ATTR_USE", - "SCHEMAP_RECURSIVE", - "SCHEMAP_SUPERNUMEROUS_LIST_ITEM_TYPE", - "SCHEMAP_INVALID_ATTR_COMBINATION", - "SCHEMAP_INVALID_ATTR_INLINE_COMBINATION", - "SCHEMAP_MISSING_SIMPLETYPE_CHILD", - "SCHEMAP_INVALID_ATTR_NAME", - "SCHEMAP_REF_AND_CONTENT", - "SCHEMAP_CT_PROPS_CORRECT_1", - "SCHEMAP_CT_PROPS_CORRECT_2", - "SCHEMAP_CT_PROPS_CORRECT_3", - "SCHEMAP_CT_PROPS_CORRECT_4", - "SCHEMAP_CT_PROPS_CORRECT_5", - "SCHEMAP_DERIVATION_OK_RESTRICTION_1", - "SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_1", - "SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_2", - "SCHEMAP_DERIVATION_OK_RESTRICTION_2_2", - "SCHEMAP_DERIVATION_OK_RESTRICTION_3", - "SCHEMAP_WILDCARD_INVALID_NS_MEMBER", - "SCHEMAP_INTERSECTION_NOT_EXPRESSIBLE", - "SCHEMAP_UNION_NOT_EXPRESSIBLE", - "SCHEMAP_SRC_IMPORT_3_1", - "SCHEMAP_SRC_IMPORT_3_2", - "SCHEMAP_DERIVATION_OK_RESTRICTION_4_1", - "SCHEMAP_DERIVATION_OK_RESTRICTION_4_2", - "SCHEMAP_DERIVATION_OK_RESTRICTION_4_3", - "SCHEMAP_COS_CT_EXTENDS_1_3", - "SCHEMAV_NOROOT", - "SCHEMAV_UNDECLAREDELEM", - "SCHEMAV_NOTTOPLEVEL", - "SCHEMAV_MISSING", - "SCHEMAV_WRONGELEM", - "SCHEMAV_NOTYPE", - "SCHEMAV_NOROLLBACK", - "SCHEMAV_ISABSTRACT", - "SCHEMAV_NOTEMPTY", - "SCHEMAV_ELEMCONT", - "SCHEMAV_HAVEDEFAULT", - "SCHEMAV_NOTNILLABLE", - "SCHEMAV_EXTRACONTENT", - "SCHEMAV_INVALIDATTR", - "SCHEMAV_INVALIDELEM", - "SCHEMAV_NOTDETERMINIST", - "SCHEMAV_CONSTRUCT", - "SCHEMAV_INTERNAL", - "SCHEMAV_NOTSIMPLE", - "SCHEMAV_ATTRUNKNOWN", - "SCHEMAV_ATTRINVALID", - "SCHEMAV_VALUE", - "SCHEMAV_FACET", - "SCHEMAV_CVC_DATATYPE_VALID_1_2_1", - "SCHEMAV_CVC_DATATYPE_VALID_1_2_2", - "SCHEMAV_CVC_DATATYPE_VALID_1_2_3", - "SCHEMAV_CVC_TYPE_3_1_1", - "SCHEMAV_CVC_TYPE_3_1_2", - "SCHEMAV_CVC_FACET_VALID", - "SCHEMAV_CVC_LENGTH_VALID", - "SCHEMAV_CVC_MINLENGTH_VALID", - "SCHEMAV_CVC_MAXLENGTH_VALID", - "SCHEMAV_CVC_MININCLUSIVE_VALID", - "SCHEMAV_CVC_MAXINCLUSIVE_VALID", - "SCHEMAV_CVC_MINEXCLUSIVE_VALID", - "SCHEMAV_CVC_MAXEXCLUSIVE_VALID", - "SCHEMAV_CVC_TOTALDIGITS_VALID", - "SCHEMAV_CVC_FRACTIONDIGITS_VALID", - "SCHEMAV_CVC_PATTERN_VALID", - "SCHEMAV_CVC_ENUMERATION_VALID", - "SCHEMAV_CVC_COMPLEX_TYPE_2_1", - "SCHEMAV_CVC_COMPLEX_TYPE_2_2", - "SCHEMAV_CVC_COMPLEX_TYPE_2_3", - "SCHEMAV_CVC_COMPLEX_TYPE_2_4", - -#if defined XML_SCHEMAV_CVC_ELT_1 - "SCHEMAV_CVC_ELT_1", - "SCHEMAV_CVC_ELT_2", - "SCHEMAV_CVC_ELT_3_1", - "SCHEMAV_CVC_ELT_3_2_1", - "SCHEMAV_CVC_ELT_3_2_2", - "SCHEMAV_CVC_ELT_4_1", - "SCHEMAV_CVC_ELT_4_2", - "SCHEMAV_CVC_ELT_4_3", - "SCHEMAV_CVC_ELT_5_1_1", - "SCHEMAV_CVC_ELT_5_1_2", - "SCHEMAV_CVC_ELT_5_2_1", - "SCHEMAV_CVC_ELT_5_2_2_1", - "SCHEMAV_CVC_ELT_5_2_2_2_1", - "SCHEMAV_CVC_ELT_5_2_2_2_2", - "SCHEMAV_CVC_ELT_6", - "SCHEMAV_CVC_ELT_7", - "SCHEMAV_CVC_ATTRIBUTE_1", - "SCHEMAV_CVC_ATTRIBUTE_2", - "SCHEMAV_CVC_ATTRIBUTE_3", - "SCHEMAV_CVC_ATTRIBUTE_4", - "SCHEMAV_CVC_COMPLEX_TYPE_3_1", - "SCHEMAV_CVC_COMPLEX_TYPE_3_2_1", - "SCHEMAV_CVC_COMPLEX_TYPE_3_2_2", - "SCHEMAV_CVC_COMPLEX_TYPE_4", - "SCHEMAV_CVC_COMPLEX_TYPE_5_1", - "SCHEMAV_CVC_COMPLEX_TYPE_5_2", - "SCHEMAV_ELEMENT_CONTENT", - "SCHEMAV_DOCUMENT_ELEMENT_MISSING", -#endif - -#if defined XML_SCHEMAV_CVC_COMPLEX_TYPE_1 - "SCHEMAV_CVC_COMPLEX_TYPE_1", - "SCHEMAV_CVC_AU", - "SCHEMAV_CVC_TYPE_1", - "SCHEMAV_CVC_TYPE_2", -#endif - - "XPTR_UNKNOWN_SCHEME", - "XPTR_CHILDSEQ_START", - "XPTR_EVAL_FAILED", - "XPTR_EXTRA_OBJECTS", - "C14N_CREATE_CTXT", - "C14N_REQUIRES_UTF8", - "C14N_CREATE_STACK", - "C14N_INVALID_NODE", - "FTP_PASV_ANSWER", - "FTP_EPSV_ANSWER", - "FTP_ACCNT", - "HTTP_URL_SYNTAX", - "HTTP_USE_IP", - "HTTP_UNKNOWN_HOST", - "SCHEMAP_SRC_SIMPLE_TYPE_1", - "SCHEMAP_SRC_SIMPLE_TYPE_2", - "SCHEMAP_SRC_SIMPLE_TYPE_3", - "SCHEMAP_SRC_SIMPLE_TYPE_4", - "SCHEMAP_SRC_RESOLVE", - "SCHEMAP_SRC_RESTRICTION_BASE_OR_SIMPLETYPE", - "SCHEMAP_SRC_LIST_ITEMTYPE_OR_SIMPLETYPE", - "SCHEMAP_SRC_UNION_MEMBERTYPES_OR_SIMPLETYPES", - "SCHEMAP_ST_PROPS_CORRECT_1", - "SCHEMAP_ST_PROPS_CORRECT_2", - "SCHEMAP_ST_PROPS_CORRECT_3", - "SCHEMAP_COS_ST_RESTRICTS_1_1", - "SCHEMAP_COS_ST_RESTRICTS_1_2", - "SCHEMAP_COS_ST_RESTRICTS_1_3_1", - "SCHEMAP_COS_ST_RESTRICTS_1_3_2", - "SCHEMAP_COS_ST_RESTRICTS_2_1", - "SCHEMAP_COS_ST_RESTRICTS_2_3_1_1", - "SCHEMAP_COS_ST_RESTRICTS_2_3_1_2", - "SCHEMAP_COS_ST_RESTRICTS_2_3_2_1", - "SCHEMAP_COS_ST_RESTRICTS_2_3_2_2", - "SCHEMAP_COS_ST_RESTRICTS_2_3_2_3", - "SCHEMAP_COS_ST_RESTRICTS_2_3_2_4", - "SCHEMAP_COS_ST_RESTRICTS_2_3_2_5", - "SCHEMAP_COS_ST_RESTRICTS_3_1", - "SCHEMAP_COS_ST_RESTRICTS_3_3_1", - "SCHEMAP_COS_ST_RESTRICTS_3_3_1_2", - "SCHEMAP_COS_ST_RESTRICTS_3_3_2_2", - "SCHEMAP_COS_ST_RESTRICTS_3_3_2_1", - "SCHEMAP_COS_ST_RESTRICTS_3_3_2_3", - "SCHEMAP_COS_ST_RESTRICTS_3_3_2_4", - "SCHEMAP_COS_ST_RESTRICTS_3_3_2_5", - "SCHEMAP_COS_ST_DERIVED_OK_2_1", - "SCHEMAP_COS_ST_DERIVED_OK_2_2", - "SCHEMAP_S4S_ELEM_NOT_ALLOWED", - "SCHEMAP_S4S_ELEM_MISSING", - "SCHEMAP_S4S_ATTR_NOT_ALLOWED", - "SCHEMAP_S4S_ATTR_MISSING", - -#if defined XML_SCHEMAP_S4S_ATTR_INVALID_VALUE - "SCHEMAP_S4S_ATTR_INVALID_VALUE", - "SCHEMAP_SRC_ELEMENT_1", - "SCHEMAP_SRC_ELEMENT_2_1", - "SCHEMAP_SRC_ELEMENT_2_2", - "SCHEMAP_SRC_ELEMENT_3", - "SCHEMAP_P_PROPS_CORRECT_1", - "SCHEMAP_P_PROPS_CORRECT_2_1", - "SCHEMAP_P_PROPS_CORRECT_2_2", - "SCHEMAP_E_PROPS_CORRECT_2", - "SCHEMAP_E_PROPS_CORRECT_3", - "SCHEMAP_E_PROPS_CORRECT_4", - "SCHEMAP_E_PROPS_CORRECT_5", - "SCHEMAP_E_PROPS_CORRECT_6", - "SCHEMAP_SRC_INCLUDE", - "SCHEMAP_SRC_ATTRIBUTE_1", - "SCHEMAP_SRC_ATTRIBUTE_2", - "SCHEMAP_SRC_ATTRIBUTE_3_1", - "SCHEMAP_SRC_ATTRIBUTE_3_2", - "SCHEMAP_SRC_ATTRIBUTE_4", - "SCHEMAP_NO_XMLNS", - "SCHEMAP_NO_XSI", - "SCHEMAP_COS_VALID_DEFAULT_1", - "SCHEMAP_COS_VALID_DEFAULT_2_1", - "SCHEMAP_COS_VALID_DEFAULT_2_2_1", - "SCHEMAP_COS_VALID_DEFAULT_2_2_2", - "SCHEMAP_CVC_SIMPLE_TYPE", - "SCHEMAP_COS_CT_EXTENDS_1_1", - "SCHEMAP_SRC_IMPORT_1_1", - "SCHEMAP_SRC_IMPORT_1_2", - "SCHEMAP_SRC_IMPORT_2", - "SCHEMAP_SRC_IMPORT_2_1", - "SCHEMAP_SRC_IMPORT_2_2", -#endif - -#if defined XML_SCHEMAP_INTERNAL - "SCHEMAP_INTERNAL", - "SCHEMAP_NOT_DETERMINISTIC", -#endif - -#if defined XML_SCHEMAP_SRC_ATTRIBUTE_GROUP_1 - "SCHEMAP_SRC_ATTRIBUTE_GROUP_1", - "SCHEMAP_SRC_ATTRIBUTE_GROUP_2", - "SCHEMAP_SRC_ATTRIBUTE_GROUP_3", - "SCHEMAP_MG_PROPS_CORRECT_1", - "SCHEMAP_MG_PROPS_CORRECT_2", - "SCHEMAP_SRC_CT_1", - "SCHEMAP_DERIVATION_OK_RESTRICTION_2_1_3", - "SCHEMAP_AU_PROPS_CORRECT_2", - "SCHEMAP_A_PROPS_CORRECT_2", -#endif - NULL -}; - -const char* SaxHandler::errToStr( int errVal ) -{ - const char* str = NULL; - int index = 0; - while ( errVal != xmlErrorVals[index] && xmlErrorVals[index] >= 0 ) - { - index++; - } - - if ( errVal == xmlErrorVals[index] ) - { - str = xmlErrorStrs[index]; - } - - return str; -} - - -int SaxHandler::parseMemory( const char* buffer, int size ) -{ - int result = xmlSAXUserParseMemory( &sax, - this, - buffer, - size ); - return result; -} - -int SaxHandler::parseFile( const char* filename ) -{ - int result = xmlSAXUserParseFile( &sax, - this, - filename ); - return result; -} - -void SaxHandler::startDocument(void *user_data) -{ - SaxHandler* self = reinterpret_cast<SaxHandler*>(user_data); - self->_startDocument(); -} - -void SaxHandler::endDocument(void *user_data) -{ - SaxHandler* self = reinterpret_cast<SaxHandler*>(user_data); - self->_endDocument(); -} -void SaxHandler::startElement(void *user_data, - const xmlChar *name, - const xmlChar **attrs) -{ - SaxHandler* self = reinterpret_cast<SaxHandler*>(user_data); - self->_startElement(name, attrs); -} -void SaxHandler::endElement(void *user_data, - const xmlChar *name) -{ - SaxHandler* self = reinterpret_cast<SaxHandler*>(user_data); - self->_endElement(name); -} -void SaxHandler::characters(void *user_data, - const xmlChar *ch, - int len) -{ - SaxHandler* self = reinterpret_cast<SaxHandler*>(user_data); - self->_characters(ch, len); -} - - - - - - - -FlatSaxHandler::FlatSaxHandler() - : SaxHandler() -{ -} - -FlatSaxHandler::~FlatSaxHandler() -{ -} - -void FlatSaxHandler::_startElement(const xmlChar */*name*/, const xmlChar **/*attrs*/) -{ - data.clear(); -} - -void FlatSaxHandler::_endElement(const xmlChar */*name*/) -{ - //g_message("<%s>%s</%s>", name, data.c_str(), name); - data.clear(); -} - -void FlatSaxHandler::_characters(const xmlChar *ch, int len) -{ - data.append((const char*)ch, len); -} - - -} // namespace IO -} // namespace Inkscape - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/io/simple-sax.h b/src/io/simple-sax.h deleted file mode 100644 index 17c571e19..000000000 --- a/src/io/simple-sax.h +++ /dev/null @@ -1,97 +0,0 @@ -#ifndef SEEN_SIMPLE_SAX_H -#define SEEN_SIMPLE_SAX_H - -/* - * SimpleSAX - * - * Authors: - * Jon A. Cruz <jon@joncruz.org> - * - * Copyright (C) 2004 AUTHORS - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#include <libxml/parser.h> -#include <glibmm/ustring.h> - -namespace Inkscape { -namespace IO -{ - -class SaxHandler -{ -public: - SaxHandler(); - virtual ~SaxHandler(); - - int parseMemory( const char* buffer, int size ); - int parseFile( const char* filename ); - - static const char* errToStr( int errVal ); - -protected: - virtual void _startDocument() {} - virtual void _endDocument() {} - virtual void _startElement(const xmlChar */*name*/, const xmlChar **/*attrs*/) {} - virtual void _endElement(const xmlChar */*name*/) {} - virtual void _characters(const xmlChar */*ch*/, int /*len*/) {} - -private: - static void startDocument(void *user_data); - static void endDocument(void *user_data); - static void startElement(void *user_data, - const xmlChar *name, - const xmlChar **attrs); - static void endElement(void *user_data, - const xmlChar *name); - static void characters(void * user_data, - const xmlChar *ch, - int len); - - // Disable: - SaxHandler(SaxHandler const &); - SaxHandler &operator=(SaxHandler const &); - - xmlSAXHandler sax; -}; - - - -class FlatSaxHandler : public SaxHandler -{ -public: - FlatSaxHandler(); - virtual ~FlatSaxHandler(); - -protected: - virtual void _startElement(const xmlChar *name, const xmlChar **attrs); - virtual void _endElement(const xmlChar *name); - virtual void _characters(const xmlChar *ch, int len); - - Glib::ustring data; - -private: - // Disable: - FlatSaxHandler(FlatSaxHandler const &); - FlatSaxHandler &operator=(FlatSaxHandler const &); -}; - - - -} // namespace IO -} // namespace Inkscape - - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 : - -#endif // SEEN_SIMPLE_SAX_H diff --git a/src/libcroco/cr-attr-sel.c b/src/libcroco/cr-attr-sel.c index 3c4800e66..0726f0f3e 100644 --- a/src/libcroco/cr-attr-sel.c +++ b/src/libcroco/cr-attr-sel.c @@ -208,8 +208,5 @@ cr_attr_sel_destroy (CRAttrSel * a_this) a_this->next = NULL; } - if (a_this) { - g_free (a_this); - a_this = NULL; - } + g_free (a_this); } diff --git a/src/libcroco/cr-om-parser.c b/src/libcroco/cr-om-parser.c index b8d70e35a..c9ce032af 100644 --- a/src/libcroco/cr-om-parser.c +++ b/src/libcroco/cr-om-parser.c @@ -217,9 +217,9 @@ start_font_face (CRDocHandler * a_this, ParsingContext **ctxtptr = NULL; UNUSED(a_location); - g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->cur_stmt == NULL); @@ -316,9 +316,9 @@ charset (CRDocHandler * a_this, CRString * a_charset, ParsingContext **ctxtptr = NULL; UNUSED(a_location); - g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->stylesheet); @@ -352,9 +352,9 @@ start_page (CRDocHandler * a_this, ParsingContext **ctxtptr = NULL; UNUSED(a_location); - g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->cur_stmt == NULL); @@ -395,8 +395,11 @@ end_page (CRDocHandler * a_this, ParsingContext **ctxtptr = NULL; CRStatement *stmt = NULL; + UNUSED(a_page); + UNUSED(a_pseudo_page); g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->cur_stmt @@ -416,8 +419,6 @@ end_page (CRDocHandler * a_this, cr_statement_destroy (ctxt->cur_stmt); ctxt->cur_stmt = NULL; } - a_page = NULL; /*keep compiler happy */ - a_pseudo_page = NULL; /*keep compiler happy */ } static void @@ -431,9 +432,9 @@ start_media (CRDocHandler * a_this, GList *media_list = NULL; UNUSED(a_location); - g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); @@ -443,12 +444,10 @@ start_media (CRDocHandler * a_this, && ctxt->stylesheet); if (a_media_list) { /*duplicate the media_list */ - media_list = cr_utils_dup_glist_of_cr_string - (a_media_list); + media_list = cr_utils_dup_glist_of_cr_string(a_media_list); } ctxt->cur_media_stmt = - cr_statement_new_at_media_rule - (ctxt->stylesheet, NULL, media_list); + cr_statement_new_at_media_rule(ctxt->stylesheet, NULL, media_list); } @@ -460,8 +459,10 @@ end_media (CRDocHandler * a_this, GList * a_media_list) ParsingContext **ctxtptr = NULL; CRStatement *stmts = NULL; + UNUSED(a_media_list); g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt @@ -481,7 +482,6 @@ end_media (CRDocHandler * a_this, GList * a_media_list) ctxt->cur_stmt = NULL ; ctxt->cur_media_stmt = NULL ; - a_media_list = NULL; } static void @@ -499,10 +499,11 @@ import_style (CRDocHandler * a_this, ParsingContext **ctxtptr = NULL; GList *media_list = NULL ; + UNUSED(a_uri_default_ns); UNUSED(a_location); - g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->stylesheet); @@ -574,8 +575,10 @@ end_selector (CRDocHandler * a_this, CRSelector * a_selector_list) ParsingContext *ctxt = NULL; ParsingContext **ctxtptr = NULL; + UNUSED(a_selector_list); g_return_if_fail (a_this); - ctxtptr = &ctxt; + + ctxtptr = &ctxt; status = cr_doc_handler_get_ctxt (a_this, (gpointer *) ctxtptr); g_return_if_fail (status == CR_OK && ctxt); g_return_if_fail (ctxt->cur_stmt && ctxt->stylesheet); diff --git a/src/libcroco/cr-parser.c b/src/libcroco/cr-parser.c index a8e2de5a3..917c5cb60 100644 --- a/src/libcroco/cr-parser.c +++ b/src/libcroco/cr-parser.c @@ -4402,8 +4402,5 @@ cr_parser_destroy (CRParser * a_this) PRIVATE (a_this) = NULL; } - if (a_this) { - g_free (a_this); - a_this = NULL; /*useless. Just for the sake of coherence */ - } + g_free (a_this); } diff --git a/src/libcroco/cr-prop-list.c b/src/libcroco/cr-prop-list.c index 076837905..551f0b8ee 100644 --- a/src/libcroco/cr-prop-list.c +++ b/src/libcroco/cr-prop-list.c @@ -48,7 +48,7 @@ cr_prop_list_allocate (void) } memset (result, 0, sizeof (CRPropList)); PRIVATE (result) = (CRPropListPriv *)g_try_malloc (sizeof (CRPropListPriv)); - if (!result) { + if (!PRIVATE (result)) { cr_utils_trace_info ("could not allocate CRPropListPriv"); g_free (result); return NULL; diff --git a/src/libcroco/cr-simple-sel.c b/src/libcroco/cr-simple-sel.c index 18dd340d8..6a51a9526 100644 --- a/src/libcroco/cr-simple-sel.c +++ b/src/libcroco/cr-simple-sel.c @@ -275,12 +275,12 @@ cr_simple_sel_compute_specificity (CRSimpleSel * a_this) /** *The destructor of the current instance of - *#CRSimpleSel. + *#CRSimpleSel. Recursively calls the destructor of #CRSimpleSel->next *@param a_this the this pointer of the current instance of #CRSimpleSel. * */ void -cr_simple_sel_destroy (CRSimpleSel * a_this) +cr_simple_sel_destroy (CRSimpleSel * const a_this) { g_return_if_fail (a_this); @@ -296,9 +296,8 @@ cr_simple_sel_destroy (CRSimpleSel * a_this) if (a_this->next) { cr_simple_sel_destroy (a_this->next); + a_this->next = NULL; } - if (a_this) { - g_free (a_this); - } + g_free (a_this); } diff --git a/src/libcroco/cr-statement.c b/src/libcroco/cr-statement.c index 40df49878..2b2c1836c 100644 --- a/src/libcroco/cr-statement.c +++ b/src/libcroco/cr-statement.c @@ -604,7 +604,10 @@ cr_statement_ruleset_to_string (CRStatement * a_this, glong a_indent) g_return_val_if_fail (a_this && a_this->type == RULESET_STMT, NULL); - GString *stringue = (GString *)g_string_new (NULL); + GString * stringue = (GString *)g_string_new (NULL); + if (!stringue) { + return result; + } if (a_this->kind.ruleset->sel_list) { if (a_indent) @@ -635,10 +638,9 @@ cr_statement_ruleset_to_string (CRStatement * a_this, glong a_indent) g_string_append (stringue, "}"); result = stringue->str; - if (stringue) { - g_string_free (stringue, FALSE); - stringue = NULL; - } + g_string_free (stringue, FALSE); + stringue = NULL; + if (tmp_str) { g_free (tmp_str); tmp_str = NULL; @@ -1377,7 +1379,6 @@ cr_statement_at_import_rule_parse_from_buf (const guchar * a_buf, } if (media_list) { GList *cur = NULL; - for (cur = media_list; media_list; media_list = g_list_next (media_list)) { if (media_list->data) { diff --git a/src/libcroco/cr-term.c b/src/libcroco/cr-term.c index d95c4979f..635577334 100644 --- a/src/libcroco/cr-term.c +++ b/src/libcroco/cr-term.c @@ -771,7 +771,7 @@ cr_term_unref (CRTerm * a_this) *of #CRTerm. */ void -cr_term_destroy (CRTerm * a_this) +cr_term_destroy (CRTerm * const a_this) { g_return_if_fail (a_this); @@ -782,8 +782,5 @@ cr_term_destroy (CRTerm * a_this) a_this->next = NULL; } - if (a_this) { - g_free (a_this); - } - + g_free (a_this); } diff --git a/src/libgdl/gdl-switcher.c b/src/libgdl/gdl-switcher.c index 60d53dd5f..780438886 100644 --- a/src/libgdl/gdl-switcher.c +++ b/src/libgdl/gdl-switcher.c @@ -370,62 +370,67 @@ layout_buttons (GdlSwitcher *switcher) if (last_buttons_height > switcher->priv->buttons_height_request) { gtk_widget_queue_resize (GTK_WIDGET (switcher)); - return -1; + y = -1; // set return value } - - /* Layout the buttons. */ - for (i = row_last; i >= 0; i --) { - int len, extra_width; - - y -= max_btn_height; - - /* Check for possible size over flow (taking into account client - * requisition - */ - if (y < (allocation.y + client_requisition.height)) { - /* We have an overflow: Insufficient allocation */ - if (last_buttons_height < switcher->priv->buttons_height_request) { - /* Request for a new resize */ - gtk_widget_queue_resize (GTK_WIDGET (switcher)); - return -1; - } - } - x = H_PADDING + allocation.x; - len = g_slist_length (rows[i]); - if (switcher_style == GDL_SWITCHER_STYLE_TEXT || - switcher_style == GDL_SWITCHER_STYLE_BOTH) - extra_width = (allocation.width - (len * max_btn_width ) - - (len * H_PADDING)) / len; - else - extra_width = 0; - for (p = rows [i]; p != NULL; p = p->next) { - GtkAllocation child_allocation; + else + { + /* Layout the buttons. */ + for (i = row_last; i >= 0; i --) { + int len, extra_width; - child_allocation.x = x; - child_allocation.y = y; - if (rows_count == 1 && row_number == 0) - { - GtkRequisition child_requisition; - gtk_widget_size_request (GTK_WIDGET (p->data), - &child_requisition); - child_allocation.width = child_requisition.width; + y -= max_btn_height; + + /* Check for possible size over flow (taking into account client + * requisition + */ + if (y < (allocation.y + client_requisition.height)) { + /* We have an overflow: Insufficient allocation */ + if (last_buttons_height < switcher->priv->buttons_height_request) { + /* Request for a new resize */ + gtk_widget_queue_resize (GTK_WIDGET (switcher)); + y = -1; // set return value + goto exit; + } } + x = H_PADDING + allocation.x; + len = g_slist_length (rows[i]); + if (switcher_style == GDL_SWITCHER_STYLE_TEXT || + switcher_style == GDL_SWITCHER_STYLE_BOTH) + extra_width = (allocation.width - (len * max_btn_width ) + - (len * H_PADDING)) / len; else - { - child_allocation.width = max_btn_width + extra_width; + extra_width = 0; + for (p = rows [i]; p != NULL; p = p->next) { + GtkAllocation child_allocation; + + child_allocation.x = x; + child_allocation.y = y; + if (rows_count == 1 && row_number == 0) + { + GtkRequisition child_requisition; + gtk_widget_size_request (GTK_WIDGET (p->data), + &child_requisition); + child_allocation.width = child_requisition.width; + } + else + { + child_allocation.width = max_btn_width + extra_width; + } + child_allocation.height = max_btn_height; + + gtk_widget_size_allocate (GTK_WIDGET (p->data), &child_allocation); + + x += child_allocation.width + H_PADDING; } - child_allocation.height = max_btn_height; - - gtk_widget_size_allocate (GTK_WIDGET (p->data), &child_allocation); - x += child_allocation.width + H_PADDING; + y -= V_PADDING; } - - y -= V_PADDING; } - - for (i = 0; i <= row_last; i ++) + + exit: + for (i = 0; i <= row_last; i ++) { g_slist_free (rows [i]); + } g_free (rows); return y; diff --git a/src/livarot/Path.cpp b/src/livarot/Path.cpp index 88d397864..68891e4aa 100644 --- a/src/livarot/Path.cpp +++ b/src/livarot/Path.cpp @@ -28,7 +28,7 @@ Path::Path() Path::~Path() { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } } @@ -37,7 +37,7 @@ Path::~Path() void Path::Affiche() { std::cout << "path: " << descr_cmd.size() << " commands." << std::endl; - for (std::vector<PathDescr*>::const_iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::const_iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { (*i)->dump(std::cout); std::cout << std::endl; } @@ -47,7 +47,7 @@ void Path::Affiche() void Path::Reset() { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } @@ -61,7 +61,7 @@ void Path::Copy(Path * who) { ResetPoints(); - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { delete *i; } @@ -69,7 +69,7 @@ void Path::Copy(Path * who) for (std::vector<PathDescr*>::const_iterator i = who->descr_cmd.begin(); i != who->descr_cmd.end(); - i++) + ++i) { descr_cmd.push_back((*i)->clone()); } @@ -496,9 +496,9 @@ void Path::PolylineBoundingBox(double &l, double &t, double &r, double &b) std::vector<path_lineto>::const_iterator i = pts.begin(); l = r = i->p[Geom::X]; t = b = i->p[Geom::Y]; - i++; + ++i; - for (; i != pts.end(); i++) { + for (; i != pts.end(); ++i) { r = std::max(r, i->p[Geom::X]); l = std::min(l, i->p[Geom::X]); b = std::max(b, i->p[Geom::Y]); @@ -701,7 +701,7 @@ void Path::PointAndTangentAt(int piece, double at, Geom::Point &pos, Geom::Point void Path::Transform(const Geom::Affine &trans) { - for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); i++) { + for (std::vector<PathDescr*>::iterator i = descr_cmd.begin(); i != descr_cmd.end(); ++i) { (*i)->transform(trans); } } diff --git a/src/livarot/PathConversion.cpp b/src/livarot/PathConversion.cpp index ed5f03f80..8d36dca4c 100644 --- a/src/livarot/PathConversion.cpp +++ b/src/livarot/PathConversion.cpp @@ -119,15 +119,12 @@ void Path::ConvertWithBackData(double treshhold) if ( nbInterm >= 1 ) { Geom::Point bx = curX; - Geom::Point cx = curX; - Geom::Point dx = curX; + Geom::Point dx = nData->p; + Geom::Point cx = 2 * bx - dx; - dx = nData->p; ip++; nData = dynamic_cast<PathDescrIntermBezierTo *>(descr_cmd[ip]); - cx = 2 * bx - dx; - for (int k = 0; k < nbInterm - 1; k++) { bx = cx; cx = dx; @@ -323,15 +320,12 @@ void Path::Convert(double treshhold) RecBezierTo(midX, curX, nextX, treshhold, 8); } else if ( nbInterm > 1 ) { Geom::Point bx = curX; - Geom::Point cx = curX; - Geom::Point dx = curX; + Geom::Point dx = nData->p; + Geom::Point cx = 2 * bx - dx; - dx = nData->p; ip++; nData = dynamic_cast<PathDescrIntermBezierTo *>(descr_cmd[ip]); - cx = 2 * bx - dx; - for (int k = 0; k < nbInterm - 1; k++) { bx = cx; cx = dx; @@ -565,15 +559,12 @@ void Path::ConvertEvenLines(double treshhold) RecBezierTo(midX, curX, nextX, treshhold, 8, 4 * treshhold); } else if ( nbInterm > 1 ) { Geom::Point bx = curX; - Geom::Point cx = curX; - Geom::Point dx = curX; + Geom::Point dx = nData->p; + Geom::Point cx = 2 * bx - dx; - dx = nData->p; ip++; nData = dynamic_cast<PathDescrIntermBezierTo *>(descr_cmd[ip]); - cx = 2 * bx - dx; - for (int k = 0; k < nbInterm - 1; k++) { bx = cx; cx = dx; diff --git a/src/livarot/PathCutting.cpp b/src/livarot/PathCutting.cpp index 848d8daa8..3ce907bf3 100644 --- a/src/livarot/PathCutting.cpp +++ b/src/livarot/PathCutting.cpp @@ -482,7 +482,7 @@ double Path::Length() Geom::Point lastP = pts[0].p; double len = 0; - for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); i++) { + for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); ++i) { if ( i->isMoveTo != polyline_moveto ) { len += Geom::L2(i->p - lastP); @@ -505,7 +505,7 @@ double Path::Surface() Geom::Point lastP = lastM; double surf = 0; - for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); i++) { + for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); ++i) { if ( i->isMoveTo == polyline_moveto ) { surf += Geom::cross(lastM - lastP, lastM); @@ -900,7 +900,7 @@ Path::cut_position* Path::CurvilignToPosition(int nbCv, double *cvAbs, int &nbCu Geom::Point lastM = pts[0].p; Geom::Point lastP = lastM; - for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); i++) { + for (std::vector<path_lineto>::const_iterator i = pts.begin(); i != pts.end(); ++i) { if ( i->isMoveTo == polyline_moveto ) { diff --git a/src/livarot/PathOutline.cpp b/src/livarot/PathOutline.cpp index 7f8853e31..3b5ce79f9 100644 --- a/src/livarot/PathOutline.cpp +++ b/src/livarot/PathOutline.cpp @@ -709,9 +709,8 @@ void Path::SubContractOutline(int off, int num_pd, } else if (nbInterm > 1) { Geom::Point bx=curX; Geom::Point cx=curX; - Geom::Point dx=curX; + Geom::Point dx=nData->p; - dx = nData->p; TangentOnBezAt (0.0, curX, *nData, *nBData, false, stPos, stTgt, stTle, stRad); stNor=stTgt.cw(); diff --git a/src/livarot/Shape.cpp b/src/livarot/Shape.cpp index c29444a33..628e0fe9f 100644 --- a/src/livarot/Shape.cpp +++ b/src/livarot/Shape.cpp @@ -20,7 +20,12 @@ */ Shape::Shape() - : qrsData(NULL), + : nbQRas(0), + firstQRas(-1), + lastQRas(-1), + qrsData(NULL), + nbInc(0), + maxInc(0), iData(NULL), sTree(NULL), sEvts(NULL), @@ -130,7 +135,12 @@ Shape::MakeQuickRasterData (bool nVal) if (_has_quick_raster_data == false) { _has_quick_raster_data = true; - qrsData = (quick_raster_data*)realloc(qrsData, maxAr * sizeof(quick_raster_data)); + quick_raster_data* new_qrsData = static_cast<quick_raster_data*>(realloc(qrsData, maxAr * sizeof(quick_raster_data))); + if (!new_qrsData) { + g_error("Not enough memory available for reallocating Shape::qrsData"); + } else { + qrsData = new_qrsData; + } } } else diff --git a/src/livarot/ShapeRaster.cpp b/src/livarot/ShapeRaster.cpp index b7b087fba..4c5bdc1ac 100644 --- a/src/livarot/ShapeRaster.cpp +++ b/src/livarot/ShapeRaster.cpp @@ -1131,8 +1131,7 @@ void Shape::Scan(float &pos, int &curP, float to, AlphaLigne *line, bool exact, int curPt = curP; while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) { - int nPt = -1; - nPt = curPt++; + int nPt = curPt++; int nbUp; int nbDn; @@ -1435,8 +1434,7 @@ void Shape::QuickScan(float &pos, int &curP, float to, FillRule directed, BitLig int curPt = curP; while ( curPt < numberOfPoints() && getPoint(curPt).x[1] <= to ) { - int nPt = -1; - nPt = curPt++; + int nPt = curPt++; int nbUp; int nbDn; diff --git a/src/livarot/ShapeSweep.cpp b/src/livarot/ShapeSweep.cpp index c2fd83e31..ff58b4a71 100644 --- a/src/livarot/ShapeSweep.cpp +++ b/src/livarot/ShapeSweep.cpp @@ -252,8 +252,7 @@ Shape::ConvertToShape (Shape * a, FillRule directed, bool invert) Geom::Point rPtX; rPtX[0]= Round (ptX[0]); rPtX[1]= Round (ptX[1]); - int lastPointNo = -1; - lastPointNo = AddPoint (rPtX); + int lastPointNo = AddPoint (rPtX); pData[lastPointNo].rx = rPtX; if (rPtX[1] > lastChange) @@ -1053,8 +1052,7 @@ Shape::Booleen (Shape * a, Shape * b, BooleanOp mod,int cutPathID) Geom::Point rPtX; rPtX[0]= Round (ptX[0]); rPtX[1]= Round (ptX[1]); - int lastPointNo = -1; - lastPointNo = AddPoint (rPtX); + int lastPointNo = AddPoint (rPtX); pData[lastPointNo].rx = rPtX; if (rPtX[1] > lastChange) diff --git a/src/live_effects/lpe-path_length.cpp b/src/live_effects/lpe-path_length.cpp index d3edcda27..4ca380c15 100644 --- a/src/live_effects/lpe-path_length.cpp +++ b/src/live_effects/lpe-path_length.cpp @@ -14,7 +14,7 @@ #include <glibmm/i18n.h> #include "live_effects/lpe-path_length.h" -#include "sp-metrics.h" +#include "util/units.h" #include "2geom/sbasis-geometric.h" @@ -52,11 +52,11 @@ LPEPathLength::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & p /* convert the measured length to the correct unit ... */ double lengthval = Geom::length(pwd2_in) * scale; - gboolean success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), unit); + lengthval = Inkscape::Util::Quantity::convert(lengthval, "px", unit.get_abbreviation()); /* ... set it as the canvas text ... */ gchar *arc_length = g_strdup_printf("%.2f %s", lengthval, - display_unit ? (success ? unit.get_abbreviation() : "px") : ""); + display_unit ? unit.get_abbreviation() : ""); info_text.param_setValue(arc_length); g_free(arc_length); diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp index fefdad95a..788ab593a 100644 --- a/src/live_effects/lpe-ruler.cpp +++ b/src/live_effects/lpe-ruler.cpp @@ -81,9 +81,9 @@ LPERuler::ruler_mark(Geom::Point const &A, Geom::Point const &n, MarkType const using namespace Geom; double real_mark_length = mark_length; - sp_convert_distance(&real_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX)); + real_mark_length = Inkscape::Util::Quantity::convert(real_mark_length, unit.get_abbreviation(), "px"); double real_minor_mark_length = minor_mark_length; - sp_convert_distance(&real_minor_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX)); + real_minor_mark_length = Inkscape::Util::Quantity::convert(real_minor_mark_length, unit.get_abbreviation(), "px"); n_major = real_mark_length * n; n_minor = real_minor_mark_length * n; @@ -133,10 +133,10 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i std::vector<double> s_cuts; double real_mark_distance = mark_distance; - sp_convert_distance(&real_mark_distance, unit, &sp_unit_get_by_id(SP_UNIT_PX)); + real_mark_distance = Inkscape::Util::Quantity::convert(real_mark_distance, unit.get_abbreviation(), "px"); double real_offset = offset; - sp_convert_distance(&real_offset, unit, &sp_unit_get_by_id(SP_UNIT_PX)); + real_offset = Inkscape::Util::Quantity::convert(real_offset, unit.get_abbreviation(), "px"); for (double s = real_offset; s<totlength; s+=real_mark_distance){ s_cuts.push_back(s); } diff --git a/src/live_effects/parameter/unit.cpp b/src/live_effects/parameter/unit.cpp index 602d806a0..561766920 100644 --- a/src/live_effects/parameter/unit.cpp +++ b/src/live_effects/parameter/unit.cpp @@ -10,6 +10,9 @@ #include "live_effects/parameter/unit.h" #include "live_effects/effect.h" #include "verbs.h" +#include "util/units.h" + +using Inkscape::Util::unit_table; namespace Inkscape { @@ -18,10 +21,10 @@ namespace LivePathEffect { UnitParam::UnitParam( const Glib::ustring& label, const Glib::ustring& tip, const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, - Effect* effect, SPUnitId default_value) + Effect* effect, Glib::ustring default_unit) : Parameter(label, tip, key, wr, effect) { - defunit = &sp_unit_get_by_id(default_value);; + defunit = new Inkscape::Util::Unit(unit_table.getUnit(default_unit)); unit = defunit; } @@ -32,9 +35,8 @@ UnitParam::~UnitParam() bool UnitParam::param_readSVGValue(const gchar * strvalue) { - SPUnit const *newval = sp_unit_get_by_abbreviation(strvalue); - if (newval) { - param_set_value(newval); + if (strvalue) { + param_set_value(unit_table.getUnit(strvalue)); return true; } return false; @@ -43,25 +45,25 @@ UnitParam::param_readSVGValue(const gchar * strvalue) gchar * UnitParam::param_getSVGValue() const { - return g_strdup(sp_unit_get_abbreviation(unit)); + return g_strdup(unit->abbr.c_str()); } void UnitParam::param_set_default() { - param_set_value(defunit); + param_set_value(*defunit); } void -UnitParam::param_set_value(SPUnit const *val) +UnitParam::param_set_value(Inkscape::Util::Unit const &val) { - unit = val; + unit = new Inkscape::Util::Unit(val); } const gchar * UnitParam::get_abbreviation() const { - return sp_unit_get_abbreviation(unit); + return unit->abbr.c_str(); } Gtk::Widget * @@ -74,7 +76,7 @@ UnitParam::param_newWidget() param_effect->getRepr(), param_effect->getSPDoc())); - unit_menu->setUnit(unit); + unit_menu->setUnit(unit->abbr); unit_menu->set_undo_parameters(SP_VERB_DIALOG_LIVE_PATH_EFFECT, _("Change unit parameter")); return dynamic_cast<Gtk::Widget *> (unit_menu); diff --git a/src/live_effects/parameter/unit.h b/src/live_effects/parameter/unit.h index ea7a0112a..59a483018 100644 --- a/src/live_effects/parameter/unit.h +++ b/src/live_effects/parameter/unit.h @@ -10,10 +10,13 @@ */ #include "live_effects/parameter/parameter.h" -#include <helper/units.h> namespace Inkscape { +namespace Util { + class Unit; +} + namespace LivePathEffect { class UnitParam : public Parameter { @@ -23,22 +26,22 @@ public: const Glib::ustring& key, Inkscape::UI::Widget::Registry* wr, Effect* effect, - SPUnitId default_value = SP_UNIT_PX); + Glib::ustring default_unit = "px"); virtual ~UnitParam(); virtual bool param_readSVGValue(const gchar * strvalue); virtual gchar * param_getSVGValue() const; virtual void param_set_default(); - void param_set_value(SPUnit const *val); + void param_set_value(Inkscape::Util::Unit const &val); const gchar *get_abbreviation() const; virtual Gtk::Widget * param_newWidget(); - operator SPUnit const *() const { return unit; } + operator Inkscape::Util::Unit const *() const { return unit; } private: - SPUnit const *unit; - SPUnit const *defunit; + Inkscape::Util::Unit const *unit; + Inkscape::Util::Unit const *defunit; UnitParam(const UnitParam&); UnitParam& operator=(const UnitParam&); diff --git a/src/live_effects/spiro.cpp b/src/live_effects/spiro.cpp index f50399a77..46e53a0da 100644 --- a/src/live_effects/spiro.cpp +++ b/src/live_effects/spiro.cpp @@ -677,163 +677,165 @@ add_mat_line(bandmat *m, double *v, } static double -spiro_iter(spiro_seg *s, bandmat *m, int *perm, double *v, int n) +spiro_iter(spiro_seg *s, bandmat *m, int *perm, double *v, const int n) { int cyclic = s[0].ty != '{' && s[0].ty != 'v'; - int i, j, jj; int nmat = count_vec(s, n); - double norm; int n_invert; - for (i = 0; i < nmat; i++) { - v[i] = 0.; - for (j = 0; j < 11; j++) - m[i].a[j] = 0.; - for (j = 0; j < 5; j++) - m[i].al[j] = 0.; + for (int i = 0; i < nmat; i++) { + v[i] = 0.; + for (int j = 0; j < 11; j++) { + m[i].a[j] = 0.; + } + for (int j = 0; j < 5; j++) { + m[i].al[j] = 0.; + } } - j = 0; - if (s[0].ty == 'o') - jj = nmat - 2; - else if (s[0].ty == 'c') - jj = nmat - 1; - else - jj = 0; - for (i = 0; i < n; i++) { - char ty0 = s[i].ty; - char ty1 = s[i + 1].ty; - int jinc = compute_jinc(ty0, ty1); - double th = s[i].bend_th; - double ends[2][4]; - double derivs[4][2][4]; - int jthl = -1, jk0l = -1, jk1l = -1, jk2l = -1; - int jthr = -1, jk0r = -1, jk1r = -1, jk2r = -1; - - compute_pderivs(&s[i], ends, derivs, jinc); - - /* constraints crossing left */ - if (ty0 == 'o' || ty0 == 'c' || ty0 == '[' || ty0 == ']') { - jthl = jj++; - jj %= nmat; - jk0l = jj++; - } - if (ty0 == 'o') { - jj %= nmat; - jk1l = jj++; - jk2l = jj++; - } + int j = 0; + int jj; + if (s[0].ty == 'o') { + jj = nmat - 2; + } else if (s[0].ty == 'c') { + jj = nmat - 1; + } else { + jj = 0; + } + for (int i = 0; i < n; i++) { + char ty0 = s[i].ty; + char ty1 = s[i + 1].ty; + int jinc = compute_jinc(ty0, ty1); + double th = s[i].bend_th; + double ends[2][4]; + double derivs[4][2][4]; + int jthl = -1, jk0l = -1, jk1l = -1, jk2l = -1; + int jthr = -1, jk0r = -1, jk1r = -1, jk2r = -1; + + compute_pderivs(&s[i], ends, derivs, jinc); + + /* constraints crossing left */ + if (ty0 == 'o' || ty0 == 'c' || ty0 == '[' || ty0 == ']') { + jthl = jj++; + jj %= nmat; + jk0l = jj++; + } + if (ty0 == 'o') { + jj %= nmat; + jk1l = jj++; + jk2l = jj++; + } - /* constraints on left */ - if ((ty0 == '[' || ty0 == 'v' || ty0 == '{' || ty0 == 'c') && - jinc == 4) { - if (ty0 != 'c') - jk1l = jj++; - jk2l = jj++; - } + /* constraints on left */ + if ((ty0 == '[' || ty0 == 'v' || ty0 == '{' || ty0 == 'c') && + jinc == 4) { + if (ty0 != 'c') + jk1l = jj++; + jk2l = jj++; + } - /* constraints on right */ - if ((ty1 == ']' || ty1 == 'v' || ty1 == '}' || ty1 == 'c') && - jinc == 4) { - if (ty1 != 'c') - jk1r = jj++; - jk2r = jj++; - } + /* constraints on right */ + if ((ty1 == ']' || ty1 == 'v' || ty1 == '}' || ty1 == 'c') && + jinc == 4) { + if (ty1 != 'c') + jk1r = jj++; + jk2r = jj++; + } - /* constraints crossing right */ - if (ty1 == 'o' || ty1 == 'c' || ty1 == '[' || ty1 == ']') { - jthr = jj; - jk0r = (jj + 1) % nmat; - } - if (ty1 == 'o') { - jk1r = (jj + 2) % nmat; - jk2r = (jj + 3) % nmat; - } + /* constraints crossing right */ + if (ty1 == 'o' || ty1 == 'c' || ty1 == '[' || ty1 == ']') { + jthr = jj; + jk0r = (jj + 1) % nmat; + } + if (ty1 == 'o') { + jk1r = (jj + 2) % nmat; + jk2r = (jj + 3) % nmat; + } - add_mat_line(m, v, derivs[0][0], th - ends[0][0], 1, j, jthl, jinc, nmat); - add_mat_line(m, v, derivs[1][0], ends[0][1], -1, j, jk0l, jinc, nmat); - add_mat_line(m, v, derivs[2][0], ends[0][2], -1, j, jk1l, jinc, nmat); - add_mat_line(m, v, derivs[3][0], ends[0][3], -1, j, jk2l, jinc, nmat); - add_mat_line(m, v, derivs[0][1], -ends[1][0], 1, j, jthr, jinc, nmat); - add_mat_line(m, v, derivs[1][1], -ends[1][1], 1, j, jk0r, jinc, nmat); - add_mat_line(m, v, derivs[2][1], -ends[1][2], 1, j, jk1r, jinc, nmat); - add_mat_line(m, v, derivs[3][1], -ends[1][3], 1, j, jk2r, jinc, nmat); - if (jthl >= 0) - v[jthl] = mod_2pi(v[jthl]); - if (jthr >= 0) - v[jthr] = mod_2pi(v[jthr]); - j += jinc; + add_mat_line(m, v, derivs[0][0], th - ends[0][0], 1, j, jthl, jinc, nmat); + add_mat_line(m, v, derivs[1][0], ends[0][1], -1, j, jk0l, jinc, nmat); + add_mat_line(m, v, derivs[2][0], ends[0][2], -1, j, jk1l, jinc, nmat); + add_mat_line(m, v, derivs[3][0], ends[0][3], -1, j, jk2l, jinc, nmat); + add_mat_line(m, v, derivs[0][1], -ends[1][0], 1, j, jthr, jinc, nmat); + add_mat_line(m, v, derivs[1][1], -ends[1][1], 1, j, jk0r, jinc, nmat); + add_mat_line(m, v, derivs[2][1], -ends[1][2], 1, j, jk1r, jinc, nmat); + add_mat_line(m, v, derivs[3][1], -ends[1][3], 1, j, jk2r, jinc, nmat); + if (jthl >= 0) + v[jthl] = mod_2pi(v[jthl]); + if (jthr >= 0) + v[jthr] = mod_2pi(v[jthr]); + j += jinc; } if (cyclic) { - memcpy(m + nmat, m, sizeof(bandmat) * nmat); - memcpy(m + 2 * nmat, m, sizeof(bandmat) * nmat); - memcpy(v + nmat, v, sizeof(double) * nmat); - memcpy(v + 2 * nmat, v, sizeof(double) * nmat); - n_invert = 3 * nmat; - j = nmat; + memcpy(m + nmat, m, sizeof(bandmat) * nmat); + memcpy(m + 2 * nmat, m, sizeof(bandmat) * nmat); + memcpy(v + nmat, v, sizeof(double) * nmat); + memcpy(v + 2 * nmat, v, sizeof(double) * nmat); + n_invert = 3 * nmat; + j = nmat; } else { - n_invert = nmat; - j = 0; + n_invert = nmat; + j = 0; } #ifdef VERBOSE - for (i = 0; i < n; i++) { - int k; - for (k = 0; k < 11; k++) - printf(" %2.4f", m[i].a[k]); - printf(": %2.4f\n", v[i]); + for (int i = 0; i < n; i++) { + for (int k = 0; k < 11; k++) { + printf(" %2.4f", m[i].a[k]); + } + printf(": %2.4f\n", v[i]); } printf("---\n"); #endif bandec11(m, perm, n_invert); banbks11(m, perm, v, n_invert); - norm = 0.; - for (i = 0; i < n; i++) { - char ty0 = s[i].ty; - char ty1 = s[i + 1].ty; - int jinc = compute_jinc(ty0, ty1); - int k; + + double norm = 0.; + for (int i = 0; i < n; i++) { + char ty0 = s[i].ty; + char ty1 = s[i + 1].ty; + int jinc = compute_jinc(ty0, ty1); + int k; - for (k = 0; k < jinc; k++) { - double dk = v[j++]; + for (k = 0; k < jinc; k++) { + double dk = v[j++]; #ifdef VERBOSE - printf("s[%d].ks[%d] += %f\n", i, k, dk); + printf("s[%d].ks[%d] += %f\n", i, k, dk); #endif - s[i].ks[k] += dk; - norm += dk * dk; - } + s[i].ks[k] += dk; + norm += dk * dk; + } s[i].ks[0] = 2.0*mod_2pi(s[i].ks[0]/2.0); } return norm; } static int -solve_spiro(spiro_seg *s, int nseg) +solve_spiro(spiro_seg *s, const int nseg) { - bandmat *m; - double *v; - int *perm; int nmat = count_vec(s, nseg); int n_alloc = nmat; - double norm; - int i; - if (nmat == 0) - return 0; - if (s[0].ty != '{' && s[0].ty != 'v') - n_alloc *= 3; - if (n_alloc < 5) - n_alloc = 5; - m = (bandmat *)malloc(sizeof(bandmat) * n_alloc); - v = (double *)malloc(sizeof(double) * n_alloc); - perm = (int *)malloc(sizeof(int) * n_alloc); - - for (i = 0; i < 10; i++) { - norm = spiro_iter(s, m, perm, v, nseg); + if (nmat == 0) { + return 0; + } + if (s[0].ty != '{' && s[0].ty != 'v') { + n_alloc *= 3; + } + if (n_alloc < 5) { + n_alloc = 5; + } + + bandmat *m = (bandmat *)malloc(sizeof(bandmat) * n_alloc); + double *v = (double *)malloc(sizeof(double) * n_alloc); + int *perm = (int *)malloc(sizeof(int) * n_alloc); + + for (unsigned i = 0; i < 10; i++) { + double norm = spiro_iter(s, m, perm, v, nseg); #ifdef VERBOSE - printf("%% norm = %g\n", norm); + printf("%% norm = %g\n", norm); #endif - if (norm < 1e-12) break; + if (norm < 1e-12) break; } free(m); diff --git a/src/lpe-tool-context.cpp b/src/lpe-tool-context.cpp index feabfa02d..062a75a7b 100644 --- a/src/lpe-tool-context.cpp +++ b/src/lpe-tool-context.cpp @@ -37,10 +37,12 @@ #include "display/canvas-text.h" #include "message-stack.h" #include "sp-path.h" -#include "helper/units.h" +#include "util/units.h" #include "lpe-tool-context.h" +using Inkscape::Util::unit_table; + static void sp_lpetool_context_dispose(GObject *object); static void sp_lpetool_context_setup(SPEventContext *ec); @@ -453,13 +455,16 @@ lpetool_create_measuring_items(SPLPEToolContext *lc, Inkscape::Selection *select if (!show) sp_canvas_item_hide(SP_CANVAS_ITEM(canvas_text)); - SPUnitId unitid = static_cast<SPUnitId>(prefs->getInt("/tools/lpetool/unitid", SP_UNIT_PX)); - SPUnit unit = sp_unit_get_by_id(unitid); + Inkscape::Util::Unit unit; + if (prefs->getString("/tools/lpetool/unit").compare("")) { + unit = unit_table.getUnit(prefs->getString("/tools/lpetool/unit")); + } else { + unit = unit_table.getUnit("px"); + } lengthval = Geom::length(pwd2); - gboolean success; - success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), &unit); - arc_length = g_strdup_printf("%.2f %s", lengthval, success ? sp_unit_get_abbreviation(&unit) : "px"); + lengthval = Inkscape::Util::Quantity::convert(lengthval, "px", unit); + arc_length = g_strdup_printf("%.2f %s", lengthval, unit.abbr.c_str()); sp_canvastext_set_text (canvas_text, arc_length); set_pos_and_anchor(canvas_text, pwd2, 0.5, 10); // TODO: must we free arc_length? @@ -482,21 +487,22 @@ void lpetool_update_measuring_items(SPLPEToolContext *lc) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - SPPath *path; - SPCurve *curve; - double lengthval; - gchar *arc_length; - std::map<SPPath *, SPCanvasItem*>::iterator i; - for (i = lc->measuring_items->begin(); i != lc->measuring_items->end(); ++i) { - path = i->first; - curve = SP_SHAPE(path)->getCurve(); + for ( std::map<SPPath *, SPCanvasItem*>::iterator i = lc->measuring_items->begin(); + i != lc->measuring_items->end(); + ++i ) + { + SPPath *path = i->first; + SPCurve *curve = SP_SHAPE(path)->getCurve(); Geom::Piecewise<Geom::D2<Geom::SBasis> > pwd2 = Geom::paths_to_pw(curve->get_pathvector()); - SPUnitId unitid = static_cast<SPUnitId>(prefs->getInt("/tools/lpetool/unitid", SP_UNIT_PX)); - SPUnit unit = sp_unit_get_by_id(unitid); - lengthval = Geom::length(pwd2); - gboolean success; - success = sp_convert_distance(&lengthval, &sp_unit_get_by_id(SP_UNIT_PX), &unit); - arc_length = g_strdup_printf("%.2f %s", lengthval, success ? sp_unit_get_abbreviation(&unit) : "px"); + Inkscape::Util::Unit unit; + if (prefs->getString("/tools/lpetool/unit").compare("")) { + unit = unit_table.getUnit(prefs->getString("/tools/lpetool/unit")); + } else { + unit = unit_table.getUnit("px"); + } + double lengthval = Geom::length(pwd2); + lengthval = Inkscape::Util::Quantity::convert(lengthval, "px", unit); + gchar *arc_length = g_strdup_printf("%.2f %s", lengthval, unit.abbr.c_str()); sp_canvastext_set_text (SP_CANVASTEXT(i->second), arc_length); set_pos_and_anchor(SP_CANVASTEXT(i->second), pwd2, 0.5, 10); // TODO: must we free arc_length? diff --git a/src/lpe-tool-context.h b/src/lpe-tool-context.h index fb3a5d4e2..7b85b09f2 100644 --- a/src/lpe-tool-context.h +++ b/src/lpe-tool-context.h @@ -16,7 +16,6 @@ */ #include "pen-context.h" -#include "helper/units.h" #define SP_TYPE_LPETOOL_CONTEXT (sp_lpetool_context_get_type()) #define SP_LPETOOL_CONTEXT(o) (G_TYPE_CHECK_INSTANCE_CAST((o), SP_TYPE_LPETOOL_CONTEXT, SPLPEToolContext)) diff --git a/src/main.cpp b/src/main.cpp index d425b88bb..29f431aa8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -68,7 +68,6 @@ #include "color.h" #include "sp-item.h" #include "sp-root.h" -#include "unit-constants.h" #include "svg/svg.h" #include "svg/svg-color.h" @@ -1524,7 +1523,7 @@ static int sp_do_export_png(SPDocument *doc) // default dpi if (dpi == 0.0) { - dpi = PX_PER_IN; + dpi = Inkscape::Util::Quantity::convert(1, "in", "px"); } unsigned long int width = 0; @@ -1537,7 +1536,7 @@ static int sp_do_export_png(SPDocument *doc) g_warning("Export width %lu out of range (1 - %lu). Nothing exported.", width, (unsigned long int)PNG_UINT_31_MAX); return 1; } - dpi = (gdouble) width * PX_PER_IN / area.width(); + dpi = (gdouble) width * Inkscape::Util::Quantity::convert(1, "in", "px") / area.width(); } if (sp_export_height) { @@ -1547,15 +1546,15 @@ static int sp_do_export_png(SPDocument *doc) g_warning("Export height %lu out of range (1 - %lu). Nothing exported.", height, (unsigned long int)PNG_UINT_31_MAX); return 1; } - dpi = (gdouble) height * PX_PER_IN / area.height(); + dpi = (gdouble) height * Inkscape::Util::Quantity::convert(1, "in", "px") / area.height(); } if (!sp_export_width) { - width = (unsigned long int) (area.width() * dpi / PX_PER_IN + 0.5); + width = (unsigned long int) (area.width() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); } if (!sp_export_height) { - height = (unsigned long int) (area.height() * dpi / PX_PER_IN + 0.5); + height = (unsigned long int) (area.height() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); } guint32 bgcolor = 0x00000000; diff --git a/src/marker.cpp b/src/marker.cpp index b3b493b00..057fcbfbd 100644 --- a/src/marker.cpp +++ b/src/marker.cpp @@ -536,7 +536,6 @@ void sp_marker_show_dimension (SPMarker *marker, unsigned int key, unsigned int size) { SPMarkerView *view; - unsigned int i; for (view = marker->views; view != NULL; view = view->next) { if (view->key == key) break; @@ -551,7 +550,7 @@ sp_marker_show_dimension (SPMarker *marker, unsigned int key, unsigned int size) if (!view) { view = new SPMarkerView(); view->items.clear(); - for (i = 0; i < size; i++) { + for (unsigned int i = 0; i < size; i++) { view->items.push_back(NULL); } view->next = marker->views; @@ -645,7 +644,6 @@ sp_marker_hide (SPMarker *marker, unsigned int key) static void sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destroyitems) { - unsigned int i; if (view == marker->views) { marker->views = view->next; } else { @@ -654,7 +652,7 @@ sp_marker_view_remove (SPMarker *marker, SPMarkerView *view, unsigned int destro v->next = view->next; } if (destroyitems) { - for (i = 0; i < view->items.size(); i++) { + for (unsigned int i = 0; i < view->items.size(); i++) { /* We have to walk through the whole array because there may be hidden items */ delete view->items[i]; } diff --git a/src/measure-context.cpp b/src/measure-context.cpp index dc23cf5c6..37e87d3d9 100644 --- a/src/measure-context.cpp +++ b/src/measure-context.cpp @@ -13,7 +13,7 @@ #include <gdk/gdkkeysyms.h> #include <boost/none_t.hpp> -#include "helper/units.h" +#include "util/units.h" #include "macros.h" #include "display/curve.h" #include "sp-shape.h" @@ -46,6 +46,7 @@ using Inkscape::ControlManager; using Inkscape::CTLINE_SECONDARY; +using Inkscape::Util::unit_table; static void sp_measure_context_setup(SPEventContext *ec); static void sp_measure_context_finish(SPEventContext *ec); @@ -494,7 +495,6 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv } curve->transform(item->i2doc_affine()); - Geom::PathVector pathv = curve->get_pathvector(); calculate_intersections(desktop, item, lineseg, curve, intersections); @@ -515,8 +515,10 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv std::sort(intersections.begin(), intersections.end(), GeomPointSortPredicate); } - SPUnitId unitid = static_cast<SPUnitId>(prefs->getInt("/tools/measure/unitid", SP_UNIT_PX)); - SPUnit unit = sp_unit_get_by_id(unitid); + Glib::ustring unit_name = prefs->getString("/tools/measure/unit"); + if (!unit_name.compare("")) { + unit_name = "px"; + } double fontsize = prefs->getInt("/tools/measure/fontsize"); @@ -527,7 +529,7 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv for (size_t idx = 1; idx < intersections.size(); ++idx) { LabelPlacement placement; placement.lengthVal = (intersections[idx] - intersections[idx - 1]).length(); - sp_convert_distance(&placement.lengthVal, &sp_unit_get_by_id(SP_UNIT_PX), &unit); + placement.lengthVal = Inkscape::Util::Quantity::convert(placement.lengthVal, "px", unit_name); placement.offset = DIMENSION_OFFSET; placement.start = desktop->doc2dt( (intersections[idx - 1] + intersections[idx]) / 2 ); placement.end = placement.start - (normal * placement.offset); @@ -543,7 +545,7 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv LabelPlacement &place = *it; // TODO cleanup memory, Glib::ustring, etc.: - gchar *measure_str = g_strdup_printf("%.2f %s", place.lengthVal, unit.abbr); + gchar *measure_str = g_strdup_printf("%.2f %s", place.lengthVal, unit_name.c_str()); SPCanvasText *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(desktop), desktop, place.end, @@ -584,10 +586,10 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv { double totallengthval = (end_point - start_point).length(); - sp_convert_distance(&totallengthval, &sp_unit_get_by_id(SP_UNIT_PX), &unit); + totallengthval = Inkscape::Util::Quantity::convert(totallengthval, "px", unit_name); // TODO cleanup memory, Glib::ustring, etc.: - gchar *totallength_str = g_strdup_printf("%.2f %s", totallengthval, unit.abbr); + gchar *totallength_str = g_strdup_printf("%.2f %s", totallengthval, unit_name.c_str()); SPCanvasText *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(desktop), desktop, end_point + desktop->w2d(Geom::Point(3*fontsize, -fontsize)), @@ -605,10 +607,10 @@ static gint sp_measure_context_root_handler(SPEventContext *event_context, GdkEv if (intersections.size() > 2) { double totallengthval = (intersections[intersections.size()-1] - intersections[0]).length(); - sp_convert_distance(&totallengthval, &sp_unit_get_by_id(SP_UNIT_PX), &unit); + totallengthval = Inkscape::Util::Quantity::convert(totallengthval, "px", unit_name); // TODO cleanup memory, Glib::ustring, etc.: - gchar *total_str = g_strdup_printf("%.2f %s", totallengthval, unit.abbr); + gchar *total_str = g_strdup_printf("%.2f %s", totallengthval, unit_name.c_str()); SPCanvasText *canvas_tooltip = sp_canvastext_new(sp_desktop_tempgroup(desktop), desktop, desktop->doc2dt((intersections[0] + intersections[intersections.size()-1])/2) + normal * 60, diff --git a/src/menus-skeleton.h b/src/menus-skeleton.h index 77e781763..d01e3e38c 100644 --- a/src/menus-skeleton.h +++ b/src/menus-skeleton.h @@ -141,7 +141,6 @@ static char const menus_skeleton[] = " <separator/>\n" " <verb verb-id=\"DialogSwatches\" />\n" " <verb verb-id=\"DialogDebug\" />\n" -//" <verb verb-id=\"DialogScript\" />\n" " <separator/>\n" " <verb verb-id=\"PrevWindow\" />\n" " <verb verb-id=\"NextWindow\" />\n" diff --git a/src/number-opt-number.h b/src/number-opt-number.h index b2f2f2a1e..867d0535f 100644 --- a/src/number-opt-number.h +++ b/src/number-opt-number.h @@ -23,9 +23,6 @@ #include <stdlib.h> #include "svg/stringstream.h" - -gdouble fixed_g_ascii_strtod (const gchar *nptr, gchar **endptr); - class NumberOptNumber { public: diff --git a/src/object-snapper.cpp b/src/object-snapper.cpp index e6f6d87db..77ba3040f 100644 --- a/src/object-snapper.cpp +++ b/src/object-snapper.cpp @@ -106,12 +106,11 @@ void Inkscape::ObjectSnapper::_findCandidates(SPObject* parent, if (it == NULL || i == it->end()) { SPItem *item = SP_ITEM(o); if (item) { - SPObject *obj = NULL; if (!clip_or_mask) { // cannot clip or mask more than once // The current item is not a clipping path or a mask, but might // still be the subject of clipping or masking itself ; if so, then // we should also consider that path or mask for snapping to - obj = SP_OBJECT(item->clip_ref ? item->clip_ref->getObject() : NULL); + SPObject *obj = SP_OBJECT(item->clip_ref ? item->clip_ref->getObject() : NULL); if (obj && _snapmanager->snapprefs.isTargetSnappable(SNAPTARGET_PATH_CLIP)) { _findCandidates(obj, it, false, bbox_to_snap, true, item->i2doc_affine()); } diff --git a/src/pen-context.cpp b/src/pen-context.cpp index df5fdadb9..6f51d59cb 100644 --- a/src/pen-context.cpp +++ b/src/pen-context.cpp @@ -21,7 +21,6 @@ #include <string> #include "pen-context.h" #include "sp-namedview.h" -#include "sp-metrics.h" #include "desktop.h" #include "desktop-handles.h" #include "selection.h" @@ -38,7 +37,6 @@ #include "display/sp-ctrlline.h" #include "display/sodipodi-ctrl.h" #include <glibmm/i18n.h> -#include "helper/units.h" #include "macros.h" #include "context-fns.h" #include "tools-switch.h" @@ -1442,11 +1440,16 @@ static void spdc_pen_set_angle_distance_status_message(SPPenContext *const pc, G SPDesktop *desktop = SP_EVENT_CONTEXT(pc)->desktop; Geom::Point rel = p - pc->p[pc_point_to_compare]; - GString *dist = SP_PX_TO_METRIC_STRING(Geom::L2(rel), desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity q = Inkscape::Util::Quantity(Geom::L2(rel), "px"); + GString *dist = g_string_new(q.string(*desktop->namedview->doc_units).c_str()); double angle = atan2(rel[Geom::Y], rel[Geom::X]) * 180 / M_PI; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - if (prefs->getBool("/options/compassangledisplay/value", 0) != 0) - angle = angle_to_compass (angle); + if (prefs->getBool("/options/compassangledisplay/value", 0) != 0) { + angle = 90 - angle; + if (angle < 0) { + angle += 360; + } + } pc->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, message, angle, dist->str); g_string_free(dist, FALSE); diff --git a/src/preferences.cpp b/src/preferences.cpp index 1d7009a99..0dc6f1ec4 100644 --- a/src/preferences.cpp +++ b/src/preferences.cpp @@ -28,6 +28,8 @@ #define PREFERENCES_FILE_NAME "preferences.xml" +using Inkscape::Util::unit_table; + namespace Inkscape { static Inkscape::XML::Document *loadImpl( std::string const& prefsFilename, Glib::ustring & errMsg ); @@ -777,8 +779,6 @@ double Preferences::_extractDouble(Entry const &v) double Preferences::_extractDouble(Entry const &v, Glib::ustring const &requested_unit) { - static Inkscape::Util::UnitTable unit_table; // load the unit_table once by making it static - double val = _extractDouble(v); Glib::ustring unit = _extractUnit(v); diff --git a/src/rdf.cpp b/src/rdf.cpp index 7bd771b4f..16344e520 100644 --- a/src/rdf.cpp +++ b/src/rdf.cpp @@ -225,6 +225,9 @@ struct rdf_license_t rdf_licenses [] = { #define XML_TAG_NAME_RDF "rdf:RDF" #define XML_TAG_NAME_WORK "cc:Work" #define XML_TAG_NAME_LICENSE "cc:License" +// Note the lowercase L! +#define XML_TAG_NAME_LICENSE_PROP "cc:license" + // Remember when using the "title" and "tip" elements to pass them through // the localization functions when you use them! @@ -338,7 +341,7 @@ public: struct rdf_work_entity_t const & entity, gchar const * text ); - static struct rdf_license_t *getLicense(SPDocument const * document); + static struct rdf_license_t *getLicense(SPDocument *document); static void setLicense(SPDocument * doc, struct rdf_license_t const * license); }; @@ -560,7 +563,6 @@ unsigned int RDFImpl::setReprText( Inkscape::XML::Node * repr, int i; Inkscape::XML::Node * temp=NULL; - Inkscape::XML::Node * child=NULL; Inkscape::XML::Node * parent=repr; Inkscape::XML::Document * xmldoc = parent->document(); @@ -666,7 +668,7 @@ unsigned int RDFImpl::setReprText( Inkscape::XML::Node * repr, parent->appendChild(temp); Inkscape::GC::release(temp); - child = xmldoc->createTextNode( g_strstrip(str) ); + Inkscape::XML::Node * child = xmldoc->createTextNode( g_strstrip(str) ); g_return_val_if_fail (child != NULL, 0); temp->appendChild(child); @@ -1028,26 +1030,95 @@ rdf_match_license(Inkscape::XML::Node const *repr, struct rdf_license_t const *l } // Public API: -struct rdf_license_t *rdf_get_license(SPDocument const * document) +struct rdf_license_t *rdf_get_license(SPDocument *document) { return RDFImpl::getLicense(document); } -struct rdf_license_t *RDFImpl::getLicense(SPDocument const *document) +struct rdf_license_t *RDFImpl::getLicense(SPDocument *document) { + // Base license lookup on the URI of cc:license rather than the license + // properties, per instructions from the ccREL gurus. + // (Fixes https://bugs.launchpad.net/inkscape/+bug/372427) + + struct rdf_work_entity_t *entity = rdf_find_entity("license_uri"); + if (entity == NULL) { + g_critical("Can't find internal entity structure for 'license_uri'"); + return NULL; + } + + const gchar *uri = getWorkEntity(document, *entity); + struct rdf_license_t * license_by_uri = NULL; + + if (uri != NULL) { + for (struct rdf_license_t * license = rdf_licenses; license->name; license++) { + if (g_strcmp0(uri, license->uri) == 0) { + license_by_uri = license; + break; + } + } + } + + // To improve backward compatibility, the old license matching code is + // kept as fallback and to warn about and fix discrepancies. + + // TODO: would it be better to do this code on document load? Is + // sp_metadata_build() then the right place to put the call to sort out + // any RDF mess? + + struct rdf_license_t * license_by_properties = NULL; + Inkscape::XML::Node const *repr = getXmlRepr( document, XML_TAG_NAME_LICENSE ); if (repr) { for ( struct rdf_license_t * license = rdf_licenses; license->name; license++ ) { if ( rdf_match_license( repr, license ) ) { - return license; + license_by_properties = license; + break; } } } -#ifdef DEBUG_MATCH - else { - printf("no license XML\n"); + + if (license_by_uri != NULL && license_by_properties != NULL) { + // Both property and structure, use property + if (license_by_uri != license_by_properties) { + // TODO: this should be a user-visible warning, but how? + g_warning("Mismatch between %s and %s metadata:\n" + "%s value URI: %s (using this one!)\n" + "%s derived URI: %s", + XML_TAG_NAME_LICENSE_PROP, + XML_TAG_NAME_LICENSE, + XML_TAG_NAME_LICENSE_PROP, + license_by_uri->uri, + XML_TAG_NAME_LICENSE, + license_by_properties->uri); + } + + // Reset license structure to match so the document is consistent + // (and this will also silence the warning above on repeated calls). + setLicense(document, license_by_uri); + + return license_by_uri; } -#endif + else if (license_by_uri != NULL) { + // Only cc:license property, set structure for backward compatiblity + setLicense(document, license_by_uri); + + return license_by_uri; + } + else if (license_by_properties != NULL) { + // Only cc:License structure + // TODO: this could be a user-visible warning too + g_warning("No %s metadata found, derived license URI from %s: %s", + XML_TAG_NAME_LICENSE_PROP, XML_TAG_NAME_LICENSE, + license_by_properties->uri); + + // Set license property to match + setWorkEntity(document, *entity, license_by_properties->uri); + + return license_by_properties; + } + + // No license info at all return NULL; } @@ -1059,6 +1130,11 @@ void rdf_set_license(SPDocument * doc, struct rdf_license_t const * license) void RDFImpl::setLicense(SPDocument * doc, struct rdf_license_t const * license) { + // When basing license check on only the license URI (see fix for + // https://bugs.launchpad.net/inkscape/+bug/372427 above) we should + // really drop this license section, but keep writing it for a while for + // compatibility with older versions. + // drop old license section Inkscape::XML::Node * repr = getXmlRepr( doc, XML_TAG_NAME_LICENSE ); if (repr) { @@ -121,7 +121,7 @@ unsigned int rdf_set_work_entity(SPDocument * doc, * \return A pointer to the static RDF license structure * */ -struct rdf_license_t * rdf_get_license(SPDocument const * doc); +struct rdf_license_t * rdf_get_license(SPDocument *doc); /** * \brief Stores an RDF/License XML in the document XML diff --git a/src/rect-context.cpp b/src/rect-context.cpp index 06745564f..17675745f 100644 --- a/src/rect-context.cpp +++ b/src/rect-context.cpp @@ -35,7 +35,6 @@ #include "message-context.h" #include "pixmaps/cursor-rect.xpm" #include "rect-context.h" -#include "sp-metrics.h" #include <glibmm/i18n.h> #include "xml/repr.h" #include "xml/node-event-vector.h" @@ -483,8 +482,10 @@ static void sp_rect_drag(SPRectContext &rc, Geom::Point const pt, guint state) // status text double rdimx = r.dimensions()[Geom::X]; double rdimy = r.dimensions()[Geom::Y]; - GString *xs = SP_PX_TO_METRIC_STRING(rdimx, desktop->namedview->getDefaultMetric()); - GString *ys = SP_PX_TO_METRIC_STRING(rdimy, desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity rdimx_q = Inkscape::Util::Quantity(rdimx, "px"); + Inkscape::Util::Quantity rdimy_q = Inkscape::Util::Quantity(rdimy, "px"); + GString *xs = g_string_new(rdimx_q.string(*desktop->namedview->doc_units).c_str()); + GString *ys = g_string_new(rdimy_q.string(*desktop->namedview->doc_units).c_str()); if (state & GDK_CONTROL_MASK) { int ratio_x, ratio_y; bool is_golden_ratio = false; diff --git a/src/satisfied-guide-cns.cpp b/src/satisfied-guide-cns.cpp index 57d4ffce3..588c78ce0 100644 --- a/src/satisfied-guide-cns.cpp +++ b/src/satisfied-guide-cns.cpp @@ -1,8 +1,8 @@ +#include <2geom/coord.h> #include "desktop-handles.h" #include "sp-guide.h" #include "sp-guide-constraint.h" #include "sp-namedview.h" -#include "approx-equal.h" #include "satisfied-guide-cns.h" void satisfied_guide_cns(SPDesktop const &desktop, @@ -13,7 +13,7 @@ void satisfied_guide_cns(SPDesktop const &desktop, for (GSList const *l = nv.guides; l != NULL; l = l->next) { SPGuide &g = *SP_GUIDE(l->data); for (unsigned int i = 0; i < snappoints.size(); ++i) { - if (approx_equal( g.getDistanceFrom(snappoints[i].getPoint()), 0) ) { + if (Geom::are_near(g.getDistanceFrom(snappoints[i].getPoint()), 0, 1e-2)) { cns.push_back(SPGuideConstraint(&g, i)); } } diff --git a/src/select-context.cpp b/src/select-context.cpp index b4b01bf15..df90d62cb 100644 --- a/src/select-context.cpp +++ b/src/select-context.cpp @@ -333,9 +333,9 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE // if shift or ctrl was pressed, do not move objects; // pass the event to root handler which will perform rubberband, shift-click, ctrl-click, ctrl-drag } else { - GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); + GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); - sc->dragging = TRUE; + sc->dragging = TRUE; sc->moved = FALSE; gdk_window_set_cursor(window, CursorSelectDragging); @@ -387,7 +387,7 @@ sp_select_context_item_handler(SPEventContext *event_context, SPItem *item, GdkE GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); gdk_window_set_cursor(window, event_context->cursor); - } + } break; case GDK_KEY_PRESS: @@ -464,8 +464,6 @@ sp_select_context_cycle_through_items(SPSelectContext *sc, Inkscape::Selection * static gint sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) { - SPItem *item = NULL; - SPItem *item_at_point = NULL, *group_at_point = NULL, *item_in_group = NULL; gint ret = FALSE; SPDesktop *desktop = event_context->desktop; @@ -542,11 +540,11 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) case GDK_MOTION_NOTIFY: { - if (is_cycling) - { - moved_while_cycling = true; - prev_event_context = event_context; - } + if (is_cycling) + { + moved_while_cycling = true; + prev_event_context = event_context; + } tolerance = prefs->getIntLimited("/options/dragtolerance/value", 0, 0, 100); if ((event->motion.state & GDK_BUTTON1_MASK) && !event_context->space_panning) { Geom::Point const motion_pt(event->motion.x, event->motion.y); @@ -566,7 +564,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) // if it's not click and ctrl or alt was pressed (the latter with some selection // but not with shift) we want to drag rather than rubberband sc->dragging = TRUE; - GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); + GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); gdk_window_set_cursor(window, CursorSelectDragging); desktop->canvas->forceFullRedrawAfterInterruptions(5); @@ -578,14 +576,14 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) // and also when we started within tolerance, but trespassed tolerance outside of item Inkscape::Rubberband::get(desktop)->stop(); SP_EVENT_CONTEXT(sc)->defaultMessageContext()->clear(); - item_at_point = desktop->getItemAtPoint(Geom::Point(event->button.x, event->button.y), FALSE); + SPItem *item_at_point = desktop->getItemAtPoint(Geom::Point(event->button.x, event->button.y), FALSE); if (!item_at_point) // if no item at this point, try at the click point (bug 1012200) item_at_point = desktop->getItemAtPoint(Geom::Point(xp, yp), FALSE); if (item_at_point || sc->moved || sc->button_press_alt) { // drag only if starting from an item, or if something is already grabbed, or if alt-dragging if (!sc->moved) { - item_in_group = desktop->getItemAtPoint(Geom::Point(event->button.x, event->button.y), TRUE); - group_at_point = desktop->getGroupAtPoint(Geom::Point(event->button.x, event->button.y)); + SPItem *item_in_group = desktop->getItemAtPoint(Geom::Point(event->button.x, event->button.y), TRUE); + SPItem *group_at_point = desktop->getGroupAtPoint(Geom::Point(event->button.x, event->button.y)); if (SP_IS_LAYER(selection->single())) group_at_point = SP_GROUP(selection->single()); @@ -640,7 +638,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) if ((event->button.button == 1) && (sc->grabbed) && !event_context->space_panning) { if (sc->dragging) { GdkWindow* window; - if (sc->moved) { + if (sc->moved) { // item has been moved seltrans->ungrab(); sc->moved = FALSE; @@ -672,7 +670,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) } } sc->dragging = FALSE; - window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); + window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); gdk_window_set_cursor(window, CursorSelectMouseover); sp_event_context_discard_delayed_snap_event(event_context); desktop->canvas->endForcedFullRedraws(); @@ -712,6 +710,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) sc->button_press_shift = false; + SPItem *item = NULL; if (sc->button_press_ctrl) { // go into groups, honoring Alt item = sp_event_context_find_item (desktop, @@ -730,7 +729,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) } else if ((sc->button_press_ctrl || sc->button_press_alt) && !rb_escaped && !drag_escaped) { // ctrl+click, alt+click - item = sp_event_context_find_item (desktop, + SPItem *item = sp_event_context_find_item (desktop, Geom::Point(event->button.x, event->button.y), sc->button_press_alt, sc->button_press_ctrl); sc->button_press_ctrl = FALSE; @@ -778,15 +777,15 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) GdkEventScroll *scroll_event = (GdkEventScroll*) event; if (scroll_event->state & GDK_MOD1_MASK) { // alt modified pressed - if (moved_while_cycling) - { - moved_while_cycling = false; - sp_select_context_reset_opacities(prev_event_context); - prev_event_context = NULL; - } - - is_cycling = true; - + if (moved_while_cycling) + { + moved_while_cycling = false; + sp_select_context_reset_opacities(prev_event_context); + prev_event_context = NULL; + } + + is_cycling = true; + bool shift_pressed = scroll_event->state & GDK_SHIFT_MASK; /* Rebuild list of items underneath the mouse pointer */ @@ -841,9 +840,8 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) // ... and rebuild them with the new items. sc->cycling_items_cmp = g_list_copy(sc->cycling_items); - SPItem *item; for(GList *l = sc->cycling_items; l != NULL; l = l->next) { - item = SP_ITEM(l->data); + SPItem *item = SP_ITEM(l->data); arenaitem = item->get_arenaitem(desktop->dkey); arenaitem->setOpacity(0.3); if (selection->includes(item)) { @@ -863,21 +861,21 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) ret = TRUE; - GtkWindow *w =GTK_WINDOW(gtk_widget_get_toplevel( GTK_WIDGET(desktop->canvas) )); - if (w) - { - gtk_window_present(w); - gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas)); - } + GtkWindow *w =GTK_WINDOW(gtk_widget_get_toplevel( GTK_WIDGET(desktop->canvas) )); + if (w) + { + gtk_window_present(w); + gtk_widget_grab_focus (GTK_WIDGET(desktop->canvas)); + } } break; } case GDK_KEY_PRESS: // keybindings for select context - { - { - guint keyval = get_group0_keyval(&event->key); + { + { + guint keyval = get_group0_keyval(&event->key); bool alt = ( MOD__ALT(event) || (keyval == GDK_KEY_Alt_L) || (keyval == GDK_KEY_Alt_R) @@ -904,19 +902,19 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) _("<b>Alt</b>: click to select under; scroll mouse-wheel to cycle-select; drag to move selected or select by touch")); // if Alt and nonempty selection, show moving cursor ("move selected"): if (alt && !selection->isEmpty() && !desktop->isWaitingCursor()) { - GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); + GdkWindow* window = gtk_widget_get_window (GTK_WIDGET (sp_desktop_canvas(desktop))); gdk_window_set_cursor(window, CursorSelectDragging); } //*/ break; } - } + } gdouble const nudge = prefs->getDoubleLimited("/options/nudgedistance/value", 2, 0, 1000, "px"); // in px - gdouble const offset = prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000, "px"); - int const snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12); + gdouble const offset = prefs->getDoubleLimited("/options/defaultscale/value", 2, 0, 1000, "px"); + int const snaps = prefs->getInt("/options/rotationsnapsperpi/value", 12); - switch (get_group0_keyval (&event->key)) { + switch (get_group0_keyval (&event->key)) { case GDK_KEY_Left: // move selection left case GDK_KEY_KP_Left: if (!MOD__CTRL(event)) { // not ctrl @@ -1104,7 +1102,7 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) break; } break; - } + } case GDK_KEY_RELEASE: { guint keyval = get_group0_keyval(&event->key); @@ -1125,11 +1123,10 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) } else { if (alt) { // TODO: Should we have a variable like is_cycling or is it harmless to run this piece of code each time? // quit cycle-selection and reset opacities - if (is_cycling) - { - sp_select_context_reset_opacities(event_context); - is_cycling = false; - } + if (is_cycling){ + sp_select_context_reset_opacities(event_context); + is_cycling = false; + } } } @@ -1153,23 +1150,21 @@ sp_select_context_root_handler(SPEventContext *event_context, GdkEvent *event) return ret; } -static void -sp_select_context_reset_opacities(SPEventContext *event_context) +static void sp_select_context_reset_opacities(SPEventContext *event_context) { // SPDesktop *desktop = event_context->desktop; - SPSelectContext *sc = SP_SELECT_CONTEXT(event_context); - Inkscape::DrawingItem *arenaitem; - for (GList *l = sc->cycling_items; l != NULL; l = g_list_next(l)) { - arenaitem = SP_ITEM(l->data)->get_arenaitem(event_context->desktop->dkey); - arenaitem->setOpacity(SP_SCALE24_TO_FLOAT(SP_ITEM(l->data)->style->opacity.value)); - } - g_list_free(sc->cycling_items); - g_list_free(sc->cycling_items_selected_before); - g_list_free(sc->cycling_items_cmp); - sc->cycling_items = NULL; - sc->cycling_items_selected_before = NULL; - sc->cycling_cur_item = NULL; - sc->cycling_items_cmp = NULL; + SPSelectContext *sc = SP_SELECT_CONTEXT(event_context); + for (GList *l = sc->cycling_items; l != NULL; l = g_list_next(l)) { + Inkscape::DrawingItem *arenaitem = SP_ITEM(l->data)->get_arenaitem(event_context->desktop->dkey); + arenaitem->setOpacity(SP_SCALE24_TO_FLOAT(SP_ITEM(l->data)->style->opacity.value)); + } + g_list_free(sc->cycling_items); + g_list_free(sc->cycling_items_selected_before); + g_list_free(sc->cycling_items_cmp); + sc->cycling_items = NULL; + sc->cycling_items_selected_before = NULL; + sc->cycling_cur_item = NULL; + sc->cycling_items_cmp = NULL; } diff --git a/src/selection-chemistry.cpp b/src/selection-chemistry.cpp index 29cb208d9..5976555f4 100644 --- a/src/selection-chemistry.cpp +++ b/src/selection-chemistry.cpp @@ -86,11 +86,10 @@ SPCycleType SP_CYCLING = SP_CYCLE_FOCUS; #include <map> #include <cstring> #include <string> -#include "helper/units.h" #include "sp-item.h" #include "box3d.h" #include "persp3d.h" -#include "unit-constants.h" +#include "util/units.h" #include "xml/simple-document.h" #include "sp-filter-reference.h" #include "gradient-drag.h" @@ -3398,7 +3397,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop) res = prefs_res; } else if (0 < prefs_min) { // If minsize is given, look up minimum bitmap size (default 250 pixels) and calculate resolution from it - res = PX_PER_IN * prefs_min / MIN(bbox->width(), bbox->height()); + res = Inkscape::Util::Quantity::convert(1, "in", "px") * prefs_min / MIN(bbox->width(), bbox->height()); } else { float hint_xdpi = 0, hint_ydpi = 0; Glib::ustring hint_filename; @@ -3413,14 +3412,14 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop) res = hint_xdpi; } else { // if all else fails, take the default 90 dpi - res = PX_PER_IN; + res = Inkscape::Util::Quantity::convert(1, "in", "px"); } } } // The width and height of the bitmap in pixels - unsigned width = (unsigned) floor(bbox->width() * res / PX_PER_IN); - unsigned height =(unsigned) floor(bbox->height() * res / PX_PER_IN); + unsigned width = (unsigned) floor(bbox->width() * res / Inkscape::Util::Quantity::convert(1, "in", "px")); + unsigned height =(unsigned) floor(bbox->height() * res / Inkscape::Util::Quantity::convert(1, "in", "px")); // Find out if we have to run an external filter gchar const *run = NULL; @@ -3452,7 +3451,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop) double shift_x = bbox->min()[Geom::X]; double shift_y = bbox->max()[Geom::Y]; - if (res == PX_PER_IN) { // for default 90 dpi, snap it to pixel grid + if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 90 dpi, snap it to pixel grid shift_x = round(shift_x); shift_y = -round(-shift_y); // this gets correct rounding despite coordinate inversion, remove the negations when the inversion is gone } @@ -3485,7 +3484,7 @@ void sp_selection_create_bitmap_copy(SPDesktop *desktop) // Create the repr for the image Inkscape::XML::Node * repr = xml_doc->createElement("svg:image"); sp_embed_image(repr, pb, "image/png"); - if (res == PX_PER_IN) { // for default 90 dpi, snap it to pixel grid + if (res == Inkscape::Util::Quantity::convert(1, "in", "px")) { // for default 90 dpi, snap it to pixel grid sp_repr_set_svg_double(repr, "width", width); sp_repr_set_svg_double(repr, "height", height); } else { diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp index 6ed8ca584..b5704bb76 100644 --- a/src/selection-describer.cpp +++ b/src/selection-describer.cpp @@ -100,9 +100,8 @@ static GSList *collect_terms (GSList *items) static int count_filtered (GSList *items) { int count=0; - SPItem *item=NULL; for (GSList *i = items; i != NULL; i = i->next) { - item = SP_ITEM(i->data); + SPItem *item = SP_ITEM(i->data); count += item->ifilt(); } return count; diff --git a/src/selection.cpp b/src/selection.cpp index 784219c88..1335c5fca 100644 --- a/src/selection.cpp +++ b/src/selection.cpp @@ -329,11 +329,11 @@ std::list<Persp3D *> const Selection::perspList() { std::list<SPBox3D *> const Selection::box3DList(Persp3D *persp) { std::list<SPBox3D *> boxes; if (persp) { - SPBox3D *box; for (std::list<SPBox3D *>::iterator i = _3dboxes.begin(); i != _3dboxes.end(); ++i) { - box = *i; - if (persp == box3d_get_perspective(box)) + SPBox3D *box = *i; + if (persp == box3d_get_perspective(box)) { boxes.push_back(box); + } } } else { boxes = _3dboxes; diff --git a/src/seltrans.cpp b/src/seltrans.cpp index 33bfe3e4a..f614853bc 100644 --- a/src/seltrans.cpp +++ b/src/seltrans.cpp @@ -37,7 +37,6 @@ #include "seltrans-handles.h" #include "seltrans.h" #include "selection-chemistry.h" -#include "sp-metrics.h" #include "verbs.h" #include <glibmm/i18n.h> #include "display/sp-ctrlline.h" @@ -1273,8 +1272,10 @@ gboolean Inkscape::SelTrans::centerRequest(Geom::Point &pt, guint state) m.unSetup(); // status text - GString *xs = SP_PX_TO_METRIC_STRING(pt[Geom::X], _desktop->namedview->getDefaultMetric()); - GString *ys = SP_PX_TO_METRIC_STRING(pt[Geom::Y], _desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(pt[Geom::X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(pt[Geom::Y], "px"); + GString *xs = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str()); + GString *ys = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str()); _message_context.setF(Inkscape::NORMAL_MESSAGE, _("Move <b>center</b> to %s, %s"), xs->str, ys->str); g_string_free(xs, FALSE); g_string_free(ys, FALSE); @@ -1425,8 +1426,10 @@ void Inkscape::SelTrans::moveTo(Geom::Point const &xy, guint state) transform(move, norm); // status text - GString *xs = SP_PX_TO_METRIC_STRING(dxy[Geom::X], _desktop->namedview->getDefaultMetric()); - GString *ys = SP_PX_TO_METRIC_STRING(dxy[Geom::Y], _desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dxy[Geom::X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dxy[Geom::Y], "px"); + GString *xs = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str()); + GString *ys = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str()); _message_context.setF(Inkscape::NORMAL_MESSAGE, _("<b>Move</b> by %s, %s; with <b>Ctrl</b> to restrict to horizontal/vertical; with <b>Shift</b> to disable snapping"), xs->str, ys->str); g_string_free(xs, TRUE); g_string_free(ys, TRUE); diff --git a/src/shape-editor.cpp b/src/shape-editor.cpp index f2339770c..71018d89b 100644 --- a/src/shape-editor.cpp +++ b/src/shape-editor.cpp @@ -46,15 +46,13 @@ ShapeEditor::~ShapeEditor() { } void ShapeEditor::unset_item(SubType type, bool keep_knotholder) { - Inkscape::XML::Node *old_repr = NULL; - switch (type) { case SH_NODEPATH: // defunct break; case SH_KNOTHOLDER: if (this->knotholder) { - old_repr = this->knotholder->repr; + Inkscape::XML::Node *old_repr = this->knotholder->repr; if (old_repr && old_repr == knotholder_listener_attached_for) { sp_repr_remove_listener_by_data(old_repr, this); Inkscape::GC::release(old_repr); diff --git a/src/snap-preferences.h b/src/snap-preferences.h index c2db0b432..a7a2e2926 100644 --- a/src/snap-preferences.h +++ b/src/snap-preferences.h @@ -10,7 +10,6 @@ * Released under GNU GPL, read the file 'COPYING' for more information */ -#include "helper/units.h" #include "snap-enums.h" namespace Inkscape diff --git a/src/sp-desc.cpp b/src/sp-desc.cpp index 9b27c4d17..aec90714d 100644 --- a/src/sp-desc.cpp +++ b/src/sp-desc.cpp @@ -22,7 +22,7 @@ G_DEFINE_TYPE(SPDesc, sp_desc, SP_TYPE_OBJECT); static void sp_desc_class_init(SPDescClass *klass) { - SPObjectClass *sp_object_class = (SPObjectClass *)(klass); + SPObjectClass *sp_object_class = reinterpret_cast<SPObjectClass *>(klass); sp_object_class->write = sp_desc_write; } diff --git a/src/sp-ellipse.cpp b/src/sp-ellipse.cpp index 8a9793852..bf019fb13 100644 --- a/src/sp-ellipse.cpp +++ b/src/sp-ellipse.cpp @@ -167,16 +167,20 @@ static void sp_genericellipse_set_shape(SPShape *shape) return; } - double rx, ry, s, e; - double x0, y0, x1, y1, x2, y2, x3, y3; + double rx; + double ry; + double s; double len; gint slice = FALSE; - // gint i; SPGenericEllipse *ellipse = (SPGenericEllipse *) shape; - if ((ellipse->rx.computed < 1e-18) || (ellipse->ry.computed < 1e-18)) return; - if (fabs(ellipse->end - ellipse->start) < 1e-9) return; + if ((ellipse->rx.computed < 1e-18) || (ellipse->ry.computed < 1e-18)) { + return; + } + if (fabs(ellipse->end - ellipse->start) < 1e-9){ + return; + } sp_genericellipse_normalize(ellipse); @@ -197,18 +201,19 @@ static void sp_genericellipse_set_shape(SPShape *shape) curve->moveto(cos(ellipse->start), sin(ellipse->start)); for (s = ellipse->start; s < ellipse->end; s += M_PI_2) { - e = s + M_PI_2; - if (e > ellipse->end) + double e = s + M_PI_2; + if (e > ellipse->end){ e = ellipse->end; + } len = 4*tan((e - s)/4)/3; - x0 = cos(s); - y0 = sin(s); - x1 = x0 + len * cos(s + M_PI_2); - y1 = y0 + len * sin(s + M_PI_2); - x3 = cos(e); - y3 = sin(e); - x2 = x3 + len * cos(e - M_PI_2); - y2 = y3 + len * sin(e - M_PI_2); + double x0 = cos(s); + double y0 = sin(s); + double x1 = x0 + len * cos(s + M_PI_2); + double y1 = y0 + len * sin(s + M_PI_2); + double x3 = cos(e); + double y3 = sin(e); + double x2 = x3 + len * cos(e - M_PI_2); + double y2 = y3 + len * sin(e - M_PI_2); #ifdef ELLIPSE_VERBOSE g_print("step %d s %f e %f coords %f %f %f %f %f %f\n", i, s, e, x1, y1, x2, y2, x3, y3); diff --git a/src/sp-font-face.cpp b/src/sp-font-face.cpp index 0a649b17f..6b6d07c6d 100644 --- a/src/sp-font-face.cpp +++ b/src/sp-font-face.cpp @@ -272,7 +272,7 @@ G_DEFINE_TYPE(SPFontFace, sp_fontface, SP_TYPE_OBJECT); static void sp_fontface_class_init(SPFontFaceClass *fc) { - SPObjectClass *sp_object_class = (SPObjectClass *) fc; + SPObjectClass *sp_object_class = reinterpret_cast<SPObjectClass *>(fc); sp_object_class->build = sp_fontface_build; sp_object_class->release = sp_fontface_release; diff --git a/src/sp-guide.cpp b/src/sp-guide.cpp index 48596cbc0..961e53e04 100644 --- a/src/sp-guide.cpp +++ b/src/sp-guide.cpp @@ -35,7 +35,6 @@ #include <glibmm/i18n.h> #include <xml/repr.h> #include <remove-last.h> -#include "sp-metrics.h" #include "inkscape.h" #include "desktop.h" #include "sp-namedview.h" @@ -463,10 +462,10 @@ char *sp_guide_description(SPGuide const *guide, const bool verbose) } else { SPNamedView *namedview = sp_document_namedview(guide->document, NULL); - GString *position_string_x = SP_PX_TO_METRIC_STRING(guide->point_on_line[X], - namedview->getDefaultMetric()); - GString *position_string_y = SP_PX_TO_METRIC_STRING(guide->point_on_line[Y], - namedview->getDefaultMetric()); + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(guide->point_on_line[X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(guide->point_on_line[Y], "px"); + GString *position_string_x = g_string_new(x_q.string(*namedview->doc_units).c_str()); + GString *position_string_y = g_string_new(y_q.string(*namedview->doc_units).c_str()); gchar *shortcuts = g_strdup_printf("; %s", _("<b>Shift+drag</b> to rotate, <b>Ctrl+drag</b> to move origin, <b>Del</b> to delete")); diff --git a/src/sp-item-rm-unsatisfied-cns.cpp b/src/sp-item-rm-unsatisfied-cns.cpp index c35e4fa48..8fb171c08 100644 --- a/src/sp-item-rm-unsatisfied-cns.cpp +++ b/src/sp-item-rm-unsatisfied-cns.cpp @@ -1,7 +1,7 @@ #include <algorithm> +#include <2geom/coord.h> -#include "approx-equal.h" #include "remove-last.h" #include "sp-guide.h" #include "sp-guide-constraint.h" @@ -22,7 +22,8 @@ void sp_item_rm_unsatisfied_cns(SPItem &item) SPGuideConstraint const &cn = item.constraints[i]; int const snappoint_ix = cn.snappoint_ix; g_assert( snappoint_ix < int(snappoints.size()) ); - if (!approx_equal( cn.g->getDistanceFrom(snappoints[snappoint_ix].getPoint()), 0) ) { + + if (!Geom::are_near(cn.g->getDistanceFrom(snappoints[snappoint_ix].getPoint()), 0, 1e-2)) { remove_last(cn.g->attached_items, SPGuideAttachment(&item, cn.snappoint_ix)); g_assert( i < item.constraints.size() ); vector<SPGuideConstraint>::iterator const ei(&item.constraints[i]); diff --git a/src/sp-lpe-item.cpp b/src/sp-lpe-item.cpp index e8629ff70..d4619e794 100644 --- a/src/sp-lpe-item.cpp +++ b/src/sp-lpe-item.cpp @@ -185,7 +185,7 @@ static void sp_lpe_item_set(SPObject *object, unsigned int key, gchar const *val Inkscape::LivePathEffect::LPEObjectReference *path_effect_ref = new Inkscape::LivePathEffect::LPEObjectReference(object); try { path_effect_ref->link(href.c_str()); - } catch (Inkscape::BadURIException e) { + } catch (Inkscape::BadURIException &e) { g_warning("BadURIException when trying to find LPE: %s", e.what()); path_effect_ref->unlink(); delete path_effect_ref; diff --git a/src/sp-metric.h b/src/sp-metric.h deleted file mode 100644 index 31f3330fa..000000000 --- a/src/sp-metric.h +++ /dev/null @@ -1,28 +0,0 @@ -#ifndef INKSCAPE_SP_METRIC_H -#define INKSCAPE_SP_METRIC_H - -/** Known metrics so far. (I don't know why this doesn't include pica.) */ -enum SPMetric { - SP_NONE, - SP_MM, - SP_CM, - SP_IN, - SP_FT, - SP_PT, - SP_PC, - SP_PX, - SP_M -}; - -#endif /* !INKSCAPE_SP_METRIC_H */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/sp-metrics.cpp b/src/sp-metrics.cpp deleted file mode 100644 index 2b421cf05..000000000 --- a/src/sp-metrics.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "sp-metrics.h" -#include "unit-constants.h" - -/* - * SPMetric handling and stuff - * I hope this will be usefull :-) - */ - -gdouble -sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, const SPMetric metric_dst) -{ - gdouble src = 1; - gdouble dst = 1; - - switch (metric_src) { - case SP_M: - src = M_PER_IN; - break; - case SP_MM: - src = MM_PER_IN; - break; - case SP_CM: - src = CM_PER_IN; - break; - case SP_IN: - src = IN_PER_IN; - break; - case SP_FT: - src = FT_PER_IN; - break; - case SP_PT: - src = PT_PER_IN; - break; - case SP_PC: - src = PC_PER_IN; - break; - case SP_PX: - src = PX_PER_IN; - break; - case SP_NONE: - src = 1; - break; - } - - switch (metric_dst) { - case SP_M: - dst = M_PER_IN; - break; - case SP_MM: - dst = MM_PER_IN; - break; - case SP_CM: - dst = CM_PER_IN; - break; - case SP_IN: - dst = IN_PER_IN; - break; - case SP_FT: - dst = FT_PER_IN; - break; - case SP_PT: - dst = PT_PER_IN; - break; - case SP_PC: - dst = PC_PER_IN; - break; - case SP_PX: - dst = PX_PER_IN; - break; - case SP_NONE: - dst = 1; - break; - } - - return length_src * (dst/src); -} - -/** - * Create a human-readable string suitable for status-bar display. - */ -GString * -sp_metric_to_metric_string(gdouble const length, - SPMetric const metric_src, SPMetric const metric_dst, - gboolean const m) -{ - gdouble const len = sp_absolute_metric_to_metric(length, metric_src, metric_dst); - GString *str = g_string_new(""); - g_string_printf(str, "%0.02f", len); - /* We need a fixed number of fractional digits, because otherwise the live statusbar display of - * lengths will be too jerky */ - - if (m) { - char const *unit_str; - switch (metric_dst) { - case SP_M: unit_str = " m"; break; - case SP_MM: unit_str = " mm"; break; - case SP_CM: unit_str = " cm"; break; - case SP_IN: unit_str = "\""; break; - case SP_PT: unit_str = " pt"; break; - case SP_PX: unit_str = " px"; break; - default: unit_str = NULL; break; - } - if (unit_str) { - g_string_append(str, unit_str); - } - } - return str; -} - - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/sp-metrics.h b/src/sp-metrics.h deleted file mode 100644 index c2f968797..000000000 --- a/src/sp-metrics.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef SP_METRICS_H -#define SP_METRICS_H - -#include <glib.h> -#include "sp-metric.h" - -gdouble sp_absolute_metric_to_metric (gdouble length_src, const SPMetric metric_src, const SPMetric metric_dst); -GString * sp_metric_to_metric_string (gdouble length, const SPMetric metric_src, const SPMetric metric_dst, gboolean m); - -// convenience since we mostly deal with points -#define SP_METRIC_TO_PT(l,m) sp_absolute_metric_to_metric(l,m,SP_PT); -#define SP_PT_TO_METRIC(l,m) sp_absolute_metric_to_metric(l,SP_PT,m); - -#define SP_PT_TO_METRIC_STRING(l,m) sp_metric_to_metric_string(l, SP_PT, m, TRUE) -#define SP_PT_TO_STRING(l,m) sp_metric_to_metric_string(l, SP_PT, m, FALSE) - -#define SP_PX_TO_METRIC_STRING(l,m) sp_metric_to_metric_string(l, SP_PX, m, TRUE) -#define SP_PX_TO_STRING(l,m) sp_metric_to_metric_string(l, SP_PX, m, FALSE) - -#endif diff --git a/src/sp-namedview.cpp b/src/sp-namedview.cpp index 452f57425..48f8eba2a 100644 --- a/src/sp-namedview.cpp +++ b/src/sp-namedview.cpp @@ -22,7 +22,7 @@ #include "display/canvas-grid.h" #include "display/guideline.h" -#include "helper/units.h" +#include "util/units.h" #include "svg/svg-color.h" #include "xml/repr.h" #include "attributes.h" @@ -40,6 +40,7 @@ #include <gtkmm/window.h> using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; #define DEFAULTGRIDCOLOR 0x3f3fff25 #define DEFAULTGRIDEMPCOLOR 0x3f3fff60 @@ -549,18 +550,19 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va * in that they aren't in general absolute units as currently required by * doc_units. */ - SPUnit const *new_unit = &sp_unit_get_by_id(SP_UNIT_PX); + static Inkscape::Util::Unit px = unit_table.getUnit("px"); + Inkscape::Util::Unit const *new_unit = new Inkscape::Util::Unit(px); if (value) { - SPUnit const *const req_unit = sp_unit_get_by_abbreviation(value); - if ( req_unit == NULL ) { + Inkscape::Util::Unit u = unit_table.getUnit(value); + Inkscape::Util::Unit const *const req_unit = new Inkscape::Util::Unit(u); + if ( !unit_table.hasUnit(value) ) { g_warning("Unrecognized unit `%s'", value); /* fixme: Document errors should be reported in the status bar or * the like (e.g. as per * http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing); g_log * should be only for programmer errors. */ - } else if ( req_unit->base == SP_UNIT_ABSOLUTE || - req_unit->base == SP_UNIT_DEVICE ) { + } else if ( req_unit->isAbsolute() ) { new_unit = req_unit; } else { g_warning("Document units must be absolute like `mm', `pt' or `px', but found `%s'", @@ -573,18 +575,18 @@ static void sp_namedview_set(SPObject *object, unsigned int key, const gchar *va break; } case SP_ATTR_UNITS: { - SPUnit const *new_unit = NULL; + Inkscape::Util::Unit const *new_unit = NULL; if (value) { - SPUnit const *const req_unit = sp_unit_get_by_abbreviation(value); - if ( req_unit == NULL ) { + Inkscape::Util::Unit u = unit_table.getUnit(value); + Inkscape::Util::Unit const *const req_unit = new Inkscape::Util::Unit(u); + if ( !unit_table.hasUnit(value) ) { g_warning("Unrecognized unit `%s'", value); /* fixme: Document errors should be reported in the status bar or * the like (e.g. as per * http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing); g_log * should be only for programmer errors. */ - } else if ( req_unit->base == SP_UNIT_ABSOLUTE || - req_unit->base == SP_UNIT_DEVICE ) { + } else if ( req_unit->isAbsolute() ) { new_unit = req_unit; } else { g_warning("Document units must be absolute like `mm', `pt' or `px', but found `%s'", @@ -1101,35 +1103,35 @@ bool SPNamedView::getGuides() * \return the margin size in px, else 0.0 if anything is invalid. */ double SPNamedView::getMarginLength(gchar const * const key, - SPUnit const * const margin_units, - SPUnit const * const return_units, + Inkscape::Util::Unit const * const margin_units, + Inkscape::Util::Unit const * const return_units, double const width, double const height, bool const use_width) { double value; + Inkscape::Util::Unit percent = unit_table.getUnit("%"); if(!this->storeAsDouble(key,&value)) { return 0.0; } - if (margin_units == &sp_unit_get_by_id (SP_UNIT_PERCENT)) { + if (*margin_units == percent) { return (use_width)? width * value : height * value; } - if (!sp_convert_distance (&value, margin_units, return_units)) { + if (!margin_units->compatibleWith(*return_units)) { return 0.0; } return value; } - /** - * Returns namedview's default metric. + * Returns namedview's default unit. */ -SPMetric SPNamedView::getDefaultMetric() const +Inkscape::Util::Unit const SPNamedView::getDefaultUnit() const { if (doc_units) { - return sp_unit_get_metric(doc_units); + return *doc_units; } else { - return SP_PT; + return *(new Inkscape::Util::Unit(unit_table.getUnit("pt"))); } } diff --git a/src/sp-namedview.h b/src/sp-namedview.h index 8191ef6d6..26febd7d3 100644 --- a/src/sp-namedview.h +++ b/src/sp-namedview.h @@ -21,16 +21,17 @@ #define SP_IS_NAMEDVIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), SP_TYPE_NAMEDVIEW)) #include "sp-object-group.h" -#include "sp-metric.h" #include "snap.h" #include "document.h" +#include "util/units.h" G_BEGIN_DECLS -struct SPUnit; - namespace Inkscape { -class CanvasGrid; + class CanvasGrid; + namespace Util { + class Unit; + } } enum { @@ -58,8 +59,8 @@ struct SPNamedView : public SPObjectGroup { GSList * grids; bool grids_visible; - SPUnit const *doc_units; - SPUnit const *units; + Inkscape::Util::Unit const *doc_units; + Inkscape::Util::Unit const *units; GQuark default_layer_id; @@ -82,7 +83,7 @@ struct SPNamedView : public SPObjectGroup { gchar const *getName() const; guint getViewCount(); GSList const *getViewList() const; - SPMetric getDefaultMetric() const; + Inkscape::Util::Unit const getDefaultUnit() const; void translateGuides(Geom::Translate const &translation); void translateGrids(Geom::Translate const &translation); @@ -94,7 +95,7 @@ struct SPNamedView : public SPObjectGroup { bool getGuides(); private: - double getMarginLength(gchar const * const key,SPUnit const * const margin_units,SPUnit const * const return_units,double const width,double const height,bool const use_width); + double getMarginLength(gchar const * const key,Inkscape::Util::Unit const * const margin_units,Inkscape::Util::Unit const * const return_units,double const width,double const height,bool const use_width); friend class SPDocument; }; diff --git a/src/sp-paint-server.cpp b/src/sp-paint-server.cpp index 298b39117..bae0e2242 100644 --- a/src/sp-paint-server.cpp +++ b/src/sp-paint-server.cpp @@ -53,7 +53,7 @@ cairo_pattern_t *sp_paint_server_create_pattern(SPPaintServer *ps, g_return_val_if_fail(SP_IS_PAINT_SERVER(ps), NULL); cairo_pattern_t *cp = NULL; - SPPaintServerClass *psc = (SPPaintServerClass *) G_OBJECT_GET_CLASS(ps); + SPPaintServerClass *psc = reinterpret_cast<SPPaintServerClass *>(G_OBJECT_GET_CLASS(ps)); if ( psc->pattern_new ) { cp = (*psc->pattern_new)(ps, ct, bbox, opacity); } diff --git a/src/sp-pattern.cpp b/src/sp-pattern.cpp index c4308a1a9..62811d51a 100644 --- a/src/sp-pattern.cpp +++ b/src/sp-pattern.cpp @@ -56,19 +56,19 @@ G_DEFINE_TYPE(SPPattern, sp_pattern, SP_TYPE_PAINT_SERVER); static void sp_pattern_class_init (SPPatternClass *klass) { - SPObjectClass *sp_object_class; - SPPaintServerClass *ps_class; + SPObjectClass *sp_object_class; + SPPaintServerClass *ps_class; - sp_object_class = (SPObjectClass *) klass; - ps_class = (SPPaintServerClass *) klass; + sp_object_class = (SPObjectClass *) klass; + ps_class = (SPPaintServerClass *) klass; - sp_object_class->build = sp_pattern_build; - sp_object_class->release = sp_pattern_release; - sp_object_class->set = sp_pattern_set; - sp_object_class->update = sp_pattern_update; - sp_object_class->modified = sp_pattern_modified; + sp_object_class->build = sp_pattern_build; + sp_object_class->release = sp_pattern_release; + sp_object_class->set = sp_pattern_set; + sp_object_class->update = sp_pattern_update; + sp_object_class->modified = sp_pattern_modified; - // do we need _write? seems to work without it + // do we need _write? seems to work without it ps_class->pattern_new = sp_pattern_create_pattern; } @@ -76,46 +76,46 @@ sp_pattern_class_init (SPPatternClass *klass) static void sp_pattern_init (SPPattern *pat) { - pat->ref = new SPPatternReference(pat); - pat->ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(pattern_ref_changed), pat)); + pat->ref = new SPPatternReference(pat); + pat->ref->changedSignal().connect(sigc::bind(sigc::ptr_fun(pattern_ref_changed), pat)); - pat->patternUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; - pat->patternUnits_set = FALSE; + pat->patternUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; + pat->patternUnits_set = FALSE; - pat->patternContentUnits = SP_PATTERN_UNITS_USERSPACEONUSE; - pat->patternContentUnits_set = FALSE; + pat->patternContentUnits = SP_PATTERN_UNITS_USERSPACEONUSE; + pat->patternContentUnits_set = FALSE; - pat->patternTransform = Geom::identity(); - pat->patternTransform_set = FALSE; + pat->patternTransform = Geom::identity(); + pat->patternTransform_set = FALSE; - pat->x.unset(); - pat->y.unset(); - pat->width.unset(); - pat->height.unset(); + pat->x.unset(); + pat->y.unset(); + pat->width.unset(); + pat->height.unset(); - pat->viewBox_set = FALSE; + pat->viewBox_set = FALSE; - new (&pat->modified_connection) sigc::connection(); + new (&pat->modified_connection) sigc::connection(); } static void sp_pattern_build (SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) { - if (((SPObjectClass *) sp_pattern_parent_class)->build) - (* ((SPObjectClass *) sp_pattern_parent_class)->build) (object, document, repr); - - object->readAttr( "patternUnits" ); - object->readAttr( "patternContentUnits" ); - object->readAttr( "patternTransform" ); - object->readAttr( "x" ); - object->readAttr( "y" ); - object->readAttr( "width" ); - object->readAttr( "height" ); - object->readAttr( "viewBox" ); - object->readAttr( "xlink:href" ); - - /* Register ourselves */ - document->addResource("pattern", object); + if (((SPObjectClass *) sp_pattern_parent_class)->build) + (* ((SPObjectClass *) sp_pattern_parent_class)->build) (object, document, repr); + + object->readAttr( "patternUnits" ); + object->readAttr( "patternContentUnits" ); + object->readAttr( "patternTransform" ); + object->readAttr( "x" ); + object->readAttr( "y" ); + object->readAttr( "width" ); + object->readAttr( "height" ); + object->readAttr( "viewBox" ); + object->readAttr( "xlink:href" ); + + /* Register ourselves */ + document->addResource("pattern", object); } static void sp_pattern_release(SPObject *object) @@ -144,118 +144,115 @@ static void sp_pattern_release(SPObject *object) static void sp_pattern_set (SPObject *object, unsigned int key, const gchar *value) { - SPPattern *pat = SP_PATTERN (object); - - switch (key) { - case SP_ATTR_PATTERNUNITS: - if (value) { - if (!strcmp (value, "userSpaceOnUse")) { - pat->patternUnits = SP_PATTERN_UNITS_USERSPACEONUSE; - } else { - pat->patternUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; - } - pat->patternUnits_set = TRUE; - } else { - pat->patternUnits_set = FALSE; - } - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_PATTERNCONTENTUNITS: - if (value) { - if (!strcmp (value, "userSpaceOnUse")) { - pat->patternContentUnits = SP_PATTERN_UNITS_USERSPACEONUSE; - } else { - pat->patternContentUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; - } - pat->patternContentUnits_set = TRUE; - } else { - pat->patternContentUnits_set = FALSE; - } - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_PATTERNTRANSFORM: { - Geom::Affine t; - if (value && sp_svg_transform_read (value, &t)) { - pat->patternTransform = t; - pat->patternTransform_set = TRUE; - } else { - pat->patternTransform = Geom::identity(); - pat->patternTransform_set = FALSE; - } - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - } - case SP_ATTR_X: - pat->x.readOrUnset(value); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_Y: - pat->y.readOrUnset(value); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_WIDTH: - pat->width.readOrUnset(value); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_HEIGHT: - pat->height.readOrUnset(value); - object->requestModified(SP_OBJECT_MODIFIED_FLAG); - break; - case SP_ATTR_VIEWBOX: { - /* fixme: Think (Lauris) */ - double x, y, width, height; - char *eptr; - - if (value) { - eptr = (gchar *) value; - x = g_ascii_strtod (eptr, &eptr); - while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; - y = g_ascii_strtod (eptr, &eptr); - while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; - width = g_ascii_strtod (eptr, &eptr); - while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; - height = g_ascii_strtod (eptr, &eptr); - while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; - if ((width > 0) && (height > 0)) { - pat->viewBox = Geom::Rect::from_xywh(x, y, width, height); - pat->viewBox_set = TRUE; - } else { - pat->viewBox_set = FALSE; - } - } else { - pat->viewBox_set = FALSE; - } - object->requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG); - break; - } - case SP_ATTR_XLINK_HREF: - if ( value && pat->href && ( strcmp(value, pat->href) == 0 ) ) { - /* Href unchanged, do nothing. */ - } else { - g_free(pat->href); - pat->href = NULL; - if (value) { - // First, set the href field; it's only used in the "unchanged" check above. - pat->href = g_strdup(value); - // Now do the attaching, which emits the changed signal. - if (value) { - try { - pat->ref->attach(Inkscape::URI(value)); - } catch (Inkscape::BadURIException &e) { - g_warning("%s", e.what()); - pat->ref->detach(); - } - } else { - pat->ref->detach(); - } - } - } - break; - default: - if (((SPObjectClass *) sp_pattern_parent_class)->set) - ((SPObjectClass *) sp_pattern_parent_class)->set (object, key, value); - break; - } + SPPattern *pat = SP_PATTERN (object); + + switch (key) { + case SP_ATTR_PATTERNUNITS: + if (value) { + if (!strcmp (value, "userSpaceOnUse")) { + pat->patternUnits = SP_PATTERN_UNITS_USERSPACEONUSE; + } else { + pat->patternUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; + } + pat->patternUnits_set = TRUE; + } else { + pat->patternUnits_set = FALSE; + } + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_PATTERNCONTENTUNITS: + if (value) { + if (!strcmp (value, "userSpaceOnUse")) { + pat->patternContentUnits = SP_PATTERN_UNITS_USERSPACEONUSE; + } else { + pat->patternContentUnits = SP_PATTERN_UNITS_OBJECTBOUNDINGBOX; + } + pat->patternContentUnits_set = TRUE; + } else { + pat->patternContentUnits_set = FALSE; + } + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_PATTERNTRANSFORM: { + Geom::Affine t; + if (value && sp_svg_transform_read (value, &t)) { + pat->patternTransform = t; + pat->patternTransform_set = TRUE; + } else { + pat->patternTransform = Geom::identity(); + pat->patternTransform_set = FALSE; + } + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + } + case SP_ATTR_X: + pat->x.readOrUnset(value); + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_Y: + pat->y.readOrUnset(value); + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_WIDTH: + pat->width.readOrUnset(value); + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_HEIGHT: + pat->height.readOrUnset(value); + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; + case SP_ATTR_VIEWBOX: { + /* fixme: Think (Lauris) */ + if (value) { + char *eptr = const_cast<gchar *>(value); + double x = g_ascii_strtod (eptr, &eptr); + while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; + double y = g_ascii_strtod (eptr, &eptr); + while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; + double width = g_ascii_strtod (eptr, &eptr); + while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; + double height = g_ascii_strtod (eptr, &eptr); + while (*eptr && ((*eptr == ',') || (*eptr == ' '))) eptr++; + if ((width > 0) && (height > 0)) { + pat->viewBox = Geom::Rect::from_xywh(x, y, width, height); + pat->viewBox_set = TRUE; + } else { + pat->viewBox_set = FALSE; + } + } else { + pat->viewBox_set = FALSE; + } + object->requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_VIEWPORT_MODIFIED_FLAG); + break; + } + case SP_ATTR_XLINK_HREF: + if ( value && pat->href && ( strcmp(value, pat->href) == 0 ) ) { + /* Href unchanged, do nothing. */ + } else { + g_free(pat->href); + pat->href = NULL; + if (value) { + // First, set the href field; it's only used in the "unchanged" check above. + pat->href = g_strdup(value); + // Now do the attaching, which emits the changed signal. + if (value) { + try { + pat->ref->attach(Inkscape::URI(value)); + } catch (Inkscape::BadURIException &e) { + g_warning("%s", e.what()); + pat->ref->detach(); + } + } else { + pat->ref->detach(); + } + } + } + break; + default: + if (((SPObjectClass *) sp_pattern_parent_class)->set) + ((SPObjectClass *) sp_pattern_parent_class)->set (object, key, value); + break; + } } /* TODO: do we need a ::remove_child handler? */ @@ -268,11 +265,11 @@ static GSList *pattern_getchildren(SPPattern *pat) for (SPPattern *pat_i = pat; pat_i != NULL; pat_i = pat_i->ref ? pat_i->ref->getObject() : NULL) { if (pat_i->firstChild()) { // find the first one with children - for (SPObject *child = pat->firstChild() ; child ; child = child->getNext() ) { - l = g_slist_prepend (l, child); - } - break; // do not go further up the chain if children are found - } + for (SPObject *child = pat->firstChild() ; child ; child = child->getNext() ) { + l = g_slist_prepend (l, child); + } + break; // do not go further up the chain if children are found + } } return l; @@ -281,45 +278,45 @@ static GSList *pattern_getchildren(SPPattern *pat) static void sp_pattern_update (SPObject *object, SPCtx *ctx, unsigned int flags) { - SPPattern *pat = SP_PATTERN (object); - - if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; - flags &= SP_OBJECT_MODIFIED_CASCADE; - - GSList *l = pattern_getchildren (pat); - l = g_slist_reverse (l); - - while (l) { - SPObject *child = SP_OBJECT (l->data); - sp_object_ref (child, NULL); - l = g_slist_remove (l, child); - if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { - child->updateDisplay(ctx, flags); - } - sp_object_unref (child, NULL); - } + SPPattern *pat = SP_PATTERN (object); + + if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; + flags &= SP_OBJECT_MODIFIED_CASCADE; + + GSList *l = pattern_getchildren (pat); + l = g_slist_reverse (l); + + while (l) { + SPObject *child = SP_OBJECT (l->data); + sp_object_ref (child, NULL); + l = g_slist_remove (l, child); + if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { + child->updateDisplay(ctx, flags); + } + sp_object_unref (child, NULL); + } } static void sp_pattern_modified (SPObject *object, guint flags) { - SPPattern *pat = SP_PATTERN (object); - - if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; - flags &= SP_OBJECT_MODIFIED_CASCADE; - - GSList *l = pattern_getchildren (pat); - l = g_slist_reverse (l); - - while (l) { - SPObject *child = SP_OBJECT (l->data); - sp_object_ref (child, NULL); - l = g_slist_remove (l, child); - if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { - child->emitModified(flags); - } - sp_object_unref (child, NULL); - } + SPPattern *pat = SP_PATTERN (object); + + if (flags & SP_OBJECT_MODIFIED_FLAG) flags |= SP_OBJECT_PARENT_MODIFIED_FLAG; + flags &= SP_OBJECT_MODIFIED_CASCADE; + + GSList *l = pattern_getchildren (pat); + l = g_slist_reverse (l); + + while (l) { + SPObject *child = SP_OBJECT (l->data); + sp_object_ref (child, NULL); + l = g_slist_remove (l, child); + if (flags || (child->mflags & (SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_CHILD_MODIFIED_FLAG))) { + child->emitModified(flags); + } + sp_object_unref (child, NULL); + } } /** @@ -328,14 +325,14 @@ Gets called when the pattern is reattached to another <pattern> static void pattern_ref_changed(SPObject *old_ref, SPObject *ref, SPPattern *pat) { - if (old_ref) { - pat->modified_connection.disconnect(); - } - if (SP_IS_PATTERN (ref)) { - pat->modified_connection = ref->connectModified(sigc::bind<2>(sigc::ptr_fun(&pattern_ref_modified), pat)); - } - - pattern_ref_modified (ref, 0, pat); + if (old_ref) { + pat->modified_connection.disconnect(); + } + if (SP_IS_PATTERN (ref)) { + pat->modified_connection = ref->connectModified(sigc::bind<2>(sigc::ptr_fun(&pattern_ref_modified), pat)); + } + + pattern_ref_modified (ref, 0, pat); } /** @@ -386,56 +383,56 @@ count_pattern_hrefs(SPObject *o, SPPattern *pat) SPPattern *pattern_chain(SPPattern *pattern) { - SPDocument *document = pattern->document; + SPDocument *document = pattern->document; Inkscape::XML::Document *xml_doc = document->getReprDoc(); - Inkscape::XML::Node *defsrepr = document->getDefs()->getRepr(); + Inkscape::XML::Node *defsrepr = document->getDefs()->getRepr(); - Inkscape::XML::Node *repr = xml_doc->createElement("svg:pattern"); - repr->setAttribute("inkscape:collect", "always"); - gchar *parent_ref = g_strconcat("#", pattern->getRepr()->attribute("id"), NULL); - repr->setAttribute("xlink:href", parent_ref); - g_free (parent_ref); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:pattern"); + repr->setAttribute("inkscape:collect", "always"); + gchar *parent_ref = g_strconcat("#", pattern->getRepr()->attribute("id"), NULL); + repr->setAttribute("xlink:href", parent_ref); + g_free (parent_ref); - defsrepr->addChild(repr, NULL); - const gchar *child_id = repr->attribute("id"); - SPObject *child = document->getObjectById(child_id); - g_assert (SP_IS_PATTERN (child)); + defsrepr->addChild(repr, NULL); + const gchar *child_id = repr->attribute("id"); + SPObject *child = document->getObjectById(child_id); + g_assert (SP_IS_PATTERN (child)); - return SP_PATTERN (child); + return SP_PATTERN (child); } SPPattern * sp_pattern_clone_if_necessary (SPItem *item, SPPattern *pattern, const gchar *property) { - if (!pattern->href || pattern->hrefcount > count_pattern_hrefs(item, pattern)) { - pattern = pattern_chain (pattern); - gchar *href = g_strconcat("url(#", pattern->getRepr()->attribute("id"), ")", NULL); - - SPCSSAttr *css = sp_repr_css_attr_new (); - sp_repr_css_set_property (css, property, href); - sp_repr_css_change_recursive(item->getRepr(), css, "style"); - } - return pattern; + if (!pattern->href || pattern->hrefcount > count_pattern_hrefs(item, pattern)) { + pattern = pattern_chain (pattern); + gchar *href = g_strconcat("url(#", pattern->getRepr()->attribute("id"), ")", NULL); + + SPCSSAttr *css = sp_repr_css_attr_new (); + sp_repr_css_set_property (css, property, href); + sp_repr_css_change_recursive(item->getRepr(), css, "style"); + } + return pattern; } void sp_pattern_transform_multiply (SPPattern *pattern, Geom::Affine postmul, bool set) { - // this formula is for a different interpretation of pattern transforms as described in (*) in sp-pattern.cpp - // for it to work, we also need sp_object_read_attr( item, "transform"); - //pattern->patternTransform = premul * item->transform * pattern->patternTransform * item->transform.inverse() * postmul; - - // otherwise the formula is much simpler - if (set) { - pattern->patternTransform = postmul; - } else { - pattern->patternTransform = pattern_patternTransform(pattern) * postmul; - } - pattern->patternTransform_set = TRUE; - - gchar *c=sp_svg_transform_write(pattern->patternTransform); - pattern->getRepr()->setAttribute("patternTransform", c); - g_free(c); + // this formula is for a different interpretation of pattern transforms as described in (*) in sp-pattern.cpp + // for it to work, we also need sp_object_read_attr( item, "transform"); + //pattern->patternTransform = premul * item->transform * pattern->patternTransform * item->transform.inverse() * postmul; + + // otherwise the formula is much simpler + if (set) { + pattern->patternTransform = postmul; + } else { + pattern->patternTransform = pattern_patternTransform(pattern) * postmul; + } + pattern->patternTransform_set = TRUE; + + gchar *c=sp_svg_transform_write(pattern->patternTransform); + pattern->getRepr()->setAttribute("patternTransform", c); + g_free(c); } const gchar *pattern_tile(GSList *reprs, Geom::Rect bounds, SPDocument *document, Geom::Affine transform, Geom::Affine move) @@ -443,33 +440,33 @@ const gchar *pattern_tile(GSList *reprs, Geom::Rect bounds, SPDocument *document Inkscape::XML::Document *xml_doc = document->getReprDoc(); Inkscape::XML::Node *defsrepr = document->getDefs()->getRepr(); - Inkscape::XML::Node *repr = xml_doc->createElement("svg:pattern"); - repr->setAttribute("patternUnits", "userSpaceOnUse"); - sp_repr_set_svg_double(repr, "width", bounds.dimensions()[Geom::X]); - sp_repr_set_svg_double(repr, "height", bounds.dimensions()[Geom::Y]); + Inkscape::XML::Node *repr = xml_doc->createElement("svg:pattern"); + repr->setAttribute("patternUnits", "userSpaceOnUse"); + sp_repr_set_svg_double(repr, "width", bounds.dimensions()[Geom::X]); + sp_repr_set_svg_double(repr, "height", bounds.dimensions()[Geom::Y]); - gchar *t=sp_svg_transform_write(transform); - repr->setAttribute("patternTransform", t); - g_free(t); + gchar *t=sp_svg_transform_write(transform); + repr->setAttribute("patternTransform", t); + g_free(t); - defsrepr->appendChild(repr); - const gchar *pat_id = repr->attribute("id"); - SPObject *pat_object = document->getObjectById(pat_id); + defsrepr->appendChild(repr); + const gchar *pat_id = repr->attribute("id"); + SPObject *pat_object = document->getObjectById(pat_id); - for (GSList *i = reprs; i != NULL; i = i->next) { - Inkscape::XML::Node *node = (Inkscape::XML::Node *)(i->data); - SPItem *copy = SP_ITEM(pat_object->appendChildRepr(node)); + for (GSList *i = reprs; i != NULL; i = i->next) { + Inkscape::XML::Node *node = (Inkscape::XML::Node *)(i->data); + SPItem *copy = SP_ITEM(pat_object->appendChildRepr(node)); - Geom::Affine dup_transform; - if (!sp_svg_transform_read (node->attribute("transform"), &dup_transform)) - dup_transform = Geom::identity(); - dup_transform *= move; + Geom::Affine dup_transform; + if (!sp_svg_transform_read (node->attribute("transform"), &dup_transform)) + dup_transform = Geom::identity(); + dup_transform *= move; copy->doWriteTransform(copy->getRepr(), dup_transform, NULL, false); } - Inkscape::GC::release(repr); - return pat_id; + Inkscape::GC::release(repr); + return pat_id; } SPPattern *pattern_getroot(SPPattern *pat) diff --git a/src/sp-text.cpp b/src/sp-text.cpp index 8d42b7d59..2e2bf15bc 100644 --- a/src/sp-text.cpp +++ b/src/sp-text.cpp @@ -43,7 +43,6 @@ #include "sp-namedview.h" #include "style.h" #include "inkscape.h" -#include "sp-metrics.h" #include "xml/quote.h" #include "xml/repr.h" #include "mod360.h" @@ -56,7 +55,6 @@ #include "sp-tspan.h" #include "text-editing.h" -#include "unit-constants.h" /*##################################################### # SPTEXT @@ -381,9 +379,9 @@ static char * sp_text_description(SPItem *item) font_instance *tf = font_factory::Default()->FaceFromStyle(style); - char name_buf[256]; char *n; if (tf) { + char name_buf[256]; tf->Family(name_buf, sizeof(name_buf)); n = xml_quote_strdup(name_buf); tf->Unref(); @@ -392,7 +390,8 @@ static char * sp_text_description(SPItem *item) n = g_strdup(_("<no name found>")); } - GString *xs = SP_PX_TO_METRIC_STRING(style->font_size.computed, sp_desktop_namedview(SP_ACTIVE_DESKTOP)->getDefaultMetric()); + Inkscape::Util::Quantity q = Inkscape::Util::Quantity(style->font_size.computed, "px"); + GString *xs = g_string_new(q.string(*sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units).c_str()); char const *trunc = ""; Inkscape::Text::Layout const *layout = te_get_layout((SPItem *) item); diff --git a/src/sp-tspan.cpp b/src/sp-tspan.cpp index 09429df6f..6f0b6ac39 100644 --- a/src/sp-tspan.cpp +++ b/src/sp-tspan.cpp @@ -145,7 +145,7 @@ static void sp_tspan_update(SPObject *object, SPCtx *ctx, guint flags) for ( SPObject *ochild = object->firstChild() ; ochild ; ochild = ochild->getNext() ) { if ( flags || ( ochild->uflags & SP_OBJECT_MODIFIED_FLAG )) { - ochild->updateDisplay(ctx, flags); + ochild->updateDisplay(ctx, flags); } } } @@ -270,8 +270,7 @@ void refresh_textpath_source(SPTextPath* offset); G_DEFINE_TYPE(SPTextPath, sp_textpath, SP_TYPE_ITEM); -static void -sp_textpath_class_init(SPTextPathClass *classname) +static void sp_textpath_class_init(SPTextPathClass *classname) { GObjectClass *gobject_class = G_OBJECT_CLASS(classname); SPObjectClass *sp_object_class = SP_OBJECT_CLASS(classname); @@ -299,16 +298,14 @@ sp_textpath_init(SPTextPath *textpath) textpath->sourcePath->user_unlink = sp_textpath_to_text; } -static void -sp_textpath_finalize(GObject *obj) +static void sp_textpath_finalize(GObject *obj) { - SPTextPath *textpath = (SPTextPath *) obj; + SPTextPath *textpath = static_cast<SPTextPath *>(obj); delete textpath->sourcePath; } -static void -sp_textpath_release(SPObject *object) +static void sp_textpath_release(SPObject *object) { SPTextPath *textpath = SP_TEXTPATH(object); @@ -321,8 +318,7 @@ sp_textpath_release(SPObject *object) (SP_OBJECT_CLASS(sp_textpath_parent_class))->release(object); } -static void -sp_textpath_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) +static void sp_textpath_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) { object->readAttr( "x" ); object->readAttr( "y" ); @@ -352,8 +348,7 @@ sp_textpath_build(SPObject *object, SPDocument *doc, Inkscape::XML::Node *repr) } } -static void -sp_textpath_set(SPObject *object, unsigned key, gchar const *value) +static void sp_textpath_set(SPObject *object, unsigned key, gchar const *value) { SPTextPath *textpath = SP_TEXTPATH(object); @@ -403,7 +398,7 @@ static void sp_textpath_update(SPObject *object, SPCtx *ctx, guint flags) } -void refresh_textpath_source(SPTextPath* tp) +void refresh_textpath_source(SPTextPath* tp) { if ( tp == NULL ) return; tp->sourcePath->refresh_source(); @@ -423,8 +418,7 @@ void refresh_textpath_source(SPTextPath* tp) } } -static void -sp_textpath_modified(SPObject *object, unsigned flags) +static void sp_textpath_modified(SPObject *object, unsigned flags) { if ((SP_OBJECT_CLASS(sp_textpath_parent_class))->modified) { (SP_OBJECT_CLASS(sp_textpath_parent_class))->modified(object, flags); @@ -454,7 +448,7 @@ sp_textpath_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape:: textpath->attributes.writeTo(repr); if (textpath->startOffset._set) { if (textpath->startOffset.unit == SVGLength::PERCENT) { - Inkscape::SVGOStringStream os; + Inkscape::SVGOStringStream os; os << (textpath->startOffset.computed * 100.0) << "%"; textpath->getRepr()->setAttribute("startOffset", os.str().c_str()); } else { @@ -506,19 +500,17 @@ sp_textpath_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape:: } -SPItem * -sp_textpath_get_path_item(SPTextPath *tp) +SPItem *sp_textpath_get_path_item(SPTextPath *tp) { if (tp && tp->sourcePath) { SPItem *refobj = tp->sourcePath->getObject(); if (SP_IS_ITEM(refobj)) - return (SPItem *) refobj; + return refobj; } return NULL; } -void -sp_textpath_to_text(SPObject *tp) +void sp_textpath_to_text(SPObject *tp) { SPObject *text = tp->parent; diff --git a/src/sp-use.cpp b/src/sp-use.cpp index 2220b4b47..5ec1f2523 100644 --- a/src/sp-use.cpp +++ b/src/sp-use.cpp @@ -252,8 +252,7 @@ sp_use_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML:: return repr; } -static Geom::OptRect -sp_use_bbox(SPItem const *item, Geom::Affine const &transform, SPItem::BBoxType type) +static Geom::OptRect sp_use_bbox(SPItem const *item, Geom::Affine const &transform, SPItem::BBoxType type) { SPUse const *use = SP_USE(item); Geom::OptRect bbox; @@ -269,8 +268,7 @@ sp_use_bbox(SPItem const *item, Geom::Affine const &transform, SPItem::BBoxType return bbox; } -static void -sp_use_print(SPItem *item, SPPrintContext *ctx) +static void sp_use_print(SPItem *item, SPPrintContext *ctx) { bool translated = false; SPUse *use = SP_USE(item); @@ -290,12 +288,10 @@ sp_use_print(SPItem *item, SPPrintContext *ctx) } } -static gchar * -sp_use_description(SPItem *item) +static gchar *sp_use_description(SPItem *item) { SPUse *use = SP_USE(item); - char *ret; if (use->child) { if( SP_IS_SYMBOL( use->child ) ) { @@ -316,7 +312,7 @@ sp_use_description(SPItem *item) char *child_desc = SP_ITEM(use->child)->description(); --recursion_depth; - ret = g_strdup_printf(_("<b>Clone</b> of: %s"), child_desc); + char *ret = g_strdup_printf(_("<b>Clone</b> of: %s"), child_desc); g_free(child_desc); return ret; } else { diff --git a/src/spiral-context.cpp b/src/spiral-context.cpp index b7bf5aead..a6cdc6bc4 100644 --- a/src/spiral-context.cpp +++ b/src/spiral-context.cpp @@ -34,7 +34,6 @@ #include "message-context.h" #include "pixmaps/cursor-spiral.xpm" #include "spiral-context.h" -#include "sp-metrics.h" #include <glibmm/i18n.h> #include "xml/repr.h" #include "xml/node-event-vector.h" @@ -437,7 +436,8 @@ static void sp_spiral_drag(SPSpiralContext *sc, Geom::Point const &p, guint stat /*t0*/ sc->t0); /* status text */ - GString *rads = SP_PX_TO_METRIC_STRING(rad, desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity q = Inkscape::Util::Quantity(rad, "px"); + GString *rads = g_string_new(q.string(*desktop->namedview->doc_units).c_str()); sc->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Spiral</b>: radius %s, angle %5g°; with <b>Ctrl</b> to snap angle"), rads->str, sp_round((arg + 2.0*M_PI*spiral->revo)*180/M_PI, 0.0001)); diff --git a/src/star-context.cpp b/src/star-context.cpp index 5fb33a180..d4996e189 100644 --- a/src/star-context.cpp +++ b/src/star-context.cpp @@ -36,7 +36,6 @@ #include "desktop-style.h" #include "message-context.h" #include "pixmaps/cursor-star.xpm" -#include "sp-metrics.h" #include <glibmm/i18n.h> #include "preferences.h" #include "xml/repr.h" @@ -450,7 +449,8 @@ static void sp_star_drag(SPStarContext *sc, Geom::Point p, guint state) arg1, arg1 + M_PI / sides, sc->isflatsided, sc->rounded, sc->randomized); /* status text */ - GString *rads = SP_PX_TO_METRIC_STRING(r1, desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity q = Inkscape::Util::Quantity(r1, "px"); + GString *rads = g_string_new(q.string(*desktop->namedview->doc_units).c_str()); sc->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, ( sc->isflatsided? _("<b>Polygon</b>: radius %s, angle %5g°; with <b>Ctrl</b> to snap angle") diff --git a/src/style.cpp b/src/style.cpp index 479f30597..4a808fac6 100644 --- a/src/style.cpp +++ b/src/style.cpp @@ -45,7 +45,7 @@ #include "svg/css-ostringstream.h" #include "xml/repr.h" #include "xml/simple-document.h" -#include "unit-constants.h" +#include "util/units.h" #include "macros.h" #include "preferences.h" @@ -2483,11 +2483,11 @@ sp_style_css_size_px_to_units(double size, int unit) case SP_CSS_UNIT_NONE: unit_size = size; break; case SP_CSS_UNIT_PX: unit_size = size; break; - case SP_CSS_UNIT_PT: unit_size = size * PT_PER_PX; break; - case SP_CSS_UNIT_PC: unit_size = size * (PT_PER_PX / PT_PER_PC); break; - case SP_CSS_UNIT_MM: unit_size = size * MM_PER_PX; break; - case SP_CSS_UNIT_CM: unit_size = size * CM_PER_PX; break; - case SP_CSS_UNIT_IN: unit_size = size * IN_PER_PX; break; + case SP_CSS_UNIT_PT: unit_size = size * Inkscape::Util::Quantity::convert(1, "px", "pt"); break; + case SP_CSS_UNIT_PC: unit_size = size * (Inkscape::Util::Quantity::convert(1, "px", "pt") / Inkscape::Util::Quantity::convert(1, "pc", "pt")); break; + case SP_CSS_UNIT_MM: unit_size = size * Inkscape::Util::Quantity::convert(1, "px", "mm"); break; + case SP_CSS_UNIT_CM: unit_size = size * Inkscape::Util::Quantity::convert(1, "px", "cm"); break; + case SP_CSS_UNIT_IN: unit_size = size * Inkscape::Util::Quantity::convert(1, "px", "in"); break; case SP_CSS_UNIT_EM: unit_size = size / SP_CSS_FONT_SIZE_DEFAULT; break; case SP_CSS_UNIT_EX: unit_size = size * 2.0 / SP_CSS_FONT_SIZE_DEFAULT ; break; case SP_CSS_UNIT_PERCENT: unit_size = size * 100.0 / SP_CSS_FONT_SIZE_DEFAULT; break; @@ -2945,14 +2945,19 @@ sp_style_clear(SPStyle *style) style->stroke.clear(); sp_style_filter_clear(style); + style->release_connection.disconnect(); + + style->fill_ps_modified_connection.disconnect(); if (style->fill.value.href) { delete style->fill.value.href; style->fill.value.href = NULL; } + style->stroke_ps_modified_connection.disconnect(); if (style->stroke.value.href) { delete style->stroke.value.href; style->stroke.value.href = NULL; } + style->filter_modified_connection.disconnect(); if (style->filter.href) { delete style->filter.href; style->filter.href = NULL; @@ -2972,7 +2977,6 @@ sp_style_clear(SPStyle *style) SPTextStyle *text = style->text; unsigned const text_private = style->text_private; - memset(style, 0, sizeof(SPStyle)); style->refcount = refcount; style->object = object; @@ -2997,49 +3001,63 @@ sp_style_clear(SPStyle *style) style->text->font_family.set = FALSE; style->font_size.set = FALSE; + style->font_size.inherit = FALSE; style->font_size.type = SP_FONT_SIZE_LITERAL; + style->font_size.unit = 0; style->font_size.literal = SP_CSS_FONT_SIZE_MEDIUM; + style->font_size.value = 12.0; style->font_size.computed = 12.0; style->font_style.set = FALSE; + style->font_style.inherit = FALSE; style->font_style.value = style->font_style.computed = SP_CSS_FONT_STYLE_NORMAL; style->font_variant.set = FALSE; + style->font_variant.inherit = FALSE; style->font_variant.value = style->font_variant.computed = SP_CSS_FONT_VARIANT_NORMAL; style->font_weight.set = FALSE; + style->font_weight.inherit = FALSE; style->font_weight.value = SP_CSS_FONT_WEIGHT_NORMAL; style->font_weight.computed = SP_CSS_FONT_WEIGHT_400; style->font_stretch.set = FALSE; + style->font_stretch.inherit = FALSE; style->font_stretch.value = style->font_stretch.computed = SP_CSS_FONT_STRETCH_NORMAL; /* text */ style->text_indent.set = FALSE; + style->text_indent.inherit = FALSE; style->text_indent.unit = SP_CSS_UNIT_NONE; style->text_indent.computed = 0.0; style->text_align.set = FALSE; + style->text_align.inherit = FALSE; style->text_align.value = style->text_align.computed = SP_CSS_TEXT_ALIGN_START; style->text_decoration.set = FALSE; + style->text_decoration.inherit = FALSE; style->text_decoration.underline = FALSE; style->text_decoration.overline = FALSE; style->text_decoration.line_through = FALSE; style->text_decoration.blink = FALSE; style->line_height.set = FALSE; + style->line_height.inherit = FALSE; style->line_height.unit = SP_CSS_UNIT_PERCENT; style->line_height.normal = TRUE; style->line_height.value = style->line_height.computed = 1.0; style->letter_spacing.set = FALSE; + style->letter_spacing.inherit = FALSE; style->letter_spacing.unit = SP_CSS_UNIT_NONE; style->letter_spacing.normal = TRUE; style->letter_spacing.value = style->letter_spacing.computed = 0.0; style->word_spacing.set = FALSE; + style->word_spacing.inherit = FALSE; style->word_spacing.unit = SP_CSS_UNIT_NONE; style->word_spacing.normal = TRUE; style->word_spacing.value = style->word_spacing.computed = 0.0; style->baseline_shift.set = FALSE; + style->baseline_shift.inherit = FALSE; style->baseline_shift.type = SP_BASELINE_SHIFT_LITERAL; style->baseline_shift.unit = SP_CSS_UNIT_NONE; style->baseline_shift.literal = SP_CSS_BASELINE_SHIFT_BASELINE; @@ -3047,74 +3065,128 @@ sp_style_clear(SPStyle *style) style->baseline_shift.computed = 0.0; style->text_transform.set = FALSE; + style->text_transform.inherit = FALSE; style->text_transform.value = style->text_transform.computed = SP_CSS_TEXT_TRANSFORM_NONE; style->direction.set = FALSE; + style->direction.inherit = FALSE; style->direction.value = style->direction.computed = SP_CSS_DIRECTION_LTR; style->block_progression.set = FALSE; + style->block_progression.inherit = FALSE; style->block_progression.value = style->block_progression.computed = SP_CSS_BLOCK_PROGRESSION_TB; style->writing_mode.set = FALSE; + style->writing_mode.inherit = FALSE; style->writing_mode.value = style->writing_mode.computed = SP_CSS_WRITING_MODE_LR_TB; style->text_anchor.set = FALSE; + style->text_anchor.inherit = FALSE; style->text_anchor.value = style->text_anchor.computed = SP_CSS_TEXT_ANCHOR_START; + style->clip_set = FALSE; + style->color_set = FALSE; + style->cursor_set = FALSE; + style->overflow_set = FALSE; + style->clip_path_set = FALSE; + style->mask_set = FALSE; + + style->clip_rule.set = FALSE; + style->clip_rule.inherit = FALSE; + style->clip_rule.value = style->clip_rule.computed = SP_WIND_RULE_NONZERO; + style->opacity.set = FALSE; + style->opacity.inherit = FALSE; style->opacity.value = SP_SCALE24_MAX; style->visibility.set = FALSE; + style->visibility.inherit = FALSE; style->visibility.value = style->visibility.computed = SP_CSS_VISIBILITY_VISIBLE; style->display.set = FALSE; + style->display.inherit = FALSE; style->display.value = style->display.computed = SP_CSS_DISPLAY_INLINE; style->overflow.set = FALSE; + style->overflow.inherit = FALSE; style->overflow.value = style->overflow.computed = SP_CSS_OVERFLOW_VISIBLE; style->color.clear(); style->color.setColor(0.0, 0.0, 0.0); + style->color_interpolation.set = FALSE; + style->color_interpolation.inherit = FALSE; style->color_interpolation.value = style->color_interpolation.computed = SP_CSS_COLOR_INTERPOLATION_SRGB; + style->color_interpolation_filters.set = FALSE; + style->color_interpolation_filters.inherit = FALSE; style->color_interpolation_filters.value = style->color_interpolation_filters.computed = SP_CSS_COLOR_INTERPOLATION_LINEARRGB; style->fill.clear(); style->fill.setColor(0.0, 0.0, 0.0); + style->fill_opacity.set = FALSE; + style->fill_opacity.inherit = FALSE; style->fill_opacity.value = SP_SCALE24_MAX; + style->fill_rule.set = FALSE; + style->fill_rule.inherit = FALSE; style->fill_rule.value = style->fill_rule.computed = SP_WIND_RULE_NONZERO; style->stroke.clear(); + style->stroke_opacity.set = FALSE; + style->stroke_opacity.inherit = FALSE; style->stroke_opacity.value = SP_SCALE24_MAX; style->stroke_width.set = FALSE; + style->stroke_width.inherit = FALSE; style->stroke_width.unit = SP_CSS_UNIT_NONE; - style->stroke_width.computed = 1.0; + style->stroke_width.value = style->stroke_width.computed = 1.0; style->stroke_linecap.set = FALSE; + style->stroke_linecap.inherit = FALSE; style->stroke_linecap.value = style->stroke_linecap.computed = SP_STROKE_LINECAP_BUTT; style->stroke_linejoin.set = FALSE; + style->stroke_linejoin.inherit = FALSE; style->stroke_linejoin.value = style->stroke_linejoin.computed = SP_STROKE_LINEJOIN_MITER; style->stroke_miterlimit.set = FALSE; + style->stroke_miterlimit.inherit = FALSE; style->stroke_miterlimit.value = 4.0; style->stroke_dash.n_dash = 0; style->stroke_dash.dash = NULL; style->stroke_dash.offset = 0.0; + style->stroke_dasharray_set = FALSE; + style->stroke_dasharray_inherit = FALSE; + style->stroke_dashoffset_set = FALSE; + style->stroke_dashoffset_inherit = FALSE; + for (unsigned i = SP_MARKER_LOC; i < SP_MARKER_LOC_QTY; i++) { g_free(style->marker[i].value); style->marker[i].set = FALSE; + style->marker[i].inherit = FALSE; + style->marker[i].data = 0; + style->marker[i].value = NULL; } + style->filter.set = FALSE; + style->filter.inherit = FALSE; + style->filter.href = NULL; + style->enable_background.value = SP_CSS_BACKGROUND_ACCUMULATE; style->enable_background.set = false; style->enable_background.inherit = false; - style->clip_rule.value = style->clip_rule.computed = SP_WIND_RULE_NONZERO; + style->filter_blend_mode.set = style->filter_blend_mode.inherit = false; + style->filter_blend_mode.value = style->filter_blend_mode.computed = 0; + style->filter_gaussianBlur_deviation.set = style->filter_gaussianBlur_deviation.inherit = false; + style->filter_gaussianBlur_deviation.value = style->filter_gaussianBlur_deviation.computed = 0; + style->color_rendering.set = style->color_rendering.inherit = false; style->color_rendering.value = style->color_rendering.computed = SP_CSS_COLOR_RENDERING_AUTO; + style->image_rendering.set = style->image_rendering.inherit = false; style->image_rendering.value = style->image_rendering.computed = SP_CSS_IMAGE_RENDERING_AUTO; + style->shape_rendering.set = style->shape_rendering.inherit = false; style->shape_rendering.value = style->shape_rendering.computed = SP_CSS_SHAPE_RENDERING_AUTO; + style->text_rendering.set = style->text_rendering.inherit = false; style->text_rendering.value = style->text_rendering.computed = SP_CSS_TEXT_RENDERING_AUTO; + style->cloned = false; } @@ -3400,19 +3472,19 @@ sp_style_read_ilength(SPILength *val, gchar const *str) } else if (!strcmp(e, "pt")) { /* Userspace / DEVICESCALE */ val->unit = SP_CSS_UNIT_PT; - val->computed = value * PX_PER_PT; + val->computed = value * Inkscape::Util::Quantity::convert(1, "pt", "px"); } else if (!strcmp(e, "pc")) { val->unit = SP_CSS_UNIT_PC; - val->computed = value * PX_PER_PC; + val->computed = value * Inkscape::Util::Quantity::convert(1, "pc", "px"); } else if (!strcmp(e, "mm")) { val->unit = SP_CSS_UNIT_MM; - val->computed = value * PX_PER_MM; + val->computed = value * Inkscape::Util::Quantity::convert(1, "mm", "px"); } else if (!strcmp(e, "cm")) { val->unit = SP_CSS_UNIT_CM; - val->computed = value * PX_PER_CM; + val->computed = value * Inkscape::Util::Quantity::convert(1, "cm", "px"); } else if (!strcmp(e, "in")) { val->unit = SP_CSS_UNIT_IN; - val->computed = value * PX_PER_IN; + val->computed = value * Inkscape::Util::Quantity::convert(1, "in", "px"); } else if (!strcmp(e, "em")) { /* EM square */ val->unit = SP_CSS_UNIT_EM; @@ -3971,23 +4043,23 @@ sp_style_write_ilength(gchar *p, gint const len, gchar const *const key, return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_PT: - os << key << ":" << val->computed * PT_PER_PX << "pt;"; + os << key << ":" << val->computed * Inkscape::Util::Quantity::convert(1, "px", "pt") << "pt;"; return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_PC: - os << key << ":" << val->computed * PT_PER_PX / 12.0 << "pc;"; + os << key << ":" << val->computed * Inkscape::Util::Quantity::convert(1, "px", "pt") / 12.0 << "pc;"; return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_MM: - os << key << ":" << val->computed * MM_PER_PX << "mm;"; + os << key << ":" << val->computed * Inkscape::Util::Quantity::convert(1, "px", "mm") << "mm;"; return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_CM: - os << key << ":" << val->computed * CM_PER_PX << "cm;"; + os << key << ":" << val->computed * Inkscape::Util::Quantity::convert(1, "px", "cm") << "cm;"; return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_IN: - os << key << ":" << val->computed * IN_PER_PX << "in;"; + os << key << ":" << val->computed * Inkscape::Util::Quantity::convert(1, "px", "in") << "in;"; return g_strlcpy(p, os.str().c_str(), len); break; case SP_CSS_UNIT_EM: diff --git a/src/svg/svg-length.cpp b/src/svg/svg-length.cpp index d2f4332d8..ea438e91a 100644 --- a/src/svg/svg-length.cpp +++ b/src/svg/svg-length.cpp @@ -23,7 +23,7 @@ #include "svg.h" #include "stringstream.h" -#include "../unit-constants.h" +#include "util/units.h" static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, float *val, float *computed, char **next); @@ -330,6 +330,8 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *next = (char *) e + 1; } return 1; + } else if (g_ascii_isspace(e[0])) { + return 0; // spaces are not allowed } else { /* Unitless */ if (unit) { @@ -365,7 +367,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::PT; } if (computed) { - *computed = v * PX_PER_PT; + *computed = v * Inkscape::Util::Quantity::convert(1, "pt", "px"); } break; case UVAL('p','c'): @@ -373,7 +375,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::PC; } if (computed) { - *computed = v * PX_PER_PC; + *computed = v * Inkscape::Util::Quantity::convert(1, "pc", "px"); } break; case UVAL('m','m'): @@ -381,7 +383,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::MM; } if (computed) { - *computed = v * PX_PER_MM; + *computed = v * Inkscape::Util::Quantity::convert(1, "mm", "px"); } break; case UVAL('c','m'): @@ -389,7 +391,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::CM; } if (computed) { - *computed = v * PX_PER_CM; + *computed = v * Inkscape::Util::Quantity::convert(1, "cm", "px"); } break; case UVAL('i','n'): @@ -397,7 +399,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::INCH; } if (computed) { - *computed = v * PX_PER_IN; + *computed = v * Inkscape::Util::Quantity::convert(1, "in", "px"); } break; case UVAL('f','t'): @@ -405,7 +407,7 @@ static unsigned sp_svg_length_read_lff(gchar const *str, SVGLength::Unit *unit, *unit = SVGLength::FOOT; } if (computed) { - *computed = v * PX_PER_FT; + *computed = v * Inkscape::Util::Quantity::convert(1, "ft", "px"); } break; case UVAL('e','m'): diff --git a/src/syseq.h b/src/syseq.h index 029f27a91..582f2949f 100644 --- a/src/syseq.h +++ b/src/syseq.h @@ -181,10 +181,9 @@ static std::vector<int> gauss_jordan (double A[S][T], int avoid_col = -1) { if (avoid_col != -1) { cols_used.push_back (avoid_col); } - int col; for (int i = 0; i < S; ++i) { /* for each row find a pivot element of maximal absolute value, skipping the columns that were used before */ - col = find_pivot<S,T>(A, i, cols_used); + int col = find_pivot<S,T>(A, i, cols_used); cols_used.push_back(col); if (col == -1) { // no non-zero elements in the row @@ -289,7 +288,7 @@ template <int S, int T> SolutionKind gaussjord_solve (double A[S][T], double x[T * afterwards copy the result back to x */ double w[S]; - SysEq::multiply<S,T>(B,x,w); + SysEq::multiply<S,T>(B,x,w); // initializes w for (int j = 0; j < S; ++j) { x[cols[j]] = w[j]; } diff --git a/src/text-context.cpp b/src/text-context.cpp index 862c50737..719a82156 100644 --- a/src/text-context.cpp +++ b/src/text-context.cpp @@ -42,7 +42,6 @@ #include "selection.h" #include "shape-editor.h" #include "sp-flowtext.h" -#include "sp-metrics.h" #include "sp-namedview.h" #include "sp-text.h" #include "style.h" @@ -640,8 +639,10 @@ static gint sp_text_context_root_handler(SPEventContext *const event_context, Gd gobble_motion_events(GDK_BUTTON1_MASK); // status text - GString *xs = SP_PX_TO_METRIC_STRING(fabs((p - tc->p0)[Geom::X]), desktop->namedview->getDefaultMetric()); - GString *ys = SP_PX_TO_METRIC_STRING(fabs((p - tc->p0)[Geom::Y]), desktop->namedview->getDefaultMetric()); + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(fabs((p - tc->p0)[Geom::X]), "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(fabs((p - tc->p0)[Geom::Y]), "px"); + GString *xs = g_string_new(x_q.string(*desktop->namedview->doc_units).c_str()); + GString *ys = g_string_new(y_q.string(*desktop->namedview->doc_units).c_str()); event_context->_message_context->setF(Inkscape::IMMEDIATE_MESSAGE, _("<b>Flowed text frame</b>: %s × %s"), xs->str, ys->str); g_string_free(xs, FALSE); g_string_free(ys, FALSE); diff --git a/src/text-editing.cpp b/src/text-editing.cpp index 401f56bb2..0d30863d9 100644 --- a/src/text-editing.cpp +++ b/src/text-editing.cpp @@ -24,7 +24,7 @@ #include "inkscape.h" #include "message-stack.h" #include "style.h" -#include "unit-constants.h" +#include "util/units.h" #include "document.h" #include "xml/repr.h" @@ -1278,23 +1278,23 @@ sp_te_adjust_linespacing_screen (SPItem *text, Inkscape::Text::Layout::iterator style->line_height.value = style->line_height.computed; break; case SP_CSS_UNIT_PT: - style->line_height.computed += zby * PT_PER_PX; + style->line_height.computed += zby * Inkscape::Util::Quantity::convert(1, "px", "pt"); style->line_height.value = style->line_height.computed; break; case SP_CSS_UNIT_PC: - style->line_height.computed += zby * (PT_PER_PX / 12); + style->line_height.computed += zby * (Inkscape::Util::Quantity::convert(1, "px", "pt") / 12); style->line_height.value = style->line_height.computed; break; case SP_CSS_UNIT_MM: - style->line_height.computed += zby * MM_PER_PX; + style->line_height.computed += zby * Inkscape::Util::Quantity::convert(1, "px", "mm"); style->line_height.value = style->line_height.computed; break; case SP_CSS_UNIT_CM: - style->line_height.computed += zby * CM_PER_PX; + style->line_height.computed += zby * Inkscape::Util::Quantity::convert(1, "px", "cm"); style->line_height.value = style->line_height.computed; break; case SP_CSS_UNIT_IN: - style->line_height.computed += zby * IN_PER_PX; + style->line_height.computed += zby * Inkscape::Util::Quantity::convert(1, "px", "in"); style->line_height.value = style->line_height.computed; break; } diff --git a/src/trace/pool.h b/src/trace/pool.h index d072a460b..88fd82bcd 100644 --- a/src/trace/pool.h +++ b/src/trace/pool.h @@ -59,17 +59,21 @@ class pool { public: pool() - { + { cblock = 0; size = sizeof(T) > sizeof(void *) ? sizeof(T) : sizeof(void *); next = NULL; - } + for (int k = 0; k < 64; k++) { + block[k] = NULL; + } + } ~pool() - { - for (int k = 0; k < cblock; k++) - free(block[k]); - } + { + for (int k = 0; k < cblock; k++) { + free(block[k]); + } + } T *draw() { @@ -89,7 +93,7 @@ class pool { int size; int cblock; - void *block[64]; //enough to store unlimited number of objects + void *block[64]; //enough to store unlimited number of objects, if 64 is changed: see constructor too void *next; void addblock() diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index f3c3b8473..b592d2527 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -59,7 +59,6 @@ set(ui_SRC dialog/ocaldialogs.cpp dialog/print-colors-preview-dialog.cpp dialog/print.cpp - dialog/scriptdialog.cpp dialog/symbols.cpp dialog/xml-tree.cpp # dialog/session-player.cpp @@ -113,6 +112,7 @@ set(ui_SRC widget/text.cpp widget/tolerance-slider.cpp widget/unit-menu.cpp + widget/unit-tracker.cpp view/view.cpp view/view-widget.cpp @@ -172,7 +172,6 @@ set(ui_SRC dialog/panel-dialog.h dialog/print-colors-preview-dialog.h dialog/print.h - dialog/scriptdialog.h dialog/spellcheck.h dialog/svg-fonts-dialog.h dialog/swatches.h @@ -242,6 +241,7 @@ set(ui_SRC widget/text.h widget/tolerance-slider.h widget/unit-menu.h + widget/unit-tracker.h view/edit-widget-interface.h view/view-widget.h diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp index 72ddd90a9..629960613 100644 --- a/src/ui/clipboard.cpp +++ b/src/ui/clipboard.cpp @@ -79,7 +79,7 @@ #include "text-editing.h" #include "tools-switch.h" #include "path-chemistry.h" -#include "unit-constants.h" +#include "util/units.h" #include "helper/png-write.h" #include "svg/svg-color.h" #include "sp-namedview.h" @@ -1078,14 +1078,14 @@ void ClipboardManagerImpl::_onGet(Gtk::SelectionData &sel, guint /*info*/) try { if (out == outlist.end() && target == "image/png") { - gdouble dpi = PX_PER_IN; + gdouble dpi = Inkscape::Util::Quantity::convert(1, "in", "px"); guint32 bgcolor = 0x00000000; Geom::Point origin (_clipboardSPDoc->getRoot()->x.computed, _clipboardSPDoc->getRoot()->y.computed); Geom::Rect area = Geom::Rect(origin, origin + _clipboardSPDoc->getDimensions()); - unsigned long int width = (unsigned long int) (area.width() * dpi / PX_PER_IN + 0.5); - unsigned long int height = (unsigned long int) (area.height() * dpi / PX_PER_IN + 0.5); + unsigned long int width = (unsigned long int) (area.width() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); + unsigned long int height = (unsigned long int) (area.height() * dpi / Inkscape::Util::Quantity::convert(1, "in", "px") + 0.5); // read from namedview Inkscape::XML::Node *nv = sp_repr_lookup_name (_clipboardSPDoc->rroot, "sodipodi:namedview"); diff --git a/src/ui/dialog/Makefile_insert b/src/ui/dialog/Makefile_insert index 580b47522..bbede9df1 100644 --- a/src/ui/dialog/Makefile_insert +++ b/src/ui/dialog/Makefile_insert @@ -81,8 +81,6 @@ ink_common_sources += \ ui/dialog/print.h \ ui/dialog/print-colors-preview-dialog.cpp \ ui/dialog/print-colors-preview-dialog.h \ - ui/dialog/scriptdialog.cpp \ - ui/dialog/scriptdialog.h \ ui/dialog/spellcheck.cpp \ ui/dialog/spellcheck.h \ ui/dialog/svg-fonts-dialog.cpp \ diff --git a/src/ui/dialog/clonetiler.cpp b/src/ui/dialog/clonetiler.cpp index 753320ab9..b3675440b 100644 --- a/src/ui/dialog/clonetiler.cpp +++ b/src/ui/dialog/clonetiler.cpp @@ -34,8 +34,8 @@ #include "document.h" #include "document-undo.h" #include "filter-chemistry.h" -#include "helper/unit-menu.h" -#include "helper/units.h" +#include "ui/widget/unit-menu.h" +#include "util/units.h" #include "helper/window.h" #include "inkscape.h" #include "interface.h" @@ -58,6 +58,7 @@ #include "sp-root.h" using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; namespace Inkscape { namespace UI { @@ -1092,35 +1093,36 @@ CloneTiler::CloneTiler (void) : g_object_set_data (G_OBJECT(dlg), "widthheight", (gpointer) hb); // unitmenu - GtkWidget *u = sp_unit_selector_new (SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE); - sp_unit_selector_set_unit (SP_UNIT_SELECTOR(u), sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units); + unit_menu = new Inkscape::UI::Widget::UnitMenu(); + unit_menu->setUnitType(Inkscape::Util::UNIT_TYPE_LINEAR); + unit_menu->setUnit(sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units->abbr); + unitChangedConn = unit_menu->signal_changed().connect(sigc::mem_fun(*this, &CloneTiler::clonetiler_unit_changed)); { // Width spinbutton #if WITH_GTKMM_3_0 - Glib::RefPtr<Gtk::Adjustment> a = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0); + fill_width = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0); #else - Gtk::Adjustment *a = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0); + fill_width = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0); #endif - sp_unit_selector_add_adjustment (SP_UNIT_SELECTOR (u), GTK_ADJUSTMENT (a->gobj())); double value = prefs->getDouble(prefs_path + "fillwidth", 50.0); - SPUnit const &unit = *sp_unit_selector_get_unit(SP_UNIT_SELECTOR(u)); - gdouble const units = sp_pixels_get_units (value, unit); - a->set_value (units); + Inkscape::Util::Unit const unit = unit_menu->getUnit(); + gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit); + fill_width->set_value (units); #if WITH_GTKMM_3_0 - Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(a, 1.0, 2); + Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(fill_width, 1.0, 2); #else - Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*a, 1.0, 2); + Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*fill_width, 1.0, 2); #endif e->set_tooltip_text (_("Width of the rectangle to be filled")); e->set_width_chars (7); e->set_digits (4); gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(e->gobj()), TRUE, TRUE, 0); // TODO: C++ification - g_signal_connect(G_OBJECT(a->gobj()), "value_changed", - G_CALLBACK(clonetiler_fill_width_changed), u); + g_signal_connect(G_OBJECT(fill_width->gobj()), "value_changed", + G_CALLBACK(clonetiler_fill_width_changed), unit_menu); } { GtkWidget *l = gtk_label_new (""); @@ -1132,32 +1134,31 @@ CloneTiler::CloneTiler (void) : { // Height spinbutton #if WITH_GTKMM_3_0 - Glib::RefPtr<Gtk::Adjustment> a = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0); + fill_height = Gtk::Adjustment::create(0.0, -1e6, 1e6, 1.0, 10.0, 0); #else - Gtk::Adjustment *a = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0); + fill_height = new Gtk::Adjustment (0.0, -1e6, 1e6, 1.0, 10.0, 0); #endif - sp_unit_selector_add_adjustment (SP_UNIT_SELECTOR (u), GTK_ADJUSTMENT (a->gobj())); double value = prefs->getDouble(prefs_path + "fillheight", 50.0); - SPUnit const &unit = *sp_unit_selector_get_unit(SP_UNIT_SELECTOR(u)); - gdouble const units = sp_pixels_get_units (value, unit); - a->set_value (units); + Inkscape::Util::Unit const unit = unit_menu->getUnit(); + gdouble const units = Inkscape::Util::Quantity::convert(value, "px", unit); + fill_height->set_value (units); #if WITH_GTKMM_3_0 - Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(a, 1.0, 2); + Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton(fill_height, 1.0, 2); #else - Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*a, 1.0, 2); + Inkscape::UI::Widget::SpinButton *e = new Inkscape::UI::Widget::SpinButton (*fill_height, 1.0, 2); #endif e->set_tooltip_text (_("Height of the rectangle to be filled")); e->set_width_chars (7); e->set_digits (4); gtk_box_pack_start (GTK_BOX (hb), GTK_WIDGET(e->gobj()), TRUE, TRUE, 0); // TODO: C++ification - g_signal_connect(G_OBJECT(a->gobj()), "value_changed", - G_CALLBACK(clonetiler_fill_height_changed), u); + g_signal_connect(G_OBJECT(fill_height->gobj()), "value_changed", + G_CALLBACK(clonetiler_fill_height_changed), unit_menu); } - gtk_box_pack_start (GTK_BOX (hb), u, TRUE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (hb), (GtkWidget*) unit_menu->gobj(), TRUE, TRUE, 0); clonetiler_table_attach (table, hb, 0.0, 2, 2); } @@ -2944,26 +2945,39 @@ void CloneTiler::clonetiler_switch_to_fill(GtkToggleButton * /*tb*/, GtkWidget * -void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, GtkWidget *u) +void CloneTiler::clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u) { gdouble const raw_dist = gtk_adjustment_get_value (adj); - SPUnit const &unit = *sp_unit_selector_get_unit(SP_UNIT_SELECTOR(u)); - gdouble const pixels = sp_units_get_pixels (raw_dist, unit); + Inkscape::Util::Unit const unit = u->getUnit(); + gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px"); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); prefs->setDouble(prefs_path + "fillwidth", pixels); } -void CloneTiler::clonetiler_fill_height_changed(GtkAdjustment *adj, GtkWidget *u) +void CloneTiler::clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u) { gdouble const raw_dist = gtk_adjustment_get_value (adj); - SPUnit const &unit = *sp_unit_selector_get_unit(SP_UNIT_SELECTOR(u)); - gdouble const pixels = sp_units_get_pixels (raw_dist, unit); + Inkscape::Util::Unit const unit = u->getUnit(); + gdouble const pixels = Inkscape::Util::Quantity::convert(raw_dist, unit, "px"); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); prefs->setDouble(prefs_path + "fillheight", pixels); } +void CloneTiler::clonetiler_unit_changed() +{ + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + gdouble width_pixels = prefs->getDouble(prefs_path + "fillwidth"); + gdouble height_pixels = prefs->getDouble(prefs_path + "fillheight"); + + Inkscape::Util::Unit unit = unit_menu->getUnit(); + + gdouble width_value = Inkscape::Util::Quantity::convert(width_pixels, "px", unit); + gdouble height_value = Inkscape::Util::Quantity::convert(height_pixels, "px", unit); + gtk_adjustment_set_value(fill_width->gobj(), width_value); + gtk_adjustment_set_value(fill_height->gobj(), height_value); +} void CloneTiler::clonetiler_do_pick_toggled(GtkToggleButton *tb, GtkWidget *dlg) { @@ -2977,7 +2991,6 @@ void CloneTiler::clonetiler_do_pick_toggled(GtkToggleButton *tb, GtkWidget *dlg) } } - } } } diff --git a/src/ui/dialog/clonetiler.h b/src/ui/dialog/clonetiler.h index 7ec30cfaa..e2a0240ee 100644 --- a/src/ui/dialog/clonetiler.h +++ b/src/ui/dialog/clonetiler.h @@ -19,6 +19,11 @@ namespace Inkscape { namespace UI { + +namespace Widget { + class UnitMenu; +} + namespace Dialog { class CloneTiler : public Widget::Panel { @@ -45,8 +50,9 @@ protected: static void clonetiler_do_pick_toggled(GtkToggleButton *tb, GtkWidget *dlg); static void clonetiler_pick_to(GtkToggleButton *tb, gpointer data); static void clonetiler_xy_changed(GtkAdjustment *adj, gpointer data); - static void clonetiler_fill_width_changed(GtkAdjustment *adj, GtkWidget *u); - static void clonetiler_fill_height_changed(GtkAdjustment *adj, GtkWidget *u); + static void clonetiler_fill_width_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u); + static void clonetiler_fill_height_changed(GtkAdjustment *adj, Inkscape::UI::Widget::UnitMenu *u); + void clonetiler_unit_changed(); static void clonetiler_switch_to_create(GtkToggleButton */*tb*/, GtkWidget *dlg); static void clonetiler_switch_to_fill(GtkToggleButton */*tb*/, GtkWidget *dlg); static void clonetiler_keep_bbox_toggled(GtkToggleButton *tb, gpointer /*data*/); @@ -112,12 +118,22 @@ private: DesktopTracker deskTrack; Inkscape::UI::Widget::ColorPicker *color_picker; GtkSizeGroup* table_row_labels; + Inkscape::UI::Widget::UnitMenu *unit_menu; + +#if WITH_GTKMM_3_0 + Glib::RefPtr<Gtk::Adjustment> fill_width; + Glib::RefPtr<Gtk::Adjustment> fill_height; +#else + Gtk::Adjustment *fill_width; + Gtk::Adjustment *fill_height; +#endif sigc::connection desktopChangeConn; sigc::connection selectChangedConn; sigc::connection subselChangedConn; sigc::connection selectModifiedConn; sigc::connection color_changed_connection; + sigc::connection unitChangedConn; /** * Can be invoked for setting the desktop. Currently not used. diff --git a/src/ui/dialog/dialog-manager.cpp b/src/ui/dialog/dialog-manager.cpp index 993f48d8f..0ce74f54e 100644 --- a/src/ui/dialog/dialog-manager.cpp +++ b/src/ui/dialog/dialog-manager.cpp @@ -32,7 +32,6 @@ #include "ui/dialog/livepatheffect-editor.h" #include "ui/dialog/memory.h" #include "ui/dialog/messages.h" -#include "ui/dialog/scriptdialog.h" #include "ui/dialog/symbols.h" #include "ui/dialog/tile.h" #include "ui/dialog/tracedialog.h" @@ -114,7 +113,6 @@ DialogManager::DialogManager() { registerFactory("ObjectAttributes", &create<ObjectAttributes, FloatingBehavior>); registerFactory("ObjectProperties", &create<ObjectProperties, FloatingBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, FloatingBehavior>); - registerFactory("Script", &create<ScriptDialog, FloatingBehavior>); registerFactory("SvgFontsDialog", &create<SvgFontsDialog, FloatingBehavior>); registerFactory("Swatches", &create<SwatchesPanel, FloatingBehavior>); registerFactory("Symbols", &create<SymbolsDialog, FloatingBehavior>); @@ -148,7 +146,6 @@ DialogManager::DialogManager() { registerFactory("ObjectAttributes", &create<ObjectAttributes, DockBehavior>); registerFactory("ObjectProperties", &create<ObjectProperties, DockBehavior>); // registerFactory("PrintColorsPreviewDialog", &create<PrintColorsPreviewDialog, DockBehavior>); - registerFactory("Script", &create<ScriptDialog, DockBehavior>); registerFactory("SvgFontsDialog", &create<SvgFontsDialog, DockBehavior>); registerFactory("Swatches", &create<SwatchesPanel, DockBehavior>); registerFactory("Symbols", &create<SymbolsDialog, DockBehavior>); diff --git a/src/ui/dialog/document-properties.cpp b/src/ui/dialog/document-properties.cpp index d335fb303..77fb182e5 100644 --- a/src/ui/dialog/document-properties.cpp +++ b/src/ui/dialog/document-properties.cpp @@ -28,7 +28,6 @@ #include "document.h" #include "desktop-handles.h" #include "desktop.h" -#include "helper/units.h" #include "inkscape.h" #include "io/sys.h" #include "preferences.h" @@ -1432,7 +1431,7 @@ void DocumentProperties::update() _rcb_shad.setActive (nv->showpageshadow); if (nv->doc_units) - _rum_deflt.setUnit (nv->doc_units); + _rum_deflt.setUnit (nv->doc_units->abbr); double const doc_w_px = sp_desktop_document(dt)->getWidth(); double const doc_h_px = sp_desktop_document(dt)->getHeight(); diff --git a/src/ui/dialog/export.cpp b/src/ui/dialog/export.cpp index a851503fe..2c92608d7 100644 --- a/src/ui/dialog/export.cpp +++ b/src/ui/dialog/export.cpp @@ -48,9 +48,8 @@ #include <glibmm/i18n.h> #include <glibmm/miscutils.h> -#include "helper/unit-menu.h" -#include "helper/units.h" -#include "unit-constants.h" +#include "ui/widget/unit-menu.h" +#include "util/units.h" #include "helper/window.h" #include "inkscape-private.h" #include "document.h" @@ -98,7 +97,7 @@ #define SP_EXPORT_MIN_SIZE 1.0 -#define DPI_BASE PX_PER_IN +#define DPI_BASE Inkscape::Util::Quantity::convert(1, "in", "px") #define EXPORT_COORD_PRECISION 3 @@ -108,6 +107,8 @@ #include "verbs.h" #include "export.h" +using Inkscape::Util::unit_table; + namespace { class MessageCleaner @@ -198,10 +199,13 @@ Export::Export (void) : /* Units box */ /* gets added to the vbox later, but the unit selector is needed earlier than that */ - unit_selector = Glib::wrap(sp_unit_selector_new (SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE)); + unit_selector = new Inkscape::UI::Widget::UnitMenu(); + unit_selector->setUnitType(Inkscape::Util::UNIT_TYPE_LINEAR); + unitChangedConn = unit_selector->signal_changed().connect(sigc::mem_fun(*this, &Export::onUnitChanged)); + SPDesktop *desktop = SP_ACTIVE_DESKTOP; if (desktop) - sp_unit_selector_set_unit (SP_UNIT_SELECTOR(unit_selector->gobj()), sp_desktop_namedview(desktop)->doc_units); + unit_selector->setUnit(sp_desktop_namedview(desktop)->doc_units->abbr); unitbox.pack_end(*unit_selector, false, false, 0); unitbox.pack_end(units_label, false, false, 3); @@ -226,28 +230,28 @@ Export::Export (void) : t->set_col_spacings (4); #endif - x0_adj = createSpinbutton ( "x0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, unit_selector->gobj(), + x0_adj = createSpinbutton ( "x0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, ((Gtk::Widget*) unit_selector)->gobj(), t, 0, 0, _("_x0:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaX0Change); - x1_adj = createSpinbutton ( "x1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, unit_selector->gobj(), + x1_adj = createSpinbutton ( "x1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, ((Gtk::Widget*) unit_selector)->gobj(), t, 0, 1, _("x_1:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaX1Change); width_adj = createSpinbutton ( "width", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, - unit_selector->gobj(), t, 0, 2, _("Wid_th:"), "", EXPORT_COORD_PRECISION, 1, + ((Gtk::Widget*) unit_selector)->gobj(), t, 0, 2, _("Wid_th:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaWidthChange); - y0_adj = createSpinbutton ( "y0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, unit_selector->gobj(), + y0_adj = createSpinbutton ( "y0", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, ((Gtk::Widget*) unit_selector)->gobj(), t, 2, 0, _("_y0:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaY0Change); - y1_adj = createSpinbutton ( "y1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, unit_selector->gobj(), + y1_adj = createSpinbutton ( "y1", 0.0, -1000000.0, 1000000.0, 0.1, 1.0, ((Gtk::Widget*) unit_selector)->gobj(), t, 2, 1, _("y_1:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaY1Change); height_adj = createSpinbutton ( "height", 0.0, 0.0, PNG_UINT_31_MAX, 0.1, 1.0, - unit_selector->gobj(), t, 2, 2, _("Hei_ght:"), "", EXPORT_COORD_PRECISION, 1, + ((Gtk::Widget*) unit_selector)->gobj(), t, 2, 2, _("Hei_ght:"), "", EXPORT_COORD_PRECISION, 1, &Export::onAreaHeightChange); area_box.pack_start(togglebox, false, false, 3); @@ -496,9 +500,6 @@ Gtk::Adjustment * Export::createSpinbutton( gchar const * /*key*/, float val, fl #else Gtk::Adjustment *adj = new Gtk::Adjustment ( val, min, max, step, page, 0 ); #endif - if (us) { - sp_unit_selector_add_adjustment ( SP_UNIT_SELECTOR (us), GTK_ADJUSTMENT (adj->gobj()) ); - } int pos = 0; Gtk::Label *l = NULL; @@ -979,6 +980,12 @@ Glib::ustring Export::absolutize_path_from_document_location (SPDocument *doc, c return path; } +// Called when unit is changed +void Export::onUnitChanged() +{ + onAreaToggled(); +} + void Export::onHideExceptSelected () { prefs->setBool("/dialogs/export/hideexceptselected/value", hide_export.get_active()); @@ -1042,8 +1049,8 @@ void Export::onExport () Geom::OptRect area = item->desktopVisualBounds(); if (area) { - gint width = (gint) (area->width() * dpi / PX_PER_IN + 0.5); - gint height = (gint) (area->height() * dpi / PX_PER_IN + 0.5); + gint width = (gint) (area->width() * dpi / DPI_BASE + 0.5); + gint height = (gint) (area->height() * dpi / DPI_BASE + 0.5); if (width > 1 && height > 1) { // Do export @@ -1507,10 +1514,6 @@ void Export::areaXChange (Gtk::Adjustment *adj) return; } - if (sp_unit_selector_update_test(SP_UNIT_SELECTOR(unit_selector->gobj()))) { - return; - } - update = true; x0 = getValuePx(x0_adj); @@ -1554,10 +1557,6 @@ void Export::areaYChange (Gtk::Adjustment *adj) return; } - if (sp_unit_selector_update_test (SP_UNIT_SELECTOR(unit_selector->gobj()))) { - return; - } - update = true; y0 = getValuePx(y0_adj); @@ -1597,10 +1596,6 @@ void Export::onAreaWidthChange() return; } - if (sp_unit_selector_update_test(reinterpret_cast<SPUnitSelector *>(unit_selector->gobj()))) { - return; - } - update = true; float x0 = getValuePx(x0_adj); @@ -1630,10 +1625,6 @@ void Export::onAreaHeightChange() return; } - if (sp_unit_selector_update_test(reinterpret_cast<SPUnitSelector *>(unit_selector->gobj()))) { - return; - } - update = true; float y0 = getValuePx(y0_adj); @@ -1709,10 +1700,6 @@ void Export::onBitmapWidthChange () return; } - if (sp_unit_selector_update_test(SP_UNIT_SELECTOR(unit_selector->gobj()))) { - return; - } - update = true; x0 = getValuePx(x0_adj); @@ -1743,10 +1730,6 @@ void Export::onBitmapHeightChange () return; } - if (sp_unit_selector_update_test(SP_UNIT_SELECTOR(unit_selector->gobj()))) { - return; - } - update = true; y0 = getValuePx(y0_adj); @@ -1803,10 +1786,6 @@ void Export::onExportXdpiChange() return; } - if (sp_unit_selector_update_test(SP_UNIT_SELECTOR(unit_selector->gobj()))) { - return; - } - update = true; x0 = getValuePx(x0_adj); @@ -1905,9 +1884,9 @@ void Export::setValuePx(Glib::RefPtr<Gtk::Adjustment>& adj, double val) void Export::setValuePx( Gtk::Adjustment *adj, double val) #endif { - const SPUnit *unit = sp_unit_selector_get_unit(SP_UNIT_SELECTOR(unit_selector->gobj()) ); + const Unit unit = unit_selector->getUnit(); - setValue(adj, sp_pixels_get_units (val, *unit)); + setValue(adj, Inkscape::Util::Quantity::convert(val, "px", unit)); return; } @@ -1955,9 +1934,9 @@ float Export::getValuePx( Gtk::Adjustment *adj ) #endif { float value = getValue( adj); - const SPUnit *unit = sp_unit_selector_get_unit(SP_UNIT_SELECTOR(unit_selector->gobj())); + const Unit unit = unit_selector->getUnit(); - return sp_units_get_pixels (value, *unit); + return Inkscape::Util::Quantity::convert(value, unit, "px"); } // end of sp_export_value_get_px() /** diff --git a/src/ui/dialog/export.h b/src/ui/dialog/export.h index b10c98fd2..f324f5dc5 100644 --- a/src/ui/dialog/export.h +++ b/src/ui/dialog/export.h @@ -172,6 +172,11 @@ private: #endif /** + * Unit changed callback + */ + void onUnitChanged(); + + /** * Hide except selected callback */ void onHideExceptSelected (); @@ -330,7 +335,7 @@ private: /* Unit selector widgets */ Gtk::HBox unitbox; - Gtk::Widget* unit_selector; + Inkscape::UI::Widget::UnitMenu *unit_selector; Gtk::Label units_label; /* Filename widgets */ @@ -365,6 +370,7 @@ private: sigc::connection selectChangedConn; sigc::connection subselChangedConn; sigc::connection selectModifiedConn; + sigc::connection unitChangedConn; }; diff --git a/src/ui/dialog/guides.cpp b/src/ui/dialog/guides.cpp index 51bbc7d9a..2de387364 100644 --- a/src/ui/dialog/guides.cpp +++ b/src/ui/dialog/guides.cpp @@ -230,7 +230,7 @@ void GuidelinePropertiesDialog::_setup() { _unit_menu.setUnitType(UNIT_TYPE_LINEAR); _unit_menu.setUnit("px"); if (_desktop->namedview->doc_units) { - _unit_menu.setUnit( sp_unit_get_abbreviation(_desktop->namedview->doc_units) ); + _unit_menu.setUnit( _desktop->namedview->doc_units->abbr ); } _spin_angle.setUnit(_angle_unit_status); diff --git a/src/ui/dialog/inkscape-preferences.cpp b/src/ui/dialog/inkscape-preferences.cpp index bc648002d..7890b0b4c 100644 --- a/src/ui/dialog/inkscape-preferences.cpp +++ b/src/ui/dialog/inkscape-preferences.cpp @@ -28,7 +28,7 @@ #include "preferences.h" #include "verbs.h" #include "selcue.h" -#include "unit-constants.h" +#include "util/units.h" #include <iostream> #include "enums.h" #include "desktop-handles.h" @@ -1428,10 +1428,10 @@ void InkscapePreferences::initPageBitmaps() _("Automatically reload linked images when file is changed on disk")); _misc_bitmap_editor.init("/options/bitmapeditor/value", true); _page_bitmaps.add_line( false, _("_Bitmap editor:"), _misc_bitmap_editor, "", "", true); - _importexport_export_res.init("/dialogs/export/defaultxdpi/value", 0.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false); + _importexport_export_res.init("/dialogs/export/defaultxdpi/value", 0.0, 6000.0, 1.0, 1.0, Inkscape::Util::Quantity::convert(1, "in", "px"), true, false); _page_bitmaps.add_line( false, _("Default export _resolution:"), _importexport_export_res, _("dpi"), _("Default bitmap resolution (in dots per inch) in the Export dialog"), false); - _bitmap_copy_res.init("/options/createbitmap/resolution", 1.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false); + _bitmap_copy_res.init("/options/createbitmap/resolution", 1.0, 6000.0, 1.0, 1.0, Inkscape::Util::Quantity::convert(1, "in", "px"), true, false); _page_bitmaps.add_line( false, _("Resolution for Create Bitmap _Copy:"), _bitmap_copy_res, _("dpi"), _("Resolution used by the Create Bitmap Copy command"), false); { @@ -1443,7 +1443,7 @@ void InkscapePreferences::initPageBitmaps() _bitmap_import_quality.init("/dialogs/import/quality", 1, 100, 1, 1, 100, true, false); _page_bitmaps.add_line( false, _("Bitmap import quality:"), _bitmap_import_quality, "%", "Bitmap import quality (jpeg only). 100 is best quality", false); } - _importexport_import_res.init("/dialogs/import/defaultxdpi/value", 0.0, 6000.0, 1.0, 1.0, PX_PER_IN, true, false); + _importexport_import_res.init("/dialogs/import/defaultxdpi/value", 0.0, 6000.0, 1.0, 1.0, Inkscape::Util::Quantity::convert(1, "in", "px"), true, false); _page_bitmaps.add_line( false, _("Default _import resolution:"), _importexport_import_res, _("dpi"), _("Default bitmap resolution (in dots per inch) for bitmap import"), false); _importexport_import_res_override.init(_("Override file resolution"), "/dialogs/import/forcexdpi", false); diff --git a/src/ui/dialog/livepatheffect-editor.cpp b/src/ui/dialog/livepatheffect-editor.cpp index e6bb9b43d..6c6f3a582 100644 --- a/src/ui/dialog/livepatheffect-editor.cpp +++ b/src/ui/dialog/livepatheffect-editor.cpp @@ -448,9 +448,9 @@ LivePathEffectEditor::onAdd() // run sp_selection_clone_original_path_lpe sp_selection_clone_original_path_lpe(current_desktop); - item = sel->singleItem(); - item->getRepr()->setAttribute("id", id); - item->getRepr()->setAttribute("transform", transform); + SPItem *new_item = sel->singleItem(); + new_item->getRepr()->setAttribute("id", id); + new_item->getRepr()->setAttribute("transform", transform); g_free(id); g_free(transform); diff --git a/src/ui/dialog/print.cpp b/src/ui/dialog/print.cpp index 2ab8cf121..4c8c77f96 100644 --- a/src/ui/dialog/print.cpp +++ b/src/ui/dialog/print.cpp @@ -26,7 +26,7 @@ #include "ui/widget/rendering-options.h" #include "document.h" -#include "unit-constants.h" +#include "util/units.h" #include "helper/png-write.h" #include "svg/svg-color.h" #include "io/sys.h" @@ -72,8 +72,8 @@ static void draw_page( sp_export_png_file(junk->_doc, tmp_png.c_str(), 0.0, 0.0, width, height, - (unsigned long)(width * dpi / PX_PER_IN), - (unsigned long)(height * dpi / PX_PER_IN), + (unsigned long)(width * dpi / Inkscape::Util::Quantity::convert(1, "in", "px")), + (unsigned long)(height * dpi / Inkscape::Util::Quantity::convert(1, "in", "px")), dpi, dpi, bgcolor, NULL, NULL, true, NULL); // This doesn't seem to work: @@ -90,7 +90,7 @@ static void draw_page( cairo_t *cr = gtk_print_context_get_cairo_context (context); cairo_matrix_t m; cairo_get_matrix(cr, &m); - cairo_scale(cr, PT_PER_IN / dpi, PT_PER_IN / dpi); + cairo_scale(cr, Inkscape::Util::Quantity::convert(1, "in", "pt") / dpi, Inkscape::Util::Quantity::convert(1, "in", "pt") / dpi); // FIXME: why is the origin offset?? cairo_set_source_surface(cr, png->cobj(), -16.0, -16.0); cairo_paint(cr); @@ -195,8 +195,8 @@ Print::Print(SPDocument *doc, SPItem *base) : // set up paper size to match the document size gtk_print_operation_set_unit (_printop, GTK_UNIT_POINTS); GtkPageSetup *page_setup = gtk_page_setup_new(); - gdouble doc_width = _doc->getWidth() * PT_PER_PX; - gdouble doc_height = _doc->getHeight() * PT_PER_PX; + gdouble doc_width = _doc->getWidth() * Inkscape::Util::Quantity::convert(1, "px", "pt"); + gdouble doc_height = _doc->getHeight() * Inkscape::Util::Quantity::convert(1, "px", "pt"); GtkPaperSize *paper_size; if (doc_width > doc_height) { gtk_page_setup_set_orientation (page_setup, GTK_PAGE_ORIENTATION_LANDSCAPE); diff --git a/src/ui/dialog/scriptdialog.cpp b/src/ui/dialog/scriptdialog.cpp deleted file mode 100644 index 87794a3ce..000000000 --- a/src/ui/dialog/scriptdialog.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/** - * @file - * Dialog for executing and monitoring script execution. - */ -/* Author: - * Bob Jamison - * - * Copyright (C) 2004-2008 Authors - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ -#ifdef HAVE_CONFIG_H -# include <config.h> -#endif - -#include "scriptdialog.h" -#include <glibmm/i18n.h> -#include <gtkmm/menubar.h> -#include <gtkmm/frame.h> -#include <gtkmm/scrolledwindow.h> -#include <gtkmm/textview.h> - -#include <extension/script/InkscapeScript.h> - - - -namespace Inkscape -{ -namespace UI -{ -namespace Dialog -{ - - - -//######################################################################### -//## I M P L E M E N T A T I O N -//######################################################################### - -/** - * A script editor/executor - */ -class ScriptDialogImpl : public ScriptDialog -{ - - public: - ScriptDialogImpl(); - ~ScriptDialogImpl() - {} - - - /** - * Remove all text from the dialog. - */ - void clear(); - - /** - * Execute a script in the dialog. - * - * @param lang language in which the script is programmed - */ - void execute(Inkscape::Extension::Script::InkscapeScript::ScriptLanguage lang); - - /** - * Execute a Javascript script - */ - void executeJavascript(); - - /** - * Execute a Python script - */ - void executePython(); - - /** - * Execute a Ruby script - */ - void executeRuby(); - - - - private: - Gtk::MenuBar menuBar; - Gtk::Menu fileMenu; - - //## Script text - Gtk::Frame scriptTextFrame; - Gtk::ScrolledWindow scriptTextScroll; - Gtk::TextView scriptText; - - //## Output text - Gtk::Frame outputTextFrame; - Gtk::ScrolledWindow outputTextScroll; - Gtk::TextView outputText; - - //## Error text - Gtk::Frame errorTextFrame; - Gtk::ScrolledWindow errorTextScroll; - Gtk::TextView errorText; - - - -}; - -static const char *defaultCodeStr = - "/**\n" - " * This is some example Javascript.\n" - " * Try 'Execute Javascript'\n" - " */\n" - "importPackage(javax.swing);\n" - "function sayHello() {\n" - " JOptionPane.showMessageDialog(null, 'Hello, world!',\n" - " 'Welcome to Inkscape', JOptionPane.WARNING_MESSAGE);\n" - "}\n" - "\n" - "sayHello();\n" - "\n"; - - - - -//######################################################################### -//## E V E N T S -//######################################################################### - -static void textViewClear(Gtk::TextView &view) -{ - Glib::RefPtr<Gtk::TextBuffer> buffer = view.get_buffer(); - buffer->erase(buffer->begin(), buffer->end()); -} - -void ScriptDialogImpl::clear() -{ - textViewClear(scriptText); - textViewClear(outputText); - textViewClear(errorText); -} - -void ScriptDialogImpl::execute(Inkscape::Extension::Script::InkscapeScript::ScriptLanguage lang) -{ - Glib::ustring script = scriptText.get_buffer()->get_text(true); - Glib::ustring output; - Glib::ustring error; - Inkscape::Extension::Script::InkscapeScript engine; - bool ok = engine.interpretScript(script, output, error, lang); - outputText.get_buffer()->set_text(output); - errorText.get_buffer()->set_text(error); - if (!ok) - { - //do we want something here? - } -} - -void ScriptDialogImpl::executeJavascript() -{ - execute(Inkscape::Extension::Script::InkscapeScript::JAVASCRIPT); -} - -void ScriptDialogImpl::executePython() -{ - execute(Inkscape::Extension::Script::InkscapeScript::PYTHON); -} - -void ScriptDialogImpl::executeRuby() -{ - execute(Inkscape::Extension::Script::InkscapeScript::RUBY); -} - - -//######################################################################### -//## C O N S T R U C T O R / D E S T R U C T O R -//######################################################################### -ScriptDialogImpl::ScriptDialogImpl() : - ScriptDialog() -{ - Gtk::Box *contents = _getContents(); - - //## Add a menu for clear() - Gtk::MenuItem* item = Gtk::manage(new Gtk::MenuItem(_("File"), true)); - item->set_submenu(fileMenu); - menuBar.append(*item); - - item = Gtk::manage(new Gtk::MenuItem(_("_Clear"), true)); - item->signal_activate().connect(sigc::mem_fun(*this, &ScriptDialogImpl::clear)); - fileMenu.append(*item); - - item = Gtk::manage(new Gtk::MenuItem(_("_Execute Javascript"), true)); - item->signal_activate().connect(sigc::mem_fun(*this, &ScriptDialogImpl::executeJavascript)); - fileMenu.append(*item); - - item = Gtk::manage(new Gtk::MenuItem(_("_Execute Python"), true)); - item->signal_activate().connect(sigc::mem_fun(*this, &ScriptDialogImpl::executePython)); - fileMenu.append(*item); - - item = Gtk::manage(new Gtk::MenuItem(_("_Execute Ruby"), true)); - item->signal_activate().connect(sigc::mem_fun(*this, &ScriptDialogImpl::executeRuby)); - fileMenu.append(*item); - - contents->pack_start(menuBar, Gtk::PACK_SHRINK); - - //### Set up the script field - scriptText.set_editable(true); - scriptText.get_buffer()->set_text(defaultCodeStr); - scriptTextScroll.add(scriptText); - scriptTextScroll.set_policy(Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS); - scriptTextFrame.set_label(_("Script")); - scriptTextFrame.set_shadow_type(Gtk::SHADOW_NONE); - scriptTextFrame.add(scriptTextScroll); - contents->pack_start(scriptTextFrame); - - //### Set up the output field - outputText.set_editable(true); - outputText.get_buffer()->set_text(""); - outputTextScroll.add(outputText); - outputTextScroll.set_policy(Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS); - outputTextFrame.set_label(_("Output")); - outputTextFrame.set_shadow_type(Gtk::SHADOW_NONE); - outputTextFrame.add(outputTextScroll); - contents->pack_start(outputTextFrame); - - //### Set up the error field - errorText.set_editable(true); - errorText.get_buffer()->set_text(""); - errorTextScroll.add(errorText); - errorTextScroll.set_policy(Gtk::POLICY_ALWAYS, Gtk::POLICY_ALWAYS); - errorTextFrame.set_label(_("Errors")); - errorTextFrame.set_shadow_type(Gtk::SHADOW_NONE); - errorTextFrame.add(errorTextScroll); - contents->pack_start(errorTextFrame); - - // sick of this thing shrinking too much - set_size_request(350, 400); - show_all_children(); - -} - -ScriptDialog &ScriptDialog::getInstance() -{ - ScriptDialog *dialog = new ScriptDialogImpl(); - return *dialog; -} - -} //namespace Dialogs -} //namespace UI -} //namespace Inkscape - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/ui/dialog/scriptdialog.h b/src/ui/dialog/scriptdialog.h deleted file mode 100644 index d1962bf6f..000000000 --- a/src/ui/dialog/scriptdialog.h +++ /dev/null @@ -1,64 +0,0 @@ -/** @file - * @brief Script dialog - * - * This dialog is for launching scripts whose main purpose is - * the scripting of Inkscape itself. - */ -/* Authors: - * Bob Jamison - * Other dudes from The Inkscape Organization - * - * Copyright (C) 2004, 2005 Authors - * - * Released under GNU GPL, read the file 'COPYING' for more information - */ - -#ifndef __SCRIPTDIALOG_H__ -#define __SCRIPTDIALOG_H__ - -#include "ui/widget/panel.h" -#include "verbs.h" - -namespace Inkscape { -namespace UI { -namespace Dialog { - - -/** - * A script editor, loader, and executor - */ -class ScriptDialog : public UI::Widget::Panel -{ - - public: - ScriptDialog() : - UI::Widget::Panel("", "/dialogs/script", SP_VERB_DIALOG_SCRIPT) - {} - - /** - * Helper function which returns a new instance of the dialog. - * getInstance is needed by the dialog manager (Inkscape::UI::Dialog::DialogManager). - */ - static ScriptDialog &getInstance(); - - virtual ~ScriptDialog() {}; - -}; // class ScriptDialog - - -} //namespace Dialog -} //namespace UI -} //namespace Inkscape - -#endif /* __DEBUGDIALOG_H__ */ - -/* - Local Variables: - mode:c++ - c-file-style:"stroustrup" - c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +)) - indent-tabs-mode:nil - fill-column:99 - End: -*/ -// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 : diff --git a/src/ui/dialog/text-edit.cpp b/src/ui/dialog/text-edit.cpp index a662495a0..4a25f723b 100644 --- a/src/ui/dialog/text-edit.cpp +++ b/src/ui/dialog/text-edit.cpp @@ -58,7 +58,7 @@ extern "C" { #include "widgets/font-selector.h" #include <glibmm/i18n.h> #include <glibmm/markup.h> -#include "unit-constants.h" +#include "util/units.h" #include "sp-textpath.h" namespace Inkscape { @@ -401,7 +401,7 @@ void TextEdit::setPreviewText (Glib::ustring font_spec, Glib::ustring phrase) Inkscape::Preferences *prefs = Inkscape::Preferences::get(); int unit = prefs->getInt("/options/font/unitType", SP_CSS_UNIT_PT); - double pt_size = sp_style_css_size_units_to_px(sp_font_selector_get_size(fsel), unit) * PT_PER_PX; + double pt_size = sp_style_css_size_units_to_px(sp_font_selector_get_size(fsel), unit) * Inkscape::Util::Quantity::convert(1, "px", "pt"); // Pango font size is in 1024ths of a point // C++11: Glib::ustring size = std::to_string( pt_size * PANGO_SCALE ); diff --git a/src/ui/tool/node.cpp b/src/ui/tool/node.cpp index 89a0f4163..5f5757a14 100644 --- a/src/ui/tool/node.cpp +++ b/src/ui/tool/node.cpp @@ -21,7 +21,6 @@ #include "preferences.h" #include "snap.h" #include "snap-preferences.h" -#include "sp-metrics.h" #include "sp-namedview.h" #include "ui/control-manager.h" #include "ui/tool/control-point-selection.h" @@ -610,9 +609,13 @@ Glib::ustring Handle::_getDragTip(GdkEventMotion */*event*/) const double angle = Geom::angle_between(Geom::Point(-1,0), position() - _parent->position()); angle += M_PI; // angle is (-M_PI...M_PI] - offset by +pi and scale to 0...360 angle *= 360.0 / (2 * M_PI); - GString *x = SP_PX_TO_METRIC_STRING(dist[Geom::X], _desktop->namedview->getDefaultMetric()); - GString *y = SP_PX_TO_METRIC_STRING(dist[Geom::Y], _desktop->namedview->getDefaultMetric()); - GString *len = SP_PX_TO_METRIC_STRING(length(), _desktop->namedview->getDefaultMetric()); + + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px"); + Inkscape::Util::Quantity len_q = Inkscape::Util::Quantity(length(), "px"); + GString *x = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str()); + GString *y = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str()); + GString *len = g_string_new(len_q.string(*_desktop->namedview->doc_units).c_str()); Glib::ustring ret = format_tip(C_("Path handle tip", "Move handle by %s, %s; angle %.2f°, length %s"), x->str, y->str, angle, len->str); g_string_free(x, TRUE); @@ -1461,8 +1464,11 @@ Glib::ustring Node::_getTip(unsigned state) const Glib::ustring Node::_getDragTip(GdkEventMotion */*event*/) const { Geom::Point dist = position() - _last_drag_origin(); - GString *x = SP_PX_TO_METRIC_STRING(dist[Geom::X], _desktop->namedview->getDefaultMetric()); - GString *y = SP_PX_TO_METRIC_STRING(dist[Geom::Y], _desktop->namedview->getDefaultMetric()); + + Inkscape::Util::Quantity x_q = Inkscape::Util::Quantity(dist[Geom::X], "px"); + Inkscape::Util::Quantity y_q = Inkscape::Util::Quantity(dist[Geom::Y], "px"); + GString *x = g_string_new(x_q.string(*_desktop->namedview->doc_units).c_str()); + GString *y = g_string_new(y_q.string(*_desktop->namedview->doc_units).c_str()); Glib::ustring ret = format_tip(C_("Path node tip", "Move node by %s, %s"), x->str, y->str); g_string_free(x, TRUE); diff --git a/src/ui/widget/Makefile_insert b/src/ui/widget/Makefile_insert index 2de954674..710b95c2b 100644 --- a/src/ui/widget/Makefile_insert +++ b/src/ui/widget/Makefile_insert @@ -79,5 +79,7 @@ ink_common_sources += \ ui/widget/tolerance-slider.cpp \ ui/widget/tolerance-slider.h \ ui/widget/unit-menu.cpp \ - ui/widget/unit-menu.h + ui/widget/unit-menu.h \ + ui/widget/unit-tracker.h \ + ui/widget/unit-tracker.cpp diff --git a/src/ui/widget/page-sizer.cpp b/src/ui/widget/page-sizer.cpp index 988c4e5de..8287452d7 100644 --- a/src/ui/widget/page-sizer.cpp +++ b/src/ui/widget/page-sizer.cpp @@ -37,7 +37,7 @@ #include "desktop.h" #include "helper/action.h" #include "helper/action-context.h" -#include "helper/units.h" +#include "util/units.h" #include "inkscape.h" #include "sp-namedview.h" #include "sp-root.h" @@ -48,6 +48,7 @@ #include "xml/repr.h" using std::pair; +using Inkscape::Util::unit_table; namespace Inkscape { namespace UI { @@ -96,7 +97,7 @@ struct PaperSizeRec { char const * const name; //name double const smaller; //lesser dimension double const larger; //greater dimension - SPUnitId const unit; //units + Glib::ustring const unit; //units }; // list of page formats that should be in landscape automatically @@ -114,31 +115,31 @@ fill_landscape_papers() { } static PaperSizeRec const inkscape_papers[] = { - { "A4", 210, 297, SP_UNIT_MM }, - { "US Letter", 8.5, 11, SP_UNIT_IN }, - { "US Legal", 8.5, 14, SP_UNIT_IN }, - { "US Executive", 7.25, 10.5, SP_UNIT_IN }, - { "A0", 841, 1189, SP_UNIT_MM }, - { "A1", 594, 841, SP_UNIT_MM }, - { "A2", 420, 594, SP_UNIT_MM }, - { "A3", 297, 420, SP_UNIT_MM }, - { "A5", 148, 210, SP_UNIT_MM }, - { "A6", 105, 148, SP_UNIT_MM }, - { "A7", 74, 105, SP_UNIT_MM }, - { "A8", 52, 74, SP_UNIT_MM }, - { "A9", 37, 52, SP_UNIT_MM }, - { "A10", 26, 37, SP_UNIT_MM }, - { "B0", 1000, 1414, SP_UNIT_MM }, - { "B1", 707, 1000, SP_UNIT_MM }, - { "B2", 500, 707, SP_UNIT_MM }, - { "B3", 353, 500, SP_UNIT_MM }, - { "B4", 250, 353, SP_UNIT_MM }, - { "B5", 176, 250, SP_UNIT_MM }, - { "B6", 125, 176, SP_UNIT_MM }, - { "B7", 88, 125, SP_UNIT_MM }, - { "B8", 62, 88, SP_UNIT_MM }, - { "B9", 44, 62, SP_UNIT_MM }, - { "B10", 31, 44, SP_UNIT_MM }, + { "A4", 210, 297, "mm" }, + { "US Letter", 8.5, 11, "in" }, + { "US Legal", 8.5, 14, "in" }, + { "US Executive", 7.25, 10.5, "in" }, + { "A0", 841, 1189, "mm" }, + { "A1", 594, 841, "mm" }, + { "A2", 420, 594, "mm" }, + { "A3", 297, 420, "mm" }, + { "A5", 148, 210, "mm" }, + { "A6", 105, 148, "mm" }, + { "A7", 74, 105, "mm" }, + { "A8", 52, 74, "mm" }, + { "A9", 37, 52, "mm" }, + { "A10", 26, 37, "mm" }, + { "B0", 1000, 1414, "mm" }, + { "B1", 707, 1000, "mm" }, + { "B2", 500, 707, "mm" }, + { "B3", 353, 500, "mm" }, + { "B4", 250, 353, "mm" }, + { "B5", 176, 250, "mm" }, + { "B6", 125, 176, "mm" }, + { "B7", 88, 125, "mm" }, + { "B8", 62, 88, "mm" }, + { "B9", 44, 62, "mm" }, + { "B10", 31, 44, "mm" }, @@ -150,63 +151,63 @@ static PaperSizeRec const inkscape_papers[] = { don't know what D and E series are used for. */ - { "C0", 917, 1297, SP_UNIT_MM }, - { "C1", 648, 917, SP_UNIT_MM }, - { "C2", 458, 648, SP_UNIT_MM }, - { "C3", 324, 458, SP_UNIT_MM }, - { "C4", 229, 324, SP_UNIT_MM }, - { "C5", 162, 229, SP_UNIT_MM }, - { "C6", 114, 162, SP_UNIT_MM }, - { "C7", 81, 114, SP_UNIT_MM }, - { "C8", 57, 81, SP_UNIT_MM }, - { "C9", 40, 57, SP_UNIT_MM }, - { "C10", 28, 40, SP_UNIT_MM }, - { "D1", 545, 771, SP_UNIT_MM }, - { "D2", 385, 545, SP_UNIT_MM }, - { "D3", 272, 385, SP_UNIT_MM }, - { "D4", 192, 272, SP_UNIT_MM }, - { "D5", 136, 192, SP_UNIT_MM }, - { "D6", 96, 136, SP_UNIT_MM }, - { "D7", 68, 96, SP_UNIT_MM }, - { "E3", 400, 560, SP_UNIT_MM }, - { "E4", 280, 400, SP_UNIT_MM }, - { "E5", 200, 280, SP_UNIT_MM }, - { "E6", 140, 200, SP_UNIT_MM }, + { "C0", 917, 1297, "mm" }, + { "C1", 648, 917, "mm" }, + { "C2", 458, 648, "mm" }, + { "C3", 324, 458, "mm" }, + { "C4", 229, 324, "mm" }, + { "C5", 162, 229, "mm" }, + { "C6", 114, 162, "mm" }, + { "C7", 81, 114, "mm" }, + { "C8", 57, 81, "mm" }, + { "C9", 40, 57, "mm" }, + { "C10", 28, 40, "mm" }, + { "D1", 545, 771, "mm" }, + { "D2", 385, 545, "mm" }, + { "D3", 272, 385, "mm" }, + { "D4", 192, 272, "mm" }, + { "D5", 136, 192, "mm" }, + { "D6", 96, 136, "mm" }, + { "D7", 68, 96, "mm" }, + { "E3", 400, 560, "mm" }, + { "E4", 280, 400, "mm" }, + { "E5", 200, 280, "mm" }, + { "E6", 140, 200, "mm" }, //#endif - { "CSE", 462, 649, SP_UNIT_PT }, - { "US #10 Envelope", 4.125, 9.5, SP_UNIT_IN }, + { "CSE", 462, 649, "pt" }, + { "US #10 Envelope", 4.125, 9.5, "in" }, /* See http://www.hbp.com/content/PCR_envelopes.cfm for a much larger list of US envelope sizes. */ - { "DL Envelope", 110, 220, SP_UNIT_MM }, - { "Ledger/Tabloid", 11, 17, SP_UNIT_IN }, + { "DL Envelope", 110, 220, "mm" }, + { "Ledger/Tabloid", 11, 17, "in" }, /* Note that `Folio' (used in QPrinter/KPrinter) is deliberately absent from this list, as it means different sizes to different people: different people may expect the width to be either 8, 8.25 or 8.5 inches, and the height to be either 13 or 13.5 inches, even restricting our interpretation to foolscap folio. If you wish to introduce a folio-like page size to the list, then please consider using a name more specific than just `Folio' or `Foolscap Folio'. */ - { "Banner 468x60", 60, 468, SP_UNIT_PX }, - { "Icon 16x16", 16, 16, SP_UNIT_PX }, - { "Icon 32x32", 32, 32, SP_UNIT_PX }, - { "Icon 48x48", 48, 48, SP_UNIT_PX }, + { "Banner 468x60", 60, 468, "px" }, + { "Icon 16x16", 16, 16, "px" }, + { "Icon 32x32", 32, 32, "px" }, + { "Icon 48x48", 48, 48, "px" }, /* business cards */ - { "Business Card (ISO 7810)", 53.98, 85.60, SP_UNIT_MM }, - { "Business Card (US)", 2, 3.5, SP_UNIT_IN }, - { "Business Card (Europe)", 55, 85, SP_UNIT_MM }, - { "Business Card (Aus/NZ)", 55, 90, SP_UNIT_MM }, + { "Business Card (ISO 7810)", 53.98, 85.60, "mm" }, + { "Business Card (US)", 2, 3.5, "in" }, + { "Business Card (Europe)", 55, 85, "mm" }, + { "Business Card (Aus/NZ)", 55, 90, "mm" }, // Start Arch Series List - { "Arch A", 9, 12, SP_UNIT_IN }, // 229 x 305 mm - { "Arch B", 12, 18, SP_UNIT_IN }, // 305 x 457 mm - { "Arch C", 18, 24, SP_UNIT_IN }, // 457 x 610 mm - { "Arch D", 24, 36, SP_UNIT_IN }, // 610 x 914 mm - { "Arch E", 36, 48, SP_UNIT_IN }, // 914 x 1219 mm - { "Arch E1", 30, 42, SP_UNIT_IN }, // 762 x 1067 mm + { "Arch A", 9, 12, "in" }, // 229 x 305 mm + { "Arch B", 12, 18, "in" }, // 305 x 457 mm + { "Arch C", 18, 24, "in" }, // 457 x 610 mm + { "Arch D", 24, 36, "in" }, // 610 x 914 mm + { "Arch E", 36, 48, "in" }, // 914 x 1219 mm + { "Arch E1", 30, 42, "in" }, // 762 x 1067 mm /* * The above list of Arch sizes were taken from the following site: @@ -217,7 +218,7 @@ static PaperSizeRec const inkscape_papers[] = { * September 2009 - DAK */ - { NULL, 0, 0, SP_UNIT_PX }, + { NULL, 0, 0, "px" }, }; @@ -226,10 +227,6 @@ static PaperSizeRec const inkscape_papers[] = { //# P A G E S I Z E R //######################################################################## -//The default unit for this widget and its calculations -static const SPUnit _px_unit = sp_unit_get_by_id (SP_UNIT_PX); - - /** * Constructor */ @@ -280,13 +277,8 @@ PageSizer::PageSizer(Registry & _wr) char formatBuf[80]; snprintf(formatBuf, 79, "%0.1f x %0.1f", p->smaller, p->larger); Glib::ustring desc = formatBuf; - if (p->unit == SP_UNIT_IN) - desc.append(" in"); - else if (p->unit == SP_UNIT_MM) - desc.append(" mm"); - else if (p->unit == SP_UNIT_PX) - desc.append(" px"); - PaperSize paper(name, p->smaller, p->larger, p->unit); + desc.append(" " + p->unit); + PaperSize paper(name, p->smaller, p->larger, unit_table.getUnit(p->unit)); _paperSizeTable[name] = paper; Gtk::TreeModel::Row row = *(_paperSizeListStore->append()); row[_paperSizeListColumns.nameColumn] = name; @@ -320,9 +312,9 @@ PageSizer::PageSizer(Registry & _wr) SPNamedView *nv = sp_desktop_namedview(dt); _wr.setUpdating (true); if (nv->units) { - _dimensionUnits.setUnit(nv->units); + _dimensionUnits.setUnit(nv->units->abbr); } else if (nv->doc_units) { - _dimensionUnits.setUnit(nv->doc_units); + _dimensionUnits.setUnit(nv->doc_units->abbr); } _wr.setUpdating (false); @@ -484,8 +476,8 @@ PageSizer::setDim (double w, double h, bool changeList) if (SP_ACTIVE_DESKTOP && !_widgetRegistry->isUpdating()) { SPDocument *doc = sp_desktop_document(SP_ACTIVE_DESKTOP); double const old_height = doc->getHeight(); - doc->setWidth (w, &_px_unit); - doc->setHeight (h, &_px_unit); + doc->setWidth (Inkscape::Util::Quantity(w, "px")); + doc->setHeight (Inkscape::Util::Quantity(h, "px")); // The origin for the user is in the lower left corner; this point should remain stationary when // changing the page size. The SVG's origin however is in the upper left corner, so we must compensate for this Geom::Translate const vert_offset(Geom::Point(0, (old_height - h))); @@ -569,9 +561,9 @@ PageSizer::find_paper_size (double w, double h) const for (iter = _paperSizeTable.begin() ; iter != _paperSizeTable.end() ; ++iter) { PaperSize paper = iter->second; - SPUnit const &i_unit = sp_unit_get_by_id(paper.unit); - double smallX = sp_units_get_pixels(paper.smaller, i_unit); - double largeX = sp_units_get_pixels(paper.larger, i_unit); + Inkscape::Util::Unit const &i_unit = paper.unit; + double smallX = Inkscape::Util::Quantity::convert(paper.smaller, i_unit, "px"); + double largeX = Inkscape::Util::Quantity::convert(paper.larger, i_unit, "px"); g_return_val_if_fail(smallX <= largeX, _paperSizeListStore->children().end()); @@ -662,9 +654,8 @@ PageSizer::on_paper_size_list_changed() _landscape = _landscapeButton.get_active(); } - SPUnit const &src_unit = sp_unit_get_by_id (paper.unit); - sp_convert_distance (&w, &src_unit, &_px_unit); - sp_convert_distance (&h, &src_unit, &_px_unit); + w = Inkscape::Util::Quantity::convert(w, paper.unit, "px"); + h = Inkscape::Util::Quantity::convert(h, paper.unit, "px"); if (_landscape) setDim (h, w, false); diff --git a/src/ui/widget/page-sizer.h b/src/ui/widget/page-sizer.h index d1fbb56e0..34ed7592d 100644 --- a/src/ui/widget/page-sizer.h +++ b/src/ui/widget/page-sizer.h @@ -18,7 +18,7 @@ #include "ui/widget/registered-widget.h" #include <sigc++/sigc++.h> -#include "helper/units.h" +#include "util/units.h" #include <gtkmm/alignment.h> #include <gtkmm/expander.h> @@ -64,7 +64,7 @@ public: PaperSize(const Glib::ustring &nameArg, double smallerArg, double largerArg, - SPUnitId unitArg) + Inkscape::Util::Unit unitArg) { name = nameArg; smaller = smallerArg; @@ -108,7 +108,7 @@ public: /** * The units (px, pt, mm, etc) of this specification */ - SPUnitId unit; + Inkscape::Util::Unit unit; private: @@ -117,7 +117,7 @@ private: name = ""; smaller = 0.0; larger = 0.0; - unit = SP_UNIT_PX; + unit = unit_table.getUnit("px"); } void assign(const PaperSize &other) diff --git a/src/ui/widget/registered-widget.cpp b/src/ui/widget/registered-widget.cpp index ea2bac867..ae6a7d1e0 100644 --- a/src/ui/widget/registered-widget.cpp +++ b/src/ui/widget/registered-widget.cpp @@ -27,7 +27,6 @@ #include "ui/widget/random.h" #include "widgets/spinbutton-events.h" -#include "helper/units.h" #include "xml/repr.h" #include "svg/svg-color.h" #include "svg/stringstream.h" @@ -118,9 +117,9 @@ RegisteredUnitMenu::RegisteredUnitMenu (const Glib::ustring& label, const Glib:: } void -RegisteredUnitMenu::setUnit (const SPUnit* unit) +RegisteredUnitMenu::setUnit (Glib::ustring unit) { - getUnitMenu()->setUnit (sp_unit_get_abbreviation (unit)); + getUnitMenu()->setUnit(unit); } void diff --git a/src/ui/widget/registered-widget.h b/src/ui/widget/registered-widget.h index fa35b815e..93b0cef4e 100644 --- a/src/ui/widget/registered-widget.h +++ b/src/ui/widget/registered-widget.h @@ -32,7 +32,6 @@ #include <gtkmm/checkbutton.h> -struct SPUnit; class SPDocument; namespace Gtk { @@ -128,6 +127,7 @@ private: repr = NULL; doc = NULL; write_undo = false; + event_type = -1; } }; @@ -166,7 +166,7 @@ public: Inkscape::XML::Node* repr_in = NULL, SPDocument *doc_in = NULL ); - void setUnit (const SPUnit*); + void setUnit (const Glib::ustring); Unit getUnit() const { return static_cast<UnitMenu*>(_widget)->getUnit(); }; UnitMenu* getUnitMenu() const { return static_cast<UnitMenu*>(_widget); }; sigc::connection _changed_connection; diff --git a/src/ui/widget/rendering-options.cpp b/src/ui/widget/rendering-options.cpp index f26e71553..d6248df69 100644 --- a/src/ui/widget/rendering-options.cpp +++ b/src/ui/widget/rendering-options.cpp @@ -13,7 +13,7 @@ #endif #include "rendering-options.h" -#include "unit-constants.h" +#include "util/units.h" #include <glibmm/i18n.h> namespace Inkscape { @@ -59,8 +59,8 @@ RenderingOptions::RenderingOptions () : _radio_bitmap.signal_toggled().connect(sigc::mem_fun(*this, &RenderingOptions::_toggled)); // configure default DPI - _dpi.setRange(PT_PER_IN,2400.0); - _dpi.setValue(PT_PER_IN); + _dpi.setRange(Inkscape::Util::Quantity::convert(1, "in", "pt"),2400.0); + _dpi.setValue(Inkscape::Util::Quantity::convert(1, "in", "pt")); _dpi.setIncrements(1.0,10.0); _dpi.setDigits(0); _dpi.update(); diff --git a/src/ui/widget/scalar-unit.cpp b/src/ui/widget/scalar-unit.cpp index 99ff70846..2f4c1f341 100644 --- a/src/ui/widget/scalar-unit.cpp +++ b/src/ui/widget/scalar-unit.cpp @@ -16,6 +16,8 @@ #include "scalar-unit.h" #include "spinbutton.h" +using Inkscape::Util::unit_table; + namespace Inkscape { namespace UI { namespace Widget { @@ -226,9 +228,8 @@ void ScalarUnit::on_unit_changed() Glib::ustring abbr = _unit_menu->getUnitAbbr(); _suffix->set_label(abbr); - Inkscape::Util::UnitTable &table = _unit_menu->getUnitTable(); - Inkscape::Util::Unit new_unit = (table.getUnit(abbr)); - Inkscape::Util::Unit old_unit = (table.getUnit(lastUnits)); + Inkscape::Util::Unit new_unit = (unit_table.getUnit(abbr)); + Inkscape::Util::Unit old_unit = (unit_table.getUnit(lastUnits)); double convertedVal = 0; if (old_unit.type == UNIT_TYPE_DIMENSIONLESS && new_unit.type == UNIT_TYPE_LINEAR) { diff --git a/src/ui/widget/selected-style.cpp b/src/ui/widget/selected-style.cpp index 18dbb984b..388a0bcea 100644 --- a/src/ui/widget/selected-style.cpp +++ b/src/ui/widget/selected-style.cpp @@ -50,6 +50,9 @@ #include "pixmaps/cursor-adj-a.xpm" #include "sp-cursor.h" #include "gradient-chemistry.h" +#include "util/units.h" + +using Inkscape::Util::unit_table; static gdouble const _sw_presets[] = { 32 , 16 , 10 , 8 , 6 , 4 , 3 , 2 , 1.5 , 1 , 0.75 , 0.5 , 0.25 , 0.1 }; static gchar const *const _sw_presets_str[] = {"32", "16", "10", "8", "6", "4", "3", "2", "1.5", "1", "0.75", "0.5", "0.25", "0.1"}; @@ -306,15 +309,17 @@ SelectedStyle::SelectedStyle(bool /*layout*/) { int row = 0; - // List of units should match with Fill/Stroke dialog stroke style width list - for (GSList *l = sp_unit_get_list(SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE); l != NULL; l = l->next) { - SPUnit const *u = static_cast<SPUnit*>(l->data); + Inkscape::Util::UnitTable::UnitMap m = unit_table.units(Inkscape::Util::UNIT_TYPE_LINEAR); + Inkscape::Util::UnitTable::UnitMap::iterator iter = m.begin(); + while(iter != m.end()) { Gtk::RadioMenuItem *mi = Gtk::manage(new Gtk::RadioMenuItem(_sw_group)); - mi->add(*(new Gtk::Label(u->abbr, 0.0, 0.5))); + mi->add(*(new Gtk::Label((*iter).first, 0.0, 0.5))); _unit_mis = g_slist_append(_unit_mis, mi); - mi->signal_activate().connect(sigc::bind<SPUnitId>(sigc::mem_fun(*this, &SelectedStyle::on_popup_units), u->unit_id)); + Inkscape::Util::Unit const *u = new Inkscape::Util::Unit(unit_table.getUnit(iter->first)); + mi->signal_activate().connect(sigc::bind<Inkscape::Util::Unit>(sigc::mem_fun(*this, &SelectedStyle::on_popup_units), *u)); _popup_sw.attach(*mi, 0,1, row, row+1); row++; + ++iter; } _popup_sw.attach(*(new Gtk::SeparatorMenuItem()), 0,1, row, row+1); @@ -476,13 +481,13 @@ SelectedStyle::setDesktop(SPDesktop *desktop) this ) )); - _sw_unit = const_cast<SPUnit*>(sp_desktop_namedview(desktop)->doc_units); + _sw_unit = const_cast<Inkscape::Util::Unit*>(sp_desktop_namedview(desktop)->doc_units); // Set the doc default unit active in the units list gint length = g_slist_length(_unit_mis); for (int i = 0; i < length; i++) { Gtk::RadioMenuItem *mi = (Gtk::RadioMenuItem *) g_slist_nth_data(_unit_mis, i); - if (mi && mi->get_label() == Glib::ustring(_sw_unit->abbr)) { + if (mi && mi->get_label() == _sw_unit->abbr) { mi->set_active(); break; } @@ -926,8 +931,8 @@ SelectedStyle::on_opacity_click(GdkEventButton *event) return false; } -void SelectedStyle::on_popup_units(SPUnitId id) { - _sw_unit = (SPUnit *) &(sp_unit_get_by_id(id)); +void SelectedStyle::on_popup_units(Inkscape::Util::Unit &unit) { + _sw_unit = new Inkscape::Util::Unit(unit); update(); } @@ -935,7 +940,7 @@ void SelectedStyle::on_popup_preset(int i) { SPCSSAttr *css = sp_repr_css_attr_new (); gdouble w; if (_sw_unit) { - w = sp_units_get_pixels (_sw_presets[i], *_sw_unit); + w = Inkscape::Util::Quantity::convert(_sw_presets[i], *_sw_unit, "px"); } else { w = _sw_presets[i]; } @@ -1114,7 +1119,7 @@ SelectedStyle::update() { double w; if (_sw_unit) { - w = sp_pixels_get_units(query->stroke_width.computed, *_sw_unit); + w = Inkscape::Util::Quantity::convert(query->stroke_width.computed, "px", *_sw_unit); } else { w = query->stroke_width.computed; } @@ -1128,7 +1133,7 @@ SelectedStyle::update() { gchar *str = g_strdup_printf(_("Stroke width: %.5g%s%s"), w, - _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px", + _sw_unit? _sw_unit->abbr.c_str() : "px", (result_sw == QUERY_STYLE_MULTIPLE_AVERAGED)? _(" (averaged)") : ""); _stroke_width_place.set_tooltip_text(str); diff --git a/src/ui/widget/selected-style.h b/src/ui/widget/selected-style.h index e5bc4f883..0a907f1fd 100644 --- a/src/ui/widget/selected-style.h +++ b/src/ui/widget/selected-style.h @@ -41,12 +41,15 @@ #include <sigc++/sigc++.h> #include "rotateable.h" -#include "helper/units.h" class SPDesktop; -struct SPUnit; namespace Inkscape { + +namespace Util { + class Unit; +} + namespace UI { namespace Widget { @@ -273,11 +276,11 @@ protected: Gtk::Menu _popup_sw; Gtk::RadioButtonGroup _sw_group; GSList *_unit_mis; - void on_popup_units(SPUnitId id); + void on_popup_units(Inkscape::Util::Unit &u); void on_popup_preset(int i); Gtk::MenuItem _popup_sw_remove; - SPUnit *_sw_unit; + Inkscape::Util::Unit *_sw_unit; void *_drop[2]; bool _dropEnabled[2]; diff --git a/src/ui/widget/style-swatch.cpp b/src/ui/widget/style-swatch.cpp index aedab3fa5..682457bed 100644 --- a/src/ui/widget/style-swatch.cpp +++ b/src/ui/widget/style-swatch.cpp @@ -26,7 +26,7 @@ #include "xml/repr.h" #include "xml/sp-css-attr.h" #include "widgets/widget-sizes.h" -#include "helper/units.h" +#include "util/units.h" #include "helper/action.h" #include "helper/action-context.h" #include "preferences.h" @@ -333,7 +333,7 @@ void StyleSwatch::setStyle(SPStyle *query) if (has_stroke) { double w; if (_sw_unit) { - w = sp_pixels_get_units(query->stroke_width.computed, *_sw_unit); + w = Inkscape::Util::Quantity::convert(query->stroke_width.computed, "px", *_sw_unit); } else { w = query->stroke_width.computed; } @@ -346,7 +346,7 @@ void StyleSwatch::setStyle(SPStyle *query) { gchar *str = g_strdup_printf(_("Stroke width: %.5g%s"), w, - _sw_unit? sp_unit_get_abbreviation(_sw_unit) : "px"); + _sw_unit? _sw_unit->abbr.c_str() : "px"); _stroke_width_place.set_tooltip_text(str); g_free (str); } diff --git a/src/ui/widget/style-swatch.h b/src/ui/widget/style-swatch.h index 6bdb5e248..6da58a2dd 100644 --- a/src/ui/widget/style-swatch.h +++ b/src/ui/widget/style-swatch.h @@ -30,7 +30,6 @@ #include "button.h" #include "preferences.h" -struct SPUnit; struct SPStyle; class SPCSSAttr; @@ -43,6 +42,11 @@ class Table; } namespace Inkscape { + +namespace Util { + class Unit; +} + namespace UI { namespace Widget { @@ -93,7 +97,7 @@ private: Gtk::EventBox _stroke_width_place; Gtk::Label _stroke_width; - SPUnit *_sw_unit; + Inkscape::Util::Unit *_sw_unit; friend class ToolObserver; }; diff --git a/src/ui/widget/unit-menu.cpp b/src/ui/widget/unit-menu.cpp index 18b7bcab9..111226774 100644 --- a/src/ui/widget/unit-menu.cpp +++ b/src/ui/widget/unit-menu.cpp @@ -15,6 +15,8 @@ #include "unit-menu.h" +using Inkscape::Util::unit_table; + namespace Inkscape { namespace UI { namespace Widget { @@ -30,7 +32,7 @@ UnitMenu::~UnitMenu() { bool UnitMenu::setUnitType(UnitType unit_type) { // Expand the unit widget with unit entries from the unit table - UnitTable::UnitMap m = _unit_table.units(unit_type); + UnitTable::UnitMap m = unit_table.units(unit_type); UnitTable::UnitMap::iterator iter = m.begin(); while(iter != m.end()) { Glib::ustring text = (*iter).first; @@ -38,7 +40,7 @@ bool UnitMenu::setUnitType(UnitType unit_type) ++iter; } _type = unit_type; - set_active_text(_unit_table.primary(unit_type)); + set_active_text(unit_table.primary(unit_type)); return true; } @@ -52,7 +54,7 @@ bool UnitMenu::resetUnitType(UnitType unit_type) void UnitMenu::addUnit(Unit const& u) { - _unit_table.addUnit(u, false); + unit_table.addUnit(u, false); append(u.abbr); } @@ -60,9 +62,9 @@ Unit UnitMenu::getUnit() const { if (get_active_text() == "") { g_assert(_type != UNIT_TYPE_NONE); - return _unit_table.getUnit(_unit_table.primary(_type)); + return unit_table.getUnit(unit_table.primary(_type)); } - return _unit_table.getUnit(get_active_text()); + return unit_table.getUnit(get_active_text()); } bool UnitMenu::setUnit(Glib::ustring const & unit) @@ -112,8 +114,8 @@ double UnitMenu::getConversion(Glib::ustring const &new_unit_abbr, Glib::ustring { double old_factor = getUnit().factor; if (old_unit_abbr != "no_unit") - old_factor = _unit_table.getUnit(old_unit_abbr).factor; - Unit new_unit = _unit_table.getUnit(new_unit_abbr); + old_factor = unit_table.getUnit(old_unit_abbr).factor; + Unit new_unit = unit_table.getUnit(new_unit_abbr); // Catch the case of zero or negative unit factors (error!) if (old_factor < 0.0000001 || diff --git a/src/ui/widget/unit-menu.h b/src/ui/widget/unit-menu.h index 3104d5aef..3f4df6bf9 100644 --- a/src/ui/widget/unit-menu.h +++ b/src/ui/widget/unit-menu.h @@ -127,10 +127,7 @@ public: */ bool isRadial() const; - UnitTable &getUnitTable() {return _unit_table;} - protected: - UnitTable _unit_table; UnitType _type; }; diff --git a/src/ui/widget/unit-tracker.cpp b/src/ui/widget/unit-tracker.cpp new file mode 100644 index 000000000..5b2dc031b --- /dev/null +++ b/src/ui/widget/unit-tracker.cpp @@ -0,0 +1,263 @@ +/* + * Inkscape::UI::Widget::UnitTracker + * Simple mediator to synchronize changes to unit menus + * + * Authors: + * Jon A. Cruz <jon@joncruz.org> + * Matthew Petroff <matthew@mpetroff.net> + * + * Copyright (C) 2007 Jon A. Cruz + * Copyright (C) 2013 Matthew Petroff + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#include "unit-tracker.h" +#include "ege-select-one-action.h" + +#define COLUMN_STRING 0 + +using Inkscape::Util::UnitTable; +using Inkscape::Util::unit_table; + +namespace Inkscape { +namespace UI { +namespace Widget { + +UnitTracker::UnitTracker(UnitType unit_type) : + _active(0), + _isUpdating(false), + _activeUnitInitialized(false), + _store(0), + _unitList(0), + _actionList(0), + _adjList(0), + _priorValues() +{ + _store = gtk_list_store_new(1, G_TYPE_STRING); + + GtkTreeIter iter; + UnitTable::UnitMap m = unit_table.units(unit_type); + UnitTable::UnitMap::iterator m_iter = m.begin(); + while(m_iter != m.end()) { + Glib::ustring text = (*m_iter).first; + m_iter++; + gtk_list_store_append(_store, &iter); + gtk_list_store_set(_store, &iter, COLUMN_STRING, text.c_str(), -1); + } + gint count = gtk_tree_model_iter_n_children(GTK_TREE_MODEL(_store), 0); + if ((count > 0) && (_active > count)) { + _setActive(--count); + } else { + _setActive(_active); + } +} + +UnitTracker::~UnitTracker() +{ + // Unhook weak references to GtkActions + while (_actionList) { + g_signal_handlers_disconnect_by_func(G_OBJECT(_actionList->data), (gpointer) _unitChangedCB, this); + g_object_weak_unref(G_OBJECT(_actionList->data), _actionFinalizedCB, this); + _actionList = g_slist_delete_link(_actionList, _actionList); + } + + // Unhook weak references to GtkAdjustments + while (_adjList) { + g_object_weak_unref(G_OBJECT(_adjList->data), _adjustmentFinalizedCB, this); + _adjList = g_slist_delete_link(_adjList, _adjList); + } +} + +bool UnitTracker::isUpdating() const +{ + return _isUpdating; +} + +Inkscape::Util::Unit UnitTracker::getActiveUnit() const +{ + return _activeUnit; +} + +void UnitTracker::setActiveUnit(Inkscape::Util::Unit const *unit) +{ + if (unit) { + GtkTreeIter iter; + int index = 0; + gboolean found = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(_store), &iter); + while (found) { + gchar *storedUnit = 0; + gtk_tree_model_get(GTK_TREE_MODEL(_store), &iter, COLUMN_STRING, &storedUnit, -1); + if (storedUnit && (!unit->abbr.compare(storedUnit))) { + _setActive(index); + break; + } + + found = gtk_tree_model_iter_next(GTK_TREE_MODEL(_store), &iter); + index++; + } + } +} + +void UnitTracker::setActiveUnitByAbbr(gchar const *abbr) +{ + Inkscape::Util::Unit u = unit_table.getUnit(abbr); + setActiveUnit(&u); +} + +void UnitTracker::addAdjustment(GtkAdjustment *adj) +{ + if (!g_slist_find(_adjList, adj)) { + g_object_weak_ref(G_OBJECT(adj), _adjustmentFinalizedCB, this); + _adjList = g_slist_append(_adjList, adj); + } +} + +void UnitTracker::addUnit(Inkscape::Util::Unit const &u) +{ + GtkTreeIter iter; + gtk_list_store_append(_store, &iter); + gtk_list_store_set(_store, &iter, COLUMN_STRING, u.abbr.c_str(), -1); +} + +void UnitTracker::setFullVal(GtkAdjustment *adj, gdouble val) +{ + _priorValues[adj] = val; +} + +GtkAction *UnitTracker::createAction(gchar const *name, gchar const *label, gchar const *tooltip) +{ + EgeSelectOneAction *act1 = ege_select_one_action_new(name, label, tooltip, NULL, GTK_TREE_MODEL(_store)); + ege_select_one_action_set_label_column(act1, COLUMN_STRING); + if (_active) { + ege_select_one_action_set_active(act1, _active); + } + + ege_select_one_action_set_appearance(act1, "minimal"); + g_object_weak_ref(G_OBJECT(act1), _actionFinalizedCB, this); + g_signal_connect(G_OBJECT(act1), "changed", G_CALLBACK(_unitChangedCB), this); + _actionList = g_slist_append(_actionList, act1); + + return GTK_ACTION(act1); +} + +void UnitTracker::_unitChangedCB(GtkAction *action, gpointer data) +{ + if (action && data) { + EgeSelectOneAction *act = EGE_SELECT_ONE_ACTION(action); + gint active = ege_select_one_action_get_active(act); + UnitTracker *self = reinterpret_cast<UnitTracker *>(data); + self->_setActive(active); + } +} + +void UnitTracker::_actionFinalizedCB(gpointer data, GObject *where_the_object_was) +{ + if (data && where_the_object_was) { + UnitTracker *self = reinterpret_cast<UnitTracker *>(data); + self->_actionFinalized(where_the_object_was); + } +} + +void UnitTracker::_adjustmentFinalizedCB(gpointer data, GObject *where_the_object_was) +{ + if (data && where_the_object_was) { + UnitTracker *self = reinterpret_cast<UnitTracker *>(data); + self->_adjustmentFinalized(where_the_object_was); + } +} + +void UnitTracker::_actionFinalized(GObject *where_the_object_was) +{ + GSList *target = g_slist_find(_actionList, where_the_object_was); + if (target) { + _actionList = g_slist_remove(_actionList, where_the_object_was); + } else { + g_warning("Received a finalization callback for unknown object %p", where_the_object_was); + } +} + +void UnitTracker::_adjustmentFinalized(GObject *where_the_object_was) +{ + GSList *target = g_slist_find(_adjList, where_the_object_was); + if (target) { + _adjList = g_slist_remove(_adjList, where_the_object_was); + } else { + g_warning("Received a finalization callback for unknown object %p", where_the_object_was); + } +} + +void UnitTracker::_setActive(gint active) +{ + if ( active != _active || !_activeUnitInitialized ) { + gint oldActive = _active; + + GtkTreeIter iter; + gboolean found = gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(_store), &iter, NULL, oldActive); + if (found) { + gchar *abbr; + gtk_tree_model_get(GTK_TREE_MODEL(_store), &iter, COLUMN_STRING, &abbr, -1); + Inkscape::Util::Unit unit = unit_table.getUnit(abbr); + + found = gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(_store), &iter, NULL, active); + if (found) { + gchar *newAbbr; + gtk_tree_model_get(GTK_TREE_MODEL(_store), &iter, COLUMN_STRING, &newAbbr, -1); + Inkscape::Util::Unit newUnit = unit_table.getUnit(newAbbr); + _activeUnit = newUnit; + + if (_adjList) { + _fixupAdjustments(unit, newUnit); + } + + } else { + g_warning("Did not find new unit"); + } + } else { + g_warning("Did not find old unit"); + } + + _active = active; + + for ( GSList *cur = _actionList ; cur ; cur = g_slist_next(cur) ) { + if (IS_EGE_SELECT_ONE_ACTION(cur->data)) { + EgeSelectOneAction *act = EGE_SELECT_ONE_ACTION(cur->data); + ege_select_one_action_set_active(act, active); + } + } + + _activeUnitInitialized = true; + } +} + +void UnitTracker::_fixupAdjustments(Inkscape::Util::Unit const oldUnit, Inkscape::Util::Unit const newUnit) +{ + _isUpdating = true; + for ( GSList *cur = _adjList ; cur ; cur = g_slist_next(cur) ) { + GtkAdjustment *adj = GTK_ADJUSTMENT(cur->data); + gdouble oldVal = gtk_adjustment_get_value(adj); + gdouble val = oldVal; + + if ( (oldUnit.type != Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) + && (newUnit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) ) + { + val = newUnit.factor * 100; + _priorValues[adj] = Inkscape::Util::Quantity::convert(oldVal, oldUnit, "px"); + } else if ( (oldUnit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) + && (newUnit.type != Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) ) + { + if (_priorValues.find(adj) != _priorValues.end()) { + val = Inkscape::Util::Quantity::convert(_priorValues[adj], "px", newUnit); + } + } else { + val = Inkscape::Util::Quantity::convert(oldVal, oldUnit, newUnit); + } + + gtk_adjustment_set_value(adj, val); + } + _isUpdating = false; +} + +} // namespace Widget +} // namespace UI +} // namespace Inkscape diff --git a/src/ui/widget/unit-tracker.h b/src/ui/widget/unit-tracker.h new file mode 100644 index 000000000..19559ae1c --- /dev/null +++ b/src/ui/widget/unit-tracker.h @@ -0,0 +1,74 @@ +/* + * Inkscape::UI::Widget::UnitTracker + * Simple mediator to synchronize changes to unit menus + * + * Authors: + * Jon A. Cruz <jon@joncruz.org> + * Matthew Petroff <matthew@mpetroff.net> + * + * Copyright (C) 2007 Jon A. Cruz + * Copyright (C) 2013 Matthew Petroff + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +#ifndef INKSCAPE_UI_WIDGET_UNIT_TRACKER_H +#define INKSCAPE_UI_WIDGET_UNIT_TRACKER_H + +#include <map> +#include <gtk/gtk.h> + +#include "util/units.h" + +using Inkscape::Util::Unit; +using Inkscape::Util::UnitType; + +namespace Inkscape { +namespace UI { +namespace Widget { + +class UnitTracker { +public: + UnitTracker(UnitType unit_type); + virtual ~UnitTracker(); + + bool isUpdating() const; + + void setActiveUnit(Inkscape::Util::Unit const *unit); + void setActiveUnitByAbbr(gchar const *abbr); + Inkscape::Util::Unit getActiveUnit() const; + + void addUnit(Inkscape::Util::Unit const &u); + void addAdjustment(GtkAdjustment *adj); + void setFullVal(GtkAdjustment *adj, gdouble val); + + GtkAction *createAction(gchar const *name, gchar const *label, gchar const *tooltip); + +protected: + UnitType _type; + +private: + static void _unitChangedCB(GtkAction *action, gpointer data); + static void _actionFinalizedCB(gpointer data, GObject *where_the_object_was); + static void _adjustmentFinalizedCB(gpointer data, GObject *where_the_object_was); + void _setActive(gint index); + void _fixupAdjustments(Inkscape::Util::Unit const oldUnit, Inkscape::Util::Unit const newUnit); + void _actionFinalized(GObject *where_the_object_was); + void _adjustmentFinalized(GObject *where_the_object_was); + + gint _active; + bool _isUpdating; + Inkscape::Util::Unit _activeUnit; + bool _activeUnitInitialized; + GtkListStore *_store; + GSList *_unitList; + GSList *_actionList; + GSList *_adjList; + std::map <GtkAdjustment *, gdouble> _priorValues; +}; + +} // namespace Widget +} // namespace UI +} // namespace Inkscape + +#endif // INKSCAPE_UI_WIDGET_UNIT_TRACKER_H diff --git a/src/unicoderange.cpp b/src/unicoderange.cpp index 67239d0d2..803e1a884 100644 --- a/src/unicoderange.cpp +++ b/src/unicoderange.cpp @@ -4,124 +4,124 @@ #include <string.h> static unsigned int hex2int(char* s){ - int res=0; - int i=0, mul=1; - while(s[i+1]!='\0') i++; + int res=0; + int i=0, mul=1; + while(s[i+1]!='\0') i++; - while(i>=0){ - if (s[i] >= 'A' && s[i] <= 'F') res += mul * (s[i]-'A'+10); - if (s[i] >= 'a' && s[i] <= 'f') res += mul * (s[i]-'a'+10); - if (s[i] >= '0' && s[i] <= '9') res += mul * (s[i]-'0'); - i--; - mul*=16; - } - return res; + while(i>=0){ + if (s[i] >= 'A' && s[i] <= 'F') res += mul * (s[i]-'A'+10); + if (s[i] >= 'a' && s[i] <= 'f') res += mul * (s[i]-'a'+10); + if (s[i] >= '0' && s[i] <= '9') res += mul * (s[i]-'0'); + i--; + mul*=16; + } + return res; } UnicodeRange::UnicodeRange(const gchar* value){ - if (!value) return; - gchar* val = (gchar*) value; - while(val[0] != '\0'){ - if (val[0]=='U' && val[1]=='+'){ - val += add_range(val+2); - } else { - this->unichars.push_back(g_utf8_get_char(&val[0])); - val++; - } - //skip spaces or commas - while(val[0]==' ' || val[0]==',') val++; - } + if (!value) return; + gchar* val = (gchar*) value; + while(val[0] != '\0'){ + if (val[0]=='U' && val[1]=='+'){ + val += add_range(val+2); + } else { + this->unichars.push_back(g_utf8_get_char(&val[0])); + val++; + } + //skip spaces or commas + while(val[0]==' ' || val[0]==',') val++; + } } -int -UnicodeRange::add_range(gchar* val){ - Urange r; - int i=0, count=0; - while(val[i]!='\0' && val[i]!='-' && val[i]!=' ' && val[i]!=','){ +int UnicodeRange::add_range(gchar* val){ + Urange r; + int i=0, count=0; + while(val[i]!='\0' && val[i]!='-' && val[i]!=' ' && val[i]!=','){ i++; - } + } r.start = (gchar*) malloc((i+1)*sizeof(gchar*)); - strncpy(r.start, val, i); - r.start[i] = '\0'; - val+=i; - count+=i; - i=0; - if (val[0]=='-'){ - val++; - while(val[i]!='\0' && val[i]!='-' && val[i]!=' ' && val[i]!=',') i++; - r.end = (gchar*) malloc((i+1)*sizeof(gchar*)); - strncpy(r.end, val, i); - r.end[i] = '\0'; - // val+=i; - count+=i; - } else { - r.end=NULL; - } - this->range.push_back(r); - return count+1; + strncpy(r.start, val, i); + r.start[i] = '\0'; + val+=i; + count+=i; + i=0; + if (val[0]=='-'){ + val++; + while(val[i]!='\0' && val[i]!='-' && val[i]!=' ' && val[i]!=',') i++; + r.end = (gchar*) malloc((i+1)*sizeof(gchar*)); + strncpy(r.end, val, i); + r.end[i] = '\0'; + // val+=i; + count+=i; + } else { + r.end=NULL; + } + this->range.push_back(r); + return count+1; } bool UnicodeRange::contains(gchar unicode){ - for(unsigned int i=0;i<this->unichars.size();i++){ - if ((gunichar) unicode == this->unichars[i]) return true; - } + for(unsigned int i=0;i<this->unichars.size();i++){ + if (static_cast<gunichar>(unicode) == this->unichars[i]){ + return true; + } + } - unsigned int unival; - unival = g_utf8_get_char (&unicode); - char uni[9] = "00000000"; - uni[8]= '\0'; - unsigned char val; - for (unsigned int i=7; unival>0; i--){ - val = unival & 0xf; - unival = unival >> 4; - if (val < 10) uni[i] = '0' + val; - else uni[i] = 'A'+ val - 10; - } + unsigned int unival; + unival = g_utf8_get_char (&unicode); + char uni[9] = "00000000"; + uni[8]= '\0'; + for (unsigned int i=7; unival>0; i--){ + unsigned char val = unival & 0xf; + unival = unival >> 4; + if (val < 10) uni[i] = '0' + val; + else uni[i] = 'A'+ val - 10; + } - bool found; - for(unsigned int i=0;i<this->range.size();i++){ - Urange r = this->range[i]; - if (r.end){ - if (unival >= hex2int(r.start) && unival <= hex2int(r.end)) return true; - } else { - found = true; + bool found; + for(unsigned int i=0;i<this->range.size();i++){ + Urange r = this->range[i]; + if (r.end){ + if (unival >= hex2int(r.start) && unival <= hex2int(r.end)) return true; + } else { + found = true; - int p=0; - while (r.start[p]!='\0') p++; - p--; + int p=0; + while (r.start[p]!='\0') p++; + p--; - for (int pos=8;p>=0;pos--,p--){ - if (uni[pos]!='?' && uni[pos]!=r.start[p]) found = false; - } - if (found) return true; - } - } - return false; + for (int pos=8;p>=0;pos--,p--){ + if (uni[pos]!='?' && uni[pos]!=r.start[p]) found = false; + } + if (found) return true; + } + } + return false; } Glib::ustring UnicodeRange::attribute_string(){ - Glib::ustring result; - unsigned int i; - for(i=0; i<this->unichars.size(); i++){ - result += this->unichars[i]; - if (i!=this->unichars.size()-1) result += ","; - } + Glib::ustring result; + unsigned int i; + for(i=0; i<this->unichars.size(); i++){ + result += this->unichars[i]; + if (i!=this->unichars.size()-1) result += ","; + } - for(i=0; i<this->range.size(); i++){ - result += "U+" + Glib::ustring(this->range[i].start); - if (this->range[i].end) result += "-" + Glib::ustring(this->range[i].end); - if (i!=this->range.size()-1) result += ", "; - } + for(i=0; i<this->range.size(); i++){ + result += "U+" + Glib::ustring(this->range[i].start); + if (this->range[i].end) result += "-" + Glib::ustring(this->range[i].end); + if (i!=this->range.size()-1) result += ", "; + } - return result; + return result; } gunichar UnicodeRange::sample_glyph(){ - //This could be better - if (!unichars.empty()) - return unichars[0]; - if (!range.empty()) - return hex2int(range[0].start); - return (gunichar) ' '; + //This could be better + if (!unichars.empty()) + return unichars[0]; + if (!range.empty()) + return hex2int(range[0].start); + return (gunichar) ' '; } diff --git a/src/unit-constants.h b/src/unit-constants.h deleted file mode 100644 index c56c0a6e8..000000000 --- a/src/unit-constants.h +++ /dev/null @@ -1,47 +0,0 @@ -#ifndef INKSCAPE_UNIT_CONSTANTS_H -#define INKSCAPE_UNIT_CONSTANTS_H - -// 72 points per inch divided by the SVG-recommended value of 90 pixels per inch for computer screen -// For now it is constant throughout Inkscape, later we may make it changeable. -// Ideally this should be the only place to change it, but this is not guaranteed (be careful!) -#define DEVICESCALE 0.8 - -#define PT_PER_IN 72.0 -#define PT_PER_PX DEVICESCALE -#define PT_PER_PC 12.0 -#define PX_PER_PT (1/DEVICESCALE) -#define PX_PER_PC (PX_PER_PT * PT_PER_PC) -#define PX_PER_IN (PT_PER_IN / PT_PER_PX) -#define PC_PER_IN (PT_PER_IN / PT_PER_PC) -#define M_PER_IN 0.0254 -#define M_PER_PX (M_PER_IN / PX_PER_IN) -#define CM_PER_IN 2.54 -#define MM_PER_IN 25.4 -#define MM_PER_MM 1.0 -#define MM_PER_CM 10.0 -#define MM_PER_M 1000.0 -#define IN_PER_PT (1 / PT_PER_IN) -#define IN_PER_PX (1 / PX_PER_IN) -#define IN_PER_CM (1 / CM_PER_IN) -#define IN_PER_MM (1 / MM_PER_IN) -#define IN_PER_FT 12.0 -#define FT_PER_IN (1 / IN_PER_FT) -#define PT_PER_CM (PT_PER_IN / CM_PER_IN) -#define PX_PER_CM (PX_PER_IN / CM_PER_IN) -#define M_PER_PT (M_PER_IN / PT_PER_IN) -#define PT_PER_M (PT_PER_IN / M_PER_IN) -#define PX_PER_M (PX_PER_IN / M_PER_IN) -#define CM_PER_PT (CM_PER_IN / PT_PER_IN) -#define CM_PER_PX (CM_PER_IN / PX_PER_IN) -#define MM_PER_PT (MM_PER_IN / PT_PER_IN) -#define PT_PER_MM (PT_PER_IN / MM_PER_IN) -#define PX_PER_MM (PX_PER_IN / MM_PER_IN) -#define MM_PER_PX (MM_PER_IN / PX_PER_IN) -#define PX_PER_FT (PX_PER_IN / FT_PER_IN) -#define PT_PER_PT 1.0 -#define PC_PER_PC 1.0 -#define IN_PER_IN 1.0 -#define PX_PER_PX 1.0 -#define FT_PER_FT 1.0 - -#endif /* !INKSCAPE_UNIT_CONSTANTS_H */ diff --git a/src/util/expression-evaluator.cpp b/src/util/expression-evaluator.cpp index 3e1bab6bc..dc59c67f4 100644 --- a/src/util/expression-evaluator.cpp +++ b/src/util/expression-evaluator.cpp @@ -29,6 +29,8 @@ #include <string.h> +using Inkscape::Util::unit_table; + namespace Inkscape { namespace Util { @@ -77,8 +79,6 @@ typedef struct */ static bool unitresolverproc (const gchar* identifier, GimpEevlQuantity *result, Unit* unit) { - static UnitTable unit_table; - if (!unit) { result->value = 1; result->dimension = 1; diff --git a/src/util/units.cpp b/src/util/units.cpp index d1275b082..7bc910fcc 100644 --- a/src/util/units.cpp +++ b/src/util/units.cpp @@ -1,12 +1,26 @@ +/* + * Inkscape Units + * + * Authors: + * Matthew Petroff <matthew@mpetroff.net> + * + * Copyright (C) 2013 Matthew Petroff + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + #ifdef HAVE_CONFIG_H # include <config.h> #endif #include <cmath> #include <cerrno> +#include <iomanip> #include <glib.h> +#include <glibmm/regex.h> +#include <glibmm/fileutils.h> +#include <glibmm/markup.h> -#include "io/simple-sax.h" #include "util/units.h" #include "path-prefix.h" #include "streq.h" @@ -47,27 +61,31 @@ std::map<Glib::ustring, Inkscape::Util::UnitType> &getTypeMappings() namespace Inkscape { namespace Util { -class UnitsSAXHandler : public Inkscape::IO::FlatSaxHandler +class UnitParser : public Glib::Markup::Parser { public: - UnitsSAXHandler(UnitTable *table); - virtual ~UnitsSAXHandler() {} + typedef Glib::Markup::Parser::AttributeMap AttrMap; + typedef Glib::Markup::ParseContext Ctx; + + UnitParser(UnitTable *table); + virtual ~UnitParser() {} - virtual void _startElement(xmlChar const *name, xmlChar const **attrs); - virtual void _endElement(xmlChar const *name); +protected: + virtual void on_start_element(Ctx &ctx, Glib::ustring const &name, AttrMap const &attrs); + virtual void on_end_element(Ctx &ctx, Glib::ustring const &name); + virtual void on_text(Ctx &ctx, Glib::ustring const &text); +public: UnitTable *tbl; bool primary; bool skip; Unit unit; }; -UnitsSAXHandler::UnitsSAXHandler(UnitTable *table) : - FlatSaxHandler(), +UnitParser::UnitParser(UnitTable *table) : tbl(table), - primary(0), - skip(0), - unit() + primary(false), + skip(false) { } @@ -103,7 +121,8 @@ void Unit::clear() *this = Unit(); } -int Unit::defaultDigits() const { +int Unit::defaultDigits() const +{ int factor_digits = int(log10(factor)); if (factor_digits < 0) { g_warning("factor = %f, factor_digits = %d", factor, factor_digits); @@ -113,30 +132,87 @@ int Unit::defaultDigits() const { return factor_digits; } +bool Unit::compatibleWith(const Unit &u) const +{ + // Percentages + if (type == UNIT_TYPE_DIMENSIONLESS || u.type == UNIT_TYPE_DIMENSIONLESS) { + return true; + } + + // Other units with same type + if (type == u.type) { + return true; + } + + // Different, incompatible types + return false; +} +bool Unit::compatibleWith(const Glib::ustring u) const +{ + static UnitTable unit_table; + return compatibleWith(unit_table.getUnit(u)); +} + +bool operator== (const Unit &u1, const Unit &u2) +{ + return (u1.type == u2.type && u1.name.compare(u2.name) == 0); +} + +bool operator!= (const Unit &u1, const Unit &u2) +{ + return !(u1 == u2); +} + +int Unit::svgUnit() const +{ + if (!abbr.compare("px")) + return 1; + if (!abbr.compare("pt")) + return 2; + if (!abbr.compare("pc")) + return 3; + if (!abbr.compare("mm")) + return 4; + if (!abbr.compare("cm")) + return 5; + if (!abbr.compare("in")) + return 6; + if (!abbr.compare("ft")) + return 7; + if (!abbr.compare("em")) + return 8; + if (!abbr.compare("ex")) + return 9; + if (!abbr.compare("%")) + return 10; + return 0; +} + UnitTable::UnitTable() { - // if we swich to the xml file, don't forget to force locale to 'C' - // load("share/ui/units.xml"); // <-- Buggy - gchar *filename = g_build_filename(INKSCAPE_UIDIR, "units.txt", NULL); - loadText(filename); + gchar *filename = g_build_filename(INKSCAPE_UIDIR, "units.xml", NULL); + load(filename); g_free(filename); } -UnitTable::~UnitTable() { +UnitTable::~UnitTable() +{ for (UnitMap::iterator iter = _unit_map.begin(); iter != _unit_map.end(); ++iter) { delete (*iter).second; } } -void UnitTable::addUnit(Unit const &u, bool primary) { +void UnitTable::addUnit(Unit const &u, bool primary) +{ _unit_map[u.abbr] = new Unit(u); if (primary) { _primary_unit[u.type] = u.abbr; } } -Unit UnitTable::getUnit(Glib::ustring const &unit_abbr) const { +Unit UnitTable::getUnit(Glib::ustring const &unit_abbr) const +{ UnitMap::const_iterator iter = _unit_map.find(unit_abbr); if (iter != _unit_map.end()) { return *((*iter).second); @@ -145,7 +221,29 @@ Unit UnitTable::getUnit(Glib::ustring const &unit_abbr) const { } } -bool UnitTable::deleteUnit(Unit const &u) { +Quantity UnitTable::getQuantity(Glib::ustring const& q) const +{ + Glib::MatchInfo match_info; + + // Extract value + double value = 0; + Glib::RefPtr<Glib::Regex> value_regex = Glib::Regex::create("[-+]*[\\d+]*\\.*[\\d+]*[eE]*[-+]*\\d+"); + if (value_regex->match(q, match_info)) { + value = atof(match_info.fetch(0).c_str()); + } + + // Extract unit abbreviation + Glib::ustring abbr; + Glib::RefPtr<Glib::Regex> unit_regex = Glib::Regex::create("[A-z%]+"); + if (unit_regex->match(q, match_info)) { + abbr = match_info.fetch(0); + } + + return Quantity(value, abbr); +} + +bool UnitTable::deleteUnit(Unit const &u) +{ bool deleted = false; // Cannot delete the primary unit type since it's // used for conversions @@ -183,172 +281,148 @@ Glib::ustring UnitTable::primary(UnitType type) const return _primary_unit[type]; } -bool UnitTable::loadText(Glib::ustring const &filename) -{ - char buf[BUFSIZE] = {0}; - - // Open file for reading - FILE * f = fopen(filename.c_str(), "r"); - if (f == NULL) { - g_warning("Could not open units file '%s': %s\n", - filename.c_str(), strerror(errno)); - g_warning("* INKSCAPE_DATADIR is: '%s'\n", INKSCAPE_DATADIR); - g_warning("* INKSCAPE_UIDIR is: '%s'\n", INKSCAPE_UIDIR); - return false; - } - - /** @todo fix this to use C++ means and explicit locale to avoid need to change. */ - // bypass current locale in order to make - // sscanf read floats with '.' as a separator - // set locale to 'C' and keep old locale - char *old_locale = g_strdup(setlocale(LC_NUMERIC, NULL)); - setlocale (LC_NUMERIC, "C"); - - while (fgets(buf, BUFSIZE, f) != NULL) { - char name[BUFSIZE] = {0}; - char plural[BUFSIZE] = {0}; - char abbr[BUFSIZE] = {0}; - char type[BUFSIZE] = {0}; - double factor = 0.0; - char primary[BUFSIZE] = {0}; - - int nchars = 0; - // locale is set to C, scanning %lf should work _everywhere_ - /** @todo address %15n, which causes a warning: */ - if (sscanf(buf, "%15s %15s %15s %15s %8lf %1s %15n", - name, plural, abbr, type, &factor, primary, &nchars) != 6) - { - // Skip the line - doesn't appear to be valid - continue; - } - - g_assert(nchars < BUFSIZE); - - char *desc = buf; - desc += nchars; // buf is now only the description - - // insert into _unit_map - if (getTypeMappings().find(type) == getTypeMappings().end()) - { - g_warning("Skipping unknown unit type '%s' for %s.\n", type, name); - continue; - } - UnitType utype = getTypeMappings()[type]; - - Unit u(utype, factor, name, plural, abbr, desc); - - // if primary is 'Y', list this unit as a primary - addUnit(u, (primary[0]=='Y' || primary[0]=='y')); - } - - // set back the saved locale - setlocale (LC_NUMERIC, old_locale); - g_free (old_locale); - - // close file - if (fclose(f) != 0) { - g_warning("Error closing units file '%s': %s\n", filename.c_str(), strerror(errno)); - return false; - } - - return true; -} - -bool UnitTable::load(Glib::ustring const &filename) { - UnitsSAXHandler handler(this); +bool UnitTable::load(std::string const &filename) { + UnitParser uparser(this); + Glib::Markup::ParseContext ctx(uparser); - int result = handler.parseFile( filename.c_str() ); - if ( result != 0 ) { - // perhaps - g_warning("Problem loading units file '%s': %d\n", filename.c_str(), result); + try { + Glib::ustring unitfile = Glib::file_get_contents(filename); + ctx.parse(unitfile); + ctx.end_parse(); + } catch (Glib::MarkupError const &e) { + g_warning("Problem loading units file '%s': %s\n", filename.c_str(), e.what().c_str()); return false; } - return true; } -bool UnitTable::save(Glib::ustring const &filename) { +bool UnitTable::save(std::string const &filename) { - // open file for writing - FILE *f = fopen(filename.c_str(), "w"); - if (f == NULL) { - g_warning("Could not open units file '%s': %s\n", filename.c_str(), strerror(errno)); - return false; - } - - // write out header - // foreach item in _unit_map, sorted alphabetically by type and then unit name - // sprintf a line - // name - // name_plural - // abbr - // type - // factor - // PRI - if listed in primary unit table, 'Y', else 'N' - // description - // write line to the file - - // close file - if (fclose(f) != 0) { - g_warning("Error closing units file '%s': %s\n", filename.c_str(), strerror(errno)); - return false; - } + g_warning("UnitTable::save(): not implemented"); return true; } +Inkscape::Util::UnitTable unit_table; -void UnitsSAXHandler::_startElement(xmlChar const *name, xmlChar const **attrs) +void UnitParser::on_start_element(Ctx &ctx, Glib::ustring const &name, AttrMap const &attrs) { - if (streq("unit", (char const *)name)) { + if (name == "unit") { // reset for next use unit.clear(); primary = false; skip = false; - for ( int i = 0; attrs[i]; i += 2 ) { - char const *const key = (char const *)attrs[i]; - if (streq("type", key)) { - char const *type = (char const*)attrs[i+1]; - if (getTypeMappings().find(type) != getTypeMappings().end()) - { - unit.type = getTypeMappings()[type]; - } else { - g_warning("Skipping unknown unit type '%s' for %s.\n", type, name); - skip = true; - } - } else if (streq("pri", key)) { - primary = attrs[i+1][0] == 'y' || attrs[i+1][0] == 'Y'; + AttrMap::const_iterator f; + if ((f = attrs.find("type")) != attrs.end()) { + Glib::ustring type = f->second; + if (getTypeMappings().find(type) != getTypeMappings().end()) { + unit.type = getTypeMappings()[type]; + } else { + g_warning("Skipping unknown unit type '%s'.\n", type.c_str()); + skip = true; } } + if ((f = attrs.find("pri")) != attrs.end()) { + primary = (f->second[0] == 'y' || f->second[0] == 'Y'); + } } } -void UnitsSAXHandler::_endElement(xmlChar const *xname) +void UnitParser::on_text(Ctx &ctx, Glib::ustring const &text) { - char const *const name = (char const *) xname; - if (streq("name", name)) { - unit.name = data; - } else if (streq("plural", name)) { - unit.name_plural = data; - } else if (streq("abbr", name)) { - unit.abbr = data; - } else if (streq("factor", name)) { + Glib::ustring element = ctx.get_element(); + if (element == "name") { + unit.name = text; + } else if (element == "plural") { + unit.name_plural = text; + } else if (element == "abbr") { + unit.abbr = text; + } else if (element == "factor") { // TODO make sure we use the right conversion - unit.factor = atol(data.c_str()); - } else if (streq("description", name)) { - unit.description = data; - } else if (streq("unit", name)) { - if (!skip) { - tbl->addUnit(unit, primary); - } + unit.factor = g_ascii_strtod(text.c_str(), NULL); + } else if (element == "description") { + unit.description = text; + } +} + +void UnitParser::on_end_element(Ctx &ctx, Glib::ustring const &name) +{ + if (name == "unit" && !skip) { + tbl->addUnit(unit, primary); } } +Quantity::Quantity(double q, const Unit &u) +{ + unit = new Unit(u); + quantity = q; +} +Quantity::Quantity(double q, const Glib::ustring u) +{ + unit = new Unit(unit_table.getUnit(u)); + quantity = q; +} + +bool Quantity::compatibleWith(const Unit &u) const +{ + return unit->compatibleWith(u); +} +bool Quantity::compatibleWith(const Glib::ustring u) const +{ + return compatibleWith(unit_table.getUnit(u)); +} + +double Quantity::value(const Unit &u) const +{ + return convert(quantity, *unit, u); +} +double Quantity::value(const Glib::ustring u) const +{ + return value(unit_table.getUnit(u)); +} + +Glib::ustring Quantity::string(const Unit &u) const { + return Glib::ustring::format(std::fixed, std::setprecision(2), value(u)) + " " + unit->abbr; +} +Glib::ustring Quantity::string(const Glib::ustring u) const { + return string(unit_table.getUnit(u)); +} +Glib::ustring Quantity::string() const { + return string(*unit); +} + +double Quantity::convert(const double from_dist, const Unit &from, const Unit &to) +{ + // Percentage + if (to.type == UNIT_TYPE_DIMENSIONLESS) { + return from_dist * to.factor; + } + + // Incompatible units + if (from.type != to.type) { + return -1; + } + + // Compatible units + return from_dist * from.factor / to.factor; +} +double Quantity::convert(const double from_dist, const Glib::ustring from, const Unit &to) +{ + return convert(from_dist, unit_table.getUnit(from), to); +} +double Quantity::convert(const double from_dist, const Unit &from, const Glib::ustring to) +{ + return convert(from_dist, from, unit_table.getUnit(to)); +} +double Quantity::convert(const double from_dist, const Glib::ustring from, const Glib::ustring to) +{ + return convert(from_dist, unit_table.getUnit(from), unit_table.getUnit(to)); +} + } // namespace Util } // namespace Inkscape - /* Local Variables: mode:c++ diff --git a/src/util/units.h b/src/util/units.h index 40c89a4a0..bb202b96a 100644 --- a/src/util/units.h +++ b/src/util/units.h @@ -1,4 +1,15 @@ /* + * Inkscape Units + * + * Authors: + * Matthew Petroff <matthew@mpetroff.net> + * + * Copyright (C) 2013 Matthew Petroff + * + * Released under GNU GPL, read the file 'COPYING' for more information + */ + +/* This is a rough draft of a global 'units' thingee, to allow dialogs and the ruler to share info about unit systems... Dunno if this is the right kind of object though, so we may have to redo this or shift things @@ -54,12 +65,53 @@ class Unit { */ int defaultDigits() const; + /** Checks if a unit is compatible with the specified unit. */ + bool compatibleWith(const Unit &u) const; + bool compatibleWith(const Glib::ustring) const; + UnitType type; double factor; Glib::ustring name; Glib::ustring name_plural; Glib::ustring abbr; Glib::ustring description; + + /** Check if units are equal. */ + friend bool operator== (const Unit &u1, const Unit &u2); + /** Check if units are not equal. */ + friend bool operator!= (const Unit &u1, const Unit &u2); + + /** Get SVG unit. */ + int svgUnit() const; +}; + +class Quantity { +public: + const Unit *unit; + double quantity; + + /** Initialize a quantity. */ + Quantity(double q, const Unit &u); // constructor + Quantity(double q, const Glib::ustring u); // constructor + + /** Checks if a quantity is compatible with the specified unit. */ + bool compatibleWith(const Unit &u) const; + bool compatibleWith(const Glib::ustring u) const; + + /** Return the quantity's value in the specified unit. */ + double value(const Unit &u) const; + double value(const Glib::ustring u) const; + + /** Return a printable string of the value in the specified unit. */ + Glib::ustring string(const Unit &u) const; + Glib::ustring string(const Glib::ustring u) const; + Glib::ustring string() const; + + /** Convert distances. */ + static double convert(const double from_dist, const Unit &from, const Unit &to); + static double convert(const double from_dist, const Glib::ustring from, const Unit &to); + static double convert(const double from_dist, const Unit &from, const Glib::ustring to); + static double convert(const double from_dist, const Glib::ustring from, const Glib::ustring to); }; class UnitTable { @@ -75,13 +127,16 @@ class UnitTable { typedef std::map<Glib::ustring, Unit*> UnitMap; /** Add a new unit to the table */ - void addUnit(Unit const& u, bool primary); + void addUnit(Unit const &u, bool primary); /** Retrieve a given unit based on its string identifier */ - Unit getUnit(Glib::ustring const& name) const; + Unit getUnit(Glib::ustring const &name) const; + + /** Retrieve a quantity based on its string identifier */ + Quantity getQuantity(Glib::ustring const &q) const; /** Remove a unit definition from the given unit type table */ - bool deleteUnit(Unit const& u); + bool deleteUnit(Unit const &u); /** Returns true if the given string 'name' is a valid unit in the table */ bool hasUnit(Glib::ustring const &name) const; @@ -96,19 +151,17 @@ class UnitTable { void setScale(); - bool load(Glib::ustring const &filename); - - /** Loads units from a text file. + /** Load units from an XML file. * - * loadText loads and merges the contents of the given file into the UnitTable, + * Loads and merges the contents of the given file into the UnitTable, * possibly overwriting existing unit definitions. * * @param filename file to be loaded */ - bool loadText(Glib::ustring const &filename); + bool load(std::string const &filename); /** Saves the current UnitTable to the given file. */ - bool save(Glib::ustring const &filename); + bool save(std::string const &filename); protected: UnitTable::UnitMap _unit_map; @@ -117,11 +170,13 @@ class UnitTable { double _linear_scale; private: - UnitTable(UnitTable const& t); - UnitTable operator=(UnitTable const& t); + UnitTable(UnitTable const &t); + UnitTable operator=(UnitTable const &t); }; +extern UnitTable unit_table; + } // namespace Util } // namespace Inkscape diff --git a/src/verbs.cpp b/src/verbs.cpp index a085e841f..06e59be38 100644 --- a/src/verbs.cpp +++ b/src/verbs.cpp @@ -40,7 +40,6 @@ #include <gtkmm/messagedialog.h> #include <gtkmm/stock.h> -#include "bind/javabind.h" #include "desktop.h" #include "desktop-handles.h" #include "display/curve.h" @@ -1992,10 +1991,6 @@ void DialogVerb::perform(SPAction *action, void *data) case SP_VERB_DIALOG_DEBUG: dt->_dlg_mgr->showDialog("Messages"); break; - case SP_VERB_DIALOG_SCRIPT: - //dt->_dlg_mgr->showDialog("Script"); - Inkscape::Bind::JavaBindery::getInstance()->showConsole(); - break; case SP_VERB_DIALOG_UNDO_HISTORY: dt->_dlg_mgr->showDialog("UndoHistory"); break; @@ -2821,8 +2816,6 @@ Verb *Verb::_base_verbs[] = { N_("Check spelling of text in document"), GTK_STOCK_SPELL_CHECK ), new DialogVerb(SP_VERB_DIALOG_DEBUG, "DialogDebug", N_("_Messages..."), N_("View debug messages"), INKSCAPE_ICON("dialog-messages")), - new DialogVerb(SP_VERB_DIALOG_SCRIPT, "DialogScript", N_("S_cripts..."), - N_("Run scripts"), INKSCAPE_ICON("dialog-scripts")), new DialogVerb(SP_VERB_DIALOG_TOGGLE, "DialogsToggle", N_("Show/Hide D_ialogs"), N_("Show or hide all open dialogs"), INKSCAPE_ICON("show-dialogs")), new DialogVerb(SP_VERB_DIALOG_CLONETILER, "DialogClonetiler", N_("Create Tiled Clones..."), diff --git a/src/verbs.h b/src/verbs.h index 053441b89..5cc2ad12e 100644 --- a/src/verbs.h +++ b/src/verbs.h @@ -280,7 +280,6 @@ enum { SP_VERB_DIALOG_FINDREPLACE, SP_VERB_DIALOG_SPELLCHECK, SP_VERB_DIALOG_DEBUG, - SP_VERB_DIALOG_SCRIPT, SP_VERB_DIALOG_TOGGLE, SP_VERB_DIALOG_CLONETILER, SP_VERB_DIALOG_ATTR, diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index 19410ee1d..fe4433153 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -6,7 +6,7 @@ set(widgets_SRC calligraphy-toolbar.cpp connector-toolbar.cpp dropper-toolbar.cpp - erasor-toolbar.cpp + eraser-toolbar.cpp lpe-toolbar.cpp measure-toolbar.cpp mesh-toolbar.cpp @@ -62,7 +62,7 @@ set(widgets_SRC calligraphy-toolbar.h connector-toolbar.h dropper-toolbar.h - erasor-toolbar.h + eraser-toolbar.h lpe-toolbar.h measure-toolbar.h mesh-toolbar.h diff --git a/src/widgets/Makefile_insert b/src/widgets/Makefile_insert index 46f0bd645..97713cbee 100644 --- a/src/widgets/Makefile_insert +++ b/src/widgets/Makefile_insert @@ -21,8 +21,8 @@ ink_common_sources += \ widgets/eek-preview.h \ widgets/ege-paint-def.cpp \ widgets/ege-paint-def.h \ - widgets/erasor-toolbar.cpp \ - widgets/erasor-toolbar.h \ + widgets/eraser-toolbar.cpp \ + widgets/eraser-toolbar.h \ widgets/fill-style.cpp \ widgets/fill-style.h \ widgets/fill-n-stroke-factory.h \ diff --git a/src/widgets/arc-toolbar.cpp b/src/widgets/arc-toolbar.cpp index 809050ad9..42f696bec 100644 --- a/src/widgets/arc-toolbar.cpp +++ b/src/widgets/arc-toolbar.cpp @@ -56,14 +56,10 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-ellipse.h" #include "../mod360.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -341,7 +337,7 @@ void sp_arc_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObjec _("Start"), _("Start:"), _("The angle (in degrees) from the horizontal to the arc's start point"), "/tools/shapes/arc/start", 0.0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, TRUE, "altx-arc", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-arc", -360.0, 360.0, 1.0, 10.0, 0, 0, 0, sp_arctb_start_value_changed); @@ -354,7 +350,7 @@ void sp_arc_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObjec _("End"), _("End:"), _("The angle (in degrees) from the horizontal to the arc's end point"), "/tools/shapes/arc/end", 0.0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -360.0, 360.0, 1.0, 10.0, 0, 0, 0, sp_arctb_end_value_changed); diff --git a/src/widgets/box3d-toolbar.cpp b/src/widgets/box3d-toolbar.cpp index e8b330375..91d4ebdec 100644 --- a/src/widgets/box3d-toolbar.cpp +++ b/src/widgets/box3d-toolbar.cpp @@ -58,16 +58,11 @@ #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" - #include "../pen-context.h" #include "../box3d-context.h" #include "../box3d.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -321,7 +316,7 @@ void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject // Translators: PL is short for 'perspective line' _("Angle of PLs in X direction"), "/tools/shapes/3dbox/box3d_angle_x", 30, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-box3d", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-box3d", -360.0, 360.0, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), box3d_angle_x_value_changed ); @@ -361,7 +356,7 @@ void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject // Translators: PL is short for 'perspective line' _("Angle of PLs in Y direction"), "/tools/shapes/3dbox/box3d_angle_y", 30, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -360.0, 360.0, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), box3d_angle_y_value_changed ); @@ -400,7 +395,7 @@ void box3d_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject // Translators: PL is short for 'perspective line' _("Angle of PLs in Z direction"), "/tools/shapes/3dbox/box3d_angle_z", 30, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -360.0, 360.0, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), box3d_angle_z_value_changed ); diff --git a/src/widgets/calligraphy-toolbar.cpp b/src/widgets/calligraphy-toolbar.cpp index 4cb4813b5..1f91b9fe2 100644 --- a/src/widgets/calligraphy-toolbar.cpp +++ b/src/widgets/calligraphy-toolbar.cpp @@ -56,13 +56,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -451,7 +447,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Pen Width"), _("Width:"), _("The width of the calligraphic pen (relative to the visible canvas area)"), "/tools/calligraphic/width", 15, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-calligraphy", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-calligraphy", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_width_value_changed, 1, 0 ); @@ -468,7 +464,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Stroke Thinning"), _("Thinning:"), _("How much velocity thins the stroke (> 0 makes fast strokes thinner, < 0 makes them broader, 0 makes width independent of velocity)"), "/tools/calligraphic/thinning", 10, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -100, 100, 1, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_velthin_value_changed, 1, 0); @@ -484,7 +480,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Pen Angle"), _("Angle:"), _("The angle of the pen's nib (in degrees; 0 = horizontal; has no effect if fixation = 0)"), "/tools/calligraphic/angle", 30, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "calligraphy-angle", + GTK_WIDGET(desktop->canvas), holder, TRUE, "calligraphy-angle", -90.0, 90.0, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_angle_value_changed, 1, 0 ); @@ -502,7 +498,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Fixation"), _("Fixation:"), _("Angle behavior (0 = nib always perpendicular to stroke direction, 100 = fixed angle)"), "/tools/calligraphic/flatness", 90, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_flatness_value_changed, 1, 0); @@ -519,7 +515,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Cap rounding"), _("Caps:"), _("Increase to make caps at the ends of strokes protrude more (0 = no caps, 1 = round caps)"), "/tools/calligraphic/cap_rounding", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 5.0, 0.01, 0.1, labels, values, G_N_ELEMENTS(labels), sp_ddc_cap_rounding_value_changed, 0.01, 2 ); @@ -535,7 +531,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Stroke Tremor"), _("Tremor:"), _("Increase to make strokes rugged and trembling"), "/tools/calligraphic/tremor", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 100, 1, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_tremor_value_changed, 1, 0); @@ -553,7 +549,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Pen Wiggle"), _("Wiggle:"), _("Increase to make the pen waver and wiggle"), "/tools/calligraphic/wiggle", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 100, 1, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_wiggle_value_changed, 1, 0); @@ -570,7 +566,7 @@ void sp_calligraphy_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions _("Pen Mass"), _("Mass:"), _("Increase to make the pen drag behind, as if slowed by inertia"), "/tools/calligraphic/mass", 2.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 100, 1, 10.0, labels, values, G_N_ELEMENTS(labels), sp_ddc_mass_value_changed, 1, 0); diff --git a/src/widgets/connector-toolbar.cpp b/src/widgets/connector-toolbar.cpp index 7c72f8e0c..54344e446 100644 --- a/src/widgets/connector-toolbar.cpp +++ b/src/widgets/connector-toolbar.cpp @@ -55,9 +55,6 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" #include "../conn-avoid-ref.h" @@ -66,7 +63,6 @@ #include "../sp-path.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -365,7 +361,7 @@ void sp_connector_toolbox_prep( SPDesktop *desktop, GtkActionGroup* mainActions, _("Connector Curvature"), _("Curvature:"), _("The amount of connectors curvature"), "/tools/connector/curvature", defaultConnCurvature, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "inkscape:connector-curvature", + GTK_WIDGET(desktop->canvas), holder, TRUE, "inkscape:connector-curvature", 0, 100, 1.0, 10.0, 0, 0, 0, connector_curvature_changed, 1, 0 ); @@ -376,7 +372,7 @@ void sp_connector_toolbox_prep( SPDesktop *desktop, GtkActionGroup* mainActions, _("Connector Spacing"), _("Spacing:"), _("The amount of space left around objects by auto-routing connectors"), "/tools/connector/spacing", defaultConnSpacing, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "inkscape:connector-spacing", + GTK_WIDGET(desktop->canvas), holder, TRUE, "inkscape:connector-spacing", 0, 100, 1.0, 10.0, 0, 0, 0, connector_spacing_changed, 1, 0 ); @@ -398,7 +394,7 @@ void sp_connector_toolbox_prep( SPDesktop *desktop, GtkActionGroup* mainActions, _("Connector Length"), _("Length:"), _("Ideal length for connectors when layout is applied"), "/tools/connector/length", 100, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "inkscape:connector-length", + GTK_WIDGET(desktop->canvas), holder, TRUE, "inkscape:connector-length", 10, 1000, 10.0, 100.0, 0, 0, 0, connector_length_changed, 1, 0 ); diff --git a/src/widgets/desktop-widget.cpp b/src/widgets/desktop-widget.cpp index c1214c1a4..6493da84d 100644 --- a/src/widgets/desktop-widget.cpp +++ b/src/widgets/desktop-widget.cpp @@ -43,8 +43,8 @@ #include "file.h" #include "helper/action.h" #include "helper/action-context.h" -#include "helper/units.h" -#include "helper/unit-tracker.h" +#include "util/units.h" +#include "ui/widget/unit-tracker.h" #include "inkscape-private.h" #include "interface.h" #include "macros.h" @@ -79,10 +79,11 @@ using Inkscape::round; #endif -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::UI::ToolboxFactory; using ege::AppearTimeTracker; +using Inkscape::Util::unit_table; enum { ACTIVATE, @@ -393,8 +394,9 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) GtkWidget *eventbox = gtk_event_box_new (); dtw->hruler = sp_ruler_new(GTK_ORIENTATION_HORIZONTAL); dtw->hruler_box = eventbox; - sp_ruler_set_unit(SP_RULER(dtw->hruler), SP_PT); - gtk_widget_set_tooltip_text (dtw->hruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT)))); + Inkscape::Util::Unit pt = unit_table.getUnit("pt"); + sp_ruler_set_unit(SP_RULER(dtw->hruler), pt); + gtk_widget_set_tooltip_text (dtw->hruler_box, gettext(pt.name_plural.c_str())); gtk_container_add (GTK_CONTAINER (eventbox), dtw->hruler); g_signal_connect (G_OBJECT (eventbox), "button_press_event", G_CALLBACK (sp_dt_hruler_event), dtw); g_signal_connect (G_OBJECT (eventbox), "button_release_event", G_CALLBACK (sp_dt_hruler_event), dtw); @@ -422,8 +424,8 @@ void SPDesktopWidget::init( SPDesktopWidget *dtw ) eventbox = gtk_event_box_new (); dtw->vruler = sp_ruler_new(GTK_ORIENTATION_VERTICAL); dtw->vruler_box = eventbox; - sp_ruler_set_unit (SP_RULER (dtw->vruler), SP_PT); - gtk_widget_set_tooltip_text (dtw->vruler_box, gettext(sp_unit_get_plural (&sp_unit_get_by_id(SP_UNIT_PT)))); + sp_ruler_set_unit (SP_RULER (dtw->vruler), pt); + gtk_widget_set_tooltip_text (dtw->vruler_box, gettext(pt.name_plural.c_str())); gtk_container_add (GTK_CONTAINER (eventbox), GTK_WIDGET (dtw->vruler)); #if GTK_CHECK_VERSION(3,0,0) @@ -1674,7 +1676,7 @@ SPDesktopWidget* SPDesktopWidget::createInstance(SPNamedView *namedview) { SPDesktopWidget *dtw = static_cast<SPDesktopWidget*>(g_object_new(SP_TYPE_DESKTOP_WIDGET, NULL)); - dtw->dt2r = 1.0 / namedview->doc_units->unittobase; + dtw->dt2r = 1. / namedview->doc_units->factor; dtw->ruler_origin = Geom::Point(0,0); //namedview->gridorigin; Why was the grid origin used here? @@ -1746,11 +1748,11 @@ void SPDesktopWidget::namedviewModified(SPObject *obj, guint flags) SPNamedView *nv=SP_NAMEDVIEW(obj); if (flags & SP_OBJECT_MODIFIED_FLAG) { - this->dt2r = 1.0 / nv->doc_units->unittobase; + this->dt2r = 1. / nv->doc_units->factor; this->ruler_origin = Geom::Point(0,0); //nv->gridorigin; Why was the grid origin used here? - sp_ruler_set_unit(SP_RULER (this->vruler), nv->getDefaultMetric()); - sp_ruler_set_unit(SP_RULER (this->hruler), nv->getDefaultMetric()); + sp_ruler_set_unit(SP_RULER (this->vruler), nv->getDefaultUnit()); + sp_ruler_set_unit(SP_RULER (this->hruler), nv->getDefaultUnit()); /* This loops through all the grandchildren of aux toolbox, * and for each that it finds, it performs an sp_search_by_data_recursive(), @@ -1786,8 +1788,8 @@ void SPDesktopWidget::namedviewModified(SPObject *obj, guint flags) } // children } // if aux_toolbox is a container - gtk_widget_set_tooltip_text(this->hruler_box, gettext(sp_unit_get_plural (nv->doc_units))); - gtk_widget_set_tooltip_text(this->vruler_box, gettext(sp_unit_get_plural (nv->doc_units))); + gtk_widget_set_tooltip_text(this->hruler_box, gettext(nv->doc_units->name_plural.c_str())); + gtk_widget_set_tooltip_text(this->vruler_box, gettext(nv->doc_units->name_plural.c_str())); sp_desktop_widget_update_rulers(this); ToolboxFactory::updateSnapToolbox(this->desktop, 0, this->snap_toolbox); diff --git a/src/widgets/desktop-widget.h b/src/widgets/desktop-widget.h index 9031ac854..58739cf3b 100644 --- a/src/widgets/desktop-widget.h +++ b/src/widgets/desktop-widget.h @@ -129,7 +129,6 @@ struct SPDesktopWidget { struct WidgetStub : public Inkscape::UI::View::EditWidgetInterface { SPDesktopWidget *_dtw; - SPDesktop *_dt; WidgetStub (SPDesktopWidget* dtw) : _dtw(dtw) {} virtual void setTitle (gchar const *uri) diff --git a/src/widgets/dropper-toolbar.cpp b/src/widgets/dropper-toolbar.cpp index cf58aa507..054955d8f 100644 --- a/src/widgets/dropper-toolbar.cpp +++ b/src/widgets/dropper-toolbar.cpp @@ -54,13 +54,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../tools-switch.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; diff --git a/src/widgets/erasor-toolbar.cpp b/src/widgets/eraser-toolbar.cpp index 2e074490d..3f5e60780 100644 --- a/src/widgets/erasor-toolbar.cpp +++ b/src/widgets/eraser-toolbar.cpp @@ -31,7 +31,7 @@ #include "ui/widget/spinbutton.h" #include <glibmm/i18n.h> #include "toolbox.h" -#include "erasor-toolbar.h" +#include "eraser-toolbar.h" #include "calligraphy-toolbar.h" #include "../desktop.h" @@ -55,13 +55,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -149,7 +145,7 @@ void sp_eraser_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb _("Pen Width"), _("Width:"), _("The width of the eraser pen (relative to the visible canvas area)"), "/tools/eraser/width", 15, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-eraser", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-eraser", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_erc_width_value_changed, 1, 0); diff --git a/src/widgets/erasor-toolbar.h b/src/widgets/eraser-toolbar.h index b1bb3a3fa..b1bb3a3fa 100644 --- a/src/widgets/erasor-toolbar.h +++ b/src/widgets/eraser-toolbar.h diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index 7fa848f1e..5f9098d44 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -33,7 +33,6 @@ #include "desktop.h" #include "widgets/font-selector.h" #include "preferences.h" -#include "unit-constants.h" /* SPFontSelector */ diff --git a/src/widgets/gradient-toolbar.cpp b/src/widgets/gradient-toolbar.cpp index ea125a380..c1eb13ceb 100644 --- a/src/widgets/gradient-toolbar.cpp +++ b/src/widgets/gradient-toolbar.cpp @@ -1171,7 +1171,7 @@ void sp_gradient_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, eact = create_adjustment_action( "GradientEditOffsetAction", _("Offset"), _("Offset:"), _("Offset of selected stop"), "/tools/gradient/stopoffset", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 1.0, 0.01, 0.1, 0, 0, 0, gr_stop_offset_adjustment_changed diff --git a/src/widgets/lpe-toolbar.cpp b/src/widgets/lpe-toolbar.cpp index c7659ab42..55cce90cd 100644 --- a/src/widgets/lpe-toolbar.cpp +++ b/src/widgets/lpe-toolbar.cpp @@ -57,9 +57,8 @@ #include "../ui/icon-names.h" #include "../helper/action.h" #include "../helper/action-context.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" +#include "util/units.h" +#include "ui/widget/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" #include "../tools-switch.h" @@ -67,7 +66,9 @@ #include "../live_effects/lpe-angle_bisector.h" #include "../lpe-tool-context.h" -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; +using Inkscape::Util::Unit; +using Inkscape::Util::Quantity; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -197,9 +198,9 @@ static void lpetool_toggle_show_measuring_info(GtkToggleAction *act, GObject *tb static void lpetool_unit_changed(GtkAction* /*act*/, GObject* tbl) { UnitTracker* tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(tbl, "tracker")); - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt("/tools/lpetool/unitid", unit->unit_id); + prefs->setString("/tools/lpetool/unit", unit.abbr); SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" )); if (SP_IS_LPETOOL_CONTEXT(desktop->event_context)) { @@ -295,13 +296,13 @@ static void lpetool_open_lpe_dialog(GtkToggleAction *act, gpointer data) void sp_lpetool_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder) { - UnitTracker* tracker = new UnitTracker(SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); tracker->setActiveUnit(sp_desktop_namedview(desktop)->doc_units); g_object_set_data(holder, "tracker", tracker); - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt("/tools/lpetool/unitid", unit->unit_id); + prefs->setString("/tools/lpetool/unit", unit.abbr); /** Automatically create a list of LPEs that get added to the toolbar **/ { diff --git a/src/widgets/measure-toolbar.cpp b/src/widgets/measure-toolbar.cpp index 21df4c6d9..53ed2d275 100644 --- a/src/widgets/measure-toolbar.cpp +++ b/src/widgets/measure-toolbar.cpp @@ -52,13 +52,12 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" +#include "ui/widget/unit-tracker.h" -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; +using Inkscape::Util::Unit; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -83,15 +82,17 @@ sp_measure_fontsize_value_changed(GtkAdjustment *adj, GObject *tbl) static void measure_unit_changed(GtkAction* /*act*/, GObject* tbl) { UnitTracker* tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(tbl, "tracker")); - SPUnit const *unit = tracker->getActiveUnit(); + Glib::ustring const unit = tracker->getActiveUnit().abbr; Inkscape::Preferences *prefs = Inkscape::Preferences::get(); - prefs->setInt("/tools/measure/unitid", unit->unit_id); + prefs->setString("/tools/measure/unit", unit); } void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, GObject* holder) { - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); - tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + tracker->setActiveUnitByAbbr(prefs->getString("/tools/measure/unit").c_str()); + g_object_set_data( holder, "tracker", tracker ); EgeAdjustmentAction *eact = 0; @@ -102,7 +103,7 @@ void sp_measure_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, G _("Font Size"), _("Font Size:"), _("The font size to be used in the measurement labels"), "/tools/measure/fontsize", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 10, 36, 1.0, 4.0, 0, 0, 0, sp_measure_fontsize_value_changed); diff --git a/src/widgets/mesh-toolbar.cpp b/src/widgets/mesh-toolbar.cpp index 99a34fbda..37763ab34 100644 --- a/src/widgets/mesh-toolbar.cpp +++ b/src/widgets/mesh-toolbar.cpp @@ -262,7 +262,7 @@ void sp_mesh_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, GObj eact = create_adjustment_action( "MeshRowAction", _("Rows"), _("Rows:"), _("Number of rows in new mesh"), "/tools/mesh/mesh_rows", 1, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 1, 20, 1, 1, labels, values, G_N_ELEMENTS(labels), ms_row_changed, @@ -278,7 +278,7 @@ void sp_mesh_toolbox_prep(SPDesktop * desktop, GtkActionGroup* mainActions, GObj eact = create_adjustment_action( "MeshColumnAction", _("Columns"), _("Columns:"), _("Number of columns in new mesh"), "/tools/mesh/mesh_cols", 1, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 1, 20, 1, 1, labels, values, G_N_ELEMENTS(labels), ms_col_changed, diff --git a/src/widgets/node-toolbar.cpp b/src/widgets/node-toolbar.cpp index 849de874d..a9e298f1d 100644 --- a/src/widgets/node-toolbar.cpp +++ b/src/widgets/node-toolbar.cpp @@ -58,17 +58,19 @@ #include "../ui/tool/node-tool.h" #include "../ui/tool/multi-path-manipulator.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" +#include "util/units.h" +#include "ui/widget/unit-tracker.h" #include "../lpe-tool-context.h" #include "../sp-namedview.h" -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; +using Inkscape::Util::Unit; +using Inkscape::Util::Quantity; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; +using Inkscape::Util::unit_table; //#################################### //# node editing callbacks @@ -238,7 +240,7 @@ static void sp_node_toolbox_coord_changed(gpointer /*shape_editor*/, GObject *tb if (!tracker) { return; } - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); InkNodeTool *nt = get_node_tool(); if (!nt || nt->_selected_nodes->empty()) { @@ -248,15 +250,15 @@ static void sp_node_toolbox_coord_changed(gpointer /*shape_editor*/, GObject *tb } else { gtk_action_set_sensitive(xact, TRUE); gtk_action_set_sensitive(yact, TRUE); - Geom::Coord oldx = sp_units_get_pixels(gtk_adjustment_get_value(xadj), *unit); - Geom::Coord oldy = sp_units_get_pixels(gtk_adjustment_get_value(xadj), *unit); + Geom::Coord oldx = Quantity::convert(gtk_adjustment_get_value(xadj), unit, "px"); + Geom::Coord oldy = Quantity::convert(gtk_adjustment_get_value(yadj), unit, "px"); Geom::Point mid = nt->_selected_nodes->pointwiseBounds()->midpoint(); if (oldx != mid[Geom::X]) { - gtk_adjustment_set_value(xadj, sp_pixels_get_units(mid[Geom::X], *unit)); + gtk_adjustment_set_value(xadj, Quantity::convert(mid[Geom::X], "px", unit)); } if (oldy != mid[Geom::Y]) { - gtk_adjustment_set_value(yadj, sp_pixels_get_units(mid[Geom::Y], *unit)); + gtk_adjustment_set_value(yadj, Quantity::convert(mid[Geom::Y], "px", unit)); } } @@ -272,11 +274,11 @@ static void sp_node_path_value_changed(GtkAdjustment *adj, GObject *tbl, Geom::D if (!tracker) { return; } - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) { prefs->setDouble(Glib::ustring("/tools/nodes/") + (d == Geom::X ? "x" : "y"), - sp_units_get_pixels(gtk_adjustment_get_value(adj), *unit)); + Quantity::convert(gtk_adjustment_get_value(adj), unit, "px")); } // quit if run by the attr_changed listener @@ -289,7 +291,7 @@ static void sp_node_path_value_changed(GtkAdjustment *adj, GObject *tbl, Geom::D InkNodeTool *nt = get_node_tool(); if (nt && !nt->_selected_nodes->empty()) { - double val = sp_units_get_pixels(gtk_adjustment_get_value(adj), *unit); + double val = Quantity::convert(gtk_adjustment_get_value(adj), unit, "px"); double oldval = nt->_selected_nodes->pointwiseBounds()->midpoint()[d]; Geom::Point delta(0,0); delta[d] = val - oldval; @@ -339,8 +341,9 @@ static void sp_node_toolbox_sel_modified(Inkscape::Selection *selection, guint / void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObject* holder) { - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); - tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); + Unit doc_units = *sp_desktop_namedview(desktop)->doc_units; + tracker->setActiveUnit(&doc_units); g_object_set_data( holder, "tracker", tracker ); Inkscape::IconSize secondarySize = ToolboxFactory::prefToSize("/toolbox/secondary", 1); @@ -589,7 +592,7 @@ void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "NodeXAction", _("X coordinate:"), _("X:"), _("X coordinate of selected node(s)"), "/tools/nodes/Xcoord", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, TRUE, "altx-nodes", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-nodes", -1e6, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_node_path_x_value_changed ); @@ -607,7 +610,7 @@ void sp_node_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "NodeYAction", _("Y coordinate:"), _("Y:"), _("Y coordinate of selected node(s)"), "/tools/nodes/Ycoord", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -1e6, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_node_path_y_value_changed ); diff --git a/src/widgets/paint-selector.cpp b/src/widgets/paint-selector.cpp index 40d2fb9f3..cd987cc87 100644 --- a/src/widgets/paint-selector.cpp +++ b/src/widgets/paint-selector.cpp @@ -1141,14 +1141,12 @@ static void sp_paint_selector_set_mode_swatch(SPPaintSelector *psel, SPPaintSele gtk_widget_set_sensitive(psel->style, TRUE); - SwatchSelector *swatchsel = NULL; - if (psel->mode == SPPaintSelector::MODE_SWATCH){ // swatchsel = static_cast<SwatchSelector*>(g_object_get_data(G_OBJECT(psel->selector), "swatch-selector")); } else { sp_paint_selector_clear_frame(psel); // Create new gradient selector - swatchsel = new SwatchSelector(); + SwatchSelector *swatchsel = new SwatchSelector(); swatchsel->show(); swatchsel->connectGrabbedHandler( G_CALLBACK(sp_paint_selector_gradient_grabbed), psel ); diff --git a/src/widgets/paintbucket-toolbar.cpp b/src/widgets/paintbucket-toolbar.cpp index 73815b86d..7c23379cd 100644 --- a/src/widgets/paintbucket-toolbar.cpp +++ b/src/widgets/paintbucket-toolbar.cpp @@ -54,9 +54,8 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" +#include "util/units.h" +#include "ui/widget/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" #include "../flood-context.h" @@ -64,11 +63,12 @@ #include <gtk/gtk.h> -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; +using Inkscape::Util::unit_table; @@ -97,13 +97,13 @@ static void paintbucket_autogap_changed(EgeSelectOneAction* act, GObject * /*tbl static void paintbucket_offset_changed(GtkAdjustment *adj, GObject *tbl) { UnitTracker* tracker = static_cast<UnitTracker*>(g_object_get_data( tbl, "tracker" )); - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); Inkscape::Preferences *prefs = Inkscape::Preferences::get(); // Don't adjust the offset value because we're saving the // unit and it'll be correctly handled on load. prefs->setDouble("/tools/paintbucket/offset", (gdouble)gtk_adjustment_get_value(adj)); - prefs->setString("/tools/paintbucket/offsetunits", sp_unit_get_abbreviation(unit)); + prefs->setString("/tools/paintbucket/offsetunits", unit.abbr); } static void paintbucket_defaults(GtkWidget *, GObject *tbl) @@ -165,7 +165,7 @@ void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions "ThresholdAction", _("Fill Threshold"), _("Threshold:"), _("The maximum allowed difference between the clicked pixel and the neighboring pixels to be counted in the fill"), - "/tools/paintbucket/threshold", 5, GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, + "/tools/paintbucket/threshold", 5, GTK_WIDGET(desktop->canvas), holder, TRUE, "inkscape:paintbucket-threshold", 0, 100.0, 1.0, 10.0, 0, 0, 0, paintbucket_threshold_changed, 1, 0 ); @@ -175,10 +175,11 @@ void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions } // Create the units menu. - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); Glib::ustring stored_unit = prefs->getString("/tools/paintbucket/offsetunits"); if (!stored_unit.empty()) { - tracker->setActiveUnit(sp_unit_get_by_abbreviation(stored_unit.data())); + Unit u = unit_table.getUnit(stored_unit); + tracker->setActiveUnit(&u); } g_object_set_data( holder, "tracker", tracker ); { @@ -192,7 +193,7 @@ void sp_paintbucket_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions "OffsetAction", _("Grow/shrink by"), _("Grow/shrink by:"), _("The amount to grow (positive) or shrink (negative) the created fill path"), - "/tools/paintbucket/offset", 0, GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, TRUE, + "/tools/paintbucket/offset", 0, GTK_WIDGET(desktop->canvas), holder, TRUE, "inkscape:paintbucket-offset", -1e4, 1e4, 0.1, 0.5, 0, 0, 0, paintbucket_offset_changed, 1, 2); diff --git a/src/widgets/pencil-toolbar.cpp b/src/widgets/pencil-toolbar.cpp index 35264662f..87a73712e 100644 --- a/src/widgets/pencil-toolbar.cpp +++ b/src/widgets/pencil-toolbar.cpp @@ -67,15 +67,10 @@ //#include "../ui/tool/multi-path-manipulator.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" - #include "../pen-context.h" //#include "../sp-namedview.h" #include "../tools-switch.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -314,7 +309,7 @@ void sp_pencil_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb _("How much smoothing (simplifying) is applied to the line"), "/tools/freehand/pencil/tolerance", 3.0, - GTK_WIDGET(desktop->canvas), NULL, + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-pencil", 1, 100.0, 0.5, 1.0, labels, values, G_N_ELEMENTS(labels), diff --git a/src/widgets/rect-toolbar.cpp b/src/widgets/rect-toolbar.cpp index 8c1a735c5..6dfd9cfcb 100644 --- a/src/widgets/rect-toolbar.cpp +++ b/src/widgets/rect-toolbar.cpp @@ -53,18 +53,20 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" +#include "util/units.h" +#include "ui/widget/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" #include "../sp-rect.h" -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; using Inkscape::UI::PrefPusher; +using Inkscape::Util::Unit; +using Inkscape::Util::Quantity; +using Inkscape::Util::unit_table; //######################## @@ -91,12 +93,12 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const * SPDesktop *desktop = static_cast<SPDesktop *>(g_object_get_data( tbl, "desktop" )); UnitTracker* tracker = reinterpret_cast<UnitTracker*>(g_object_get_data( tbl, "tracker" )); - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); if (DocumentUndo::getUndoSensitive(sp_desktop_document(desktop))) { Inkscape::Preferences *prefs = Inkscape::Preferences::get(); prefs->setDouble(Glib::ustring("/tools/shapes/rect/") + value_name, - sp_units_get_pixels(gtk_adjustment_get_value(adj), *unit)); + Quantity::convert(gtk_adjustment_get_value(adj), unit, "px")); } // quit if run by the attr_changed listener @@ -113,7 +115,7 @@ static void sp_rtb_value_changed(GtkAdjustment *adj, GObject *tbl, gchar const * if (SP_IS_RECT(items->data)) { if (gtk_adjustment_get_value(adj) != 0) { setter(SP_RECT(items->data), - sp_units_get_pixels(gtk_adjustment_get_value(adj), *unit)); + Quantity::convert(gtk_adjustment_get_value(adj), unit, "px")); } else { SP_OBJECT(items->data)->getRepr()->setAttribute(value_name, NULL); } @@ -184,32 +186,32 @@ static void rect_tb_event_attr_changed(Inkscape::XML::Node * /*repr*/, gchar con g_object_set_data( tbl, "freeze", GINT_TO_POINTER(TRUE) ); UnitTracker* tracker = reinterpret_cast<UnitTracker*>( g_object_get_data( tbl, "tracker" ) ); - SPUnit const *unit = tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); gpointer item = g_object_get_data( tbl, "item" ); if (item && SP_IS_RECT(item)) { { GtkAdjustment *adj = GTK_ADJUSTMENT( g_object_get_data( tbl, "rx" ) ); gdouble rx = sp_rect_get_visible_rx(SP_RECT(item)); - gtk_adjustment_set_value(adj, sp_pixels_get_units(rx, *unit)); + gtk_adjustment_set_value(adj, Quantity::convert(rx, "px", unit)); } { GtkAdjustment *adj = GTK_ADJUSTMENT( g_object_get_data( tbl, "ry" ) ); gdouble ry = sp_rect_get_visible_ry(SP_RECT(item)); - gtk_adjustment_set_value(adj, sp_pixels_get_units(ry, *unit)); + gtk_adjustment_set_value(adj, Quantity::convert(ry, "px", unit)); } { GtkAdjustment *adj = GTK_ADJUSTMENT( g_object_get_data( tbl, "width" ) ); gdouble width = sp_rect_get_visible_width (SP_RECT(item)); - gtk_adjustment_set_value(adj, sp_pixels_get_units(width, *unit)); + gtk_adjustment_set_value(adj, Quantity::convert(width, "px", unit)); } { GtkAdjustment *adj = GTK_ADJUSTMENT( g_object_get_data( tbl, "height" ) ); gdouble height = sp_rect_get_visible_height (SP_RECT(item)); - gtk_adjustment_set_value(adj, sp_pixels_get_units(height, *unit)); + gtk_adjustment_set_value(adj, Quantity::convert(height, "px", unit)); } } @@ -301,7 +303,7 @@ void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje } // rx/ry units menu: create - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); //tracker->addUnit( SP_UNIT_PERCENT, 0 ); // fixme: add % meaning per cent of the width/height tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); @@ -314,7 +316,7 @@ void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RectWidthAction", _("Width"), _("W:"), _("Width of rectangle"), "/tools/shapes/rect/width", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, TRUE, "altx-rect", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-rect", 0, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_rtb_width_value_changed ); @@ -331,7 +333,7 @@ void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RectHeightAction", _("Height"), _("H:"), _("Height of rectangle"), "/tools/shapes/rect/height", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_rtb_height_value_changed ); @@ -348,7 +350,7 @@ void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RadiusXAction", _("Horizontal radius"), _("Rx:"), _("Horizontal radius of rounded corners"), "/tools/shapes/rect/rx", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_rtb_rx_value_changed); @@ -363,7 +365,7 @@ void sp_rect_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RadiusYAction", _("Vertical radius"), _("Ry:"), _("Vertical radius of rounded corners"), "/tools/shapes/rect/ry", 0, - GTK_WIDGET(desktop->canvas), NULL/*us*/, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0, 1e6, SPIN_STEP, SPIN_PAGE_STEP, labels, values, G_N_ELEMENTS(labels), sp_rtb_ry_value_changed); diff --git a/src/widgets/ruler.cpp b/src/widgets/ruler.cpp index c1f9be2a5..e4e72d86e 100644 --- a/src/widgets/ruler.cpp +++ b/src/widgets/ruler.cpp @@ -33,9 +33,9 @@ #include "widget-sizes.h" #include "ruler.h" -#include "unit-constants.h" #include "round.h" #include <glibmm/i18n.h> +#include "util/units.h" #define ROUND(x) ((int) ((x) + 0.5)) @@ -44,6 +44,7 @@ #define DEFAULT_RULER_FONT_SCALE PANGO_SCALE_X_SMALL #define MINIMUM_INCR 5 +using Inkscape::Util::unit_table; enum { PROP_0, @@ -62,7 +63,7 @@ enum { typedef struct { GtkOrientation orientation; - SPMetric unit; + Inkscape::Util::Unit *unit; gdouble lower; gdouble upper; gdouble position; @@ -196,11 +197,10 @@ sp_ruler_class_init (SPRulerClass *klass) /* FIXME: Should probably use g_param_spec_enum */ g_object_class_install_property (object_class, PROP_UNIT, - g_param_spec_uint ("unit", + g_param_spec_string ("unit", _("Unit"), _("Unit of the ruler"), - 0, 8, - SP_PX, + "px", static_cast<GParamFlags>(GTK_PARAM_READWRITE))); g_object_class_install_property (object_class, @@ -260,7 +260,7 @@ sp_ruler_init (SPRuler *ruler) gtk_widget_set_has_window (GTK_WIDGET (ruler), FALSE); priv->orientation = GTK_ORIENTATION_HORIZONTAL; - priv->unit = SP_PX; + priv->unit = new Inkscape::Util::Unit(unit_table.getUnit("px")); priv->lower = 0; priv->upper = 0; priv->position = 0; @@ -387,7 +387,7 @@ sp_ruler_set_property (GObject *object, break; case PROP_UNIT: - sp_ruler_set_unit (ruler, static_cast<SPMetric>(g_value_get_int (value))); + sp_ruler_set_unit (ruler, unit_table.getUnit(g_value_get_string (value))); break; case PROP_LOWER: @@ -436,7 +436,7 @@ sp_ruler_get_property (GObject *object, break; case PROP_UNIT: - g_value_set_int (value, priv->unit); + g_value_set_string (value, priv->unit->abbr.c_str()); break; case PROP_LOWER: g_value_set_double (value, priv->lower); @@ -1071,15 +1071,15 @@ sp_ruler_remove_track_widget (SPRuler *ruler, */ void sp_ruler_set_unit (SPRuler *ruler, - SPMetric unit) + const Inkscape::Util::Unit &unit) { SPRulerPrivate *priv = SP_RULER_GET_PRIVATE (ruler); g_return_if_fail (SP_IS_RULER (ruler)); - if (priv->unit != unit) + if (*priv->unit != unit) { - priv->unit = unit; + priv->unit = new Inkscape::Util::Unit(unit); g_object_notify(G_OBJECT(ruler), "unit"); gtk_widget_queue_draw (GTK_WIDGET (ruler)); @@ -1092,11 +1092,9 @@ sp_ruler_set_unit (SPRuler *ruler, * * Return value: the unit currently used in the @ruler widget. **/ -SPMetric +Inkscape::Util::Unit* sp_ruler_get_unit (SPRuler *ruler) { - g_return_val_if_fail(SP_IS_RULER(ruler), static_cast<SPMetric>(0)); - return SP_RULER_GET_PRIVATE (ruler)->unit; } @@ -1184,7 +1182,7 @@ sp_ruler_draw_ticks (SPRuler *ruler) gint text_size; gint pos; gdouble max_size; - SPMetric unit; + Inkscape::Util::Unit *unit; SPRulerMetric ruler_metric = ruler_metric_general; /* The metric to use for this unit system */ PangoLayout *layout; PangoRectangle logical_rect, ink_rect; @@ -1300,7 +1298,7 @@ sp_ruler_draw_ticks (SPRuler *ruler) /* Inkscape change to ruler: Use a 1,2,4,8... scale for inches * or a 1,2,5,10... scale for everything else */ - if (sp_ruler_get_unit (ruler) == SP_IN) + if (*sp_ruler_get_unit (ruler) == unit_table.getUnit("in")) ruler_metric = ruler_metric_inches; for (scale = 0; scale < G_N_ELEMENTS (ruler_metric.ruler_scale); scale++) @@ -1319,7 +1317,7 @@ sp_ruler_draw_ticks (SPRuler *ruler) gdouble subd_incr; /* hack to get proper subdivisions at full pixels */ - if (unit == SP_PX && scale == 1 && i == 1) + if (*unit == unit_table.getUnit("px") && scale == 1 && i == 1) subd_incr = 1.0; else subd_incr = ((gdouble) ruler_metric.ruler_scale[scale] / diff --git a/src/widgets/ruler.h b/src/widgets/ruler.h index f0d866fff..08760f584 100644 --- a/src/widgets/ruler.h +++ b/src/widgets/ruler.h @@ -14,10 +14,15 @@ */ #include <gtk/gtk.h> -#include "sp-metric.h" #include <iostream> #include <glib.h> +namespace Inkscape { + namespace Util { + class Unit; + } +} + G_BEGIN_DECLS #define SP_TYPE_RULER (sp_ruler_get_type ()) @@ -51,8 +56,8 @@ void sp_ruler_remove_track_widget (SPRuler *ruler, GtkWidget *widget); void sp_ruler_set_unit (SPRuler *ruler, - SPMetric unit); -SPMetric sp_ruler_get_unit (SPRuler *ruler); + const Inkscape::Util::Unit &unit); +Inkscape::Util::Unit *sp_ruler_get_unit (SPRuler *ruler); void sp_ruler_set_position (SPRuler *ruler, gdouble set_position); gdouble sp_ruler_get_position (SPRuler *ruler); diff --git a/src/widgets/select-toolbar.cpp b/src/widgets/select-toolbar.cpp index 1bfc841e3..e4a5a2905 100644 --- a/src/widgets/select-toolbar.cpp +++ b/src/widgets/select-toolbar.cpp @@ -39,8 +39,7 @@ #include <glibmm/i18n.h> #include "helper/action.h" #include "helper/action-context.h" -#include "helper/unit-menu.h" -#include "helper/units.h" +#include "util/units.h" #include "inkscape.h" #include "verbs.h" #include "selection.h" @@ -48,7 +47,7 @@ #include "sp-item-transform.h" #include "message-stack.h" #include "display/sp-canvas.h" -#include "helper/unit-tracker.h" +#include "ui/widget/unit-tracker.h" #include "ege-adjustment-action.h" #include "ege-output-action.h" #include "ink-action.h" @@ -56,8 +55,11 @@ #include "ui/icon-names.h" #include "select-toolbar.h" -using Inkscape::UnitTracker; +using Inkscape::UI::Widget::UnitTracker; +using Inkscape::Util::Unit; +using Inkscape::Util::Quantity; using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; static void sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) @@ -78,7 +80,7 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) Geom::OptRect const bbox(sel->bounds(bbox_type)); if ( bbox ) { UnitTracker *tracker = reinterpret_cast<UnitTracker*>(g_object_get_data(G_OBJECT(spw), "tracker")); - SPUnit const &unit = *tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); struct { char const *key; double val; } const keyval[] = { { "X", bbox->min()[X] }, @@ -87,8 +89,8 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) { "height", bbox->dimensions()[Y] } }; - if (unit.base == SP_UNIT_DIMENSIONLESS) { - double const val = 1. / unit.unittobase; + if (unit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) { + double const val = unit.factor * 100; for (unsigned i = 0; i < G_N_ELEMENTS(keyval); ++i) { GtkAdjustment *a = GTK_ADJUSTMENT(g_object_get_data(G_OBJECT(spw), keyval[i].key)); gtk_adjustment_set_value(a, val); @@ -97,7 +99,7 @@ sp_selection_layout_widget_update(SPWidget *spw, Inkscape::Selection *sel) } else { for (unsigned i = 0; i < G_N_ELEMENTS(keyval); ++i) { GtkAdjustment *a = GTK_ADJUSTMENT(g_object_get_data(G_OBJECT(spw), keyval[i].key)); - gtk_adjustment_set_value(a, sp_pixels_get_units(keyval[i].val, unit)); + gtk_adjustment_set_value(a, Quantity::convert(keyval[i].val, "px", unit)); } } } @@ -183,28 +185,28 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) gdouble y1 = 0; gdouble xrel = 0; gdouble yrel = 0; - SPUnit const &unit = *tracker->getActiveUnit(); + Unit const unit = tracker->getActiveUnit(); GtkAdjustment* a_x = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "X" ) ); GtkAdjustment* a_y = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "Y" ) ); GtkAdjustment* a_w = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "width" ) ); GtkAdjustment* a_h = GTK_ADJUSTMENT( g_object_get_data( G_OBJECT(spw), "height" ) ); - if (unit.base == SP_UNIT_ABSOLUTE || unit.base == SP_UNIT_DEVICE) { - x0 = sp_units_get_pixels (gtk_adjustment_get_value (a_x), unit); - y0 = sp_units_get_pixels (gtk_adjustment_get_value (a_y), unit); - x1 = x0 + sp_units_get_pixels (gtk_adjustment_get_value (a_w), unit); - xrel = sp_units_get_pixels (gtk_adjustment_get_value (a_w), unit) / bbox_user->dimensions()[Geom::X]; - y1 = y0 + sp_units_get_pixels (gtk_adjustment_get_value (a_h), unit); - yrel = sp_units_get_pixels (gtk_adjustment_get_value (a_h), unit) / bbox_user->dimensions()[Geom::Y]; + if (unit.type == Inkscape::Util::UNIT_TYPE_LINEAR) { + x0 = Quantity::convert(gtk_adjustment_get_value(a_x), unit, "px"); + y0 = Quantity::convert(gtk_adjustment_get_value(a_y), unit, "px"); + x1 = x0 + Quantity::convert(gtk_adjustment_get_value(a_w), unit, "px"); + xrel = Quantity::convert(gtk_adjustment_get_value(a_w), unit, "px") / bbox_user->dimensions()[Geom::X]; + y1 = y0 + Quantity::convert(gtk_adjustment_get_value(a_h), unit, "px");; + yrel = Quantity::convert(gtk_adjustment_get_value(a_h), unit, "px") / bbox_user->dimensions()[Geom::Y]; } else { - double const x0_propn = gtk_adjustment_get_value (a_x) * unit.unittobase; + double const x0_propn = gtk_adjustment_get_value (a_x) / 100 / unit.factor; x0 = bbox_user->min()[Geom::X] * x0_propn; - double const y0_propn = gtk_adjustment_get_value (a_y) * unit.unittobase; + double const y0_propn = gtk_adjustment_get_value (a_y) / 100 / unit.factor; y0 = y0_propn * bbox_user->min()[Geom::Y]; - xrel = gtk_adjustment_get_value (a_w) * unit.unittobase; + xrel = gtk_adjustment_get_value (a_w) / (100 / unit.factor); x1 = x0 + xrel * bbox_user->dimensions()[Geom::X]; - yrel = gtk_adjustment_get_value (a_h) * unit.unittobase; + yrel = gtk_adjustment_get_value (a_h) / (100 / unit.factor); y1 = y0 + yrel * bbox_user->dimensions()[Geom::Y]; } @@ -225,11 +227,11 @@ sp_object_layout_any_value_changed(GtkAdjustment *adj, SPWidget *spw) double sv = fabs(y1 - bbox_user->max()[Geom::Y]); // unless the unit is %, convert the scales and moves to the unit - if (unit.base == SP_UNIT_ABSOLUTE || unit.base == SP_UNIT_DEVICE) { - mh = sp_pixels_get_units (mh, unit); - sh = sp_pixels_get_units (sh, unit); - mv = sp_pixels_get_units (mv, unit); - sv = sp_pixels_get_units (sv, unit); + if (unit.type == Inkscape::Util::UNIT_TYPE_LINEAR) { + mh = Quantity::convert(mh, "px", unit); + sh = Quantity::convert(sh, "px", unit); + mv = Quantity::convert(mv, "px", unit); + sv = Quantity::convert(sv, "px", unit); } // do the action only if one of the scales/moves is greater than half the last significant @@ -488,8 +490,8 @@ void sp_select_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb gtk_container_add(GTK_CONTAINER(spw), vb); // Create the units menu. - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); - tracker->addUnit( SP_UNIT_PERCENT, 0 ); + UnitTracker* tracker = new UnitTracker(Inkscape::Util::UNIT_TYPE_LINEAR); + tracker->addUnit(unit_table.getUnit("%")); tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); g_object_set_data( G_OBJECT(spw), "tracker", tracker ); diff --git a/src/widgets/spiral-toolbar.cpp b/src/widgets/spiral-toolbar.cpp index 08d26f3d1..cccaf5154 100644 --- a/src/widgets/spiral-toolbar.cpp +++ b/src/widgets/spiral-toolbar.cpp @@ -53,13 +53,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-spiral.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -263,7 +259,7 @@ void sp_spiral_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb eact = create_adjustment_action( "SpiralRevolutionAction", _("Number of turns"), _("Turns:"), _("Number of revolutions"), "/tools/shapes/spiral/revolution", 3.0, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-spiral", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-spiral", 0.01, 1024.0, 0.1, 1.0, labels, values, G_N_ELEMENTS(labels), sp_spl_tb_revolution_value_changed, 1, 2); @@ -277,7 +273,7 @@ void sp_spiral_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb eact = create_adjustment_action( "SpiralExpansionAction", _("Divergence"), _("Divergence:"), _("How much denser/sparser are outer revolutions; 1 = uniform"), "/tools/shapes/spiral/expansion", 1.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 1000.0, 0.01, 1.0, labels, values, G_N_ELEMENTS(labels), sp_spl_tb_expansion_value_changed); @@ -291,7 +287,7 @@ void sp_spiral_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GOb eact = create_adjustment_action( "SpiralT0Action", _("Inner radius"), _("Inner radius:"), _("Radius of the innermost revolution (relative to the spiral size)"), "/tools/shapes/spiral/t0", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.0, 0.999, 0.01, 1.0, labels, values, G_N_ELEMENTS(labels), sp_spl_tb_t0_value_changed); diff --git a/src/widgets/spray-toolbar.cpp b/src/widgets/spray-toolbar.cpp index 06850d261..fe221f695 100644 --- a/src/widgets/spray-toolbar.cpp +++ b/src/widgets/spray-toolbar.cpp @@ -52,13 +52,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../spray-context.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -131,7 +127,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj EgeAdjustmentAction *eact = create_adjustment_action( "SprayWidthAction", _("Width"), _("Width:"), _("The width of the spray area (relative to the visible canvas area)"), "/tools/spray/width", 15, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-spray", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-spray", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_width_value_changed, 1, 0 ); @@ -147,7 +143,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj EgeAdjustmentAction *eact = create_adjustment_action( "SprayMeanAction", _("Focus"), _("Focus:"), _("0 to spray a spot; increase to enlarge the ring radius"), "/tools/spray/mean", 0, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "spray-mean", + GTK_WIDGET(desktop->canvas), holder, TRUE, "spray-mean", 0, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_mean_value_changed, 1, 0 ); @@ -163,7 +159,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj EgeAdjustmentAction *eact = create_adjustment_action( "SprayStandard_deviationAction", C_("Spray tool", "Scatter"), C_("Spray tool", "Scatter:"), _("Increase to scatter sprayed objects"), "/tools/spray/standard_deviation", 70, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "spray-standard_deviation", + GTK_WIDGET(desktop->canvas), holder, TRUE, "spray-standard_deviation", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_standard_deviation_value_changed, 1, 0 ); @@ -224,7 +220,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj _("Amount"), _("Amount:"), _("Adjusts the number of items sprayed per click"), "/tools/spray/population", 70, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "spray-population", + GTK_WIDGET(desktop->canvas), holder, TRUE, "spray-population", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_population_value_changed, 1, 0 ); @@ -255,7 +251,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj // xgettext:no-c-format _("Variation of the rotation of the sprayed objects; 0% for the same rotation than the original object"), "/tools/spray/rotation_variation", 0, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "spray-rotation", + GTK_WIDGET(desktop->canvas), holder, TRUE, "spray-rotation", 0, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_rotation_value_changed, 1, 0 ); @@ -273,7 +269,7 @@ void sp_spray_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj // xgettext:no-c-format _("Variation in the scale of the sprayed objects; 0% for the same scale than the original object"), "/tools/spray/scale_variation", 0, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "spray-scale", + GTK_WIDGET(desktop->canvas), holder, TRUE, "spray-scale", 0, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_spray_scale_value_changed, 1, 0 ); diff --git a/src/widgets/spw-utilities.cpp b/src/widgets/spw-utilities.cpp index 87ca80f2f..d0a3ed1c5 100644 --- a/src/widgets/spw-utilities.cpp +++ b/src/widgets/spw-utilities.cpp @@ -32,7 +32,6 @@ #include "selection.h" -#include "helper/unit-menu.h" #include "spw-utilities.h" #include <gtk/gtk.h> @@ -231,51 +230,6 @@ spw_dropdown(GtkWidget * dialog, GtkWidget * table, return selector; } -/** - * Creates a unit selector widget, used for selecting whether one wishes - * to measure screen elements in millimeters, points, etc. This is a - * compound unit that includes a label as well as the dropdown selector. - */ -GtkWidget * -spw_unit_selector(GtkWidget * dialog, GtkWidget * table, - const gchar * label_text, gchar * key, int row, - GtkWidget * us, GCallback cb, bool can_be_negative) -{ - g_assert(dialog != NULL); - g_assert(table != NULL); - g_assert(us != NULL); - - spw_label_old(table, label_text, 0, row); - -#if GTK_CHECK_VERSION(3,0,0) - GtkAdjustment * a = gtk_adjustment_new(0.0, can_be_negative?-1e6:0, 1e6, 1.0, 10.0, 10.0); -#else - GtkObject * a = gtk_adjustment_new(0.0, can_be_negative?-1e6:0, 1e6, 1.0, 10.0, 10.0); -#endif - - g_assert(a != NULL); - g_object_set_data (G_OBJECT (a), "key", key); - g_object_set_data (G_OBJECT (a), "unit_selector", us); - g_object_set_data (G_OBJECT (dialog), key, a); - sp_unit_selector_add_adjustment (SP_UNIT_SELECTOR (us), GTK_ADJUSTMENT (a)); - GtkWidget * sb = gtk_spin_button_new (GTK_ADJUSTMENT (a), 1.0, 4); - g_assert(sb != NULL); - gtk_widget_show (sb); - -#if GTK_CHECK_VERSION(3,0,0) - gtk_widget_set_halign(sb, GTK_ALIGN_FILL); - gtk_widget_set_hexpand(sb, TRUE); - gtk_widget_set_valign(sb, GTK_ALIGN_CENTER); - gtk_grid_attach(GTK_GRID(table), sb, 1, row, 1, 1); -#else - gtk_table_attach (GTK_TABLE (table), sb, 1, 2, row, row+1, - (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)0, 0, 0); -#endif - - g_signal_connect (G_OBJECT (a), "value_changed", cb, dialog); - return sb; -} - static void sp_set_font_size_recursive (GtkWidget *w, gpointer font) { diff --git a/src/widgets/spw-utilities.h b/src/widgets/spw-utilities.h index fb8c04ebf..d52cbd888 100644 --- a/src/widgets/spw-utilities.h +++ b/src/widgets/spw-utilities.h @@ -56,11 +56,6 @@ spw_dropdown(GtkWidget *dialog, GtkWidget *table, GtkWidget *selector ); -GtkWidget * -spw_unit_selector(GtkWidget *dialog, GtkWidget *table, - gchar const *label, gchar *key, int row, - GtkWidget *us, GCallback cb, bool can_be_negative = false); - void sp_set_font_size (GtkWidget *w, guint font); void sp_set_font_size_smaller (GtkWidget *w); diff --git a/src/widgets/star-toolbar.cpp b/src/widgets/star-toolbar.cpp index 8c07c6473..9f7dd95e0 100644 --- a/src/widgets/star-toolbar.cpp +++ b/src/widgets/star-toolbar.cpp @@ -53,14 +53,10 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-star.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -505,7 +501,7 @@ void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "MagnitudeAction", _("Corners"), _("Corners:"), _("Number of corners of a polygon or star"), "/tools/shapes/star/magnitude", 3, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 3, 1024, 1, 5, labels, values, G_N_ELEMENTS(labels), sp_stb_magnitude_value_changed, @@ -524,7 +520,7 @@ void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje // Base radius is the same for the closest handle. _("Base radius to tip radius ratio"), "/tools/shapes/star/proportion", 0.5, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, 0.01, 1.0, 0.01, 0.1, labels, values, G_N_ELEMENTS(labels), sp_stb_proportion_value_changed ); @@ -545,7 +541,7 @@ void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RoundednessAction", _("Rounded"), _("Rounded:"), _("How much rounded are the corners (0 for sharp)"), "/tools/shapes/star/rounded", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -10.0, 10.0, 0.01, 0.1, labels, values, G_N_ELEMENTS(labels), sp_stb_rounded_value_changed ); @@ -560,7 +556,7 @@ void sp_star_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje eact = create_adjustment_action( "RandomizationAction", _("Randomized"), _("Randomized:"), _("Scatter randomly the corners and angles"), "/tools/shapes/star/randomized", 0.0, - GTK_WIDGET(desktop->canvas), NULL, holder, FALSE, NULL, + GTK_WIDGET(desktop->canvas), holder, FALSE, NULL, -10.0, 10.0, 0.001, 0.01, labels, values, G_N_ELEMENTS(labels), sp_stb_randomized_value_changed, 0.1, 3 ); diff --git a/src/widgets/stroke-style.cpp b/src/widgets/stroke-style.cpp index 0a5b3781b..12d4002b8 100644 --- a/src/widgets/stroke-style.cpp +++ b/src/widgets/stroke-style.cpp @@ -22,8 +22,11 @@ #include "sp-gradient.h" #include "sp-stop.h" #include "svg/svg-color.h" +#include "util/units.h" +#include "ui/widget/unit-menu.h" using Inkscape::DocumentUndo; +using Inkscape::Util::unit_table; /** * Creates a new widget for the line stroke paint. @@ -189,22 +192,22 @@ StrokeStyle::StrokeStyle() : sp_dialog_defocus_on_enter_cpp(widthSpin); hb->pack_start(*widthSpin, false, false, 0); - unitSelector = sp_unit_selector_new(SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE); - Gtk::Widget *us = manage(Glib::wrap(unitSelector)); + unitSelector = new Inkscape::UI::Widget::UnitMenu(); + unitSelector->setUnitType(Inkscape::Util::UNIT_TYPE_LINEAR); + Gtk::Widget *us = manage(unitSelector); SPDesktop *desktop = SP_ACTIVE_DESKTOP; - if (desktop) - sp_unit_selector_set_unit (SP_UNIT_SELECTOR(unitSelector), sp_desktop_namedview(desktop)->doc_units); - sp_unit_selector_add_unit(SP_UNIT_SELECTOR(unitSelector), &sp_unit_get_by_id(SP_UNIT_PERCENT), 0); - g_signal_connect ( G_OBJECT (unitSelector), "set_unit", G_CALLBACK (StrokeStyle::setStrokeWidthUnit), this ); + unitSelector->addUnit(unit_table.getUnit("%")); + if (desktop) { + unitSelector->setUnit(sp_desktop_namedview(desktop)->doc_units->abbr); + _old_unit = new Inkscape::Util::Unit(*sp_desktop_namedview(desktop)->doc_units); + } + _old_unit = new Inkscape::Util::Unit(unitSelector->getUnit()); + widthSpin->setUnitMenu(unitSelector); + unitChangedConn = unitSelector->signal_changed().connect(sigc::mem_fun(*this, &StrokeStyle::unitChangedCB)); + us->show(); -#if WITH_GTKMM_3_0 - sp_unit_selector_add_adjustment( SP_UNIT_SELECTOR(unitSelector), GTK_ADJUSTMENT((*widthAdj)->gobj()) ); -#else - sp_unit_selector_add_adjustment( SP_UNIT_SELECTOR(unitSelector), GTK_ADJUSTMENT(widthAdj->gobj()) ); -#endif - hb->pack_start(*us, FALSE, FALSE, 0); #if WITH_GTKMM_3_0 @@ -519,75 +522,17 @@ void StrokeStyle::updateMarkerHist(SPMarkerLoc const which) } /** - * Sets the stroke width units for all selected items. - * Also handles absolute and dimensionless units. + * Callback for when UnitMenu widget is modified. + * Triggers update action. */ -gboolean StrokeStyle::setStrokeWidthUnit(SPUnitSelector *, - SPUnit const *old, - SPUnit const *new_units, - StrokeStyle *spw) +void StrokeStyle::unitChangedCB() { - if (spw->update) { - return FALSE; - } - - if (!spw->desktop) { - return FALSE; + Inkscape::Util::Unit new_unit = unitSelector->getUnit(); + if (new_unit.type == Inkscape::Util::UNIT_TYPE_DIMENSIONLESS) { + widthSpin->set_value(100); } - - Inkscape::Selection *selection = sp_desktop_selection (spw->desktop); - - if (selection->isEmpty()) - return FALSE; - - GSList const *objects = selection->itemList(); - - if ((old->base == SP_UNIT_ABSOLUTE || old->base == SP_UNIT_DEVICE) && - (new_units->base == SP_UNIT_DIMENSIONLESS)) { - - /* Absolute to percentage */ - spw->update = true; - -#if WITH_GTKMM_3_0 - float w = sp_units_get_pixels( (*spw->widthAdj)->get_value(), *old); -#else - float w = sp_units_get_pixels(spw->widthAdj->get_value(), *old); -#endif - - gdouble average = stroke_average_width (objects); - - if ((average == Geom::infinity()) || (average < 1e-8)){ //less than 1e-8: to campare against zero, while taking numeric accuracy into account - return FALSE; - } - -#if WITH_GTKMM_3_0 - (*spw->widthAdj)->set_value(100.0 * w / average); -#else - spw->widthAdj->set_value(100.0 * w / average); -#endif - - spw->update = false; - return TRUE; - - } else if ((old->base == SP_UNIT_DIMENSIONLESS) && - (new_units->base == SP_UNIT_ABSOLUTE || new_units->base == SP_UNIT_DEVICE)) { - - /* Percentage to absolute */ - spw->update = true; - - gdouble average = stroke_average_width (objects); - -#if WITH_GTKMM_3_0 - (*spw->widthAdj)->set_value (sp_pixels_get_units (0.01 * (*spw->widthAdj)->get_value() * average, *new_units)); -#else - spw->widthAdj->set_value (sp_pixels_get_units (0.01 * spw->widthAdj->get_value() * average, *new_units)); -#endif - - spw->update = false; - return TRUE; - } - - return FALSE; + widthSpin->set_value(Inkscape::Util::Quantity::convert(widthSpin->get_value(), *_old_unit, new_unit)); + _old_unit = new Inkscape::Util::Unit(new_unit); } /** @@ -877,21 +822,21 @@ StrokeStyle::updateLine() } else { table->set_sensitive(true); - SPUnit const *unit = sp_unit_selector_get_unit(SP_UNIT_SELECTOR(unitSelector)); + Inkscape::Util::Unit const *unit = new Inkscape::Util::Unit(unitSelector->getUnit()); if (result_sw == QUERY_STYLE_MULTIPLE_AVERAGED) { - sp_unit_selector_set_unit(SP_UNIT_SELECTOR(unitSelector), &sp_unit_get_by_id(SP_UNIT_PERCENT)); + unitSelector->setUnit("%"); } else { // same width, or only one object; no sense to keep percent, switch to absolute - if (unit->base != SP_UNIT_ABSOLUTE && unit->base != SP_UNIT_DEVICE) { - sp_unit_selector_set_unit(SP_UNIT_SELECTOR(unitSelector), sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units); + if (unit->type != Inkscape::Util::UNIT_TYPE_LINEAR) { + unitSelector->setUnit(sp_desktop_namedview(SP_ACTIVE_DESKTOP)->doc_units->abbr); } } - unit = sp_unit_selector_get_unit(SP_UNIT_SELECTOR(unitSelector)); + unit = new Inkscape::Util::Unit(unitSelector->getUnit()); - if (unit->base == SP_UNIT_ABSOLUTE || unit->base == SP_UNIT_DEVICE) { - double avgwidth = sp_pixels_get_units (query->stroke_width.computed, *unit); + if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) { + double avgwidth = Inkscape::Util::Quantity::convert(query->stroke_width.computed, "px", *unit); #if WITH_GTKMM_3_0 (*widthAdj)->set_value(avgwidth); #else @@ -1017,7 +962,7 @@ StrokeStyle::scaleLine() double const miterlimit = miterLimitAdj->get_value(); #endif - SPUnit const *const unit = sp_unit_selector_get_unit(SP_UNIT_SELECTOR(unitSelector)); + Inkscape::Util::Unit const *const unit = new Inkscape::Util::Unit(unitSelector->getUnit()); double *dash, offset; int ndash; @@ -1026,8 +971,8 @@ StrokeStyle::scaleLine() for (GSList const *i = items; i != NULL; i = i->next) { /* Set stroke width */ double width; - if (unit->base == SP_UNIT_ABSOLUTE || unit->base == SP_UNIT_DEVICE) { - width = sp_units_get_pixels (width_typed, *unit); + if (unit->type == Inkscape::Util::UNIT_TYPE_LINEAR) { + width = Inkscape::Util::Quantity::convert(width_typed, *unit, "px"); } else { // percentage gdouble old_w = SP_OBJECT(i->data)->style->stroke_width.computed; width = old_w * width_typed / 100; @@ -1053,7 +998,7 @@ StrokeStyle::scaleLine() g_free(dash); - if (unit->base != SP_UNIT_ABSOLUTE && unit->base != SP_UNIT_DEVICE) { + if (unit->type != Inkscape::Util::UNIT_TYPE_LINEAR) { // reset to 100 percent #if WITH_GTKMM_3_0 (*widthAdj)->set_value(100.0); diff --git a/src/widgets/stroke-style.h b/src/widgets/stroke-style.h index fd9940db1..440881c6d 100644 --- a/src/widgets/stroke-style.h +++ b/src/widgets/stroke-style.h @@ -40,8 +40,6 @@ #include "document-undo.h" #include "gradient-chemistry.h" #include "helper/stock-items.h" -#include "helper/unit-menu.h" -#include "helper/units.h" #include "inkscape.h" #include "io/sys.h" #include "marker.h" @@ -77,6 +75,17 @@ class Widget; class Container; } +namespace Inkscape { + namespace Util { + class Unit; + } + namespace UI { + namespace Widget { + class UnitMenu; + } + } +} + struct { gchar const *key; gint value; } const SPMarkerNames[] = { {"marker-all", SP_MARKER_LOC}, {"marker-start", SP_MARKER_LOC_START}, @@ -162,17 +171,13 @@ private: StrokeStyleButtonType button_type, gchar const *stroke_style); - static gboolean setStrokeWidthUnit(SPUnitSelector *, - SPUnit const *old, - SPUnit const *new_units, - StrokeStyle *spw); - // Callback functions void selectionModifiedCB(guint flags); void selectionChangedCB(); void widthChangedCB(); void miterLimitChangedCB(); void lineDashChangedCB(); + void unitChangedCB(); static void markerSelectCB(MarkerComboBox *marker_combo, StrokeStyle *spw, SPMarkerLoc const which); static void buttonToggledCB(StrokeStyleButton *tb, StrokeStyle *spw); @@ -191,7 +196,7 @@ private: #endif Inkscape::UI::Widget::SpinButton *miterLimitSpin; Inkscape::UI::Widget::SpinButton *widthSpin; - GtkWidget *unitSelector; + Inkscape::UI::Widget::UnitMenu *unitSelector; StrokeStyleButton *joinMiter; StrokeStyleButton *joinRound; StrokeStyleButton *joinBevel; @@ -207,6 +212,9 @@ private: sigc::connection startMarkerConn; sigc::connection midMarkerConn; sigc::connection endMarkerConn; + sigc::connection unitChangedConn; + + Inkscape::Util::Unit *_old_unit; }; } // namespace Inkscape diff --git a/src/widgets/text-toolbar.cpp b/src/widgets/text-toolbar.cpp index 87cb54d10..7554f4faf 100644 --- a/src/widgets/text-toolbar.cpp +++ b/src/widgets/text-toolbar.cpp @@ -56,9 +56,6 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../sp-namedview.h" #include "../svg/css-ostringstream.h" @@ -72,7 +69,6 @@ #include "widgets/font-selector.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -1217,11 +1213,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje Inkscape::Preferences *prefs = Inkscape::Preferences::get(); Inkscape::IconSize secondarySize = ToolboxFactory::prefToSize("/toolbox/secondary", 1); - // Is this used? - UnitTracker* tracker = new UnitTracker( SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE ); - tracker->setActiveUnit( sp_desktop_namedview(desktop)->doc_units ); - g_object_set_data( holder, "tracker", tracker ); - /* Font family */ { // Font list @@ -1462,7 +1453,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/lineheight", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ @@ -1493,7 +1483,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/wordspacing", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ @@ -1524,7 +1513,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/letterspacing", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ @@ -1555,7 +1543,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/dx", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ @@ -1586,7 +1573,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/dy", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ @@ -1617,7 +1603,6 @@ void sp_text_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObje "/tools/text/rotation", /* preferences path */ 0.0, /* default */ GTK_WIDGET(desktop->canvas), /* focusTarget */ - NULL, /* unit selector */ holder, /* dataKludge */ FALSE, /* set alt-x keyboard shortcut? */ NULL, /* altx_mark */ diff --git a/src/widgets/toolbox.cpp b/src/widgets/toolbox.cpp index 4c8af75ca..340359ca7 100644 --- a/src/widgets/toolbox.cpp +++ b/src/widgets/toolbox.cpp @@ -49,9 +49,6 @@ #include "../graphlayout.h" #include "../helper/action.h" #include "../helper/action-context.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "icon.h" #include "../ink-action.h" #include "../ink-comboboxentry-action.h" @@ -79,7 +76,7 @@ #include "calligraphy-toolbar.h" #include "connector-toolbar.h" #include "dropper-toolbar.h" -#include "erasor-toolbar.h" +#include "eraser-toolbar.h" #include "gradient-toolbar.h" #include "lpe-toolbar.h" #include "mesh-toolbar.h" @@ -101,7 +98,6 @@ //#define DEBUG_TEXT -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::PrefPusher; @@ -1031,7 +1027,6 @@ EgeAdjustmentAction * create_adjustment_action( gchar const *name, gchar const *label, gchar const *shortLabel, gchar const *tooltip, Glib::ustring const &path, gdouble def, GtkWidget *focusTarget, - GtkWidget *us, GObject *dataKludge, gboolean altx, gchar const *altx_mark, gdouble lower, gdouble upper, gdouble step, gdouble page, @@ -1048,9 +1043,6 @@ EgeAdjustmentAction * create_adjustment_action( gchar const *name, Inkscape::Preferences *prefs = Inkscape::Preferences::get(); GtkAdjustment* adj = GTK_ADJUSTMENT( gtk_adjustment_new( prefs->getDouble(path, def) * factor, lower, upper, step, page, 0 ) ); - if (us) { - sp_unit_selector_add_adjustment( SP_UNIT_SELECTOR(us), adj ); - } g_signal_connect( G_OBJECT(adj), "value-changed", G_CALLBACK(callback), dataKludge ); diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h index 9c839a8fe..197f0fb5e 100644 --- a/src/widgets/toolbox.h +++ b/src/widgets/toolbox.h @@ -118,7 +118,6 @@ void delete_connection(GObject * /*obj*/, sigc::connection *connection); gchar const *label, gchar const *shortLabel, gchar const *tooltip, Glib::ustring const &path, gdouble def, GtkWidget *focusTarget, - GtkWidget *us, GObject *dataKludge, gboolean altx, gchar const *altx_mark, gdouble lower, gdouble upper, gdouble step, gdouble page, diff --git a/src/widgets/tweak-toolbar.cpp b/src/widgets/tweak-toolbar.cpp index beb527a17..d5fe67ef7 100644 --- a/src/widgets/tweak-toolbar.cpp +++ b/src/widgets/tweak-toolbar.cpp @@ -52,13 +52,9 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../tweak-context.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; @@ -145,7 +141,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj EgeAdjustmentAction *eact = create_adjustment_action( "TweakWidthAction", _("Width"), _("Width:"), _("The width of the tweak area (relative to the visible canvas area)"), "/tools/tweak/width", 15, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "altx-tweak", + GTK_WIDGET(desktop->canvas), holder, TRUE, "altx-tweak", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_tweak_width_value_changed, 0.01, 0, 100 ); @@ -162,7 +158,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj EgeAdjustmentAction *eact = create_adjustment_action( "TweakForceAction", _("Force"), _("Force:"), _("The force of the tweak action"), "/tools/tweak/force", 20, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "tweak-force", + GTK_WIDGET(desktop->canvas), holder, TRUE, "tweak-force", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_tweak_force_value_changed, 0.01, 0, 100 ); @@ -371,7 +367,7 @@ void sp_tweak_toolbox_prep(SPDesktop *desktop, GtkActionGroup* mainActions, GObj _("Fidelity"), _("Fidelity:"), _("Low fidelity simplifies paths; high fidelity preserves path features but may generate a lot of new nodes"), "/tools/tweak/fidelity", 50, - GTK_WIDGET(desktop->canvas), NULL, holder, TRUE, "tweak-fidelity", + GTK_WIDGET(desktop->canvas), holder, TRUE, "tweak-fidelity", 1, 100, 1.0, 10.0, labels, values, G_N_ELEMENTS(labels), sp_tweak_fidelity_value_changed, 0.01, 0, 100 ); diff --git a/src/widgets/zoom-toolbar.cpp b/src/widgets/zoom-toolbar.cpp index 7d7f2c774..9cdbc3d6a 100644 --- a/src/widgets/zoom-toolbar.cpp +++ b/src/widgets/zoom-toolbar.cpp @@ -51,14 +51,10 @@ #include "../xml/repr.h" #include "ui/uxmanager.h" #include "../ui/icon-names.h" -#include "../helper/unit-menu.h" -#include "../helper/units.h" -#include "../helper/unit-tracker.h" #include "../pen-context.h" #include "../tweak-context.h" -using Inkscape::UnitTracker; using Inkscape::UI::UXManager; using Inkscape::DocumentUndo; using Inkscape::UI::ToolboxFactory; diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 1b6116936..af47779fe 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -504,7 +504,6 @@ gint sp_repr_qualified_name (gchar *p, gint len, xmlNsPtr ns, const xmlChar *nam static Node *sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gchar *default_ns, GHashTable *prefix_map) { - Node *repr, *crepr; xmlAttrPtr prop; xmlNodePtr child; gchar c[256]; @@ -544,7 +543,7 @@ static Node *sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gc } sp_repr_qualified_name (c, 256, node->ns, node->name, default_ns, prefix_map); - repr = xml_doc->createElement(c); + Node *repr = xml_doc->createElement(c); /* TODO remember node->ns->prefix if node->ns != NULL */ for (prop = node->properties; prop != NULL; prop = prop->next) { @@ -561,7 +560,7 @@ static Node *sp_repr_svg_read_node (Document *xml_doc, xmlNodePtr node, const gc child = node->xmlChildrenNode; for (child = node->xmlChildrenNode; child != NULL; child = child->next) { - crepr = sp_repr_svg_read_node (xml_doc, child, default_ns, prefix_map); + Node *crepr = sp_repr_svg_read_node (xml_doc, child, default_ns, prefix_map); if (crepr) { repr->appendChild(crepr); Inkscape::GC::release(crepr); |
