with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTableRow_Interface is

   procedure Initialize (This : in out IHTMLTableRow_Type) is
   begin
      Set_IID (This, IID_IHTMLTableRow);
   end Initialize;

   function Pointer (This : IHTMLTableRow_Type)
     return Pointer_To_IHTMLTableRow
   is
   begin
      return To_Pointer_To_IHTMLTableRow (Address (This));
   end Pointer;

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

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

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

   end Put_align;

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

      return RetVal;
   end Get_align;

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

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

   end Put_vAlign;

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

      return RetVal;
   end Get_vAlign;

   procedure Put_bgColor
     (This : IHTMLTableRow_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 : IHTMLTableRow_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_borderColor
     (This : IHTMLTableRow_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_borderColor
         (Pointer (This),
          p));

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

   end Put_borderColor;

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

      return RetVal;
   end Get_borderColor;

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

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

   end Put_borderColorLight;

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

      return RetVal;
   end Get_borderColorLight;

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

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

   end Put_borderColorDark;

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

      return RetVal;
   end Get_borderColorDark;

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

      return RetVal;
   end Get_rowIndex;

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

      return RetVal;
   end Get_sectionRowIndex;

   function Get_cells
     (This : IHTMLTableRow_Type)
     return Pointer_To_IHTMLElementCollection
   is
       RetVal : aliased Pointer_To_IHTMLElementCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_cells
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_cells;

   function insertCell
     (This  : IHTMLTableRow_Type;
      index : Interfaces.C.long)
     return GNATCOM.Types.Pointer_To_IDispatch
   is
       RetVal : aliased GNATCOM.Types.Pointer_To_IDispatch;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.insertCell
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end insertCell;

   procedure deleteCell
     (This  : IHTMLTableRow_Type;
      index : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.deleteCell
         (Pointer (This),
          index));

   end deleteCell;

end MSHTML.IHTMLTableRow_Interface;

