with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLInputButtonElement_Interface is

   procedure Initialize (This : in out IHTMLInputButtonElement_Type) is
   begin
      Set_IID (This, IID_IHTMLInputButtonElement);
   end Initialize;

   function Pointer (This : IHTMLInputButtonElement_Type)
     return Pointer_To_IHTMLInputButtonElement
   is
   begin
      return To_Pointer_To_IHTMLInputButtonElement (Address (This));
   end Pointer;

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

   function Get_type
     (This : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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 : IHTMLInputButtonElement_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;

   function createTextRange
     (This   : IHTMLInputButtonElement_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.IHTMLInputButtonElement_Interface;

