with GNATCOM.Errors;

package body MSHTML.IElementBehaviorSiteOM_Interface is

   procedure Initialize (This : in out IElementBehaviorSiteOM_Type) is
   begin
      Set_IID (This, IID_IElementBehaviorSiteOM);
   end Initialize;

   function Pointer (This : IElementBehaviorSiteOM_Type)
     return Pointer_To_IElementBehaviorSiteOM
   is
   begin
      return To_Pointer_To_IElementBehaviorSiteOM (Address (This));
   end Pointer;

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

   function RegisterEvent
     (This     : IElementBehaviorSiteOM_Type;
      pchEvent : GNATCOM.Types.LPWSTR;
      lFlags   : Interfaces.C.long)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.RegisterEvent
         (Pointer (This),
          pchEvent,
          lFlags,
          RetVal'Unchecked_Access));

      return RetVal;
   end RegisterEvent;

   function GetEventCookie
     (This     : IElementBehaviorSiteOM_Type;
      pchEvent : GNATCOM.Types.LPWSTR)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetEventCookie
         (Pointer (This),
          pchEvent,
          RetVal'Unchecked_Access));

      return RetVal;
   end GetEventCookie;

   procedure FireEvent
     (This         : IElementBehaviorSiteOM_Type;
      lCookie      : Interfaces.C.long;
      pEventObject : Pointer_To_IHTMLEventObj)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.FireEvent
         (Pointer (This),
          lCookie,
          pEventObject));

   end FireEvent;

   function CreateEventObject
     (This          : IElementBehaviorSiteOM_Type)
     return Pointer_To_IHTMLEventObj
   is
       RetVal : aliased Pointer_To_IHTMLEventObj;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.CreateEventObject
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end CreateEventObject;

   procedure RegisterName
     (This    : IElementBehaviorSiteOM_Type;
      pchName : GNATCOM.Types.LPWSTR)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.RegisterName
         (Pointer (This),
          pchName));

   end RegisterName;

   procedure RegisterUrn
     (This   : IElementBehaviorSiteOM_Type;
      pchUrn : GNATCOM.Types.LPWSTR)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.RegisterUrn
         (Pointer (This),
          pchUrn));

   end RegisterUrn;

end MSHTML.IElementBehaviorSiteOM_Interface;

