with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.IHTMLBaseFontElement_Interface is

   procedure Initialize (This : in out IHTMLBaseFontElement_Type) is
   begin
      Set_IID (This, IID_IHTMLBaseFontElement);
   end Initialize;

   function Pointer (This : IHTMLBaseFontElement_Type)
     return Pointer_To_IHTMLBaseFontElement
   is
   begin
      return To_Pointer_To_IHTMLBaseFontElement (Address (This));
   end Pointer;

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

   procedure Put_color
     (This : IHTMLBaseFontElement_Type;
      p    : GNATCOM.Types.VARIANT;
      Free : Boolean := True)
   is
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Put_color
         (Pointer (This),
          p));

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

   end Put_color;

   function Get_color
     (This : IHTMLBaseFontElement_Type)
     return GNATCOM.Types.VARIANT
   is
       RetVal : aliased GNATCOM.Types.VARIANT;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_color
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_color;

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

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

   end Put_face;

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

      return RetVal;
   end Get_face;

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

   end Put_size;

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

      return RetVal;
   end Get_size;

end MSHTML.IHTMLBaseFontElement_Interface;

