with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLStyleSheetRulesCollection_Interface is

   procedure Initialize (This : in out IHTMLStyleSheetRulesCollection_Type) is
   begin
      Set_IID (This, IID_IHTMLStyleSheetRulesCollection);
   end Initialize;

   function Pointer (This : IHTMLStyleSheetRulesCollection_Type)
     return Pointer_To_IHTMLStyleSheetRulesCollection
   is
   begin
      return To_Pointer_To_IHTMLStyleSheetRulesCollection (Address (This));
   end Pointer;

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

   function Get_length
     (This : IHTMLStyleSheetRulesCollection_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                 : IHTMLStyleSheetRulesCollection_Type;
      index                : Interfaces.C.long)
     return Pointer_To_IHTMLStyleSheetRule
   is
       RetVal : aliased Pointer_To_IHTMLStyleSheetRule;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.item
         (Pointer (This),
          index,
          RetVal'Unchecked_Access));

      return RetVal;
   end item;

end MSHTML.IHTMLStyleSheetRulesCollection_Interface;

