with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLEventObj2_Interface is

   procedure Initialize (This : in out IHTMLEventObj2_Type) is
   begin
      Set_IID (This, IID_IHTMLEventObj2);
   end Initialize;

   function Pointer (This : IHTMLEventObj2_Type)
     return Pointer_To_IHTMLEventObj2
   is
   begin
      return To_Pointer_To_IHTMLEventObj2 (Address (This));
   end Pointer;

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

   procedure setAttribute
     (This             : IHTMLEventObj2_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             : IHTMLEventObj2_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             : IHTMLEventObj2_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_propertyName
     (This : IHTMLEventObj2_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_propertyName
         (Pointer (This),
          p));

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

   end Put_propertyName;

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

      return RetVal;
   end Get_propertyName;

   procedure PutRef_bookmarks
     (This : IHTMLEventObj2_Type;
      p    : Pointer_To_IHTMLBookmarkCollection)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_bookmarks
         (Pointer (This),
          p));

   end PutRef_bookmarks;

   function Get_bookmarks
     (This : IHTMLEventObj2_Type)
     return Pointer_To_IHTMLBookmarkCollection
   is
       RetVal : aliased Pointer_To_IHTMLBookmarkCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_bookmarks
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_bookmarks;

   procedure PutRef_recordset
     (This : IHTMLEventObj2_Type;
      p    : GNATCOM.Types.Pointer_To_IDispatch)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_recordset
         (Pointer (This),
          p));

   end PutRef_recordset;

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

      return RetVal;
   end Get_recordset;

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

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

   end Put_dataFld;

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

      return RetVal;
   end Get_dataFld;

   procedure PutRef_boundElements
     (This : IHTMLEventObj2_Type;
      p    : Pointer_To_IHTMLElementCollection)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_boundElements
         (Pointer (This),
          p));

   end PutRef_boundElements;

   function Get_boundElements
     (This : IHTMLEventObj2_Type)
     return Pointer_To_IHTMLElementCollection
   is
       RetVal : aliased Pointer_To_IHTMLElementCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_boundElements
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_boundElements;

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

   end Put_repeat;

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

      return RetVal;
   end Get_repeat;

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

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

   end Put_srcUrn;

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

      return RetVal;
   end Get_srcUrn;

   procedure PutRef_srcElement
     (This : IHTMLEventObj2_Type;
      p    : Pointer_To_IHTMLElement)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_srcElement
         (Pointer (This),
          p));

   end PutRef_srcElement;

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

      return RetVal;
   end Get_srcElement;

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

   end Put_altKey;

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

      return RetVal;
   end Get_altKey;

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

   end Put_ctrlKey;

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

      return RetVal;
   end Get_ctrlKey;

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

   end Put_shiftKey;

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

      return RetVal;
   end Get_shiftKey;

   procedure PutRef_fromElement
     (This : IHTMLEventObj2_Type;
      p    : Pointer_To_IHTMLElement)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_fromElement
         (Pointer (This),
          p));

   end PutRef_fromElement;

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

      return RetVal;
   end Get_fromElement;

   procedure PutRef_toElement
     (This : IHTMLEventObj2_Type;
      p    : Pointer_To_IHTMLElement)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_toElement
         (Pointer (This),
          p));

   end PutRef_toElement;

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

      return RetVal;
   end Get_toElement;

   procedure Put_button
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_button
         (Pointer (This),
          p));

   end Put_button;

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

      return RetVal;
   end Get_button;

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

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

   end Put_type;

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

      return RetVal;
   end Get_type;

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

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

   end Put_qualifier;

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

      return RetVal;
   end Get_qualifier;

   procedure Put_reason
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_reason
         (Pointer (This),
          p));

   end Put_reason;

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

      return RetVal;
   end Get_reason;

   procedure Put_x
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_x
         (Pointer (This),
          p));

   end Put_x;

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

      return RetVal;
   end Get_x;

   procedure Put_y
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_y
         (Pointer (This),
          p));

   end Put_y;

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

      return RetVal;
   end Get_y;

   procedure Put_clientX
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_clientX
         (Pointer (This),
          p));

   end Put_clientX;

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

      return RetVal;
   end Get_clientX;

   procedure Put_clientY
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_clientY
         (Pointer (This),
          p));

   end Put_clientY;

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

      return RetVal;
   end Get_clientY;

   procedure Put_offsetX
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_offsetX
         (Pointer (This),
          p));

   end Put_offsetX;

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

      return RetVal;
   end Get_offsetX;

   procedure Put_offsetY
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_offsetY
         (Pointer (This),
          p));

   end Put_offsetY;

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

      return RetVal;
   end Get_offsetY;

   procedure Put_screenX
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_screenX
         (Pointer (This),
          p));

   end Put_screenX;

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

      return RetVal;
   end Get_screenX;

   procedure Put_screenY
     (This : IHTMLEventObj2_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_screenY
         (Pointer (This),
          p));

   end Put_screenY;

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

      return RetVal;
   end Get_screenY;

   procedure PutRef_srcFilter
     (This : IHTMLEventObj2_Type;
      p    : GNATCOM.Types.Pointer_To_IDispatch)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.PutRef_srcFilter
         (Pointer (This),
          p));

   end PutRef_srcFilter;

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

      return RetVal;
   end Get_srcFilter;

   function Get_dataTransfer
     (This : IHTMLEventObj2_Type)
     return Pointer_To_IHTMLDataTransfer
   is
       RetVal : aliased Pointer_To_IHTMLDataTransfer;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_dataTransfer
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_dataTransfer;

end MSHTML.IHTMLEventObj2_Interface;

