with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLInputTextElement_Interface is

   procedure Initialize (This : in out IHTMLInputTextElement_Type) is
   begin
      Set_IID (This, IID_IHTMLInputTextElement);
   end Initialize;

   function Pointer (This : IHTMLInputTextElement_Type)
     return Pointer_To_IHTMLInputTextElement
   is
   begin
      return To_Pointer_To_IHTMLInputTextElement (Address (This));
   end Pointer;

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

   function Get_type
     (This : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 Put_size
     (This : IHTMLInputTextElement_Type;
      p    : Interfaces.C.long)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_size
         (Pointer (This),
          p));

   end Put_size;

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

      return RetVal;
   end Get_size;

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

   end Put_maxLength;

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

      return RetVal;
   end Get_maxLength;

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

   end uselect;

   procedure Put_onchange
     (This : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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 : IHTMLInputTextElement_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;

   function createTextRange
     (This   : IHTMLInputTextElement_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.IHTMLInputTextElement_Interface;

