------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2008, 2009 Vadim Godunko <vgodunko@gmail.com>                --
--                                                                          --
-- QtAda is free software;  you can  redistribute it and/or modify it under --
-- terms of the  GNU General Public License as published  by the Free Soft- --
-- ware  Foundation;  either version 2,  or (at your option) any later ver- --
-- sion. QtAda is distributed in the hope that it will be useful, but WITH- --
-- OUT ANY WARRANTY;  without even the  implied warranty of MERCHANTABILITY --
-- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
-- for  more details.  You should have  received  a copy of the GNU General --
-- Public License distributed with QtAda;  see file COPYING.  If not, write --
-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
-- Boston, MA 02110-1301, USA.                                              --
--                                                                          --
-- As a special exception,  if other files  instantiate  generics from this --
-- unit, or you link  this unit with other files  to produce an executable, --
-- this  unit  does not  by itself cause  the resulting  executable  to  be --
-- covered  by the  GNU  General  Public  License.  This exception does not --
-- however invalidate  any other reasons why  the executable file  might be --
-- covered by the  GNU Public License.                                      --
--                                                                          --
------------------------------------------------------------------------------
--  $Revision: 3257 $ $Date: 2009-04-16 10:07:26 +0400 (Thu, 16 Apr 2009) $
------------------------------------------------------------------------------
with Qt4.Paint_Engines;
with Qt_Ada.Internals.Paint_Devices;

package Qt4.Paint_Devices is

   type Paint_Device_Metric is
    (Pdm_Width,
     Pdm_Height,
     Pdm_Width_MM,
     Pdm_Height_MM,
     Pdm_Num_Colors,
     Pdm_Depth,
     Pdm_Dpi_X,
     Pdm_Dpi_Y,
     Pdm_Physical_Dpi_X,
     Pdm_Physical_Dpi_Y);
   pragma Convention (C, Paint_Device_Metric);
   for Paint_Device_Metric use
    (Pdm_Width          => 1,
     Pdm_Height         => 2,
     Pdm_Width_MM       => 3,
     Pdm_Height_MM      => 4,
     Pdm_Num_Colors     => 5,
     Pdm_Depth          => 6,
     Pdm_Dpi_X          => 7,
     Pdm_Dpi_Y          => 8,
     Pdm_Physical_Dpi_X => 9,
     Pdm_Physical_Dpi_Y => 10);

   type Q_Paint_Device is limited interface
     and Qt_Ada.Internals.Paint_Devices.Q_Paint_Device_Base;

   function Depth
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Height
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Height_MM
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Logical_Dpi_X
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Logical_Dpi_Y
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Num_Colors
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   not overriding
   function Paint_Engine
    (Self : not null access Q_Paint_Device)
       return not null access Qt4.Paint_Engines.Q_Paint_Engine
         is abstract;

   function Painting_Active
    (Self : not null access constant Q_Paint_Device'Class)
       return Boolean;

   function Physical_Dpi_X
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Physical_Dpi_Y
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Width
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

   function Width_MM
    (Self : not null access constant Q_Paint_Device'Class)
       return Qt4.Q_Integer;

end Qt4.Paint_Devices;
