diff -r 000000000000 -r 88edb906c587 svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/svgt_plat/svgt_api/inc/SvgJavaInterfaceImpl.h Wed Nov 03 18:56:10 2010 +0200
@@ -0,0 +1,2673 @@
+/*
+* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SVG Engine header file
+ *
+*/
+
+
+ #ifndef _INC_SVGJAVAINTERFACEIMPL_
+ #define _INC_SVGJAVAINTERFACEIMPL_
+
+#if !defined(__E32BASE_H__)
+#include The SVG Document is a subset of the Document interface defined
+ * in the
+ * DOM Level 3 Core.
+ * An SVG element's "traits" value can be read and manipulated. Each trait
+ * corresponds to an attribute or property,which is parsed and understood by the element
+ * and in most cases animatable. Unlike attributes, each element has a
+ * well-defined set of traits and attempting to access undefined trait is an error. Also unlike
+ * attributes traits are typed and their values are normalized; for instance SVG path specification
+ * is parsed and all path commands are converted to their absolute variants, it is not possible to
+ * say through the value of the trait if a path command was absolute or relative. When getting and
+ * setting trait values, accessor of the correct type must be used or exception will be thrown.
+ *
+ * Initial trait values come from parsing corresponding attributes. If value is not specified, but
+ * corresponing attribute (or property for environments where styling is supported) is inherited,
+ * inherited value is returned as a result of the trait query method. If it is not inherited, default
+ * value is returned. Default values are also returned in the case when there is no parent to inherit
+ * from, for ex: when you create a new element, set a trait value to 'inherit', but there is no parent for
+ * inheritance. It is important to note that the value which is returned is always a base value (i.e. before animation
+ * is applied), and this is true for both static and animated content.
+ *
+ * Setting a trait value has the same effect as changing a corresponding attribute, but trait
+ * setters can operate on typed values. The value which is modified is always a base value.
+ * For inheritable traits the trait value can always be set to "inherit"
+ * (but querying the value will always return the actual inherited value as explained above).
+ * The table below shows the list of attributes and properties that SVG Tiny
+ * DOM 1.1 implementations must support. Each light gray section lists one or
+ * multiple elements for which the subsequent attributes or properties
+ * apply. Each attribute row lists the allowed getter and setter (s). The last
+ * column specifies the default values that must be used for each attribute or
+ * property. Note: For 'REQUIRED' attributes, there are two cases:
+ *
+ *
+ *
+ */
+
+// *****************************************************************************
+// SVG Rendering Surface Functions
+// *****************************************************************************
+/**
+ * The SVG Rendering Surface functions are not used in java side.
+ *
+
+// ***********************************************************************
+// SVG Document
+// ***********************************************************************
+/**
+ * The SVG Document represents an XML Document.
+ * Traits supported in this specification, SVG Tiny 1.1 DOM
+ *
+ *
+ *
+ *
Property + * |
+ * Trait Getter [possible return value(s)] + * |
+ * Trait Setter [allowed value(s)] + * |
+ * Default Values + * |
+ *
---|---|---|---|
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<svg>, + * <rect>, <circle>, <ellipse>, <line>, + * <path>, <g>, <image>, <text>, <a>, and <use> | + *|||
color + * |
+ * getRGBColorTrait [SVGRGBColor] + * |
+ * setTrait [inherit] setRGBColorTrait [SVGRGBColor] + * |
+ * rgb(0,0,0) + * |
+ *
display + * |
+ * getTrait [inline | none ] + * |
+ * setTrait [inline | none | inherit ] | + *"inline" + * |
+ *
fill + * |
+ * getRGBColorTrait [null, SVGRGBColor] + * |
+ * setRGBColorTrait [SVGRGBColor] setTrait(none | currentColor | inherit) + * |
+ * rgb(0,0,0) + * |
+ *
fill-rule + * |
+ * getTrait [nonzero | evenodd] + * |
+ * setTrait [nonzero | evenodd | inherit] | + *"nonzero" + * |
+ *
stroke | + *getRGBColorTrait [null, SVGRGBColor] | + *setRGBColorTrait [SVGRGBColor] setTrait [none | currentColor | inherit] |
+ * "none" + * |
+ *
stroke-dashoffset | + *getFloatTrait | + *setTrait [inherit] setFloatTrait |
+ * 0.0f + * |
+ *
stroke-linecap | + *getTrait [butt | round | square] | + *setTrait [butt | round | square | inherit] | + *"butt" + * |
+ *
stroke-linejoin | + *getTrait [miter | round | bevel ] | + *setTrait [miter | round | bevel | inherit] | + *"miter" + * |
+ *
stroke-miterlimit | + *getFloatTrait [ value >= 1] | + *setTrait [inherit] setFloatTrait [value >= 1] |
+ * 4.0f + * |
+ *
stroke-width | + *getFloatTrait [value >= 0] | + *setTrait [inherit] setFloatTrait [value >= 0] |
+ * 1.0f + * |
+ *
visibility | + *getTrait [visible | hidden] | + *setTrait [visible | hidden | inherit] | + *"visible" + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<svg>, <text>, <g>, <a>, and <use>; + * |
+ * |||
font-family + * |
+ * getTrait [single, computed font-family value] + * |
+ * setTrait [same syntax as font-family attribute] + * |
+ * User-Agent + * |
+ *
font-size + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] setTrait [inherit] + * |
+ * User-Agent + * |
font-style + * |
+ * getTrait [normal | italic | oblique ] | + *setTrait [normal | italic | oblique | inherit] | + *"normal" + * |
font-weight + * |
+ * getTrait [100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 ] |
+ * setTrait [normal | bold | bolder | lighter | 100 | 200 | 300 + * | 400 | 500 | 600 | 700 | 800 | 900 | inherit] |
+ * "normal" + * |
text-anchor + * |
+ * getTrait [start | middle | end] + * |
+ * setTrait [start | middle | end | inherit ] + * |
+ * "start" + * |
+ * |
+ * |||
Attribute + * |
+ * Trait Getter + * |
+ * Trait Setter + * |
+ * Default Values + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
+ * <rect>, <circle>, <ellipse>, <line>, <path>, <g>, + * <image>, <text>, <a>, and <use> | + *|||
transform + * |
+ * getMatrixTrait [SVGMatrix] + * |
+ * setMatrixTrait [SVGMatrix] + * |
+ * Identity matrix + * (1,0,0,1,0,0) + * |
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<rect> + * |
+ * |||
height + * |
+ * getFloatTrait [ value >= 0] + * |
+ * setFloatTrait [ value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
width + * |
+ * getFloatTrait [ value >= 0] | + *setFloatTrait [ value >= 0] | + *REQUIRED (0.0f) + * |
+ *
x + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
rx + * |
+ * getFloatTrait [value >= 0] | + *setFloatTrait [value >= 0] | + *0.0f + * |
+ *
ry + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * 0.0f + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<circle> + * |
+ * |||
cx + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
cy + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
r + * |
+ * getFloatTrait [ value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<ellipse> + * |
+ * |||
cx + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
cy + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
rx + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
ry + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<line> + * |
+ * |||
x1 + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
x2 + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y1 + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y2 + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<path> (path-length is not supported) + * |
+ * |||
d + * |
+ * getPathTrait [SVGPath] + * |
+ * setPathTrait [SVGPath] + * |
+ * REQUIRED (Empty SVGPath) + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<image> + * |
+ * |||
x + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
width + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
height + * |
+ * getFloatTrait [value >= 0] + * |
+ * setFloatTrait [value >= 0] + * |
+ * REQUIRED (0.0f) + * |
+ *
xlink:href + * |
+ * getTrait NS[absolute URI] + * |
+ * setTraitNS [non local-URI value] + * |
+ * REQUIRED ( "" ) + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<use> + * |
+ * |||
x + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
xlink:href + * |
+ * getTraitNS[absolute URI] + * |
+ * setTraitNS + * |
+ * "" + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<a> + * |
+ * |||
target + * |
+ * getTrait + * |
+ * setTrait + * |
+ * "" + * |
+ *
xlink:href + * |
+ * getTraitNS[absolute URI] + * |
+ * setTraitNS + * |
+ * "" + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<text> (Notes: + * For 'x' and 'y', it is only possible + * to provide floating point scalar values; an array of x or y values is not supported. + * 'rotate' attribute is not supported.) + * |
+ * |||
x + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
y + * |
+ * getFloatTrait + * |
+ * setFloatTrait + * |
+ * 0.0f + * |
+ *
#text + * |
+ * getTrait [not null] + * |
+ * setTrait [not null] + * |
+ * "" + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
<svg> + * |
+ * |||
version + * |
+ * getTrait + * |
+ * Not available (readonly) + * |
+ * "1.1" + * |
+ *
baseProfile + * |
+ * getTrait + * |
+ * Not available (readonly) + * |
+ * "tiny" + * |
+ *
viewBox + * |
+ * getRectTrait [null, SVGRect] + * |
+ * setRectTrait [SVGRect] + * |
+ * null + * |
+ *
zoomAndPan + * |
+ * getTrait [disable | magnify] + * |
+ * setTrait [disable | magnify] + * |
+ * "magnify" + * |
+ *
+ * |
+ * + * |
+ * + * |
+ * + * |
+ *
The native implementations must support the following simplifications or + * canonicalization of path segments. Any simplifications should be lossless. + * + *
RENDERING_QUALITY_LOW
(=1) or RENDERING_QUALITY_HIGH
(=2).
+ * Default value is RENDERING_QUALITY_HIGH
.
+ * The implementation of these quality levels is implementation dependent and should
+ * be mapped to definitions in SVG spec (shape, text, image and color rendering)
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableGraphics#setRenderingQuality()
+ * @param aEngineHandle Engine handle.
+ * @param aQuality This value indicates the quality of rendering required.
+ */
+ IMPORT_C void SvgEngineSetRenderQuality( SvgEngineHandle aEngineHandle, TInt aQuality );
+
+ /**
+ * Request to render the SVG document.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableGraphics#render()
+ * @param aEngineHandle Svg engine handle
+ * @param aDocumentHandle Svg document handle
+ * @param aSurfaceHandle Svg surface handle
+ * @param aSurfaceMaskHandle Mask that defines what pixels should be thrown and what not.
+ * @param aCurrentTime Current frame time. NOTE might be obsolete since the
+ */
+ IMPORT_C void SvgEngineRenderDocument(
+ SvgEngineHandle aEngineHandle, SvgDocumentHandle aDocumentHandle,
+ TInt aSurfaceHandle, TInt aSurfaceMaskHandle = NULL, TReal32 aCurrentTime = 0.0f ) __SOFTFP;
+
+ IMPORT_C void SvgEngineRenderDocumentL(
+ SvgEngineHandle aEngineHandle, SvgDocumentHandle aDocumentHandle,
+ TInt aSurfaceHandle, const TPoint& aAnchor, const TRect& aRenderArea, TReal32 aCurrentTime, TReal32 aAlpha ) __SOFTFP;
+
+ /**
+ * Request to destroy the given engine by handle.
+ * NOTE: Java MIDlet could use multiple engines.
+ *
+ * @since 1.0
+ * @param aEngineHandle Engine
+ */
+ IMPORT_C void SvgEngineDestroy( SvgEngineHandle aEngineHandle );
+
+ /*
+ * Sets the animation back to time 0 and then starts the internal engine timer
+ * NOTE: Java doesn't use this method. Java uses own timer(s).
+ *
+ * @since 1.0
+ * @param aEngineHandle Engine
+ */
+ IMPORT_C void SvgEngineStart( SvgEngineHandle aEngineHandle );
+
+ /*
+ * Stops the internal SVG engine timer
+ * NOTE: Java doesn't use this method. Java uses own timer.
+ *
+ * @since 1.0
+ * @param aEngineHandle Engine
+ */
+ IMPORT_C void SvgEngineStop( SvgEngineHandle aEngineHandle );
+
+ /*
+ * Resumes the internal SVG engine timer
+ * NOTE: Java doesn't use this method. Java uses own timer.
+ *
+ * @since 1.0
+ * @param aEngineHandle Engine
+ */
+ IMPORT_C void SvgEngineResume( SvgEngineHandle aEngineHandle );
+
+ // *****************************************************************************
+ // SVG Rendering Surface Functions
+ // *****************************************************************************
+ /**
+ * Create a Svg Rendering Surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aWidth Width
+ * @param aHeight Height
+ * @return Surface
+ */
+ IMPORT_C SvgSurfaceHandle SvgRenderingSurfaceCreate( TInt aWidth, TInt aHeight );
+
+ /**
+ * Destroy a Svg Rendering Surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aSurface Surface
+ */
+ IMPORT_C void SvgRenderingSurfaceDestroy( SvgSurfaceHandle aSurface );
+
+ /**
+ * Get a pointer to the Svg Rendering surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aSurface Surface
+ * @return CFbsBitmap object
+ */
+ IMPORT_C TUint* SvgRenderingSurfaceGetBuffer( SvgSurfaceHandle aSurface );
+
+ /**
+ * Get the width of the Svg Rendering Surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aSurface Surface
+ * @return Width
+ */
+ IMPORT_C TInt SvgRenderingSurfaceGetWidth( SvgSurfaceHandle aSurface );
+ /**
+ * Get the height of the Svg Rendering Surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aSurface Surface
+ * @return Height
+ */
+ IMPORT_C TInt SvgRenderingSurfaceGetHeight( SvgSurfaceHandle aSurface );
+
+ /**
+ * Clear the Svg Rendering Surface.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aSurface Surface
+ */
+ IMPORT_C void SvgRenderingSurfaceClearBuffer( SvgSurfaceHandle aSurface );
+
+ // ***********************************************************************
+ // SVG Document
+ // ***********************************************************************
+ /**
+ * Create an empty svg document.
+ * NOTE: Java doesn't use this method.
+ * Java side uses the SvgDocumentCreateL
method to create an empty SVG document
+ * that contains a root <svg> element with default viewport size of 100x100.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#createEmptyImage()
+ * @return Svg Document.
+ */
+ IMPORT_C SvgDocumentHandle SvgDocumentCreateEmpty();
+
+ /**
+ * Create a svg document by parsing the given string.
+ * The image size is determined by the content specification
+ * (eg: width/height attributes on root SVG element). The default viewport size
+ * of 100-by-100 pixels is used when the size is unspecified. This method will throw an exception
+ * when the document is in error:
+ * SvgDocumentRequestCompleted
.
+ * However, please note that data URIs (for ex: base64 encoded images
+ * like <image xlink:href="data:image/png;base64,/9j/4AAQ..."/>)
+ * are required to be decoded by the native engine.
+ * The engine must only make one call if there exist multiple resources with the same URI.
+ *
+ * If a svg document contains external resources and SvgDocumentRequestCompleted
is not called
+ * then the engine's default implementation is used automatically, but it might not be able to load all of
+ * external resources. For example, if the svg document is loaded from a file in a Jar file,
+ * the implementation will not be able to load images that have relative
+ * URIs (ex; <image xlink:href="myImage.png" />).
+ *
+ * Note that SvgDocumentRequestCompleted
is also called when the xlink:href attribute on
+ * <image> is set or changed by the application, but the call is made only when the
+ * element is hooked into the document tree i.e. when the ancestors go all the way up to
+ * the root <svg> element. There are two cases:
+ *
NULL
for data (0
for data_size) indicates
+ * that the requested resource could not be fetched by java side, and in this event the SVG engine
+ * will not make further attempts to load this resource.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableImage#requestCompleted()
+ * @param hDocument SVG document handle
+ * @param uri External resource URI
+ * @param data External resource data
+ * @param data_size External resource data size
+ * @return TODO
+ */
+ EXPORT_C TInt SvgDocumentRequestCompleted( SvgDocumentHandle hDocument, const TPtrC16& aUri, const TPtrC8& );
+
+ /**
+ * Get an external item indicated in a SVG document.
+ * Java side might request an external resouce and once the requested external resource is available,
+ * java side forwards this information (SvgDocumentGetExternalListItem
) to the SVG engine.
+ * Note: Returning null
indicates that the SVG engine tryes to handle the requested resource.
+ *
+ * @since 1.0
+ * @param aDocumentHandle SVG document handle
+ * @param index External resource item index. Scale:
+ * index
< SvgDocumentGetExternalListSize
SvgDocumentCreateL
) java side checks if
+ * the SVG document contains external item(s)
+ *
+ * @since 1.0
+ * @param aDocumentHandle SVG document handle
+ * @return Number of external resource items
+ */
+ IMPORT_C TInt SvgDocumentGetExternalListSize( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Increments the animation or media timeline for the specified document aDocumentHandle
+ * (in seconds).
+ * This method is intended to move only forward in the timeline.
+ * It is important to note that setting large increments of time would result in
+ * skipping parts of the animation as per the SVG animation model.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#incrementTime()
+ * @see org.w3c.dom.svg.SVGSVGElement#setCurrentTime()
+ * @param aDocumentHandle SVG document handle.
+ * @param seconds the value of time to be set in seconds.
+ */
+ IMPORT_C void SvgDocumentSetMediaTime( SvgDocumentHandle aDocumentHandle, TReal32 seconds ) __SOFTFP;
+
+ /**
+ * Get current animation or media timeline time for the specified document.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGSVGElement#getCurrentTime()
+ * @param aDocumentHandle SVG document handle
+ * @return Returns current animation timeline time in seconds
+ */
+ IMPORT_C TReal32 SvgDocumentGetMediaTime( SvgDocumentHandle aDocumentHandle ) __SOFTFP;
+
+ /**
+ * Get the viewport width of the given SVG document.
+ * The value returned is always in pixels. If the specified width is defined in percentages, the
+ * values are mapped to the default view port size of 100x100. If the viewport width
+ * is explicitly changed by the java application, then the percentages are ignored and the content
+ * is made to fit to this new viewport width.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableImage#getViewportWidth()
+ * @see SvgDocumentSetViewportWidth
+ * @param aDocumentHandle SVG document handle
+ * @return the current width of the given SVG document.
+ */
+ IMPORT_C TInt SvgDocumentGetViewportWidth( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Get the viewport height of the given SVG document.
+ * The value returned is always in pixels. If the specified height is defined in percentages, the
+ * values are mapped to the default view port size of 100x100. If the viewport height
+ * is explicitly changed by the java application, then the percentages are ignored and the content
+ * is made to fit to this new viewport height.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableImage#getViewportHeight()
+ * @see SvgDocumentSetViewportHeight
+ * @param aDocumentHandle SVG document handle
+ * @return the current height of the given SVG document.
+ */
+ IMPORT_C TInt SvgDocumentGetViewportHeight( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Set the new (viewport) width for the given SVG document.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableImage#setViewportWidth()
+ * @see SvgDocumentGetViewportWidth
+ * @param aDocumentHandle SVG document handle
+ * @param aWidth The new width to be set.
+ */
+ IMPORT_C void SvgDocumentSetViewportWidth( SvgDocumentHandle aDocumentHandle, TInt aWidth );
+
+ /**
+ * Set the new (viewport) height for the given SVG document.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.ScalableImage#setViewportHeight()
+ * @see SvgDocumentGetViewportHeight
+ * @param aDocumentHandle SVG document handle
+ * @param aHeight The new height to be set.
+ */
+ IMPORT_C void SvgDocumentSetViewportHeight( SvgDocumentHandle aDocumentHandle, TInt aHeight );
+
+ /**
+ * Set the default viewport size for the given SVG document.
+ * The default viewport size of 100-by-100 pixels is used when the size is unspecified.
+ *
+ * @since 1.0
+ * @param aDocumentHandle Document
+ */
+ IMPORT_C void SvgDocumentViewportInit( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Get the viewport width units for the given document.
+ * NOTE: Java side is not actually need this method.
+ *
+ * @since 1.0
+ * @param aDocumentHandle Document
+ * @return 1
if pixels or 0
if percentages
+ */
+ IMPORT_C TInt SvgDocumentGetViewportWidthUnits( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Get the viewport height units for the given document.
+ * NOTE: Java side is not actually need this method.
+ *
+ * @since 1.0
+ * @param aDocumentHandle Document
+ * @return 1
if pixels or 0
if percentages
+ */
+ IMPORT_C TInt SvgDocumentGetViewportHeightUnits( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Return a child element of the given SVG document Node which corresponds to the top-most
+ * tag in XML file. For SVG files it must be SVGSVGElement
.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Document#getDocumentElement()
+ * @param aDocumentHandle SVG document handle
+ * @return The root element associated with the given SVG document.
+ */
+ IMPORT_C SvgElementHandle SvgDocumentGetRootElement( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Get the svg element in the given SVG document with
+ * the given unique ID string.If no such element exists, this returns NULL.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Document#getElementById()
+ * @param aDocumentHandle SVG document handle
+ * @param aId the ID of the element to be retrieved.
+ * @return An element handle that matches with the given ID or
+ * NULL
if the ID is not present.
+ */
+ IMPORT_C SvgElementHandle SvgDocumentGetElementById( SvgDocumentHandle aDocumentHandle, const TPtrC16& aID );
+
+ /**
+ * Get the number of ids in the current SVG document.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aDocumentHandle SVG document handle
+ */
+ IMPORT_C TInt SvgDocumentGetNumberOfIds(SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Get an id (at index) from the current SVG document.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aDocumentHandle SVG document handle
+ * @param index ID index
+ * @return ID string
+ */
+ IMPORT_C TInt SvgDocumentGetId(SvgDocumentHandle aDocumentHandle, TInt index, TPtrC16& aId);
+
+ /**
+ * Set the begin animation time for the given element in the given SVG document.
+ * The new time is added to the
+ * begin instance times list.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGAnimationElement#beginElementAt()
+ * @param aDocumentHandle SVG document handle
+ * @param aElementHandle Element handle
+ * @param aOffsetTime The time in seconds at which to begin the element.
+ */
+ IMPORT_C void SvgDocumentBeginElementAt( SvgDocumentHandle aDocumentHandle,
+ SvgElementHandle aElementHandle,
+ TReal32 aOffsetTime ) __SOFTFP;
+
+ /**
+ * Set the end animation time for the given element in the given SVG document.
+ * The new time is added to the
+ * end instance times list.
+ * NOTE: Native engine checks the element is active before set the new end time.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGAnimationElement#endElementAt()
+ * @param aDocumentHandle SVG document handle
+ * @param aElementHandle Element handle
+ * @param aOffsetTime The time in seconds at which to end the element.
+ */
+ IMPORT_C void SvgDocumentEndElementAt( SvgDocumentHandle aDocumentHandle,
+ SvgElementHandle aElementHandle,
+ TReal32 aOffsetTime ) __SOFTFP;
+
+ /**
+ * Set the given element to have the focus in the given SVG document.
+ * The initial focus is always null
and setting
+ * NULL
will remove the current focus.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#focusOn()
+ * @param aDocumentHandle SVG document handle
+ * @param aElementHandle The element to set the focus on.
+
+ * changes made for Focus-in/focus-out bug(AMIA-6T8EEG)
+ */
+ IMPORT_C void SvgDocumentFocusOn( SvgDocumentHandle aDocumentHandle,
+ SvgElementHandle aElementHandle );
+
+ /**
+ * Get the element having the focus.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#focusOn()
+ * @param aDocumentHandle SVG document handle
+ * @return The element focused.
+ */
+ IMPORT_C SvgElementHandle SvgDocumentGetFocus( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Activate the element that has the focus.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#activate()
+ * @param aDocumentHandle SVG document handle
+ */
+ IMPORT_C void SvgDocumentActivate( SvgDocumentHandle aDocumentHandle );
+
+ /**
+ * Request a mouse event at the given coordinate.
+ * This method is used to dispatch a mouse "click" event to the given
+ * document. The mouse position is given as screen coordinates aMouseX, aMouseY
.
+ * If the aMouseX, aMouseY values are outside the viewport area or no target is available
+ * for the aMouseX, aMouseY coordinates, the event is not dispatched.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#dispatchMouseEvent()
+ * @param aDocumentHandle SVG document handle
+ * @param aMouseX The x location of the mouse/pointer in viewport coordinate system.
+ * @param aMouseX The y location of the mouse/pointer in viewport coordinate system.
+ * @return Element handle to where mouse was clicked. Return null if no hit.
+ */
+ IMPORT_C SvgElementHandle SvgDocumentDispatchMouseEvent( SvgDocumentHandle aDocumentHandle,
+ TInt aMouseX, TInt aMouseY );
+
+ /**
+ * Check if document has animation.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aDocumentHandle SVG document handle
+ * @param TBool . ETrue if animation present otherwise EFalse.
+ */
+ IMPORT_C TInt SvgDocumentHasAnimation( SvgDocumentHandle aDocumentHandle );
+
+
+ // ***********************************************************************
+ // SVG Element
+ // ***********************************************************************
+ /**
+ * Create a new svg element based on the specified
+ * (aType
) SVG tag name. Only the following elements must be supported:
+ * <rect>, <circle>, <ellipse>, <line>,
+ * <path> <use> <image> <text>,
+ * <a> and <g>.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Document#createElementNS()
+ * @param aType
+ * @return handle to the newly created SVG Element.
+ */
+ IMPORT_C SvgElementHandle SvgElementCreate( SvgAttrType aType );
+
+ /**
+ * Destroy svg element of the given handle.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param hElement Element handle
+ */
+ IMPORT_C void SvgElementDestroy( SvgElementHandle hElement );
+
+ /**
+ * Returns a parent element of the given element.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getParentNode()
+ * @param aElementHandle Element handle
+ * @return The parent element or NULL
if there is no parent
+ * (i.e. if a element has just been created and not yet added to the tree,
+ * or if it has been removed from the tree, this is null).
+ */
+ IMPORT_C SvgElementHandle SvgElementGetParent( SvgElementHandle aElementHandle );
+
+ /**
+ * Returns the first child element node of the given element.
+ * Return NULL
if this element has no child elements.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getFirstElementChild()
+ * @param aElementHandle Element handle
+ * @return The first child element node of the given element.
+ */
+ IMPORT_C SvgElementHandle SvgElementGetFirstElementChild( SvgElementHandle aElementHandle );
+
+ /**
+ * Returns the next sibling element of the given element.
+ * Return NULL
if the given element has no element sibling
+ * nodes that come after this one in the document tree.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getNextElementSibling()
+ * @param aElementHandle Element handle
+ * @return The next sibling element node of this element.
+ */
+ IMPORT_C SvgElementHandle SvgElementGetNextElementSibling( SvgElementHandle aElementHandle );
+
+ /**
+ * Append the given child element to the given svg element.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Node#appendChild()
+ * @param aElementHandle Element handle
+ * @param aChildElementHandle New child element handle
+ * @return Next sibling element
+ */
+ IMPORT_C void SvgElementAppendChild( SvgElementHandle aElementHandle,
+ SvgElementHandle aChildElementHandle );
+
+ /**
+ * Remove the given child element from the given svg element.
+ * Elements that have ids cannot be removed from the tree.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Node#removeChild()
+ * @param aElementHandle The parent element.
+ * @param aChildElementHandle The element that is to be removed
+ * TODO @return Handle to the removed element. Return NULL
+ * if operation failed.
+ */
+ IMPORT_C SvgElementHandle SvgElementRemoveChild( SvgElementHandle aElementHandle,
+ SvgElementHandle aChildElementHandle );
+
+ /**
+ * Inserts aChildElementHandle
before aReferenceElementHandle
+ * in the child list for the aElementHandle
. If aReferenceElementHandle
+ * is NULL
, aChildElementHandle
is inserted at the end of the list.
+ * If the aChildElementHandle
is already part of the tree, it is first removed.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Node#insertBefore()
+ * @param aElementHandle The parent element.
+ * @param aChildElementHandle The child to add
+ * @param aReferenceElementHandle The child before which the new child should be added.
+ * @throws TODO Should throw exception if the aChildElementHandle
would cause
+ * the SVG document to go into error, for ex: when the newChild contains a <use>
+ * element with an invalid xlink:href attribute.
+ */
+ IMPORT_C void SvgElementInsertBefore( SvgElementHandle aElementHandle,
+ SvgElementHandle aChildElementHandle,
+ SvgElementHandle aReferenceElementHandle );
+
+ /**
+ * Request element type. The following element type are supported:
+ * <a>, <animate>, <animateColor>, <animateMotion>,
+ * <animateTransform> <circle> <defs> <ellipse>,
+ * <font>, <font-face>, <font-face-name>, <font-face-src>,
+ * <foreignObject>, <g>, <glyph>, <hkern>, <image>,
+ * <line>, <metadata>, <missing-glyph>, <metadata>, <mpath>.
+ * <path>, <polygon>, <polyline>, <rect>, <set>,
+ * <svg>, <switch>, <text>, <title>, <use>.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement
+ * @param aElementHandle The element.
+ * @return Element type.
+ */
+ IMPORT_C TInt SvgElementGetType( SvgElementHandle aElementHandle );
+
+ /**
+ * Check if document has animation.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aElementHandle SVG element handle
+ * @param TBool . ETrue if animation present otherwise EFalse.
+ */
+ IMPORT_C TInt SvgElementHasAnimation( SvgElementHandle aElementHandle );
+
+ /**
+ * Get a string attribute from the given element.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement
+ * @param aElementHandle The element.
+ * @param aAttributeName Attribute's name
+ * @return Attribute value.
+ */
+ IMPORT_C TInt SvgElementGetStringAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttributeName, TPtrC16& aStrAttribute );
+
+ /**
+ * Set a string attribute in the given element.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement
+ * @param aElementHandle The SVG element handle.
+ * @param aAttributeName Attribute's name
+ * @param aAttributeValue Atribute's value.
+ */
+ IMPORT_C void SvgElementSetStringAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttributeName,
+ const TPtrC16& aAttributeValue );
+
+ /**
+ * Get a color attribute from the given element.
+ * The values are copied into the color components given.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGRGBColor
+ * @param aElementHandle The element handle.
+ * @param aAttributeName Attribute's name
+ * @param aRedValue The red value
+ * @param aGreenValue The green value
+ * @param aBlueValue The blue value
+ * @return Integer containing the RGB value for the color.
+ */
+ IMPORT_C TInt SvgElementGetColorAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute,
+ TInt* aRedValue, TInt* aGreenValue, TInt* aBlueValue );
+
+ /**
+ * Set a color attribute for the given element.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGRGBColor
+ * @param aElementHandle The element.
+ * @param aAttribute Attribute's name
+ * @param aRedValue The red value
+ * @param aGreenValue The green value
+ * @param aBlueValue The blue value
+ */
+ IMPORT_C void SvgElementSetColorAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute,
+ TInt aRedValue, TInt aGreenValue, TInt aBlueValue );
+
+
+ /**
+ * Return a attribute (trait) value as float.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getFloatTrait()
+ * @param aElementHandle The element.
+ * @param aAttribute Attribute's (or trait's) name
+ * @return The attribute (or trait) value as float for the specified name.
+ */
+ IMPORT_C TReal32 SvgElementGetFloatAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute ) __SOFTFP;
+
+ /**
+ * Set the attribute (trait) value as float.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getFloatTrait()
+ * @param aElementHandle The element handle.
+ * @param aAttribute The name of the attribute (trait) to be set.
+ * @param aFloatValue The value of the attribute (trait) to be set as float.
+ */
+ IMPORT_C void SvgElementSetFloatAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute,
+ TReal32 aFloatValue ) __SOFTFP;
+
+ /**
+ * Set enum attribute (trait) value.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement
+ * @param aElementHandle The element handle.
+ * @param aAttribute The name of the attribute (trait) to be set.
+ * @param aValue The value of the attribute (trait) to be set.
+ */
+ IMPORT_C void SvgElementSetEnumAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute, short aValue );
+
+ /**
+ * Get enum attribute (trait) value.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement
+ * @param aElementHandle The element handle.
+ * @param aAttribute The name of the attribute (trait).
+ * @return The value of the attribute (trait).
+ */
+ IMPORT_C short SvgElementGetEnumAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aAttribute );
+
+ /**
+ * Return the rectangle attribute (trait) values.
+ * NOTE: The returned values are copies of the actual attribute (trait) values and
+ * will not change if the corresponding trait changes.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getRectTrait()
+ * @param aElementHandle The element handle.
+ * @param aRectAttribute The name of the attribute (trait) to retrieve.
+ * @param aX X coordinate.
+ * @param aY Y coordinate.
+ * @param aWidth Width.
+ * @param aHeight Height.
+ * @return -1
if failed otherwise returns positive integer.
+ */
+ IMPORT_C TInt SvgElementGetRectAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aRectAttribute,
+ TReal32* aX, TReal32* aY, TReal32* aWidth, TReal32* aHeight ) __SOFTFP;
+
+ /**
+ * Set the rectangle attribute (trait) values.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#setRectTrait()
+ * @param aElementHandle The element handle.
+ * @param aRectAttribute The name of the attribute (trait) to be set.
+ * @param aX X coordinate.
+ * @param aY Y coordinate.
+ * @param aWidth Width.
+ * @param aHeight Height.
+ */
+ IMPORT_C void SvgElementSetRectAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aRectAttribute,
+ TReal32 aX, TReal32 aY, TReal32 aWidth, TReal32 aHeight ) __SOFTFP;
+
+ /**
+ * Get the matrix attribute (trait) values.
+ * NOTE: The returned values are copies of the actual attribute (trait) values and
+ * will not change if the corresponding trait changes.
+ *
+ * [aAVal aCVal aEVal]
+ * [aBVal aDVal aFVal]
+ *
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getMatrixTrait()
+ * @param aElementHandle The element handle.
+ * @param aMatrixAttribute The name of the attribute (trait) to retrieve.
+ * @param aAVal The x scaling component
+ * @param aBVal The y shearing component
+ * @param aCVal The x shearing component
+ * @param aDVal The y scaling component
+ * @param aEVal The x translation component
+ * @param aFVal The y translation component
+ * @return TODO
+ */
+ IMPORT_C TInt SvgElementGetMatrixAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aMatrixAttribute,
+ TReal32* aAVal, TReal32* aBVal, TReal32* aCVal,
+ TReal32* aDVal, TReal32* aEVal, TReal32* aFVal ) __SOFTFP;
+
+ /**
+ * Set the matrix attribute (trait) values.
+ *
+ * [aAVal aCVal aEVal]
+ * [aBVal aDVal aFVal]
+ *
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#setMatrixTrait()
+ * @param aElementHandle The element handle.
+ * @param aMatrixAttribute The name of the attribute (trait) to be set.
+ * @param aAVal The x scaling component
+ * @param aBVal The y shearing component
+ * @param aCVal The x shearing component
+ * @param aDVal The y scaling component
+ * @param aEVal The x translation component
+ * @param aFVal The y translation component
+ */
+ IMPORT_C void SvgElementSetMatrixAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aMatrixAttribute,
+ TReal32 aAVal, TReal32 aBVal, TReal32 aCVal,
+ TReal32 aDVal, TReal32 aEVal, TReal32 aFVal ) __SOFTFP;
+
+ /**
+ * Get the path attribute (trait)value.
+ * NOTE: The returned values are copies of the actual attribute values and will not change if
+ * the corresponding trait changes.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#getPathTrait()
+ * @see org.w3c.dom.svg.SVGPath
+ * @param aElementHandle The element handle.
+ * @param aPathAttribute The name of the attribute (trait) to retrieve.
+ * @return The handle to path object. NULL
if not successed.
+ */
+ IMPORT_C TInt SvgElementGetPathAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aPathAttribute );
+
+ /**
+ * Set the path attribute (trait) value.
+ * NOTE: Value is a copy in the trait so subsequent changes to the given
+ * aPathHandle
have no effect on the value of the attribute (trait).
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGElement#setPathTrait()
+ * @see org.w3c.dom.svg.SVGPath
+ * @param aElementHandle The element handle.
+ * @param aPathAttribute The name of the attribute (trait) to be set.
+ * @param aPathHandle The value of the attribute (trait) to be set as.
+ */
+ IMPORT_C void SvgElementSetPathAttribute( SvgElementHandle aElementHandle,
+ SvgAttrType aPathAttribute , SvgPathHandle aPathHandle);
+
+ /**
+ * Returns the tight bounding box in current user coordinate space.
+ * Tight bounding box is the smallest possible rectangle that includes the geometry
+ * of all contained graphics elements excluding stroke.
+ * The calculation is done in the user coordinate space of the element. When bounding box
+ * is calculated elements with display property (trait) set to none are ignored.
+ * Exact rules for the bounding box calculation are given in the
+ * SVG spec.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGLocatableElement#getBBox()
+ * @param aElementHandle The element handle.
+ * @param aAttributeType The name of the attribute (trait) to retrieve.
+ * @param aX X coordinate.
+ * @param aY Y coordinate.
+ * @param aWidth Width.
+ * @param aHeight Height.
+ */
+ IMPORT_C void SvgElementGetBBox( SvgElementHandle aElementHandle,
+ SvgAttrType aAttributeType,
+ TReal32* aX, TReal32* aY, TReal32* aWidth, TReal32* aHeight ) __SOFTFP;
+
+ /**
+ * Add event listener to the given element.
+ * Note: need to replace void* with specific class
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aElementHandle The element handle.
+ * @param aListener Listener
+ * @param aType Type
+ */
+ IMPORT_C void SvgElementAddEventListener( SvgElementHandle aElementHandle,
+ TInt aListener, SvgAttrType aType );
+
+ /**
+ * Remove event listener from the given element.
+ * Note: need to replace void* with specific class
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aElementHandle The element handle.
+ * @param aListener Listener
+ * @param aType Type
+ */
+ IMPORT_C void SvgElementRemoveEventListener( SvgElementHandle aElementHandle,
+ TInt aListener, SvgAttrType aType );
+ /**
+ * Check if element is active.
+ * i.e. an animation element is active in these cases:
+ *
+ * -
+ * A media time is 1s.
+ *
+ *
+
+
+ *
+ *
+ * -
+ * A media time is 2s.
+ *
+ *
+
+
+ *
+ *
+ *
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGAnimationElement#endElementAt()
+ * @param aElementHandle The element handle.
+ * @return Positive integer if element is active.
+ */
+ IMPORT_C TInt SvgElementIsActive( SvgElementHandle aElementHandle );
+
+ /**
+ * Check if the given element is removable (no id or children with ids).
+ *
+ * @since 1.0
+ * @see org.w3c.dom.Node#removeChild()
+ * @param aElementHandle The element handle.
+ * @return Positive integer if element is removeable.
+ */
+ IMPORT_C TInt SvgElementCheckRemoveable( SvgElementHandle aElementHandle );
+
+ // ***********************************************************************
+ // SVG Path
+ // ***********************************************************************
+ /**
+ * Creates new path object that is empty.
+ * This object can be used to modify value of path traits
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGSVGElement#createSVGPath()
+ * @see org.w3c.dom.svg.SVGPath
+ * @return The newly created path object handle with empty path commands.
+ */
+ IMPORT_C SvgPathHandle SvgPathCreate();
+
+ /**
+ * Destroy the specified path path
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath
+ * @param aPathHandle Handle to the path to be deleted.
+ */
+ IMPORT_C void SvgPathDestroy( SvgPathHandle aPathHandle );
+
+ /**
+ * Get the segment count of the given path.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#getNumberOfSegments()
+ * @param aPathHandle The path handle.
+ * @return Segment count
+ */
+ IMPORT_C TInt SvgPathGetSegmentCount( SvgPathHandle aPathHandle );
+
+ /**
+ * Returns segment command by zero-based command index.
+ * Returns one of MOVE_TO
, LINE_TO
,
+ * CURVE_TO
, QUAD_TO
or CLOSE
.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#getSegment()
+ * @param aPathHandle The path handle.
+ * @param aSegmentIndex The command index for the segment command to retrieve.
+ * @return The segment command for the specified aSegmentIndex.
+ */
+ IMPORT_C TInt SvgPathGetSegmentType( SvgPathHandle aPathHandle, TInt aSegmentIndex );
+
+ /**
+ * Returns segment parameter by zero-based command index and zero-based parametr index.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#getSegmentParameter()
+ * @param aPathHandle The path handle.
+ * @param aSegmentIndex The command index for the segment command to retrieve.
+ * @param aSegmentParameterIndex The parameter index for the segment parameter to retrieve.
+ * @return the segment parameter for the specified aSegmentIndex and aSegmentParameterIndex.
+ */
+ IMPORT_C TReal32 SvgPathGetSegmentParameter( SvgPathHandle aPathHandle,
+ TInt aSegmentIndex,
+ TInt aSegmentParameterIndex ) __SOFTFP;
+
+ /**
+ * Appends 'M' (absolute move) segment to the path with the specified coordinates.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#moveTo()
+ * @param aPathHandle The path handle.
+ * @param aX The x-axis coordinate for the specified point.
+ * @param aY The y-axis coordinate for the specified point.
+ */
+ IMPORT_C void SvgPathAddMoveTo( SvgPathHandle aPathHandle, TReal32 aX, TReal32 aY ) __SOFTFP;
+
+ /**
+ * Appends 'L' (absolute line) segment to the path with the specified coordinates.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#moveTo()
+ * @param aPathHandle The path handle.
+ * @param aX The x-axis coordinate for the specified point.
+ * @param aY The y-axis coordinate for the specified point.
+ */
+ IMPORT_C void SvgPathAddLineTo( SvgPathHandle aPathHandle, TReal32 aX, TReal32 aY ) __SOFTFP;
+
+ /**
+ * Appends 'Q' (absolute quadratic curve) segment to the path.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#quadTo()
+ * @param aPathHandle The path handle.
+ * @param aX1 the x-axis coordinate of the first control point.
+ * @param aY1 the y-axis coordinate of the first control point.
+ * @param aX2 the x-axis coordinate of the final end point.
+ * @param aY2 the y-axis coordinate of the final end point.
+ *
+ */
+ IMPORT_C void SvgPathAddQuadTo( SvgPathHandle aPathHandle,
+ TReal32 aX1, TReal32 aY1,
+ TReal32 aX2, TReal32 aY2 ) __SOFTFP;
+
+ /**
+ * Appends 'C' (absolute cubic curve) segment to the path.
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#curveTo()
+ * @param aPathHandle The path handle.
+ * @param aX1 the x-axis coordinate of the first control point.
+ * @param aY1 the y-axis coordinate of the first control point.
+ * @param aX2 the x-axis coordinate of the second end point.
+ * @param aY2 the y-axis coordinate of the second end point.
+ * @param aX3 the x-axis coordinate of the final end point.
+ * @param aY3 the y-axis coordinate of the final end point.
+ *
+ */
+ IMPORT_C void SvgPathAddCurveTo( SvgPathHandle aPathHandle,
+ TReal32 aX1, TReal32 aY1,
+ TReal32 aX2, TReal32 aY2,
+ TReal32 aX3, TReal32 aY3 ) __SOFTFP;
+ /**
+ * Appends 'Z' (close path) segment to the path
+ *
+ * @since 1.0
+ * @see org.w3c.dom.svg.SVGPath#close()
+ * @param aPathHandle The path handle.
+ */
+ IMPORT_C void SvgPathAddClose( SvgPathHandle aPathHandle );
+
+ /**
+ * Update path info.
+ * NOTE: Java doesn't use this method.
+ *
+ * @since 1.0
+ * @param aElementHandle The element handle.
+ * @param aPathHandle The path handle.
+ */
+ IMPORT_C void SvgElementUpdatePath( SvgElementHandle aElementHandle, SvgPathHandle aPathHandle );
+
+ /**
+ * Find whether the element is present in a document.
+ *
+ * @since 1.0
+ * @param hDocument The SVG document handle.
+ * @param hElement The element handle.
+ * @return Positive integer if the element presents in the given SVG document.
+ */
+ IMPORT_C TInt SvgElementElementInDOM ( TInt hDocument, TInt hElement );
+
+ /**
+ * Checks whether this element is child of a use element.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#dispatchMouseEvent()
+ * @param hElement The element handle.
+ * @return Postivive integer if the element is child of a use element.
+ */
+ IMPORT_C TInt SvgElementIsUsed ( TInt hElement );
+
+ /**
+ * Finds the handle to the actual cloned element.
+ *
+ * @since 1.0
+ * @see javax.microedition.m2g.SVGImage#dispatchMouseEvent()
+ * @param hElement aElement This is handle to the cloned element. this is child of the
+ *