with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLBodyElement_Interface is

   procedure Initialize (This : in out IHTMLBodyElement_Type) is
   begin
      Set_IID (This, IID_IHTMLBodyElement);
   end Initialize;

   function Pointer (This : IHTMLBodyElement_Type)
     return Pointer_To_IHTMLBodyElement
   is
   begin
      return To_Pointer_To_IHTMLBodyElement (Address (This));
   end Pointer;

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

   procedure Put_background
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_background
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_background;

   function Get_background
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_background
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_background;

   procedure Put_bgProperties
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_bgProperties
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_bgProperties;

   function Get_bgProperties
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_bgProperties
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_bgProperties;

   procedure Put_leftMargin
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_leftMargin
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_leftMargin;

   function Get_leftMargin
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_leftMargin
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_leftMargin;

   procedure Put_topMargin
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_topMargin
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_topMargin;

   function Get_topMargin
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_topMargin
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_topMargin;

   procedure Put_rightMargin
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_rightMargin
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_rightMargin;

   function Get_rightMargin
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_rightMargin
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_rightMargin;

   procedure Put_bottomMargin
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_bottomMargin
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_bottomMargin;

   function Get_bottomMargin
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_bottomMargin
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_bottomMargin;

   procedure Put_noWrap
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_noWrap
         (Pointer (This),
          p));

   end Put_noWrap;

   function Get_noWrap
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT_BOOL
   is
       RetVal : aliased GNATCOM.Types.VARIANT_BOOL;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_noWrap
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_noWrap;

   procedure Put_bgColor
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_bgColor
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_bgColor;

   function Get_bgColor
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_bgColor
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_bgColor;

   procedure Put_text
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_text
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_text;

   function Get_text
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_text
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_text;

   procedure Put_link
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_link
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_link;

   function Get_link
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_link
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_link;

   procedure Put_vLink
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_vLink
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_vLink;

   function Get_vLink
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_vLink
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_vLink;

   procedure Put_aLink
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_aLink
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_aLink;

   function Get_aLink
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_aLink
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_aLink;

   procedure Put_onload
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onload
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_onload;

   function Get_onload
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onload
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onload;

   procedure Put_onunload
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onunload
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_onunload;

   function Get_onunload
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onunload
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onunload;

   procedure Put_scroll
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.BSTR;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_scroll
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_scroll;

   function Get_scroll
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_scroll
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_scroll;

   procedure Put_onselect
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onselect
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_onselect;

   function Get_onselect
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onselect
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onselect;

   procedure Put_onbeforeunload
     (This : IHTMLBodyElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_onbeforeunload
         (Pointer (This),
          p));

      if Free then
               GNATCOM.IInterface.Free (p);
      
      end if;

   end Put_onbeforeunload;

   function Get_onbeforeunload
     (This : IHTMLBodyElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_onbeforeunload
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_onbeforeunload;

   function createTextRange
     (This   : IHTMLBodyElement_Type)
     return Pointer_To_IHTMLTxtRange
   is
       RetVal : aliased Pointer_To_IHTMLTxtRange;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.createTextRange
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end createTextRange;

end MSHTML.IHTMLBodyElement_Interface;

