with GNATCOM.IInterface;

with GNATCOM.Errors;

package body MSHTML.ICanvasImageData_Interface is

   procedure Initialize (This : in out ICanvasImageData_Type) is
   begin
      Set_IID (This, IID_ICanvasImageData);
   end Initialize;

   function Pointer (This : ICanvasImageData_Type)
     return Pointer_To_ICanvasImageData
   is
   begin
      return To_Pointer_To_ICanvasImageData (Address (This));
   end Pointer;

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

   function Get_width
     (This : ICanvasImageData_Type)
     return Interfaces.C.unsigned_long
   is
       RetVal : aliased Interfaces.C.unsigned_long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_width
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_width;

   function Get_height
     (This : ICanvasImageData_Type)
     return Interfaces.C.unsigned_long
   is
       RetVal : aliased Interfaces.C.unsigned_long;
   begin
      GNATCOM.Errors.Error_Check
        (Pointer (This).Vtbl.Get_height
         (Pointer (This),
          RetVal'Unchecked_Access));

      return RetVal;
   end Get_height;

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

      return RetVal;
   end Get_data;

end MSHTML.ICanvasImageData_Interface;

