package body MSHTML.DWebBridgeEvents_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 DWebBridgeEvents_onscriptletevent=>
            onscriptletevent
              (DWebBridgeEvents_Event'Class (Event_Object.all),
               pdispparams.rgvarg (1),
               pdispparams.rgvarg (0));
         when DWebBridgeEvents_onreadystatechange=>
            onreadystatechange
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onclick=>
            onclick
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_ondblclick=>
            ondblclick
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onkeydown=>
            onkeydown
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onkeyup=>
            onkeyup
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onkeypress=>
            onkeypress
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onmousedown=>
            onmousedown
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onmousemove=>
            onmousemove
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         when DWebBridgeEvents_onmouseup=>
            onmouseup
              (DWebBridgeEvents_Event'Class (Event_Object.all));
         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_DWebBridgeEvents,
         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_DWebBridgeEvents,
         Event_Interface,
         Free);
   end Set_Events;

   procedure onscriptletevent
     (This      : DWebBridgeEvents_Event;
      name      : GNATCOM.Types.VARIANT;
      eventData : GNATCOM.Types.VARIANT)
   is
   begin
      null;
   end onscriptletevent;

   procedure onreadystatechange
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onreadystatechange;

   procedure onclick
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onclick;

   procedure ondblclick
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end ondblclick;

   procedure onkeydown
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onkeydown;

   procedure onkeyup
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onkeyup;

   procedure onkeypress
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onkeypress;

   procedure onmousedown
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onmousedown;

   procedure onmousemove
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onmousemove;

   procedure onmouseup
     (This : DWebBridgeEvents_Event)
   is
   begin
      null;
   end onmouseup;

end MSHTML.DWebBridgeEvents_Events;

