## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --               GtkAda - Ada95 binding for Gtk+/Gnome               --

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-2006 AdaCore                    --

6.     --                                                                   --

7.     -- This library is free software; you can redistribute it and/or     --

8.     -- modify it under the terms of the GNU General Public               --

9.     -- License as published by the Free Software Foundation; either      --

10.     -- version 2 of the License, or (at your option) any later version.  --

11.     --                                                                   --

12.     -- This library is distributed in the hope that it will be useful,   --

13.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

14.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

15.     -- General Public License for more details.                          --

16.     --                                                                   --

17.     -- You should have received a copy of the GNU General Public         --

18.     -- License along with this library; if not, write to the             --

19.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

20.     -- Boston, MA 02111-1307, USA.                                       --

21.     --                                                                   --

22.     -- As a special exception, if other files instantiate generics from  --

23.     -- this unit, or you link this unit with other files to produce an   --

24.     -- executable, this  unit  does not  by itself cause  the resulting  --

25.     -- executable to be covered by the GNU General Public License. This  --

26.     -- exception does not however invalidate any other reasons why the   --

27.     -- executable file  might be covered by the  GNU Public License.     --

28.     -----------------------------------------------------------------------

30.     --  <c_version>2.8.17</c_version>

31.     --  <group>Obsolescent widgets</group>

32.     --  <testgtk>create_preview_color.adb</testgtk>

34.     with Glib.PropertiesTo API docTo specTo body;

35.     with Gdk.ColorTo API docTo specTo body;

36.     with Gdk.GCTo API docTo specTo body;

37.     with Gdk.VisualTo API docTo specTo body;

38.     with Gdk.WindowTo API docTo specTo body;

39.     with Gtk.EnumsTo API docTo specTo body; use Gtk.EnumsTo API docTo specTo body;

40.     with Gtk.WidgetTo API docTo specTo body;

42.     package Gtk.PreviewTo API docTo specTo body is

43.        pragma Obsolescent;

45.        type Gtk_Preview_RecordTo API docTo body is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body with private;

46.        type Gtk_Preview is access all Gtk_Preview_RecordTo API docTo specTo body'Class;

48.        type Gtk_Preview_Info_RecordTo API docTo body is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body

49.          with private;

50.        type Gtk_Preview_Info is access all Gtk_Preview_Info_RecordTo API docTo specTo body'Class;

52.        procedure Draw_RowTo API docTo body

53.          (Preview : access Gtk_Preview_RecordTo API docTo specTo body;

54.           Data    : Guchar_ArrayTo API docTo spec;

55.           X       : GintTo API docTo spec;

56.           Y       : GintTo API docTo spec;

57.           W       : GintTo API docTo spec);

58.        --  The size required for Data depends of the color depth of the

59.        --  preview. No verification is done by Ada, everything is left to

60.        --  gtk. You might get some segmentation fault !

61.        --  for a color preview, Data'Length = W * 3  (for R, G ,B)

62.        --  for a grey preview, Data'Length = W;

64.        function Get_CmapTo API docTo body return Gdk.Color.Gdk_ColormapTo API docTo spec;

66.        function Get_InfoTo API docTo body return Gtk_Preview_InfoTo API docTo spec;

68.        function Get_VisualTo API docTo body return Gdk.Visual.Gdk_VisualTo API docTo spec;

70.        procedure Gtk_NewTo API docTo body

71.          (Preview  : out Gtk_PreviewTo API docTo spec; The_TypeTo API docTo body : Gtk_Preview_TypeTo API docTo spec);

73.        procedure InitializeTo API docTo body

74.          (Preview  : access Gtk_Preview_RecordTo API docTo specTo body'Class;

75.           The_TypeTo API docTo body : Gtk_Preview_TypeTo API docTo spec);

77.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

78.        --  Return the internal value associated with a Gtk_Preview.

80.        procedure PutTo API docTo body

81.          (Preview : access Gtk_Preview_RecordTo API docTo specTo body;

82.           Window  : Gdk.Window.Gdk_WindowTo API docTo spec;

83.           Gc      : Gdk.GC.Gdk_GCTo API docTo spec;

84.           Srcx    : GintTo API docTo spec;

85.           Srcy    : GintTo API docTo spec;

86.           Destx   : GintTo API docTo spec;

87.           Desty   : GintTo API docTo spec;

88.           Width   : GintTo API docTo spec;

89.           Height  : GintTo API docTo spec);

91.        procedure ResetTo API docTo body;

93.        procedure Set_Color_CubeTo API docTo body

94.          (Nred_Shades   : GuintTo API docTo spec;

95.           Ngreen_Shades : GuintTo API docTo spec;

96.           Nblue_Shades  : GuintTo API docTo spec;

97.           Ngray_Shades  : GuintTo API docTo spec);

99.        procedure Set_ExpandTo API docTo body

100.          (Preview : access Gtk_Preview_RecordTo API docTo specTo body;

101.           Expand  : Boolean);

103.        procedure Set_GammaTo API docTo body (Gamma : GdoubleTo API docTo spec);

105.        procedure Set_Install_CmapTo API docTo body (Install_Cmap : GintTo API docTo spec);

107.        procedure Set_ReservedTo API docTo body (Nreserved : GintTo API docTo spec);

109.        procedure SizeTo API docTo body

110.          (Preview : access Gtk_Preview_RecordTo API docTo specTo body;

111.           Width   : GintTo API docTo spec;

112.           Height  : GintTo API docTo spec);

114.        procedure UninitTo API docTo body;

116.        ----------------

117.        -- Properties --

118.        ----------------

120.        --  <properties>

121.        --  The following properties are defined for this widget. See

122.        --  Glib.Properties for more information on properties.

123.        --

124.        --  Name:  Expand_Property

125.        --  Type:  Boolean

126.        --  Descr: Whether the preview widget should take up the entire space it is

127.        --         allocated

128.        --

129.        --  </properties>

131.        Expand_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

133.     private

134.        type Gtk_Preview_RecordTo API docTo spec is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body

135.          with null record;

137.        type Gtk_Preview_Info_RecordTo API docTo spec is new Gtk.Widget.Gtk_Widget_RecordTo API docTo specTo body

138.          with null record;

140.        Expand_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

141.          Glib.Properties.BuildTo API docTo specTo body ("expand");

143.        pragma Import (C, Get_VisualTo API docTo spec, "gtk_preview_get_visual");

144.        pragma Import (C, Get_CmapTo API docTo spec, "gtk_preview_get_cmap");

145.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_preview_get_type");

146.        pragma Import (C, ResetTo API docTo spec, "gtk_preview_reset");

147.        pragma Import (C, Set_GammaTo API docTo spec, "gtk_preview_set_gamma");

148.        pragma Import (C, Set_Install_CmapTo API docTo spec, "gtk_preview_set_install_cmap");

149.        pragma Import (C, Set_ReservedTo API docTo spec, "gtk_preview_set_reserved");

150.        pragma Import (C, UninitTo API docTo spec, "gtk_preview_uninit");

152.     end Gtk.PreviewTo API docTo specTo body;

154.     --  No binding: gtk_preview_set_dither