Code

Rearrange to enable code that does not directly rely on lcms.
[inkscape.git] / src / dom / svgtypes.h
old mode 100755 (executable)
new mode 100644 (file)
index 237c6c9..9b3d1ca
@@ -13,7 +13,7 @@
  * Authors:
  *   Bob Jamison
  *
- * Copyright (C) 2005 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
  *  You should have received a copy of the GNU Lesser General Public
  *  License along with this library; if not, write to the Free Software
  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *  
+ * =======================================================================
+ * NOTES
+ * 
+ * This API follows:
+ * http://www.w3.org/TR/SVG11/svgdom.html
+ * 
+ * This file contains the definitions of the non-Node SVG classes.  DOM Nodes
+ * for SVG are defined in svg.h.
+ *          
  */
 
 
 // For access to DOM2 core
-#include "dom.h"
+#include "dom/dom.h"
 
 // For access to DOM2 events
-#include "events.h"
+#include "dom/events.h"
 
 // For access to those parts from DOM2 CSS OM used by SVG DOM.
-#include "css.h"
+#include "dom/css.h"
 
 // For access to those parts from DOM2 Views OM used by SVG DOM.
-#include "views.h"
+#include "dom/views.h"
 
 // For access to the SMIL OM used by SVG DOM.
-#include "smil.h"
+#include "dom/smil.h"
 
 
 #include <math.h>
@@ -68,7 +78,9 @@ typedef dom::NodeList NodeList;
 
 
 class SVGElement;
+typedef Ptr<SVGElement> SVGElementPtr;
 class SVGUseElement;
+typedef Ptr<SVGUseElement> SVGUseElementPtr;
 class SVGAnimatedPreserveAspectRatio;
 
 
@@ -1799,7 +1811,7 @@ public:
     /**
      *
      */
-    virtual void setValueInSpecifiedUnits( double val )
+    virtual void setValueInSpecifiedUnits( double /*val*/ )
                                            throw (DOMException)
         {
         //fill this in
@@ -1820,7 +1832,7 @@ public:
     /**
      *
      */
-    virtual void setValueAsString( const DOMString& val )
+    virtual void setValueAsString( const DOMString& /*val*/ )
                                    throw (DOMException)
         {
         }
@@ -1829,14 +1841,14 @@ public:
     /**
      *
      */
-    virtual void newValueSpecifiedUnits ( unsigned short unitType, double val )
+    virtual void newValueSpecifiedUnits ( unsigned short /*unitType*/, double /*val*/ )
         {
         }
 
     /**
      *
      */
-    virtual void convertToSpecifiedUnits ( unsigned short unitType )
+    virtual void convertToSpecifiedUnits ( unsigned short /*unitType*/ )
         {
         }
 
@@ -2221,7 +2233,7 @@ public:
     /**
      *
      */
-    virtual void setValueInSpecifiedUnits(double val)
+    virtual void setValueInSpecifiedUnits(double /*val*/)
                                      throw (DOMException)
         {
         //do conversion
@@ -2242,7 +2254,7 @@ public:
     /**
      *
      */
-    virtual void setValueAsString(const DOMString &val)
+    virtual void setValueAsString(const DOMString &/*val*/)
                                   throw (DOMException)
         {
         //convert here
@@ -2252,8 +2264,8 @@ public:
     /**
      *
      */
-    virtual void newValueSpecifiedUnits (unsigned short unitType,
-                                 double valueInSpecifiedUnits )
+    virtual void newValueSpecifiedUnits (unsigned short /*unitType*/,
+                                         double /*valueInSpecifiedUnits*/ )
         {
         //convert here
         }
@@ -2261,7 +2273,7 @@ public:
     /**
      *
      */
-    virtual void convertToSpecifiedUnits (unsigned short unitType )
+    virtual void convertToSpecifiedUnits (unsigned short /*unitType*/ )
         {
         //convert here
         }
@@ -2498,7 +2510,7 @@ public:
     /**
      *
      */
-    virtual void setRGBColor (const DOMString& rgbColor )
+    virtual void setRGBColor (const DOMString& /*rgbColor*/ )
                               throw( SVGException )
         {
         }
@@ -2506,8 +2518,8 @@ public:
     /**
      *
      */
-    virtual void setRGBColorICCColor (const DOMString& rgbColor,
-                                      const DOMString& iccColor )
+    virtual void setRGBColorICCColor (const DOMString& /*rgbColor*/,
+                                      const DOMString& /*iccColor*/ )
                                       throw( SVGException )
         {
         }
@@ -2515,9 +2527,9 @@ public:
     /**
      *
      */
-    virtual void setColor (unsigned short colorType,
-                           const DOMString& rgbColor,
-                           const DOMString& iccColor )
+    virtual void setColor (unsigned short /*colorType*/,
+                           const DOMString& /*rgbColor*/,
+                           const DOMString& /*iccColor*/ )
                            throw( SVGException )
         {
         }
@@ -2781,7 +2793,7 @@ public:
     /**
      *
      */
-    virtual SVGPoint matrixTransform(const SVGMatrix &matrix)
+    virtual SVGPoint matrixTransform(const SVGMatrix &/*matrix*/)
         {
         SVGPoint point;
         return point;
@@ -3041,7 +3053,7 @@ public:
     /**
      *
      */
-    virtual css::CSSValue getPresentationAttribute (const DOMString& name )
+    virtual css::CSSValue getPresentationAttribute (const DOMString& /*name*/ )
         {
         css::CSSValue val;
         //perform a lookup
@@ -3094,18 +3106,18 @@ public:
     /**
      *
      */
-    virtual SVGElement *getNearestViewportElement()
+    virtual SVGElementPtr getNearestViewportElement()
         {
-        SVGElement *result = NULL;
+        SVGElementPtr result;
         return result;
         }
 
     /**
      *
      */
-    virtual SVGElement *getFarthestViewportElement()
+    virtual SVGElementPtr getFarthestViewportElement()
         {
-        SVGElement *result = NULL;
+        SVGElementPtr result;
         return result;
         }
 
@@ -3136,7 +3148,7 @@ public:
     /**
      *
      */
-    virtual SVGMatrix getTransformToElement (const SVGElement &element)
+    virtual SVGMatrix getTransformToElement (const SVGElement &/*element*/)
                     throw( SVGException )
         {
         SVGMatrix result;
@@ -3158,7 +3170,7 @@ public:
     /**
      *
      */
-    SVGLocatable(const SVGLocatable &other)
+    SVGLocatable(const SVGLocatable &/*other*/)
         {
         }
 
@@ -3274,7 +3286,7 @@ public:
     /**
      *
      */
-    virtual bool hasExtension (const DOMString& extension )
+    virtual bool hasExtension (const DOMString& /*extension*/ )
         {
         return false;
         }
@@ -3770,7 +3782,7 @@ public:
     /**
      *
      */
-    virtual SVGElement *getViewTarget()
+    virtual SVGElementPtr getViewTarget()
         { return viewTarget; }
 
     /**
@@ -3839,7 +3851,7 @@ public:
 
 protected:
 
-    SVGElement *viewTarget;
+    SVGElementPtr viewTarget;
     SVGTransformList transform;
 };
 
@@ -4013,7 +4025,7 @@ protected:
 ###########################################################################
 #########################################################################*/
 
-static char *pathSegLetters[] =
+static char const *const pathSegLetters[] =
 {
     "@", // PATHSEG_UNKNOWN,
     "z", // PATHSEG_CLOSEPATH
@@ -4091,7 +4103,7 @@ public:
         int typ = type;
         if (typ<0 || typ>PATHSEG_CURVETO_QUADRATIC_SMOOTH_REL)
             typ = PATHSEG_UNKNOWN;
-        char *ch = pathSegLetters[typ];
+        char const *ch = pathSegLetters[typ];
         DOMString letter = ch;
         return letter;
         }
@@ -6209,7 +6221,7 @@ public:
     /**
      *
      */
-    SVGAnimatedPathData(const SVGAnimatedPathData &other)
+   SVGAnimatedPathData(const SVGAnimatedPathData &/*other*/)
         {
         }
 
@@ -6337,8 +6349,8 @@ public:
      */
     virtual void setPaint (unsigned short paintTypeArg,
                            const DOMString& uriArg,
-                           const DOMString& rgbColor,
-                           const DOMString& iccColor )
+                           const DOMString& /*rgbColor*/,
+                           const DOMString& /*iccColor*/ )
                            throw( SVGException )
         {
         paintType = paintTypeArg;
@@ -6697,13 +6709,13 @@ public:
     /**
      *
      */
-    virtual SVGElement *getCorrespondingElement()
+    virtual SVGElementPtr getCorrespondingElement()
         { return correspondingElement; }
 
     /**
      *
      */
-    virtual SVGUseElement *getCorrespondingUseElement()
+    virtual SVGUseElementPtr getCorrespondingUseElement()
         { return correspondingUseElement; }
 
     /**
@@ -6783,8 +6795,8 @@ public:
 
 protected:
 
-    SVGElement    *correspondingElement;
-    SVGUseElement *correspondingUseElement;
+    SVGElementPtr      correspondingElement;
+    SVGUseElementPtr   correspondingUseElement;
 
 };
 
@@ -6829,7 +6841,7 @@ public:
      *        SVGElementInstanceList SVGElementInstance::getChildNodes()
      *
      */
-    static SVGElementInstanceList getChildNodes(const SVGElementInstance &instance)
+    static SVGElementInstanceList getChildNodes(const SVGElementInstance &/*instance*/)
         {
         SVGElementInstanceList list;
         return list;