with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLBodyElement5_Interface is

   procedure Initialize (This : in out IHTMLBodyElement5_Type) is
   begin
      Set_IID (This, IID_IHTMLBodyElement5);
   end Initialize;

   function Pointer (This : IHTMLBodyElement5_Type)
     return Pointer_To_IHTMLBodyElement5
   is
   begin
      return To_Pointer_To_IHTMLBodyElement5 (Address (This));
   end Pointer;

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

   procedure Put_onpopstate
     (This : IHTMLBodyElement5_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onpopstate
         (Pointer (This),
          p));

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

   end Put_onpopstate;

   function Get_onpopstate
     (This : IHTMLBodyElement5_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onpopstate
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onpopstate;

end MSHTML.IHTMLBodyElement5_Interface;

