with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLStyleSheetRulesCollection2_Interface is

   procedure Initialize (This : in out IHTMLStyleSheetRulesCollection2_Type) is
   begin
      Set_IID (This, IID_IHTMLStyleSheetRulesCollection2);
   end Initialize;

   function Pointer (This : IHTMLStyleSheetRulesCollection2_Type)
     return Pointer_To_IHTMLStyleSheetRulesCollection2
   is
   begin
      return To_Pointer_To_IHTMLStyleSheetRulesCollection2 (Address (This));
   end Pointer;

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

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

      return RetVal;
   end Get_length;

   function item
     (This          : IHTMLStyleSheetRulesCollection2_Type;
      index         : Interfaces.C.long)
     return Pointer_To_IHTMLCSSRule
   is
       RetVal : aliased Pointer_To_IHTMLCSSRule;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.item
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end item;

end MSHTML.IHTMLStyleSheetRulesCollection2_Interface;

