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

« back to all changes in this revision

Viewing changes to src/gtk-extra-plot.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:
1
1
-----------------------------------------------------------------------
2
2
--          GtkAda - Ada95 binding for the Gimp Toolkit              --
3
3
--                                                                   --
 
4
--                 Copyright (C) 2000-2008, AdaCore                  --
4
5
--        Emmanuel Briot, Joel Brobecker and Arnaud Charlet          --
 
6
--                 Copyright (C) 2001-2008, AdaCore                  --
5
7
--                                                                   --
6
8
-- This library is free software; you can redistribute it and/or     --
7
9
-- modify it under the terms of the GNU General Public               --
28
28
with Gtk.Enums;            use Gtk.Enums;
29
29
with Interfaces.C.Strings; use Interfaces.C.Strings;
30
30
 
 
31
with Glib.Type_Conversion_Hooks;
 
32
 
31
33
package body Gtk.Extra.Plot is
32
34
 
 
35
   package Type_Conversion is new Glib.Type_Conversion_Hooks.Hook_Registrator
 
36
     (Get_Type'Access, Gtk_Plot_Record);
 
37
   pragma Warnings (Off, Type_Conversion);
 
38
 
33
39
   -------------
34
40
   -- Gtk_New --
35
41
   -------------
174
180
      procedure Internal (Plot       : in System.Address;
175
181
                          Background : in System.Address);
176
182
      pragma Import (C, Internal, "gtk_plot_set_background");
177
 
      use type Gdk.Color.Gdk_Color;
178
183
 
179
184
      Back : aliased Gdk.Color.Gdk_Color := Background;
180
185
      Backa : System.Address := Back'Address;
506
511
         Justification : Gtk.Enums.Gtk_Justification;
507
512
         Text          : String) return Gtk_Plot_Text;
508
513
      pragma Import (C, Internal, "gtk_plot_put_text");
509
 
      use type Gdk.Color.Gdk_Color;
510
514
 
511
515
      Back  : aliased Gdk.Color.Gdk_Color := Background;
512
516
      Fore  : aliased Gdk.Color.Gdk_Color := Foreground;
666
670
         Width : Gfloat;
667
671
         Color : System.Address);
668
672
      pragma Import (C, Internal, "gtk_plot_axis_set_attributes");
669
 
      use type Gdk.Color.Gdk_Color;
670
673
 
671
674
      C  : aliased Gdk.Color.Gdk_Color := Color;
672
675
      Ca : System.Address := C'Address;
878
881
         Transparent   : Gint;
879
882
         Justification : Gtk.Enums.Gtk_Justification);
880
883
      pragma Import (C, Internal, "gtk_plot_axis_title_set_attributes");
881
 
      use type Gdk.Color.Gdk_Color;
882
884
 
883
885
      Fore : aliased Gdk.Color.Gdk_Color := Foreground;
884
886
      Fa   : System.Address := Fore'Address;
923
925
         Transparent   : Gint;
924
926
         Justification : Gtk.Enums.Gtk_Justification);
925
927
      pragma Import (C, Internal, "gtk_plot_axis_set_labels_attributes");
926
 
      use type Gdk.Color.Gdk_Color;
927
928
 
928
929
      Fore : aliased Gdk.Color.Gdk_Color := Foreground;
929
930
      Fa   : System.Address := Fore'Address;
1028
1029
                            Hminor : out Boolean)
1029
1030
   is
1030
1031
      procedure Internal (Plot   : in System.Address;
1031
 
                          Vmajor : out Boolean;
1032
 
                          Vminor : out Boolean;
1033
 
                          Hmajor : out Boolean;
1034
 
                          Hminor : out Boolean);
 
1032
                          Vmajor : out Gboolean;
 
1033
                          Vminor : out Gboolean;
 
1034
                          Hmajor : out Gboolean;
 
1035
                          Hminor : out Gboolean);
1035
1036
      pragma Import (C, Internal, "gtk_plot_grids_visible");
 
1037
 
 
1038
      Vma, Vmi, Hma, Hmi : Gboolean;
1036
1039
   begin
1037
 
      Internal (Get_Object (Plot), Vmajor, Vminor, Hmajor, Hminor);
 
1040
      Internal (Get_Object (Plot), Vma, Vmi, Hma, Hmi);
 
1041
      Vmajor := Boolean'Val (Vma);
 
1042
      Vminor := Boolean'Val (Vmi);
 
1043
      Hmajor := Boolean'Val (Hma);
 
1044
      Hminor := Boolean'Val (Hmi);
1038
1045
   end Grids_Visible;
1039
1046
 
1040
1047
   -----------------------
1077
1084
         Width : Gfloat;
1078
1085
         Color : System.Address);
1079
1086
      pragma Import (C, Internal, "gtk_plot_x0line_set_attributes");
1080
 
      use type Gdk.Color.Gdk_Color;
1081
1087
 
1082
1088
      C : aliased Gdk.Color.Gdk_Color := Color;
1083
1089
      Ca : System.Address := C'Address;
1105
1111
          Width : Gfloat;
1106
1112
          Color : System.Address);
1107
1113
      pragma Import (C, Internal, "gtk_plot_y0line_set_attributes");
1108
 
      use type Gdk.Color.Gdk_Color;
1109
1114
 
1110
1115
      C : aliased Gdk.Color.Gdk_Color := Color;
1111
1116
      Ca : System.Address := C'Address;
1133
1138
         Width : Gfloat;
1134
1139
         Color : System.Address);
1135
1140
      pragma Import (C, Internal, "gtk_plot_major_hgrid_set_attributes");
1136
 
      use type Gdk.Color.Gdk_Color;
1137
1141
 
1138
1142
      C : aliased Gdk.Color.Gdk_Color := Color;
1139
1143
      Ca : System.Address := C'Address;
1161
1165
         Width : Gfloat;
1162
1166
         Color : System.Address);
1163
1167
      pragma Import (C, Internal, "gtk_plot_major_vgrid_set_attributes");
1164
 
      use type Gdk.Color.Gdk_Color;
1165
1168
 
1166
1169
      C : aliased Gdk.Color.Gdk_Color := Color;
1167
1170
      Ca : System.Address := C'Address;
1189
1192
         Width : Gfloat;
1190
1193
         Color : System.Address);
1191
1194
      pragma Import (C, Internal, "gtk_plot_minor_hgrid_set_attributes");
1192
 
      use type Gdk.Color.Gdk_Color;
1193
1195
 
1194
1196
      C : aliased Gdk.Color.Gdk_Color := Color;
1195
1197
      Ca : System.Address := C'Address;
1217
1219
         Width : Gfloat;
1218
1220
         Color : System.Address);
1219
1221
      pragma Import (C, Internal, "gtk_plot_minor_vgrid_set_attributes");
1220
 
      use type Gdk.Color.Gdk_Color;
1221
1222
 
1222
1223
      C : aliased Gdk.Color.Gdk_Color := Color;
1223
1224
      Ca : System.Address := C'Address;
1334
1335
                          Foreground : in System.Address;
1335
1336
                          Background : in System.Address);
1336
1337
      pragma Import (C, Internal, "gtk_plot_legends_set_attributes");
1337
 
      use type Gdk.Color.Gdk_Color;
1338
1338
 
1339
1339
      Fore  : aliased Gdk.Color.Gdk_Color := Foreground;
1340
1340
      Forea : System.Address := Fore'Address;
1525
1525
         Str           : String);
1526
1526
      pragma Import (C, Internal, "gtk_plot_text_set_attributes");
1527
1527
 
1528
 
      use type Gdk.Color.Gdk_Color;
1529
1528
      Back  : aliased Gdk.Color.Gdk_Color := Bg;
1530
1529
      Fore  : aliased Gdk.Color.Gdk_Color := Fg;
1531
1530
      Backa : System.Address := Back'Address;