with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLOListElement_Interface is

   procedure Initialize (This : in out IHTMLOListElement_Type) is
   begin
      Set_IID (This, IID_IHTMLOListElement);
   end Initialize;

   function Pointer (This : IHTMLOListElement_Type)
     return Pointer_To_IHTMLOListElement
   is
   begin
      return To_Pointer_To_IHTMLOListElement (Address (This));
   end Pointer;

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

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

   end Put_compact;

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

      return RetVal;
   end Get_compact;

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

   end Put_start;

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

      return RetVal;
   end Get_start;

   procedure Put_type
     (This : IHTMLOListElement_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 : IHTMLOListElement_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.IHTMLOListElement_Interface;

