with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLMSCSSKeyframesRule_Interface is

   procedure Initialize (This : in out IHTMLMSCSSKeyframesRule_Type) is
   begin
      Set_IID (This, IID_IHTMLMSCSSKeyframesRule);
   end Initialize;

   function Pointer (This : IHTMLMSCSSKeyframesRule_Type)
     return Pointer_To_IHTMLMSCSSKeyframesRule
   is
   begin
      return To_Pointer_To_IHTMLMSCSSKeyframesRule (Address (This));
   end Pointer;

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

   procedure Put_name
     (This : IHTMLMSCSSKeyframesRule_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 : IHTMLMSCSSKeyframesRule_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;

   function Get_cssRules
     (This : IHTMLMSCSSKeyframesRule_Type)
     return Pointer_To_IHTMLStyleSheetRulesCollection
   is
       RetVal : aliased Pointer_To_IHTMLStyleSheetRulesCollection;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_cssRules
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_cssRules;

   procedure appendRule
     (This     : IHTMLMSCSSKeyframesRule_Type;
      bstrRule : GNATCOM.Types.BSTR;
      Free     : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.appendRule
         (Pointer (This),
          bstrRule));

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

   end appendRule;

   procedure deleteRule
     (This    : IHTMLMSCSSKeyframesRule_Type;
      bstrKey : GNATCOM.Types.BSTR;
      Free    : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.deleteRule
         (Pointer (This),
          bstrKey));

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

   end deleteRule;

   function findRule
     (This             : IHTMLMSCSSKeyframesRule_Type;
      bstrKey          : GNATCOM.Types.BSTR;
      Free             : Boolean := True)
     return Pointer_To_IHTMLMSCSSKeyframeRule
   is
       RetVal : aliased Pointer_To_IHTMLMSCSSKeyframeRule;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.findRule
         (Pointer (This),
          bstrKey,
          RetVal'Unchecked_Access));

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

      return RetVal;
   end findRule;

end MSHTML.IHTMLMSCSSKeyframesRule_Interface;

