with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLDocument3_Interface is

   procedure Initialize (This : in out IHTMLDocument3_Type) is
   begin
      Set_IID (This, IID_IHTMLDocument3);
   end Initialize;

   function Pointer (This : IHTMLDocument3_Type)
     return Pointer_To_IHTMLDocument3
   is
   begin
      return To_Pointer_To_IHTMLDocument3 (Address (This));
   end Pointer;

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

   procedure releaseCapture
     (This : IHTMLDocument3_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.releaseCapture
         (Pointer (This)));

   end releaseCapture;

   procedure recalc
     (This   : IHTMLDocument3_Type;
      fForce : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.recalc
         (Pointer (This),
          fForce));

   end recalc;

   function createTextNode
     (This        : IHTMLDocument3_Type;
      text        : GNATCOM.Types.BSTR;
      Free        : Boolean := True)
     return Pointer_To_IHTMLDOMNode
   is
       RetVal : aliased Pointer_To_IHTMLDOMNode;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createTextNode
         (Pointer (This),
          text,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end createTextNode;

   function Get_documentElement
     (This : IHTMLDocument3_Type)
     return Pointer_To_IHTMLElement
   is
       RetVal : aliased Pointer_To_IHTMLElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_documentElement
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_documentElement;

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

      return RetVal;
   end Get_uniqueID;

   function attachEvent
     (This     : IHTMLDocument3_Type;
      event    : GNATCOM.Types.BSTR;
      pdisp    : GNATCOM.Types.Pointer_To_IDispatch;
      Free     : Boolean := True)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.attachEvent
         (Pointer (This),
          event,
          pdisp,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end attachEvent;

   procedure detachEvent
     (This  : IHTMLDocument3_Type;
      event : GNATCOM.Types.BSTR;
      pdisp : GNATCOM.Types.Pointer_To_IDispatch;
      Free  : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.detachEvent
         (Pointer (This),
          event,
          pdisp));

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

   end detachEvent;

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

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

   end Put_onrowsdelete;

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

      return RetVal;
   end Get_onrowsdelete;

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

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

   end Put_onrowsinserted;

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

      return RetVal;
   end Get_onrowsinserted;

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

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

   end Put_oncellchange;

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

      return RetVal;
   end Get_oncellchange;

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

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

   end Put_ondatasetchanged;

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

      return RetVal;
   end Get_ondatasetchanged;

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

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

   end Put_ondataavailable;

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

      return RetVal;
   end Get_ondataavailable;

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

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

   end Put_ondatasetcomplete;

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

      return RetVal;
   end Get_ondatasetcomplete;

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

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

   end Put_onpropertychange;

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

      return RetVal;
   end Get_onpropertychange;

   procedure Put_dir
     (This : IHTMLDocument3_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_dir
         (Pointer (This),
          p));

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

   end Put_dir;

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

      return RetVal;
   end Get_dir;

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

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

   end Put_oncontextmenu;

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

      return RetVal;
   end Get_oncontextmenu;

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

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

   end Put_onstop;

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

      return RetVal;
   end Get_onstop;

   function createDocumentFragment
     (This    : IHTMLDocument3_Type)
     return Pointer_To_IHTMLDocument2
   is
       RetVal : aliased Pointer_To_IHTMLDocument2;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createDocumentFragment
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createDocumentFragment;

   function Get_parentDocument
     (This : IHTMLDocument3_Type)
     return Pointer_To_IHTMLDocument2
   is
       RetVal : aliased Pointer_To_IHTMLDocument2;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_parentDocument
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_parentDocument;

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

   end Put_enableDownload;

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

      return RetVal;
   end Get_enableDownload;

   procedure Put_baseUrl
     (This : IHTMLDocument3_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_baseUrl
         (Pointer (This),
          p));

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

   end Put_baseUrl;

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

      return RetVal;
   end Get_baseUrl;

   function Get_childNodes
     (This : IHTMLDocument3_Type)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_childNodes
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_childNodes;

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

   end Put_inheritStyleSheets;

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

      return RetVal;
   end Get_inheritStyleSheets;

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

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

   end Put_onbeforeeditfocus;

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

      return RetVal;
   end Get_onbeforeeditfocus;

   function getElementsByName
     (This    : IHTMLDocument3_Type;
      v       : GNATCOM.Types.BSTR;
      Free    : Boolean := True)
     return Pointer_To_IHTMLElementCollection
   is
       RetVal : aliased Pointer_To_IHTMLElementCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getElementsByName
         (Pointer (This),
          v,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end getElementsByName;

   function getElementById
     (This : IHTMLDocument3_Type;
      v    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
     return Pointer_To_IHTMLElement
   is
       RetVal : aliased Pointer_To_IHTMLElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getElementById
         (Pointer (This),
          v,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end getElementById;

   function getElementsByTagName
     (This    : IHTMLDocument3_Type;
      v       : GNATCOM.Types.BSTR;
      Free    : Boolean := True)
     return Pointer_To_IHTMLElementCollection
   is
       RetVal : aliased Pointer_To_IHTMLElementCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getElementsByTagName
         (Pointer (This),
          v,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end getElementsByTagName;

end MSHTML.IHTMLDocument3_Interface;

