with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLWindow4_Interface is

   procedure Initialize (This : in out IHTMLWindow4_Type) is
   begin
      Set_IID (This, IID_IHTMLWindow4);
   end Initialize;

   function Pointer (This : IHTMLWindow4_Type)
     return Pointer_To_IHTMLWindow4
   is
   begin
      return To_Pointer_To_IHTMLWindow4 (Address (This));
   end Pointer;

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

   function createPopup
     (This     : IHTMLWindow4_Type;
      varArgIn : access GNATCOM.Types.VARIANT :=
        GNATCOM.Types.PVARIANT_MISSING)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createPopup
         (Pointer (This),
          varArgIn,
          RetVal'Unchecked_Access));

      return RetVal;
   end createPopup;

   function Get_frameElement
     (This : IHTMLWindow4_Type)
     return Pointer_To_IHTMLFrameBase
   is
       RetVal : aliased Pointer_To_IHTMLFrameBase;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_frameElement
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_frameElement;

end MSHTML.IHTMLWindow4_Interface;

