------------------------------------------------------------------------------
--                                                                          --
--                An Ada2005 binding to the Qt C++ framework                --
--                                                                          --
------------------------------------------------------------------------------
--                                                                          --
-- Copyright © 2007-2010 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.                                      --
--                                                                          --
------------------------------------------------------------------------------
--    This file has been generated automatically. Please don't edit it.     --
------------------------------------------------------------------------------
private with Ada.Finalization;
with Qt4.Points;
with Qt_Ada.Internals.Value_Class_Sizes;
with System;

package Qt4.Lines is

   type Q_Line is tagged private;

   function Create
    (Pt_1 : in Qt4.Points.Q_Point'Class;
     Pt_2 : in Qt4.Points.Q_Point'Class)
       return Q_Line;

   function Create
    (X_1 : in Qt4.Q_Integer;
     Y_1 : in Qt4.Q_Integer;
     X_2 : in Qt4.Q_Integer;
     Y_2 : in Qt4.Q_Integer)
       return Q_Line;

   function Dx
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function Dy
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function Is_Null
    (Self : in Q_Line'Class)
       return Boolean;

   function P_1
    (Self : in Q_Line'Class)
       return Qt4.Points.Q_Point;

   function P_2
    (Self : in Q_Line'Class)
       return Qt4.Points.Q_Point;

   procedure Translate
    (Self : in out Q_Line'Class;
     P : in Qt4.Points.Q_Point'Class);

   procedure Translate
    (Self : in out Q_Line'Class;
     Dx : in Qt4.Q_Integer;
     Dy : in Qt4.Q_Integer);

   function X_1
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function X_2
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function Y_1
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function Y_2
    (Self : in Q_Line'Class)
       return Qt4.Q_Integer;

   function "="
    (Self : in Q_Line;
     D : in Q_Line)
       return Boolean;

   package Internals is

      type QLine is private;

      type QLine_Access is access all QLine;
      pragma Convention (C, QLine_Access);

      function QLine_View
       (Item : in Q_Line'Class)
          return QLine_Access;
      pragma Inline (QLine_View);

      function To_Pointer
       (Address : in System.Address)
          return QLine_Access;
      pragma Inline (To_Pointer);

      function To_Address
       (Pointer : in QLine_Access)
          return System.Address;
      pragma Inline (To_Address);

      function Create_Wrapper
       (Item : in Internals.QLine_Access)
          return Q_Line;

   private

      type QLine is record
         Placeholder : Interfaces.C.char_array (1 .. Qt_Ada.Internals.Value_Class_Sizes.QLine_C_Size_Of);
      end record;
      pragma Convention (C, QLine);

   end Internals;

private

   type Q_Line is new Ada.Finalization.Controlled with record
      Storage : aliased Internals.QLine;
      Object  : Internals.QLine_Access := null;
      Wrapper : Boolean := False;
   end record;

   overriding
   procedure Adjust (Self : in out Q_Line);

   overriding
   procedure Finalize (Self : in out Q_Line);

   overriding
   procedure Initialize (Self : in out Q_Line);

end Qt4.Lines;
