with GNATCOM.Errors;

package body MSHTML.IElementSegment_Interface is

   procedure Initialize (This : in out IElementSegment_Type) is
   begin
      Set_IID (This, IID_IElementSegment);
   end Initialize;

   function Pointer (This : IElementSegment_Type)
     return Pointer_To_IElementSegment
   is
   begin
      return To_Pointer_To_IElementSegment (Address (This));
   end Pointer;

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

   procedure GetPointers
     (This    : IElementSegment_Type;
      pIStart : Pointer_To_IMarkupPointer;
      pIEnd   : Pointer_To_IMarkupPointer)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetPointers
         (Pointer (This),
          pIStart,
          pIEnd));

   end GetPointers;

   procedure GetElement
     (This       : IElementSegment_Type;
      ppIElement : Pointer_To_Pointer_To_IHTMLElement)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetElement
         (Pointer (This),
          ppIElement));

   end GetElement;

   procedure SetPrimary
     (This     : IElementSegment_Type;
      fPrimary : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.SetPrimary
         (Pointer (This),
          fPrimary));

   end SetPrimary;

   procedure IsPrimary
     (This      : IElementSegment_Type;
      pfPrimary : GNATCOM.Types.Pointer_To_long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.IsPrimary
         (Pointer (This),
          pfPrimary));

   end IsPrimary;

end MSHTML.IElementSegment_Interface;

