with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLScriptElement_Interface is

   procedure Initialize (This : in out IHTMLScriptElement_Type) is
   begin
      Set_IID (This, IID_IHTMLScriptElement);
   end Initialize;

   function Pointer (This : IHTMLScriptElement_Type)
     return Pointer_To_IHTMLScriptElement
   is
   begin
      return To_Pointer_To_IHTMLScriptElement (Address (This));
   end Pointer;

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

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

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

   end Put_src;

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

      return RetVal;
   end Get_src;

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

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

   end Put_htmlFor;

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

      return RetVal;
   end Get_htmlFor;

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

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

   end Put_event;

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

      return RetVal;
   end Get_event;

   procedure Put_text
     (This : IHTMLScriptElement_Type;
      p    : GNATCOM.Types.BSTR;
      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 : IHTMLScriptElement_Type)
     return GNATCOM.Types.BSTR
   is
       RetVal : aliased GNATCOM.Types.BSTR;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_text
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_text;

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

   end Put_defer;

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

      return RetVal;
   end Get_defer;

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

      return RetVal;
   end Get_readyState;

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

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

   end Put_onerror;

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

      return RetVal;
   end Get_onerror;

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

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

   end Put_type;

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

end MSHTML.IHTMLScriptElement_Interface;

