SVG Tiny 1.2 - 20050413

B IDL Definitions

This appendix contains the complete OMG IDL for the SVG UDOM.

The SVG UDOM IDL defines the model for the SVG UDOM. Note that the SVG UDOM IDL is defined such that some interfaces have more than one base class. The different standard language bindings for the SVG UDOM are responsible for defining how to map all aspects of the SVG UDOM into the given language, including how the language should implement interfaces with more than one base class.


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;
    typedef Object DOMObject;
    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;
        readonly attribute Document ownerDocument;
        attribute DOMString textContent;
        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
    {
        DOMString getAttributeNS(in DOMString namespaceURI, in DOMString localName) raises(DOMException);  
        void setAttributeNS(in DOMString namespaceURI, in DOMString localName, in DOMString value);
    };

    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 addEventListenerNS(in DOMString namespaceURI, in DOMString type, in EventListener listener, in boolean useCapture);
        void removeEventListenerNS(in DOMString namespaceURI, in DOMString type, in EventListener listener, in boolean useCapture);
    };

    interface EventListener
    {
        void handleEvent(in Event evt);
    };

    interface Event
    {
        readonly attribute EventTarget target;
        readonly attribute EventTarget currentTarget;
        readonly attribute DOMString type;
    };

    interface OriginalEvent 
    {
        readonly attribute Event originalEvent;
    };

    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;
    };

    interface TimeEvent : Event 
    {
        readonly attribute long detail;
    };

    interface WheelEvent : Event 
    {
        readonly attribute int wheelDelta;
    };

    interface ProgressEvent : Event 
    {
        readonly attribute boolean lengthComputable;
        readonly attribute DOMString typeArg;
        readonly attribute unsigned long loaded;
        readonly attribute unsigned long total;
    };

};

module smil
{

    interface ElementTimeControl
    {
        void beginElementAt(in float offset);
        void beginElement();
        void endElementAt(in float offset);
        void endElement();
        void pauseElement();
        void resumeElement();
        readonly attribute boolean isPaused; 
    };

};

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;
    typedef dom::DOMObject DOMObject;
    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, events::EventTarget 
    {
        readonly attribute SVGGlobal global;
    };

    interface SVGElementInstance : events::EventTarget 
    {
        readonly attribute SVGElement correspondingElement;
        readonly attribute SVGElement correspondingUseElement;
    };

    interface SVGSVGElement : SVGLocatableElement : SVGAnimationElement
    {
        const unsigned short FOCUS_AUTO     = 1; 
    const unsigned short FOCUS_NEXT     = 2; 
    const unsigned short FOCUS_PREV     = 3; 
    const unsigned short FOCUS_NORTH        = 4; 
    const unsigned short FOCUS_NORTH_EAST   = 5; 
    const unsigned short FOCUS_EAST     = 6; 
        const unsigned short FOCUS_SOUTH_EAST   = 7;
        const unsigned short FOCUS_SOUTH    = 8;
        const unsigned short FOCUS_SOUTH_WEST   = 9;
        const unsigned short FOCUS_WEST     = 10;
        const unsigned short FOCUS_NORTH_WEST   = 11;
        attribute float currentScale;
        attribute float currentRotate;
        readonly attribute SVGPoint currentTranslate;
        readonly attribute SVGRect viewport; 
        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);
        void moveFocus(in unsigned short motionType) raises(DOMException);
        void setFocus(in DOMObject object) raises(DOMException);
        DOMObject getCurrentFocusedObject();
    };

    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 inverse() 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);
        DOMString getPresentationTrait(in DOMString name) raises(DOMException);
        DOMString getPresentationTraitNS(in DOMString namespaceURI, in DOMString name) raises(DOMException);
        float getFloatPresentationTrait(in DOMString name) raises(DOMException);
        SVGMatrix getMatrixPresentationTrait(in DOMString name) raises(DOMException);
        SVGRect getRectPresentationTrait(in DOMString name) raises(DOMException);
        SVGPath getPathPresentationTrait(in DOMString name) raises(DOMException);
        SVGRGBColor getRGBColorPresentationTrait(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 SVGVisualMediaElement : SVGLocatableElement, SVGAnimationElement 
    {
    };

    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;
    };

};