pragmas { java.jni.api.name="org.w3c.dom"; core.package.vendor="W3C"; core.package.name="SVG Tiny"; core.package.id="svgt"; }; [ comment="subsetted Core DOM"; java.jni.api.name="org.w3c.dom"; ] module dom { typedef string DOMString; interface Node; interface Element; interface Document; exception DOMException { unsigned short code; }; const unsigned short WRONG_DOCUMENT_ERR = 4; const unsigned short INDEX_SIZE_ERR = 1; const unsigned short HIERARCHY_REQUEST_ERR = 3; const unsigned short NO_MODIFICATION_ALLOWED_ERR = 7; const unsigned short NOT_FOUND_ERR = 8; const unsigned short NOT_SUPPORTED_ERR = 9; const unsigned short INVALID_STATE_ERR = 11; const unsigned short INVALID_MODIFICATION_ERR = 13; const unsigned short INVALID_ACCESS_ERR = 15; const unsigned short TYPE_MISMATCH_ERR = 17; interface Node { readonly attribute DOMString namespaceURI; readonly attribute DOMString localName; readonly attribute Node parentNode; Node appendChild(in Node newChild) raises(DOMException); Node insertBefore(in Node newChild, in Node refChild) raises(DOMException); Node removeChild(in Node oldChild) raises(DOMException); }; interface Element : Node { }; interface Document : Node { Element createElementNS(in DOMString namespaceURI, in DOMString qualifiedName) raises(DOMException); readonly attribute Element documentElement; Element getElementById(in DOMString id); }; }; module events { typedef dom::DOMString DOMString; typedef dom::DOMException DOMException; typedef dom::Document Document; typedef dom::Element Element; interface EventTarget; interface EventListener; interface Event; interface EventTarget { void addEventListener(in DOMString type, in EventListener listener, in boolean useCapture); void removeEventListener(in DOMString type, in EventListener listener, in boolean useCapture); }; interface EventListener { void handleEvent(in Event evt); }; interface Event { readonly attribute EventTarget currentTarget; readonly attribute DOMString type; }; interface MouseEvent : Event { readonly attribute long screenX; readonly attribute long screenY; readonly attribute long clientX; readonly attribute long clientY; readonly attribute unsigned short button; }; interface TextEvent : Event { readonly attribute DOMString data; }; interface KeyboardEvent : Event { readonly attribute DOMString keyIdentifier; }; interface ConnectionEvent : Event { readonly attribute DOMString data; }; }; module smil { interface ElementTimeControl { void beginElementAt(in float offset); void beginElement(); void endElementAt(in float offset); void endElement(); void pauseElement(); void unpauseElement(); readonly attribute boolean elementPaused; }; }; module global { interface Connection; interface Global {}; interface Connection : events::EventTarget { typedef dom::DOMString DOMString; typedef dom::DOMException DOMException; void connect(in DOMString uri) raises(DOMException); void send(in DOMString data); void close(); readonly attribute boolean connected; }; }; module svg { typedef dom::DOMString DOMString; typedef dom::DOMException DOMException; typedef dom::Document Document; typedef dom::Element Element; interface SVGSVGElement; interface SVGRGBColor; interface SVGRect; interface SVGPoint; interface SVGPath; interface SVGMatrix; interface SVGLocatableElement; interface SVGElement; interface SVGAnimationElement; interface SVGDocument; interface SVGGlobal; exception SVGException { unsigned short code; }; const unsigned short SVG_INVALID_VALUE_ERR = 1; const unsigned short SVG_MATRIX_NOT_INVERTABLE = 2; interface SVGDocument : Document { readonly attribute SVGGlobal global; }; interface SVGSVGElement : SVGLocatableElement { attribute float currentScale; attribute float currentRotate; readonly attribute SVGPoint currentTranslate; readonly attribute SVGRect viewport; void pauseAnimations(); void unpauseAnimations(); boolean animationsPaused(); attribute float currentTime; SVGMatrix createSVGMatrixComponents(in float a, in float b, in float c, in float d, in float e, in float f); SVGRect createSVGRect(); SVGPath createSVGPath(); SVGRGBColor createSVGRGBColor(in long red, in long green, in long blue) raises(SVGException); }; interface SVGRGBColor { readonly attribute unsigned long red; readonly attribute unsigned long green; readonly attribute unsigned long blue; }; interface SVGRect { attribute float x; attribute float y; attribute float width; attribute float height; }; interface SVGPoint { attribute float x; attribute float y; }; interface SVGPath { const unsigned short MOVE_TO = 77; const unsigned short LINE_TO = 76; const unsigned short CURVE_TO = 67; const unsigned short QUAD_TO = 81; const unsigned short CLOSE = 90; readonly attribute unsigned long numberOfSegments; unsigned short getSegment(in unsigned long cmdIndex) raises(DOMException); float getSegmentParam(in unsigned long cmdIndex, in unsigned long paramIndex) raises(DOMException); void moveTo(in float x, in float y); void lineTo(in float x, in float y); void quadTo(in float x1, in float y1, in float x2, in float y2); void curveTo(in float x1, in float y1, in float x2, in float y2, in float x3, in float y3); void close(); }; interface SVGMatrix { float getComponent(in unsigned long index) raises(DOMException); SVGMatrix mMultiply(in SVGMatrix secondMatrix); SVGMatrix mInverse() raises(SVGException); SVGMatrix mTranslate(in float x, in float y); SVGMatrix mScale(in float scaleFactor); SVGMatrix mRotate(in float angle); }; interface SVGLocatable { SVGRect getBBox(); SVGMatrix getScreenCTM(); SVGRect getScreenBBox(); }; interface SVGLocatableElement : SVGElement, SVGLocatable { }; interface TraitAccess { DOMString getTrait(in DOMString name) raises(DOMException); DOMString getTraitNS(in DOMString namespaceURI, in DOMString name) raises(DOMException); float getFloatTrait(in DOMString name) raises(DOMException); SVGMatrix getMatrixTrait(in DOMString name) raises(DOMException); SVGRect getRectTrait(in DOMString name) raises(DOMException); SVGPath getPathTrait(in DOMString name) raises(DOMException); SVGRGBColor getRGBColorTrait(in DOMString name) raises(DOMException); void setTrait(in DOMString name, in DOMString value) raises(DOMException); void setTraitNS(in DOMString namespaceURI, in DOMString name, in DOMString value) raises(DOMException); void setFloatTrait(in DOMString name, in float value) raises(DOMException); void setMatrixTrait(in DOMString name, in SVGMatrix matrix) raises(DOMException); void setRectTrait(in DOMString name, in SVGRect rect) raises(DOMException); void setPathTrait(in DOMString name, in SVGPath path) raises(DOMException); void setRGBColorTrait(in DOMString name, in SVGRGBColor color) raises(DOMException); }; interface ElementTraversal { readonly attribute Element firstElementChild; readonly attribute Element lastElementChild; readonly attribute Element nextElementSibling; readonly attribute Element previousElementSibling; }; interface SVGElement : dom::Element, events::EventTarget, TraitAccess, ElementTraversal { attribute DOMString id; }; interface SVGAnimationElement : SVGElement, smil::ElementTimeControl { }; interface EventListenerInitializer { void initializeEventListeners( in SVGDocument doc); }; interface EventListenerInitializer2 { void initializeEventListeners( in dom::Element scriptElement ); events::EventListener createEventListener( in dom::Element handlerElement ); }; interface SVGGlobal : global::Global { global::Connection createConnection(); void gotoLocation(in DOMString newURI); readonly attribute Document document; readonly attribute global::Global parent; }; };