with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLTextAreaElement_Interface is

   procedure Initialize (This : in out IHTMLTextAreaElement_Type) is
   begin
      Set_IID (This, IID_IHTMLTextAreaElement);
   end Initialize;

   function Pointer (This : IHTMLTextAreaElement_Type)
     return Pointer_To_IHTMLTextAreaElement
   is
   begin
      return To_Pointer_To_IHTMLTextAreaElement (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_type;

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

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

   end Put_value;

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

      return RetVal;
   end Get_value;

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

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

   end Put_name;

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

      return RetVal;
   end Get_name;

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

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

   end Put_status;

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

      return RetVal;
   end Get_status;

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

   end Put_disabled;

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

      return RetVal;
   end Get_disabled;

   function Get_form
     (This : IHTMLTextAreaElement_Type)
     return Pointer_To_IHTMLFormElement
   is
       RetVal : aliased Pointer_To_IHTMLFormElement;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_form
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_form;

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

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

   end Put_defaultValue;

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

      return RetVal;
   end Get_defaultValue;

   procedure uselect
     (This : IHTMLTextAreaElement_Type)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.uselect
         (Pointer (This)));

   end uselect;

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

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

   end Put_onchange;

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

      return RetVal;
   end Get_onchange;

   procedure Put_onselect
     (This : IHTMLTextAreaElement_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 : IHTMLTextAreaElement_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_readOnly
     (This : IHTMLTextAreaElement_Type;
      p    : GNATCOM.Types.VARIANT_BOOL)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_readOnly
         (Pointer (This),
          p));

   end Put_readOnly;

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

      return RetVal;
   end Get_readOnly;

   procedure Put_rows
     (This : IHTMLTextAreaElement_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_rows
         (Pointer (This),
          p));

   end Put_rows;

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

      return RetVal;
   end Get_rows;

   procedure Put_cols
     (This : IHTMLTextAreaElement_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_cols
         (Pointer (This),
          p));

   end Put_cols;

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

      return RetVal;
   end Get_cols;

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

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

   end Put_wrap;

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

      return RetVal;
   end Get_wrap;

   function createTextRange
     (This   : IHTMLTextAreaElement_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.IHTMLTextAreaElement_Interface;

