with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLFrameBase2_Interface is

   procedure Initialize (This : in out IHTMLFrameBase2_Type) is
   begin
      Set_IID (This, IID_IHTMLFrameBase2);
   end Initialize;

   function Pointer (This : IHTMLFrameBase2_Type)
     return Pointer_To_IHTMLFrameBase2
   is
   begin
      return To_Pointer_To_IHTMLFrameBase2 (Address (This));
   end Pointer;

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

   function Get_contentWindow
     (This : IHTMLFrameBase2_Type)
     return Pointer_To_IHTMLWindow2
   is
       RetVal : aliased Pointer_To_IHTMLWindow2;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_contentWindow
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_contentWindow;

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

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

   end Put_onload;

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

      return RetVal;
   end Get_onload;

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

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

   end Put_onreadystatechange;

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

      return RetVal;
   end Get_onreadystatechange;

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

      return RetVal;
   end Get_readyState;

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

   end Put_allowTransparency;

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

      return RetVal;
   end Get_allowTransparency;

end MSHTML.IHTMLFrameBase2_Interface;

