with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ISVGStyleElement_Interface is

   procedure Initialize (This : in out ISVGStyleElement_Type) is
   begin
      Set_IID (This, IID_ISVGStyleElement);
   end Initialize;

   function Pointer (This : ISVGStyleElement_Type)
     return Pointer_To_ISVGStyleElement
   is
   begin
      return To_Pointer_To_ISVGStyleElement (Address (This));
   end Pointer;

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

   procedure Put_type
     (This : ISVGStyleElement_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 : ISVGStyleElement_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;

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

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

   end Put_media;

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

      return RetVal;
   end Get_media;

end MSHTML.ISVGStyleElement_Interface;

