with GNATCOM.Errors;

package body MSHTML.IElementBehaviorLayout_Interface is

   procedure Initialize (This : in out IElementBehaviorLayout_Type) is
   begin
      Set_IID (This, IID_IElementBehaviorLayout);
   end Initialize;

   function Pointer (This : IElementBehaviorLayout_Type)
     return Pointer_To_IElementBehaviorLayout
   is
   begin
      return To_Pointer_To_IElementBehaviorLayout (Address (This));
   end Pointer;

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

   procedure GetSize
     (This           : IElementBehaviorLayout_Type;
      dwFlags        : Interfaces.C.long;
      sizeContent    : tagSIZE;
      pptTranslateBy : Pointer_To_tagPOINT;
      pptTopLeft     : Pointer_To_tagPOINT;
      psizeProposed  : Pointer_To_tagSIZE)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetSize
         (Pointer (This),
          dwFlags,
          sizeContent,
          pptTranslateBy,
          pptTopLeft,
          psizeProposed));

   end GetSize;

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

      return RetVal;
   end GetLayoutInfo;

   procedure GetPosition
     (This       : IElementBehaviorLayout_Type;
      lFlags     : Interfaces.C.long;
      pptTopLeft : Pointer_To_tagPOINT)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.GetPosition
         (Pointer (This),
          lFlags,
          pptTopLeft));

   end GetPosition;

   procedure MapSize
     (This    : IElementBehaviorLayout_Type;
      psizeIn : Pointer_To_tagSIZE;
      prcOut  : Pointer_To_tagRECT)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.MapSize
         (Pointer (This),
          psizeIn,
          prcOut));

   end MapSize;

end MSHTML.IElementBehaviorLayout_Interface;

