2
2
-- GtkAda - Ada95 binding for Gtk+/Gnome --
4
4
-- Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet --
5
-- Copyright (C) 2000-2008, AdaCore --
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;
30
with Glib.Type_Conversion_Hooks;
30
32
package body Gtk.Notebook is
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);
771
777
Internal (Get_Object (Notebook), Get_Object (Child), Position);
772
778
end Reorder_Child;
780
-------------------------
781
-- Get_Tab_Reorderable --
782
-------------------------
784
function Get_Tab_Reorderable
785
(Notebook : access Gtk_Notebook_Record;
786
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
791
(Notebook : System.Address;
792
Child : System.Address;
793
Position : Gint) return Gboolean;
794
pragma Import (C, Internal, "gtk_notebook_get_tab_reorderable");
798
(Get_Object (Notebook), Get_Object (Child), Position) /= 0;
799
end Get_Tab_Reorderable;
801
-------------------------
802
-- Set_Tab_Reorderable --
803
-------------------------
805
procedure Set_Tab_Reorderable
806
(Notebook : access Gtk_Notebook_Record;
807
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
808
Reorderable : Boolean := True)
811
(Notebook : System.Address;
812
Child : System.Address;
814
pragma Import (C, Internal, "gtk_notebook_set_tab_reorderable");
817
(Get_Object (Notebook), Get_Object (Child), Boolean'Pos (Reorderable));
818
end Set_Tab_Reorderable;
820
------------------------
821
-- Get_Tab_Detachable --
822
------------------------
824
function Get_Tab_Detachable
825
(Notebook : access Gtk_Notebook_Record;
826
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
831
(Notebook : System.Address;
832
Child : System.Address;
835
pragma Import (C, Internal, "gtk_notebook_get_tab_detachable");
838
(Get_Object (Notebook), Get_Object (Child), Position) /= 0;
839
end Get_Tab_Detachable;
841
------------------------
842
-- Set_Tab_Detachable --
843
------------------------
845
procedure Set_Tab_Detachable
846
(Notebook : access Gtk_Notebook_Record;
847
Child : access Gtk.Widget.Gtk_Widget_Record'Class;
848
Detachable : Boolean := True)
851
(Notebook : System.Address;
852
Child : System.Address;
854
pragma Import (C, Internal, "gtk_notebook_set_tab_detachable");
857
(Get_Object (Notebook), Get_Object (Child), Boolean'Pos (Detachable));
858
end Set_Tab_Detachable;
774
860
-----------------------
775
861
-- Get_Notebook_Page --
776
862
-----------------------
795
881
return Internal (Get_Object (Notebook));
884
------------------------------
885
-- Set_Window_Creation_Hook --
886
------------------------------
888
procedure Set_Window_Creation_Hook
889
(Func : Gtk_Notebook_Window_Creation_Func;
890
Data : System.Address;
891
Destroy : Glib.G_Destroy_Notify_Address)
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");
899
Internal (Func, Data, Destroy);
900
end Set_Window_Creation_Hook;
906
procedure Set_Group_Id
907
(Notebook : access Gtk_Notebook_Record; Group_Id : Gint)
910
(Notebook : System.Address;
912
pragma Import (C, Internal, "gtk_notebook_set_group_id");
914
Internal (Get_Object (Notebook), Group_Id);
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");
925
return Internal (Get_Object (Notebook));
798
928
end Gtk.Notebook;