with GNATCOM.Errors;

package body MSHTML.IDOMEventRegistrationCallback_Interface is

   procedure Initialize (This : in out IDOMEventRegistrationCallback_Type) is
   begin
      Set_IID (This, IID_IDOMEventRegistrationCallback);
   end Initialize;

   function Pointer (This : IDOMEventRegistrationCallback_Type)
     return Pointer_To_IDOMEventRegistrationCallback
   is
   begin
      return To_Pointer_To_IDOMEventRegistrationCallback (Address (This));
   end Pointer;

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

   procedure OnDOMEventListenerAdded
     (This         : IDOMEventRegistrationCallback_Type;
      pszEventType : GNATCOM.Types.LPWSTR;
      pHandler     : Pointer_To_IScriptEventHandler)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.OnDOMEventListenerAdded
         (Pointer (This),
          pszEventType,
          pHandler));

   end OnDOMEventListenerAdded;

   procedure OnDOMEventListenerRemoved
     (This      : IDOMEventRegistrationCallback_Type;
      ullCookie : GNATCOM.Types.DWORDLONG)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.OnDOMEventListenerRemoved
         (Pointer (This),
          ullCookie));

   end OnDOMEventListenerRemoved;

end MSHTML.IDOMEventRegistrationCallback_Interface;

