with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGSVGElement_Interface is

   procedure Initialize (This : in out ISVGSVGElement_Type) is
   begin
      Set_IID (This, IID_ISVGSVGElement);
   end Initialize;

   function Pointer (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGSVGElement
   is
   begin
      return To_Pointer_To_ISVGSVGElement (Address (This));
   end Pointer;

   procedure Attach (This    : in out ISVGSVGElement_Type;
                     Pointer : in     Pointer_To_ISVGSVGElement)
   is
   begin
      Attach (This, GNATCOM.IInterface.To_Pointer_To_IUnknown
              (Pointer.all'Address));
   end Attach;

   procedure PutRef_x
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGAnimatedLength)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_x
         (Pointer (This),
          p));

   end PutRef_x;

   function Get_x
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGAnimatedLength
   is
       RetVal : aliased Pointer_To_ISVGAnimatedLength;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_x
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_x;

   procedure PutRef_y
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGAnimatedLength)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_y
         (Pointer (This),
          p));

   end PutRef_y;

   function Get_y
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGAnimatedLength
   is
       RetVal : aliased Pointer_To_ISVGAnimatedLength;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_y
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_y;

   procedure PutRef_width
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGAnimatedLength)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_width
         (Pointer (This),
          p));

   end PutRef_width;

   function Get_width
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGAnimatedLength
   is
       RetVal : aliased Pointer_To_ISVGAnimatedLength;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_width
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_width;

   procedure PutRef_height
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGAnimatedLength)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_height
         (Pointer (This),
          p));

   end PutRef_height;

   function Get_height
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGAnimatedLength
   is
       RetVal : aliased Pointer_To_ISVGAnimatedLength;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_height
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_height;

   procedure Put_contentScriptType
     (This : ISVGSVGElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_contentScriptType
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_contentScriptType;

   function Get_contentScriptType
     (This : ISVGSVGElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_contentScriptType
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_contentScriptType;

   procedure Put_contentStyleType
     (This : ISVGSVGElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_contentStyleType
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_contentStyleType;

   function Get_contentStyleType
     (This : ISVGSVGElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_contentStyleType
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_contentStyleType;

   procedure PutRef_viewport
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGRect)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_viewport
         (Pointer (This),
          p));

   end PutRef_viewport;

   function Get_viewport
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGRect
   is
       RetVal : aliased Pointer_To_ISVGRect;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_viewport
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_viewport;

   procedure Put_pixelUnitToMillimeterX
     (This : ISVGSVGElement_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_pixelUnitToMillimeterX
         (Pointer (This),
          p));

   end Put_pixelUnitToMillimeterX;

   function Get_pixelUnitToMillimeterX
     (This : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_pixelUnitToMillimeterX
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_pixelUnitToMillimeterX;

   procedure Put_pixelUnitToMillimeterY
     (This : ISVGSVGElement_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_pixelUnitToMillimeterY
         (Pointer (This),
          p));

   end Put_pixelUnitToMillimeterY;

   function Get_pixelUnitToMillimeterY
     (This : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_pixelUnitToMillimeterY
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_pixelUnitToMillimeterY;

   procedure Put_screenPixelToMillimeterX
     (This : ISVGSVGElement_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_screenPixelToMillimeterX
         (Pointer (This),
          p));

   end Put_screenPixelToMillimeterX;

   function Get_screenPixelToMillimeterX
     (This : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_screenPixelToMillimeterX
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_screenPixelToMillimeterX;

   procedure Put_screenPixelToMillimeterY
     (This : ISVGSVGElement_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_screenPixelToMillimeterY
         (Pointer (This),
          p));

   end Put_screenPixelToMillimeterY;

   function Get_screenPixelToMillimeterY
     (This : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_screenPixelToMillimeterY
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_screenPixelToMillimeterY;

   procedure Put_useCurrentView
     (This : ISVGSVGElement_Type;
      p    : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_useCurrentView
         (Pointer (This),
          p));

   end Put_useCurrentView;

   function Get_useCurrentView
     (This : ISVGSVGElement_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_useCurrentView
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_useCurrentView;

   procedure PutRef_currentView
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGViewSpec)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_currentView
         (Pointer (This),
          p));

   end PutRef_currentView;

   function Get_currentView
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGViewSpec
   is
       RetVal : aliased Pointer_To_ISVGViewSpec;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_currentView
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_currentView;

   procedure Put_currentScale
     (This : ISVGSVGElement_Type;
      p    : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_currentScale
         (Pointer (This),
          p));

   end Put_currentScale;

   function Get_currentScale
     (This : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_currentScale
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_currentScale;

   procedure PutRef_currentTranslate
     (This : ISVGSVGElement_Type;
      p    : Pointer_To_ISVGPoint)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_currentTranslate
         (Pointer (This),
          p));

   end PutRef_currentTranslate;

   function Get_currentTranslate
     (This : ISVGSVGElement_Type)
     return Pointer_To_ISVGPoint
   is
       RetVal : aliased Pointer_To_ISVGPoint;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_currentTranslate
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_currentTranslate;

   function suspendRedraw
     (This                : ISVGSVGElement_Type;
      maxWaitMilliseconds : Interfaces.C.unsigned_long)
     return Interfaces.C.unsigned_long
   is
       RetVal : aliased Interfaces.C.unsigned_long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.suspendRedraw
         (Pointer (This),
          maxWaitMilliseconds,
          RetVal'Unchecked_Access));

      return RetVal;
   end suspendRedraw;

   procedure unsuspendRedraw
     (This           : ISVGSVGElement_Type;
      suspendHandeID : Interfaces.C.unsigned_long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.unsuspendRedraw
         (Pointer (This),
          suspendHandeID));

   end unsuspendRedraw;

   procedure unsuspendRedrawAll
     (This : ISVGSVGElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.unsuspendRedrawAll
         (Pointer (This)));

   end unsuspendRedrawAll;

   procedure forceRedraw
     (This : ISVGSVGElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.forceRedraw
         (Pointer (This)));

   end forceRedraw;

   procedure pauseAnimations
     (This : ISVGSVGElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.pauseAnimations
         (Pointer (This)));

   end pauseAnimations;

   procedure unpauseAnimations
     (This : ISVGSVGElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.unpauseAnimations
         (Pointer (This)));

   end unpauseAnimations;

   function animationsPaused
     (This    : ISVGSVGElement_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.animationsPaused
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end animationsPaused;

   function getCurrentTime
     (This    : ISVGSVGElement_Type)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getCurrentTime
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end getCurrentTime;

   procedure setCurrentTime
     (This    : ISVGSVGElement_Type;
      seconds : Interfaces.C.C_float)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.setCurrentTime
         (Pointer (This),
          seconds));

   end setCurrentTime;

   function getIntersectionList
     (This             : ISVGSVGElement_Type;
      rect             : Pointer_To_ISVGRect;
      referenceElement : Pointer_To_ISVGElement)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getIntersectionList
         (Pointer (This),
          rect,
          referenceElement,
          RetVal'Unchecked_Access));

      return RetVal;
   end getIntersectionList;

   function getEnclosureList
     (This             : ISVGSVGElement_Type;
      rect             : Pointer_To_ISVGRect;
      referenceElement : Pointer_To_ISVGElement)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getEnclosureList
         (Pointer (This),
          rect,
          referenceElement,
          RetVal'Unchecked_Access));

      return RetVal;
   end getEnclosureList;

   function checkIntersection
     (This    : ISVGSVGElement_Type;
      element : Pointer_To_ISVGElement;
      rect    : Pointer_To_ISVGRect)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.checkIntersection
         (Pointer (This),
          element,
          rect,
          RetVal'Unchecked_Access));

      return RetVal;
   end checkIntersection;

   function checkEnclosure
     (This    : ISVGSVGElement_Type;
      element : Pointer_To_ISVGElement;
      rect    : Pointer_To_ISVGRect)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.checkEnclosure
         (Pointer (This),
          element,
          rect,
          RetVal'Unchecked_Access));

      return RetVal;
   end checkEnclosure;

   procedure deselectAll
     (This : ISVGSVGElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.deselectAll
         (Pointer (This)));

   end deselectAll;

   function createSVGNumber
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGNumber
   is
       RetVal : aliased Pointer_To_ISVGNumber;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGNumber
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGNumber;

   function createSVGLength
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGLength
   is
       RetVal : aliased Pointer_To_ISVGLength;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGLength
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGLength;

   function createSVGAngle
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGAngle
   is
       RetVal : aliased Pointer_To_ISVGAngle;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGAngle
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGAngle;

   function createSVGPoint
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGPoint
   is
       RetVal : aliased Pointer_To_ISVGPoint;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGPoint
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGPoint;

   function createSVGMatrix
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGMatrix
   is
       RetVal : aliased Pointer_To_ISVGMatrix;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGMatrix
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGMatrix;

   function createSVGRect
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGRect
   is
       RetVal : aliased Pointer_To_ISVGRect;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGRect
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGRect;

   function createSVGTransform
     (This    : ISVGSVGElement_Type)
     return Pointer_To_ISVGTransform
   is
       RetVal : aliased Pointer_To_ISVGTransform;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGTransform
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGTransform;

   function createSVGTransformFromMatrix
     (This    : ISVGSVGElement_Type;
      matrix  : Pointer_To_ISVGMatrix)
     return Pointer_To_ISVGTransform
   is
       RetVal : aliased Pointer_To_ISVGTransform;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createSVGTransformFromMatrix
         (Pointer (This),
          matrix,
          RetVal'Unchecked_Access));

      return RetVal;
   end createSVGTransformFromMatrix;

   function getElementById
     (This      : ISVGSVGElement_Type;
      elementId : GNATCOM.Types.BSTR;
      Free      : Boolean := True)
     return Pointer_To_IHTMLElement
   is
       RetVal : aliased Pointer_To_IHTMLElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getElementById
         (Pointer (This),
          elementId,
          RetVal'Unchecked_Access));

      if Free then
               GNATCOM.IInterface.Free (elementId);
      
      end if;

      return RetVal;
   end getElementById;

end MSHTML.ISVGSVGElement_Interface;

