This file is indexed.

/usr/share/ada/adainclude/gtkada/gtk-grid.ads is in libgtkada16.1.0-dev 17.0.2017-2.

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
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
------------------------------------------------------------------------------
--                                                                          --
--      Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet       --
--                     Copyright (C) 2000-2017, AdaCore                     --
--                                                                          --
-- This library is free software;  you can redistribute it and/or modify it --
-- under terms of the  GNU General Public License  as published by the Free --
-- Software  Foundation;  either version 3,  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 MERCHAN- --
-- TABILITY or FITNESS FOR A PARTICULAR PURPOSE.                            --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
--                                                                          --
-- You should have received a copy of the GNU General Public License and    --
-- a copy of the GCC Runtime Library Exception along with this program;     --
-- see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see    --
-- <http://www.gnu.org/licenses/>.                                          --
--                                                                          --
------------------------------------------------------------------------------

--  <description>
--  GtkGrid is a container which arranges its child widgets in rows and
--  columns. It is a very similar to Gtk.Table.Gtk_Table and Gtk.Box.Gtk_Box,
--  but it consistently uses Gtk.Widget.Gtk_Widget's
--  Gtk.Widget.Gtk_Widget:margin and Gtk.Widget.Gtk_Widget:expand properties
--  instead of custom child properties, and it fully supports [height-for-width
--  geometry management][geometry-management].
--
--  Children are added using Gtk.Grid.Attach. They can span multiple rows or
--  columns. It is also possible to add a child next to an existing child,
--  using Gtk.Grid.Attach_Next_To. The behaviour of GtkGrid when several
--  children occupy the same grid cell is undefined.
--
--  GtkGrid can be used like a Gtk.Box.Gtk_Box by just using
--  Gtk.Container.Add, which will place children next to each other in the
--  direction determined by the Gtk.Orientable.Gtk_Orientable:orientation
--  property.
--
--  </description>
pragma Ada_2005;

pragma Warnings (Off, "*is already use-visible*");
with Glib;            use Glib;
with Glib.Properties; use Glib.Properties;
with Glib.Types;      use Glib.Types;
with Gtk.Buildable;   use Gtk.Buildable;
with Gtk.Container;   use Gtk.Container;
with Gtk.Enums;       use Gtk.Enums;
with Gtk.Orientable;  use Gtk.Orientable;
with Gtk.Widget;      use Gtk.Widget;

package Gtk.Grid is

   type Gtk_Grid_Record is new Gtk_Container_Record with null record;
   type Gtk_Grid is access all Gtk_Grid_Record'Class;

   ------------------
   -- Constructors --
   ------------------

   procedure Gtk_New (Self : out Gtk_Grid);
   procedure Initialize (Self : not null access Gtk_Grid_Record'Class);
   --  Creates a new grid widget.
   --  Initialize does nothing if the object was already created with another
   --  call to Initialize* or G_New.

   function Gtk_Grid_New return Gtk_Grid;
   --  Creates a new grid widget.

   function Get_Type return Glib.GType;
   pragma Import (C, Get_Type, "gtk_grid_get_type");

   -------------
   -- Methods --
   -------------

   procedure Attach
      (Self   : not null access Gtk_Grid_Record;
       Child  : not null access Gtk.Widget.Gtk_Widget_Record'Class;
       Left   : Gint;
       Top    : Gint;
       Width  : Gint := 1;
       Height : Gint := 1);
   --  Adds a widget to the grid.
   --  The position of Child is determined by Left and Top. The number of
   --  "cells" that Child will occupy is determined by Width and Height.
   --  "child": the widget to add
   --  "left": the column number to attach the left side of Child to
   --  "top": the row number to attach the top side of Child to
   --  "width": the number of columns that Child will span
   --  "height": the number of rows that Child will span

   procedure Attach_Next_To
      (Self    : not null access Gtk_Grid_Record;
       Child   : not null access Gtk.Widget.Gtk_Widget_Record'Class;
       Sibling : access Gtk.Widget.Gtk_Widget_Record'Class;
       Side    : Gtk.Enums.Gtk_Position_Type;
       Width   : Gint := 1;
       Height  : Gint := 1);
   --  Adds a widget to the grid.
   --  The widget is placed next to Sibling, on the side determined by Side.
   --  When Sibling is null, the widget is placed in row (for left or right
   --  placement) or column 0 (for top or bottom placement), at the end
   --  indicated by Side.
   --  Attaching widgets labeled [1], [2], [3] with Sibling == null and Side
   --  == Gtk.Enums.Pos_Left yields a layout of [3][2][1].
   --  "child": the widget to add
   --  "sibling": the child of Grid that Child will be placed next to, or null
   --  to place Child at the beginning or end
   --  "side": the side of Sibling that Child is positioned next to
   --  "width": the number of columns that Child will span
   --  "height": the number of rows that Child will span

   function Get_Baseline_Row
      (Self : not null access Gtk_Grid_Record) return Gint;
   --  Returns which row defines the global baseline of Grid.
   --  Since: gtk+ 3.10

   procedure Set_Baseline_Row
      (Self : not null access Gtk_Grid_Record;
       Row  : Gint);
   --  Sets which row defines the global baseline for the entire grid. Each
   --  row in the grid can have its own local baseline, but only one of those
   --  is global, meaning it will be the baseline in the parent of the Grid.
   --  Since: gtk+ 3.10
   --  "row": the row index

   function Get_Child_At
      (Self : not null access Gtk_Grid_Record;
       Left : Gint;
       Top  : Gint) return Gtk.Widget.Gtk_Widget;
   --  Gets the child of Grid whose area covers the grid cell whose upper left
   --  corner is at Left, Top.
   --  Since: gtk+ 3.2
   --  "left": the left edge of the cell
   --  "top": the top edge of the cell

   function Get_Column_Homogeneous
      (Self : not null access Gtk_Grid_Record) return Boolean;
   --  Returns whether all columns of Grid have the same width.

   procedure Set_Column_Homogeneous
      (Self        : not null access Gtk_Grid_Record;
       Homogeneous : Boolean);
   --  Sets whether all columns of Grid will have the same width.
   --  "homogeneous": True to make columns homogeneous

   function Get_Column_Spacing
      (Self : not null access Gtk_Grid_Record) return Guint;
   --  Returns the amount of space between the columns of Grid.

   procedure Set_Column_Spacing
      (Self    : not null access Gtk_Grid_Record;
       Spacing : Guint);
   --  Sets the amount of space between columns of Grid.
   --  "spacing": the amount of space to insert between columns

   function Get_Row_Baseline_Position
      (Self : not null access Gtk_Grid_Record;
       Row  : Gint) return Gtk.Enums.Gtk_Baseline_Position;
   --  Returns the baseline position of Row as set by
   --  Gtk.Grid.Set_Row_Baseline_Position or the default value
   --  Gtk.Enums.Baseline_Position_Center.
   --  Since: gtk+ 3.10
   --  "row": a row index

   procedure Set_Row_Baseline_Position
      (Self : not null access Gtk_Grid_Record;
       Row  : Gint;
       Pos  : Gtk.Enums.Gtk_Baseline_Position);
   --  Sets how the baseline should be positioned on Row of the grid, in case
   --  that row is assigned more space than is requested.
   --  Since: gtk+ 3.10
   --  "row": a row index
   --  "pos": a Gtk.Enums.Gtk_Baseline_Position

   function Get_Row_Homogeneous
      (Self : not null access Gtk_Grid_Record) return Boolean;
   --  Returns whether all rows of Grid have the same height.

   procedure Set_Row_Homogeneous
      (Self        : not null access Gtk_Grid_Record;
       Homogeneous : Boolean);
   --  Sets whether all rows of Grid will have the same height.
   --  "homogeneous": True to make rows homogeneous

   function Get_Row_Spacing
      (Self : not null access Gtk_Grid_Record) return Guint;
   --  Returns the amount of space between the rows of Grid.

   procedure Set_Row_Spacing
      (Self    : not null access Gtk_Grid_Record;
       Spacing : Guint);
   --  Sets the amount of space between rows of Grid.
   --  "spacing": the amount of space to insert between rows

   procedure Insert_Column
      (Self     : not null access Gtk_Grid_Record;
       Position : Gint);
   --  Inserts a column at the specified position.
   --  Children which are attached at or to the right of this position are
   --  moved one column to the right. Children which span across this position
   --  are grown to span the new column.
   --  Since: gtk+ 3.2
   --  "position": the position to insert the column at

   procedure Insert_Next_To
      (Self    : not null access Gtk_Grid_Record;
       Sibling : not null access Gtk.Widget.Gtk_Widget_Record'Class;
       Side    : Gtk.Enums.Gtk_Position_Type);
   --  Inserts a row or column at the specified position.
   --  The new row or column is placed next to Sibling, on the side determined
   --  by Side. If Side is Gtk.Enums.Pos_Top or Gtk.Enums.Pos_Bottom, a row is
   --  inserted. If Side is Gtk.Enums.Pos_Left of Gtk.Enums.Pos_Right, a column
   --  is inserted.
   --  Since: gtk+ 3.2
   --  "sibling": the child of Grid that the new row or column will be placed
   --  next to
   --  "side": the side of Sibling that Child is positioned next to

   procedure Insert_Row
      (Self     : not null access Gtk_Grid_Record;
       Position : Gint);
   --  Inserts a row at the specified position.
   --  Children which are attached at or below this position are moved one row
   --  down. Children which span across this position are grown to span the new
   --  row.
   --  Since: gtk+ 3.2
   --  "position": the position to insert the row at

   procedure Remove_Column
      (Self     : not null access Gtk_Grid_Record;
       Position : Gint);
   --  Removes a column from the grid.
   --  Children that are placed in this column are removed, spanning children
   --  that overlap this column have their width reduced by one, and children
   --  after the column are moved to the left.
   --  Since: gtk+ 3.10
   --  "position": the position of the column to remove

   procedure Remove_Row
      (Self     : not null access Gtk_Grid_Record;
       Position : Gint);
   --  Removes a row from the grid.
   --  Children that are placed in this row are removed, spanning children
   --  that overlap this row have their height reduced by one, and children
   --  below the row are moved up.
   --  Since: gtk+ 3.10
   --  "position": the position of the row to remove

   ---------------------------------------------
   -- Inherited subprograms (from interfaces) --
   ---------------------------------------------
   --  Methods inherited from the Buildable interface are not duplicated here
   --  since they are meant to be used by tools, mostly. If you need to call
   --  them, use an explicit cast through the "-" operator below.

   function Get_Orientation
      (Self : not null access Gtk_Grid_Record)
       return Gtk.Enums.Gtk_Orientation;

   procedure Set_Orientation
      (Self        : not null access Gtk_Grid_Record;
       Orientation : Gtk.Enums.Gtk_Orientation);

   ----------------
   -- Properties --
   ----------------
   --  The following properties are defined for this widget. See
   --  Glib.Properties for more information on properties)

   Baseline_Row_Property : constant Glib.Properties.Property_Int;

   Column_Homogeneous_Property : constant Glib.Properties.Property_Boolean;

   Column_Spacing_Property : constant Glib.Properties.Property_Int;

   Row_Homogeneous_Property : constant Glib.Properties.Property_Boolean;

   Row_Spacing_Property : constant Glib.Properties.Property_Int;

   ----------------
   -- Interfaces --
   ----------------
   --  This class implements several interfaces. See Glib.Types
   --
   --  - "Buildable"
   --
   --  - "Orientable"

   package Implements_Gtk_Buildable is new Glib.Types.Implements
     (Gtk.Buildable.Gtk_Buildable, Gtk_Grid_Record, Gtk_Grid);
   function "+"
     (Widget : access Gtk_Grid_Record'Class)
   return Gtk.Buildable.Gtk_Buildable
   renames Implements_Gtk_Buildable.To_Interface;
   function "-"
     (Interf : Gtk.Buildable.Gtk_Buildable)
   return Gtk_Grid
   renames Implements_Gtk_Buildable.To_Object;

   package Implements_Gtk_Orientable is new Glib.Types.Implements
     (Gtk.Orientable.Gtk_Orientable, Gtk_Grid_Record, Gtk_Grid);
   function "+"
     (Widget : access Gtk_Grid_Record'Class)
   return Gtk.Orientable.Gtk_Orientable
   renames Implements_Gtk_Orientable.To_Interface;
   function "-"
     (Interf : Gtk.Orientable.Gtk_Orientable)
   return Gtk_Grid
   renames Implements_Gtk_Orientable.To_Object;

private
   Row_Spacing_Property : constant Glib.Properties.Property_Int :=
     Glib.Properties.Build ("row-spacing");
   Row_Homogeneous_Property : constant Glib.Properties.Property_Boolean :=
     Glib.Properties.Build ("row-homogeneous");
   Column_Spacing_Property : constant Glib.Properties.Property_Int :=
     Glib.Properties.Build ("column-spacing");
   Column_Homogeneous_Property : constant Glib.Properties.Property_Boolean :=
     Glib.Properties.Build ("column-homogeneous");
   Baseline_Row_Property : constant Glib.Properties.Property_Int :=
     Glib.Properties.Build ("baseline-row");
end Gtk.Grid;