with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTextRangeMetrics_Interface is

   procedure Initialize (This : in out IHTMLTextRangeMetrics_Type) is
   begin
      Set_IID (This, IID_IHTMLTextRangeMetrics);
   end Initialize;

   function Pointer (This : IHTMLTextRangeMetrics_Type)
     return Pointer_To_IHTMLTextRangeMetrics
   is
   begin
      return To_Pointer_To_IHTMLTextRangeMetrics (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_offsetTop;

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

      return RetVal;
   end Get_offsetLeft;

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

      return RetVal;
   end Get_boundingTop;

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

      return RetVal;
   end Get_boundingLeft;

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

      return RetVal;
   end Get_boundingWidth;

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

      return RetVal;
   end Get_boundingHeight;

end MSHTML.IHTMLTextRangeMetrics_Interface;

