package body MSHTML.HTMLWindowEvents2_Events is

   procedure Invoke
     (dispidMember : in Interfaces.C.long;
      wFlags       : in Interfaces.C.unsigned_short;
      pdispparams  : in GNATCOM.Types.Pointer_To_DISPPARAMS;
      Event_Object : in GNATCOM.Events.Event_Object.Event_Pointer)
   is
      use type Interfaces.C.long;
   begin
      case dispidMember is
         when HTMLWindowEvents2_onload=>
            onload
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onunload=>
            onunload
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onhelp=>
            onhelp
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onfocus=>
            onfocus
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onblur=>
            onblur
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onerror=>
            onerror
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (2),
               pdispparams.rgvarg (1),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onresize=>
            onresize
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onscroll=>
            onscroll
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onbeforeunload=>
            onbeforeunload
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onbeforeprint=>
            onbeforeprint
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when HTMLWindowEvents2_onafterprint=>
            onafterprint
              (HTMLWindowEvents2_Event'Class (Event_Object.all),
               pdispparams.rgvarg (0));
         when others =>
            null;
      end case;
   end Invoke;

   function Create (From : in GNATCOM.Events.Event_Object.Event_Pointer)
     return GNATCOM.Create.COM_Interface.Pointer_To_COM_Interface_Type
   is
   begin
      return GNATCOM.Events.Event_Object.Create
        (Invoke'Access,
         IID_HTMLWindowEvents2,
         From);
   end Create;

   procedure Set_Events
     (This            : in out GNATCOM.Events.IConnectionPoint_Type;
      For_Object      : in     GNATCOM.IInterface.Interface_Type'Class;
      Event_Interface :
        access GNATCOM.Create.COM_Interface.COM_Interface_Type;
      Free            : Boolean := True)
   is
   begin
      GNATCOM.Events.Set_Events
        (This,
         For_Object,
         IID_HTMLWindowEvents2,
         Event_Interface,
         Free);
   end Set_Events;

   procedure onload
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onload;

   procedure onunload
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onunload;

   procedure onhelp
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onhelp;

   procedure onfocus
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onfocus;

   procedure onblur
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onblur;

   procedure onerror
     (This        : HTMLWindowEvents2_Event;
      description : GNATCOM.Types.VARIANT;
      url         : GNATCOM.Types.VARIANT;
      line        : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onerror;

   procedure onresize
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onresize;

   procedure onscroll
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onscroll;

   procedure onbeforeunload
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onbeforeunload;

   procedure onbeforeprint
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onbeforeprint;

   procedure onafterprint
     (This    : HTMLWindowEvents2_Event;
      pEvtObj : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onafterprint;

end MSHTML.HTMLWindowEvents2_Events;

