with GNATCOM.Errors;

package body MSHTML.IElementBehaviorSite_Interface is

   procedure Initialize (This : in out IElementBehaviorSite_Type) is
   begin
      Set_IID (This, IID_IElementBehaviorSite);
   end Initialize;

   function Pointer (This : IElementBehaviorSite_Type)
     return Pointer_To_IElementBehaviorSite
   is
   begin
      return To_Pointer_To_IElementBehaviorSite (Address (This));
   end Pointer;

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

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

      return RetVal;
   end GetElement;

   procedure RegisterNotification
     (This   : IElementBehaviorSite_Type;
      lEvent : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.RegisterNotification
         (Pointer (This),
          lEvent));

   end RegisterNotification;

end MSHTML.IElementBehaviorSite_Interface;

