with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLElement_Interface is

   procedure Initialize (This : in out IHTMLElement_Type) is
   begin
      Set_IID (This, IID_IHTMLElement);
   end Initialize;

   function Pointer (This : IHTMLElement_Type)
     return Pointer_To_IHTMLElement
   is
   begin
      return To_Pointer_To_IHTMLElement (Address (This));
   end Pointer;

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

   procedure setAttribute
     (This             : IHTMLElement_Type;
      strAttributeName : GNATCOM.Types.BSTR;
      AttributeValue   : GNATCOM.Types.VARIANT;
      lFlags           : Interfaces.C.long;
      Free             : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.setAttribute
         (Pointer (This),
          strAttributeName,
          AttributeValue,
          lFlags));

      if Free then
               GNATCOM.IInterface.Free (strAttributeName);
               GNATCOM.IInterface.Free (AttributeValue);
      
      end if;

   end setAttribute;

   function getAttribute
     (This             : IHTMLElement_Type;
      strAttributeName : GNATCOM.Types.BSTR;
      lFlags           : Interfaces.C.long;
      Free             : Boolean := True)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.getAttribute
         (Pointer (This),
          strAttributeName,
          lFlags,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end getAttribute;

   function removeAttribute
     (This             : IHTMLElement_Type;
      strAttributeName : GNATCOM.Types.BSTR;
      lFlags           : Interfaces.C.long;
      Free             : Boolean := True)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.removeAttribute
         (Pointer (This),
          strAttributeName,
          lFlags,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end removeAttribute;

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

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

   end Put_className;

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

      return RetVal;
   end Get_className;

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

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

   end Put_id;

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

      return RetVal;
   end Get_id;

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

      return RetVal;
   end Get_tagName;

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

      return RetVal;
   end Get_parentElement;

   function Get_style
     (This : IHTMLElement_Type)
     return Pointer_To_IHTMLStyle
   is
       RetVal : aliased Pointer_To_IHTMLStyle;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_style
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_style;

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

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

   end Put_onhelp;

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

      return RetVal;
   end Get_onhelp;

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

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

   end Put_onclick;

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

      return RetVal;
   end Get_onclick;

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

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

   end Put_ondblclick;

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

      return RetVal;
   end Get_ondblclick;

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

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

   end Put_onkeydown;

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

      return RetVal;
   end Get_onkeydown;

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

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

   end Put_onkeyup;

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

      return RetVal;
   end Get_onkeyup;

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

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

   end Put_onkeypress;

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

      return RetVal;
   end Get_onkeypress;

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

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

   end Put_onmouseout;

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

      return RetVal;
   end Get_onmouseout;

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

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

   end Put_onmouseover;

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

      return RetVal;
   end Get_onmouseover;

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

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

   end Put_onmousemove;

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

      return RetVal;
   end Get_onmousemove;

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

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

   end Put_onmousedown;

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

      return RetVal;
   end Get_onmousedown;

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

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

   end Put_onmouseup;

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

      return RetVal;
   end Get_onmouseup;

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

      return RetVal;
   end Get_document;

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

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

   end Put_title;

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

      return RetVal;
   end Get_title;

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

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

   end Put_language;

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

      return RetVal;
   end Get_language;

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

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

   end Put_onselectstart;

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

      return RetVal;
   end Get_onselectstart;

   procedure scrollIntoView
     (This        : IHTMLElement_Type;
      varargStart : GNATCOM.Types.VARIANT  := GNATCOM.Types.VARIANT_MISSING;
      Free        : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.scrollIntoView
         (Pointer (This),
          varargStart));

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

   end scrollIntoView;

   function contains
     (This     : IHTMLElement_Type;
      pChild   : Pointer_To_IHTMLElement)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.contains
         (Pointer (This),
          pChild,
          RetVal'Unchecked_Access));

      return RetVal;
   end contains;

   function Get_sourceIndex
     (This : IHTMLElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_sourceIndex
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_sourceIndex;

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

      return RetVal;
   end Get_recordNumber;

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

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

   end Put_lang;

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

      return RetVal;
   end Get_lang;

   function Get_offsetLeft
     (This : IHTMLElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_offsetLeft
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_offsetLeft;

   function Get_offsetTop
     (This : IHTMLElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_offsetTop
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_offsetTop;

   function Get_offsetWidth
     (This : IHTMLElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_offsetWidth
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_offsetWidth;

   function Get_offsetHeight
     (This : IHTMLElement_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_offsetHeight
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_offsetHeight;

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

      return RetVal;
   end Get_offsetParent;

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

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

   end Put_innerHTML;

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

      return RetVal;
   end Get_innerHTML;

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

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

   end Put_innerText;

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

      return RetVal;
   end Get_innerText;

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

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

   end Put_outerHTML;

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

      return RetVal;
   end Get_outerHTML;

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

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

   end Put_outerText;

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

      return RetVal;
   end Get_outerText;

   procedure insertAdjacentHTML
     (This  : IHTMLElement_Type;
      where : GNATCOM.Types.BSTR;
      html  : GNATCOM.Types.BSTR;
      Free  : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.insertAdjacentHTML
         (Pointer (This),
          where,
          html));

      if Free then
               GNATCOM.IInterface.Free (where);
               GNATCOM.IInterface.Free (html);
      
      end if;

   end insertAdjacentHTML;

   procedure insertAdjacentText
     (This  : IHTMLElement_Type;
      where : GNATCOM.Types.BSTR;
      text  : GNATCOM.Types.BSTR;
      Free  : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.insertAdjacentText
         (Pointer (This),
          where,
          text));

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

   end insertAdjacentText;

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

      return RetVal;
   end Get_parentTextEdit;

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

      return RetVal;
   end Get_isTextEdit;

   procedure click
     (This : IHTMLElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.click
         (Pointer (This)));

   end click;

   function Get_filters
     (This : IHTMLElement_Type)
     return Pointer_To_IHTMLFiltersCollection
   is
       RetVal : aliased Pointer_To_IHTMLFiltersCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_filters
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_filters;

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

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

   end Put_ondragstart;

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

      return RetVal;
   end Get_ondragstart;

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

      return RetVal;
   end toString;

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

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

   end Put_onbeforeupdate;

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

      return RetVal;
   end Get_onbeforeupdate;

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

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

   end Put_onafterupdate;

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

      return RetVal;
   end Get_onafterupdate;

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

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

   end Put_onerrorupdate;

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

      return RetVal;
   end Get_onerrorupdate;

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

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

   end Put_onrowexit;

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

      return RetVal;
   end Get_onrowexit;

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

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

   end Put_onrowenter;

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

      return RetVal;
   end Get_onrowenter;

   procedure Put_ondatasetchanged
     (This : IHTMLElement_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 : IHTMLElement_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 : IHTMLElement_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 : IHTMLElement_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 : IHTMLElement_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 : IHTMLElement_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_onfilterchange
     (This : IHTMLElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onfilterchange
         (Pointer (This),
          p));

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

   end Put_onfilterchange;

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

      return RetVal;
   end Get_onfilterchange;

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

      return RetVal;
   end Get_children;

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

      return RetVal;
   end Get_all;

end MSHTML.IHTMLElement_Interface;

