This file is indexed.

/usr/share/ada/adainclude/gtkada/gtk-assistant.ads is in libgtkada2.24.1-dev 2.24.1-14.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
-----------------------------------------------------------------------
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
--                                                                   --
--                    Copyright (C) 2010, AdaCore                    --
--                                                                   --
-- This library is free software; you can redistribute it and/or     --
-- modify it under the terms of the GNU General Public               --
-- License as published by the Free Software Foundation; either      --
-- version 2 of the License, or (at your option) any later version.  --
--                                                                   --
-- This library is distributed in the hope that it will be useful,   --
-- but WITHOUT ANY WARRANTY; without even the implied warranty of    --
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --
-- General Public License for more details.                          --
--                                                                   --
-- You should have received a copy of the GNU General Public         --
-- License along with this library; if not, write to the             --
-- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --
-- Boston, MA 02111-1307, USA.                                       --
--                                                                   --
-----------------------------------------------------------------------

--  <description>
--  A Gtk_Assistant is a widget used to represent a generally complex
--  operation split into several steps, guiding the user through its
--  pages and controlling the page flow to collect the necessary data.
--  </description>
--  <c_version>2.16.6</c_version>
--  <group>Windows</group>
--  <testgtk>create_assistant.adb</testgtk>

with Glib;
with Glib.Properties;
with Gdk.Pixbuf;      use Gdk.Pixbuf;
with Gtk.Widget;      use Gtk.Widget;
with Gtk.Window;

package Gtk.Assistant is

   type Gtk_Assistant_Record is new Gtk.Window.Gtk_Window_Record with private;
   type Gtk_Assistant is access all Gtk_Assistant_Record'Class;

   procedure Gtk_New (Widget : out Gtk_Assistant);
   procedure Initialize (Widget : access Gtk_Assistant_Record'Class);
   --  Creates a new Gtk_Assistant.

   type Gtk_Assistant_Page_Type is
     (Gtk_Assistant_Page_Content,
      Gtk_Assistant_Page_Intro,
      Gtk_Assistant_Page_Confirm,
      Gtk_Assistant_Page_Summary,
      Gtk_Assistant_Page_Progress);
   --  Definition of various page types.  See Get_Page_Type/Set_Page_Type
   --  for more info.

   procedure Add_Action_Widget
     (Assistant : access Gtk_Assistant_Record;
      Child     : access Gtk_Widget_Record'Class);
   --  Adds a widget to the action area of a Gtk_Assistant.

   function Append_Page
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Gint;
   --  Appends a page to the Assistant.
   --
   --  Return value: the index (starting at 0) of the inserted page

   function Get_Current_Page (Assistant : access Gtk_Assistant_Record)
      return Gint;
   --  Returns the index (starting from 0) of the current page in the
   --  Assistant.  If the Assistant has no pages, -1 will be returned

   function Get_N_Pages (Assistant : access Gtk_Assistant_Record) return Gint;
   --  Returns the number of pages in the Assistant

   function Get_Nth_Page
     (Assistant : access Gtk_Assistant_Record;
      Page_Num  : Gint)
      return Gtk_Widget;
   --  Assistant: a Gtk_Assistant
   --  Page_Num: The index of a page in the Assistant, or -1 to get the
   --  last page
   --
   --  Returns the child widget contained in page number Page_Num, or null
   --  if Page_Num is out of bounds.

   function Get_Page_Complete
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Boolean;
   --  Returns whether Page is complete.

   function Get_Page_Header_Image
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Gdk_Pixbuf;
   --  Gets the header image for Page.  Returns null if there's no header
   --  image for the page.

   function Get_Page_Side_Image
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Gdk_Pixbuf;
   --  Gets the side image for Page.  Returns null if there's no side
   --  image for the page.

   function Get_Page_Title
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return String;
   --  Gets the title for Page.

   function Get_Page_Type
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Gtk_Assistant_Page_Type;
   --  Gets the page type of Page.

   function Get_Type return GType;
   --  Return the internal value associated with a Gtk_Assistant.

   function Insert_Page
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Position  : Gint)
      return Gint;
   --  Assistant: a Gtk_Assistant
   --  Page: a Gtk_Widget
   --  Position: the index (starting at 0) at which to insert the page,
   --  or -1 to append the page to the Assistant
   --
   --  Inserts a page in the Assistant at a given position.
   --
   --  Return value: the index (starting from 0) of the inserted page

   function Prepend_Page
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class)
      return Gint;
   --  Prepends a page to the Assistant.
   --
   --  Return value: the index (starting at 0) of the inserted page

   procedure Remove_Action_Widget
     (Assistant : access Gtk_Assistant_Record;
      Child     : access Gtk_Widget_Record'Class);
   --  Removes a widget from the action area of a Gtk_Assistant.

   procedure Set_Current_Page
     (Assistant : access Gtk_Assistant_Record;
      Page_Num  : Gint);
   --  Assistant: a Gtk_Assistant
   --  Page_Num: index of the page to switch to, starting from 0.
   --  If negative, the last page will be used. If greater
   --  than the number of pages in the Assistant, nothing
   --  will be done.
   --
   --  Switches the page to Page_Num. Note that this will only be necessary
   --  in custom buttons, as the Assistant flow can be set with
   --  Set_Forward_Page_Func.

   generic
      type Data_Type (<>) is private;
   package Generic_Assistant_Functions is
      type Page_Func is access function
        (Current_Page : Gint;
         User_Data    : Data_Type)
         return Gint;
      --  Spec for page forwarding function.

      type Destroy_Notify is access procedure (User_Data : in out Data_Type);
      --  Destroy_Notify is called just prior to the destruction of
      --  User_Data.

      procedure Set_Forward_Page_Func
        (Assistant : Gtk_Assistant;
         Func      : Page_Func;
         User_Data : Data_Type;
         Destroy   : Destroy_Notify := null);
      --  Sets the Assistant's page forwarding function to be Func.  This
      --  function will be used to determine what will be the next page when
      --  the user presses the forward button. Setting Func to null will make
      --  the assistant use the default forward function, which just goes
      --  to the next visible page.
   end Generic_Assistant_Functions;

   procedure Set_Page_Complete
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Complete  : Boolean);
   --  Sets whether Page contents are complete. This will make
   --  Assistant update the buttons' state to be able to continue the task.

   procedure Set_Page_Header_Image
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Pixbuf    : Gdk_Pixbuf);
   --  Sets a header image for Page. This image is displayed in the header
   --  area of the assistant when Page is the current page.

   procedure Set_Page_Side_Image
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Pixbuf    : Gdk_Pixbuf);
   --  Sets a side image for Page. This image is displayed in the side
   --  area of the assistant when Page is the current page.

   procedure Set_Page_Title
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Title     : String);
   --  Sets a title for Page. The title is displayed in the header
   --  area of the assistant when Page is the current page.

   procedure Set_Page_Type
     (Assistant : access Gtk_Assistant_Record;
      Page      : access Gtk_Widget_Record'Class;
      Page_Type : Gtk_Assistant_Page_Type);
   --  Sets the page type for Page. The page type determines the page
   --  behavior in the Assistant.

   procedure Update_Buttons_State (Assistant : access Gtk_Assistant_Record);
   --  Forces Assistant to recompute the state of the buttons.
   --
   --  GTK+ automatically takes care of this in most situations,
   --  e.g. when the user goes to a different page, or when the
   --  visibility or completeness of a page changes.
   --
   --  One situation where it can be necessary to call this
   --  function is when changing a value on the current page
   --  affects the future page flow of the assistant.

   ----------------------
   -- Child Properties --
   ----------------------
   --  The following properties can be set on children of this widget. See
   --  in particular Gtk.Containers.Child_Set_Property.

   --  <child_properties>
   --  Name:  Complete_Property
   --  Type:  Boolean
   --  Descr: Whether all required fields on the page have been filled out
   --
   --  Name:  Header_Image_Property
   --  Type:  Object
   --  Descr: Header image for the assistant page
   --
   --  Name:  Page_Type_Property
   --  Type:  Enum
   --  Descr: The type of the assistant page
   --
   --  Name:  Sidebar_Image_Property
   --  Type:  Object
   --  Descr: Sidebar image for the assistant page
   --
   --  Name:  Title_Property
   --  Type:  String
   --  Descr: The title of the assistant page
   --  </child_properties>

   Complete_Property      : constant Glib.Properties.Property_Boolean;
   Header_Image_Property  : constant Glib.Properties.Property_Object;
   Page_Type_Property     : constant Glib.Properties.Property_Enum;
   Sidebar_Image_Property : constant Glib.Properties.Property_Object;
   Title_Property         : constant Glib.Properties.Property_String;

   ----------------------
   -- Style Properties --
   ----------------------
   --  The following properties can be changed through the gtk theme and
   --  configuration files, and retrieved through Gtk.Widget.Style_Get_Property

   --  <style_properties>
   --  Name:  Content_Padding_Property
   --  Type:  Int
   --  Descr: Number of pixels around the content pages.
   --
   --  Name:  Header_Padding_Property
   --  Type:  Int
   --  Descr: Number of pixels around the header.
   --  </style_properties>

   Content_Padding_Property : constant Glib.Properties.Property_Int;
   Header_Padding_Property  : constant Glib.Properties.Property_Int;

private

   type Gtk_Assistant_Record is
     new Gtk.Window.Gtk_Window_Record with null record;

   pragma Import (C, Get_Type, "gtk_assistant_get_type");

   Complete_Property : constant Glib.Properties.Property_Boolean :=
     Glib.Properties.Build ("complete");
   Header_Image_Property : constant Glib.Properties.Property_Object :=
     Glib.Properties.Build ("header-image");
   Page_Type_Property : constant Glib.Properties.Property_Enum :=
     Glib.Properties.Build ("page-type");
   Sidebar_Image_Property : constant Glib.Properties.Property_Object :=
     Glib.Properties.Build ("sidebar-image");
   Title_Property : constant Glib.Properties.Property_String :=
     Glib.Properties.Build ("title");

   Content_Padding_Property : constant Glib.Properties.Property_Int :=
     Glib.Properties.Build ("content-padding");
   Header_Padding_Property : constant Glib.Properties.Property_Int :=
     Glib.Properties.Build ("header-padding");

end Gtk.Assistant;