~ubuntu-branches/ubuntu/intrepid/libgtkada2/intrepid

« back to all changes in this revision

Viewing changes to src/gdk-color.adb

  • Committer: Bazaar Package Importer
  • Author(s): Luca Falavigna
  • Date: 2008-08-11 09:46:51 UTC
  • mfrom: (6.1.1 squeeze)
  • Revision ID: james.westby@ubuntu.com-20080811094651-9mjd6acwa98ffw5c
Tags: 2.12.0-2ubuntu1
Add lpia to supported architectures.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
3
3
--                                                                   --
4
4
--   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --
 
5
--                Copyright (C) 2000-2008, AdaCore                   --
5
6
--                                                                   --
6
7
-- This library is free software; you can redistribute it and/or     --
7
8
-- modify it under the terms of the GNU General Public               --
27
27
 
28
28
package body Gdk.Color is
29
29
 
30
 
   function Internal_Copy (C : Gdk_Color) return System.Address;
31
 
 
 
30
   function To_Address
 
31
     (C : Gdk_Color; Add : System.Address) return System.Address;
32
32
   package Color_Properties is new Generic_Internal_Boxed_Property
33
 
     (Gdk_Color, Gdk_Color_Type, Internal_Copy);
34
 
 
35
 
   -------------------
36
 
   -- Internal_Copy --
37
 
   -------------------
38
 
 
39
 
   function Internal_Copy (C : Gdk_Color) return System.Address is
40
 
      function Internal (C : System.Address) return System.Address;
41
 
      pragma Import (C, Internal, "gdk_color_copy");
42
 
      C2 : aliased Gdk_Color := C;
 
33
     (Gdk_Color, Gdk_Color_Type, To_Address);
 
34
 
 
35
   procedure Set_Value (Value : out Glib.Values.GValue; Val : Gdk_Color)
 
36
                        renames Color_Properties.Set_Value;
 
37
   function  Get_Value (Value : Glib.Values.GValue) return Gdk_Color
 
38
                        renames Color_Properties.Get_Value;
 
39
 
 
40
   ----------------
 
41
   -- To_Address --
 
42
   ----------------
 
43
 
 
44
   function To_Address
 
45
     (C : Gdk_Color; Add : System.Address) return System.Address is
43
46
   begin
44
 
      if C /= Null_Color then
45
 
         return Internal (C2'Address);
 
47
      if C = Null_Color then
 
48
         return System.Null_Address;
46
49
      else
47
 
         return System.Null_Address;
 
50
         return Add;
48
51
      end if;
49
 
   end Internal_Copy;
 
52
   end To_Address;
50
53
 
51
54
   -----------
52
55
   -- Equal --