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

« back to all changes in this revision

Viewing changes to src/gtk-notebook.adb

  • Committer: Bazaar Package Importer
  • Author(s): Ludovic Brenta
  • Date: 2008-07-31 18:10:47 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 7.
  • Revision ID: james.westby@ubuntu.com-20080731181047-6m1y25zjad0p2yjr
Tags: 2.12.0-2

Correct the project files to add a Library_ALI_Dir and correct the
Library_Name.

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
with Interfaces.C.Strings; use Interfaces.C.Strings;
28
28
with System;
29
29
 
 
30
with Glib.Type_Conversion_Hooks;
 
31
 
30
32
package body Gtk.Notebook is
31
33
 
 
34
   package Type_Conversion is new Glib.Type_Conversion_Hooks.Hook_Registrator
 
35
     (Get_Type'Access, Gtk_Notebook_Record);
 
36
   pragma Warnings (Off, Type_Conversion);
 
37
 
32
38
   -----------------
33
39
   -- Append_Page --
34
40
   -----------------
771
777
      Internal (Get_Object (Notebook), Get_Object (Child), Position);
772
778
   end Reorder_Child;
773
779
 
 
780
   -------------------------
 
781
   -- Get_Tab_Reorderable --
 
782
   -------------------------
 
783
 
 
784
   function Get_Tab_Reorderable
 
785
     (Notebook : access Gtk_Notebook_Record;
 
786
      Child    : access Gtk.Widget.Gtk_Widget_Record'Class;
 
787
      Position : Gint)
 
788
      return Boolean
 
789
   is
 
790
      function Internal
 
791
        (Notebook : System.Address;
 
792
         Child    : System.Address;
 
793
         Position : Gint) return Gboolean;
 
794
      pragma Import (C, Internal, "gtk_notebook_get_tab_reorderable");
 
795
 
 
796
   begin
 
797
      return Internal
 
798
        (Get_Object (Notebook), Get_Object (Child), Position) /= 0;
 
799
   end Get_Tab_Reorderable;
 
800
 
 
801
   -------------------------
 
802
   -- Set_Tab_Reorderable --
 
803
   -------------------------
 
804
 
 
805
   procedure Set_Tab_Reorderable
 
806
     (Notebook    : access Gtk_Notebook_Record;
 
807
      Child       : access Gtk.Widget.Gtk_Widget_Record'Class;
 
808
      Reorderable : Boolean := True)
 
809
   is
 
810
      procedure Internal
 
811
        (Notebook    : System.Address;
 
812
         Child       : System.Address;
 
813
         Reorderable : Gint);
 
814
      pragma Import (C, Internal, "gtk_notebook_set_tab_reorderable");
 
815
   begin
 
816
      Internal
 
817
        (Get_Object (Notebook), Get_Object (Child), Boolean'Pos (Reorderable));
 
818
   end Set_Tab_Reorderable;
 
819
 
 
820
   ------------------------
 
821
   -- Get_Tab_Detachable --
 
822
   ------------------------
 
823
 
 
824
   function Get_Tab_Detachable
 
825
     (Notebook : access Gtk_Notebook_Record;
 
826
      Child    : access Gtk.Widget.Gtk_Widget_Record'Class;
 
827
      Position : Gint)
 
828
      return Boolean
 
829
   is
 
830
      function Internal
 
831
        (Notebook : System.Address;
 
832
         Child    : System.Address;
 
833
         Position : Gint)
 
834
         return Gboolean;
 
835
      pragma Import (C, Internal, "gtk_notebook_get_tab_detachable");
 
836
   begin
 
837
      return Internal
 
838
        (Get_Object (Notebook), Get_Object (Child), Position) /= 0;
 
839
   end Get_Tab_Detachable;
 
840
 
 
841
   ------------------------
 
842
   -- Set_Tab_Detachable --
 
843
   ------------------------
 
844
 
 
845
   procedure Set_Tab_Detachable
 
846
     (Notebook   : access Gtk_Notebook_Record;
 
847
      Child      : access Gtk.Widget.Gtk_Widget_Record'Class;
 
848
      Detachable : Boolean := True)
 
849
   is
 
850
      procedure Internal
 
851
        (Notebook   : System.Address;
 
852
         Child      : System.Address;
 
853
         Detachable : Gint);
 
854
      pragma Import (C, Internal, "gtk_notebook_set_tab_detachable");
 
855
   begin
 
856
      Internal
 
857
        (Get_Object (Notebook), Get_Object (Child), Boolean'Pos (Detachable));
 
858
   end Set_Tab_Detachable;
 
859
 
774
860
   -----------------------
775
861
   -- Get_Notebook_Page --
776
862
   -----------------------
795
881
      return Internal (Get_Object (Notebook));
796
882
   end Get_N_Pages;
797
883
 
 
884
   ------------------------------
 
885
   -- Set_Window_Creation_Hook --
 
886
   ------------------------------
 
887
 
 
888
   procedure Set_Window_Creation_Hook
 
889
     (Func    : Gtk_Notebook_Window_Creation_Func;
 
890
      Data    : System.Address;
 
891
      Destroy : Glib.G_Destroy_Notify_Address)
 
892
   is
 
893
      procedure Internal
 
894
        (Func : Gtk_Notebook_Window_Creation_Func;
 
895
         Data : System.Address;
 
896
         Destroy : G_Destroy_Notify_Address);
 
897
      pragma Import (C, Internal, "gtk_notebook_set_window_creation_hook");
 
898
   begin
 
899
      Internal (Func, Data, Destroy);
 
900
   end Set_Window_Creation_Hook;
 
901
 
 
902
   ------------------
 
903
   -- Set_Group_Id --
 
904
   ------------------
 
905
 
 
906
   procedure Set_Group_Id
 
907
     (Notebook : access Gtk_Notebook_Record; Group_Id : Gint)
 
908
   is
 
909
      procedure Internal
 
910
        (Notebook : System.Address;
 
911
         Group_Id : Gint);
 
912
      pragma Import (C, Internal, "gtk_notebook_set_group_id");
 
913
   begin
 
914
      Internal (Get_Object (Notebook), Group_Id);
 
915
   end Set_Group_Id;
 
916
 
 
917
   ------------------
 
918
   -- Get_Group_Id --
 
919
   ------------------
 
920
 
 
921
   function Get_Group_Id (Notebook : access Gtk_Notebook_Record) return Gint is
 
922
      function Internal (Notebook : System.Address) return Gint;
 
923
      pragma Import (C, Internal, "gtk_notebook_get_group_id");
 
924
   begin
 
925
      return Internal (Get_Object (Notebook));
 
926
   end Get_Group_Id;
 
927
 
798
928
end Gtk.Notebook;