with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGTextContentElement_Interface is

   procedure Initialize (This : in out ISVGTextContentElement_Type) is
   begin
      Set_IID (This, IID_ISVGTextContentElement);
   end Initialize;

   function Pointer (This : ISVGTextContentElement_Type)
     return Pointer_To_ISVGTextContentElement
   is
   begin
      return To_Pointer_To_ISVGTextContentElement (Address (This));
   end Pointer;

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

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

   end PutRef_textLength;

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

      return RetVal;
   end Get_textLength;

   procedure PutRef_lengthAdjust
     (This : ISVGTextContentElement_Type;
      p    : Pointer_To_ISVGAnimatedEnumeration)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_lengthAdjust
         (Pointer (This),
          p));

   end PutRef_lengthAdjust;

   function Get_lengthAdjust
     (This : ISVGTextContentElement_Type)
     return Pointer_To_ISVGAnimatedEnumeration
   is
       RetVal : aliased Pointer_To_ISVGAnimatedEnumeration;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_lengthAdjust
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_lengthAdjust;

   function getNumberOfChars
     (This    : ISVGTextContentElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getNumberOfChars
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end getNumberOfChars;

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

      return RetVal;
   end getComputedTextLength;

   function getSubStringLength
     (This    : ISVGTextContentElement_Type;
      charnum : Interfaces.C.long;
      nchars  : Interfaces.C.long)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getSubStringLength
         (Pointer (This),
          charnum,
          nchars,
          RetVal'Unchecked_Access));

      return RetVal;
   end getSubStringLength;

   function getStartPositionOfChar
     (This     : ISVGTextContentElement_Type;
      charnum  : Interfaces.C.long)
     return Pointer_To_ISVGPoint
   is
       RetVal : aliased Pointer_To_ISVGPoint;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getStartPositionOfChar
         (Pointer (This),
          charnum,
          RetVal'Unchecked_Access));

      return RetVal;
   end getStartPositionOfChar;

   function getEndPositionOfChar
     (This     : ISVGTextContentElement_Type;
      charnum  : Interfaces.C.long)
     return Pointer_To_ISVGPoint
   is
       RetVal : aliased Pointer_To_ISVGPoint;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getEndPositionOfChar
         (Pointer (This),
          charnum,
          RetVal'Unchecked_Access));

      return RetVal;
   end getEndPositionOfChar;

   function getExtentOfChar
     (This     : ISVGTextContentElement_Type;
      charnum  : Interfaces.C.long)
     return Pointer_To_ISVGRect
   is
       RetVal : aliased Pointer_To_ISVGRect;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getExtentOfChar
         (Pointer (This),
          charnum,
          RetVal'Unchecked_Access));

      return RetVal;
   end getExtentOfChar;

   function getRotationOfChar
     (This    : ISVGTextContentElement_Type;
      charnum : Interfaces.C.long)
     return Interfaces.C.C_float
   is
       RetVal : aliased Interfaces.C.C_float;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getRotationOfChar
         (Pointer (This),
          charnum,
          RetVal'Unchecked_Access));

      return RetVal;
   end getRotationOfChar;

   function getCharNumAtPosition
     (This    : ISVGTextContentElement_Type;
      point   : Pointer_To_ISVGPoint)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getCharNumAtPosition
         (Pointer (This),
          point,
          RetVal'Unchecked_Access));

      return RetVal;
   end getCharNumAtPosition;

   procedure selectSubString
     (This    : ISVGTextContentElement_Type;
      charnum : Interfaces.C.long;
      nchars  : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.selectSubString
         (Pointer (This),
          charnum,
          nchars));

   end selectSubString;

end MSHTML.ISVGTextContentElement_Interface;

