with GNATCOM.Errors;

package body MSHTML.IElementBehaviorRender_Interface is

   procedure Initialize (This : in out IElementBehaviorRender_Type) is
   begin
      Set_IID (This, IID_IElementBehaviorRender);
   end Initialize;

   function Pointer (This : IElementBehaviorRender_Type)
     return Pointer_To_IElementBehaviorRender
   is
   begin
      return To_Pointer_To_IElementBehaviorRender (Address (This));
   end Pointer;

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

   procedure Draw
     (This      : IElementBehaviorRender_Type;
      hdc       : wireHDC;
      lLayer    : Interfaces.C.long;
      pRect     : Pointer_To_tagRECT;
      pReserved : GNATCOM.Types.Pointer_To_IUnknown)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Draw
         (Pointer (This),
          hdc,
          lLayer,
          pRect,
          pReserved));

   end Draw;

   function GetRenderInfo
     (This         : IElementBehaviorRender_Type)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetRenderInfo
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end GetRenderInfo;

   function HitTestPoint
     (This      : IElementBehaviorRender_Type;
      pPoint    : Pointer_To_tagPOINT;
      pReserved : GNATCOM.Types.Pointer_To_IUnknown)
     return Interfaces.C.long
   is
       RetVal : aliased Interfaces.C.long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.HitTestPoint
         (Pointer (This),
          pPoint,
          pReserved,
          RetVal'Unchecked_Access));

      return RetVal;
   end HitTestPoint;

end MSHTML.IElementBehaviorRender_Interface;

