This file is indexed.

/usr/share/ada/adainclude/gnomeada/gnome-mdi.adb is in libgnomeada2.24.4-dev 2.24.4dfsg-1.

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
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
-----------------------------------------------------------------------
--              GtkAda - Ada95 binding for Gtk+/Gnome                --
--                                                                   --
--                  Copyright (C) 2001-2013, 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.                                       --
--                                                                   --
-----------------------------------------------------------------------

with Gtk.Widget; use Gtk.Widget;
with Gtk; use Gtk;
with System;

package body Gnome.MDI is

   ---------------
   -- Gnome_New --
   ---------------

   procedure Gnome_New
     (Widget  : out Gnome_MDI;
      Appname : String;
      Title   : String) is
   begin
      Widget := new Gnome_MDI_Record;
      Initialize (Widget, Appname, Title);
   end Gnome_New;

   ----------------
   -- Initialize --
   ----------------

   procedure Initialize
     (Widget  : access Gnome_MDI_Record'Class;
      Appname : String;
      Title   : String)
   is
      function Internal
        (Appname : String;
         Title   : String)
         return System.Address;
      pragma Import (C, Internal, "gnome_mdi_new");
   begin
      Set_Object (Widget, Internal (Appname & ASCII.NUL, Title & ASCII.NUL));
   end Initialize;

   ---------------
   -- Add_Child --
   ---------------

   function Add_Child
     (MDI    : access Gnome_MDI_Record;
      Child  : access Gnome_MDI_Child_Record'Class) return Gint
   is
      function Internal
        (MDI    : System.Address;
         Child  : System.Address)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_add_child");
   begin
      return Internal (Get_Object (MDI), Get_Object (Child));
   end Add_Child;

   -----------------------
   -- Add_Toplevel_View --
   -----------------------

   function Add_Toplevel_View
     (MDI    : access Gnome_MDI_Record;
      Child  : access Gnome_MDI_Child_Record'Class) return Gint
   is
      function Internal
        (MDI    : System.Address;
         Child  : System.Address)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_add_toplevel_view");
   begin
      return Internal (Get_Object (MDI), Get_Object (Child));
   end Add_Toplevel_View;

   --------------
   -- Add_View --
   --------------

   function Add_View
     (MDI    : access Gnome_MDI_Record;
      Child  : access Gnome_MDI_Child_Record'Class)
      return Gint
   is
      function Internal
        (MDI    : System.Address;
         Child  : System.Address)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_add_view");
   begin
      return Internal (Get_Object (MDI), Get_Object (Child));
   end Add_View;

   ----------------
   -- Find_Child --
   ----------------

   function Find_Child
     (MDI    : access Gnome_MDI_Record;
      Name   : String)
      return Gnome_MDI_Child
   is
      function Internal
        (MDI  : System.Address;
         Name : String)
         return System.Address;
      pragma Import (C, Internal, "gnome_mdi_find_child");

      Stub : Gnome_MDI_Child_Record;
   begin
      return Gnome_MDI_Child (Get_User_Data
        (Internal (Get_Object (MDI), Name & ASCII.NUL), Stub));
   end Find_Child;

   ----------------------
   -- Get_Active_Child --
   ----------------------

   function Get_Active_Child
     (MDI : access Gnome_MDI_Record) return Gnome_MDI_Child
   is
      function Internal (MDI : System.Address) return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_active_child");

      Stub : Gnome_MDI_Child_Record;
   begin
      return Gnome_MDI_Child (Get_User_Data
        (Internal (Get_Object (MDI)), Stub));
   end Get_Active_Child;

   ---------------------
   -- Get_Active_View --
   ---------------------

   function Get_Active_View
     (MDI : access Gnome_MDI_Record) return Gtk.Widget.Gtk_Widget
   is
      function Internal (MDI : System.Address) return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_active_view");
   begin
      return Widget.Convert (Internal (Get_Object (MDI)));
   end Get_Active_View;

   -----------------------
   -- Get_Active_Window --
   -----------------------

   function Get_Active_Window
     (MDI : access Gnome_MDI_Record) return Gnome.App.Gnome_App
   is
      function Internal (MDI : System.Address) return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_active_window");

      Stub : Gnome.App.Gnome_App_Record;
   begin
      return Gnome.App.Gnome_App (Get_User_Data
        (Internal (Get_Object (MDI)), Stub));
   end Get_Active_Window;

   -----------------------
   -- Get_App_From_View --
   -----------------------

   function Get_App_From_View
     (View : access Gtk.Widget.Gtk_Widget_Record'Class)
      return Gnome.App.Gnome_App
   is
      function Internal (View : System.Address) return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_app_from_view");

      Stub : Gnome.App.Gnome_App_Record;
   begin
      return Gnome.App.Gnome_App (Get_User_Data
        (Internal (Get_Object (View)), Stub));
   end Get_App_From_View;

   -------------------------
   -- Get_Child_From_View --
   -------------------------

   function Get_Child_From_View
     (View : access Gtk.Widget.Gtk_Widget_Record'Class) return Gnome_MDI_Child
   is
      function Internal (View : System.Address) return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_child_from_view");

      Stub : Gnome_MDI_Child_Record;
   begin
      return Gnome_MDI_Child (Get_User_Data
        (Internal (Get_Object (View)), Stub));
   end Get_Child_From_View;

   -------------------------
   -- Get_Child_Menu_Info --
   -------------------------

   function Get_Child_Menu_Info
     (App : access Gnome.App.Gnome_App_Record'Class)
      return Flat_UI_Info_Array_Access
   is
      function Internal
        (App : System.Address) return Flat_UI_Info_Array_Access;
      pragma Import (C, Internal, "gnome_mdi_get_child_menu_info");
   begin
      return Internal (Get_Object (App));
   end Get_Child_Menu_Info;

   ----------------------
   -- Get_Menubar_Info --
   ----------------------

   function Get_Menubar_Info
     (App : access Gnome.App.Gnome_App_Record'Class)
      return Flat_UI_Info_Array_Access
   is
      function Internal
        (App : System.Address) return Flat_UI_Info_Array_Access;
      pragma Import (C, Internal, "gnome_mdi_get_menubar_info");
   begin
      return Internal (Get_Object (App));
   end Get_Menubar_Info;

   ----------------------
   -- Get_Toolbar_Info --
   ----------------------

   function Get_Toolbar_Info
     (App : access Gnome.App.Gnome_App_Record'Class)
      return Flat_UI_Info_Array_Access
   is
      function Internal
        (App : System.Address) return Flat_UI_Info_Array_Access;
      pragma Import (C, Internal, "gnome_mdi_get_toolbar_info");
   begin
      return Internal (Get_Object (App));
   end Get_Toolbar_Info;

   --------------------------
   -- Get_View_From_Window --
   --------------------------

   function Get_View_From_Window
     (MDI    : access Gnome_MDI_Record;
      App    : access Gnome.App.Gnome_App_Record'Class)
      return Gtk.Widget.Gtk_Widget
   is
      function Internal
        (MDI    : System.Address;
         App    : System.Address)
         return System.Address;
      pragma Import (C, Internal, "gnome_mdi_get_view_from_window");
   begin
      return Widget.Convert (Internal (Get_Object (MDI),
                                       Get_Object (App)));
   end Get_View_From_Window;

   -------------------
   -- Open_Toplevel --
   -------------------

   procedure Open_Toplevel (MDI : access Gnome_MDI_Record)
   is
      procedure Internal (MDI : System.Address);
      pragma Import (C, Internal, "gnome_mdi_open_toplevel");
   begin
      Internal (Get_Object (MDI));
   end Open_Toplevel;

   --------------
   -- Register --
   --------------

   procedure Register
     (MDI    : access Gnome_MDI_Record;
      Object : access Glib.Object.GObject_Record'Class)
   is
      procedure Internal
        (MDI    : System.Address;
         Object : System.Address);
      pragma Import (C, Internal, "gnome_mdi_register");
   begin
      Internal (Get_Object (MDI), Get_Object (Object));
   end Register;

   ----------------
   -- Remove_All --
   ----------------

   function Remove_All
     (MDI    : access Gnome_MDI_Record;
      Force  : Gint)
      return Gint
   is
      function Internal
        (MDI    : System.Address;
         Force  : Gint)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_remove_all");
   begin
      return Internal (Get_Object (MDI),
                       Force);
   end Remove_All;

   ------------------
   -- Remove_Child --
   ------------------

   function Remove_Child
     (MDI    : access Gnome_MDI_Record;
      Child  : access Gnome_MDI_Child_Record'Class;
      Force  : Gint)
      return Gint
   is
      function Internal
        (MDI    : System.Address;
         Child  : System.Address;
         Force  : Gint)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_remove_child");
   begin
      return Internal (Get_Object (MDI),
                       Get_Object (Child),
                       Force);
   end Remove_Child;

   -----------------
   -- Remove_View --
   -----------------

   function Remove_View
     (MDI    : access Gnome_MDI_Record;
      View   : access Gtk.Widget.Gtk_Widget_Record'Class;
      Force  : Gint)
      return Gint
   is
      function Internal
        (MDI    : System.Address;
         View   : System.Address;
         Force  : Gint)
         return Gint;
      pragma Import (C, Internal, "gnome_mdi_remove_view");
   begin
      return Internal (Get_Object (MDI),
                       Get_Object (View),
                       Force);
   end Remove_View;

   ---------------------
   -- Set_Active_View --
   ---------------------

   procedure Set_Active_View
     (MDI  : access Gnome_MDI_Record;
      View : access Gtk.Widget.Gtk_Widget_Record'Class)
   is
      procedure Internal
        (MDI  : System.Address;
         View : System.Address);
      pragma Import (C, Internal, "gnome_mdi_set_active_view");
   begin
      Internal (Get_Object (MDI),
                Get_Object (View));
   end Set_Active_View;

   -------------------------
   -- Set_Child_List_Path --
   -------------------------

   procedure Set_Child_List_Path
     (MDI  : access Gnome_MDI_Record;
      Path : String)
   is
      procedure Internal
        (MDI  : System.Address;
         Path : String);
      pragma Import (C, Internal, "gnome_mdi_set_child_list_path");
   begin
      Internal (Get_Object (MDI),
                Path & ASCII.NUL);
   end Set_Child_List_Path;

   -------------------------
   -- Set_Child_Menu_Path --
   -------------------------

   procedure Set_Child_Menu_Path
     (MDI  : access Gnome_MDI_Record;
      Path : String)
   is
      procedure Internal
        (MDI  : System.Address;
         Path : String);
      pragma Import (C, Internal, "gnome_mdi_set_child_menu_path");
   begin
      Internal (Get_Object (MDI),
                Path & ASCII.NUL);
   end Set_Child_Menu_Path;

   --------------------------
   -- Set_Menubar_Template --
   --------------------------

   procedure Set_Menubar_Template
     (MDI       : access Gnome_MDI_Record;
      Menu_Tmpl : access Gnome.App_Helper.UI_Info_Array)
   is
      procedure Internal
        (MDI       : System.Address;
         Menu_Tmpl : System.Address);
      pragma Import (C, Internal, "gnome_mdi_set_menubar_template");
   begin
      Internal (Get_Object (MDI), Menu_Tmpl.all'Address);
   end Set_Menubar_Template;

   --------------
   -- Set_Mode --
   --------------

   procedure Set_Mode
     (MDI  : access Gnome_MDI_Record;
      Mode : Gnome_MDI_Mode)
   is
      procedure Internal
        (MDI  : System.Address;
         Mode : Gnome_MDI_Mode);
      pragma Import (C, Internal, "gnome_mdi_set_mode");
   begin
      Internal (Get_Object (MDI), Mode);
   end Set_Mode;

   --------------------------
   -- Set_Toolbar_Template --
   --------------------------

   procedure Set_Toolbar_Template
     (MDI       : access Gnome_MDI_Record;
      Tbar_Tmpl : access Gnome.App_Helper.UI_Info_Array)
   is
      procedure Internal
        (MDI       : System.Address;
         Tbar_Tmpl : System.Address);
      pragma Import (C, Internal, "gnome_mdi_set_toolbar_template");
   begin
      Internal (Get_Object (MDI), Tbar_Tmpl.all'Address);
   end Set_Toolbar_Template;

   ----------------
   -- Unregister --
   ----------------

   procedure Unregister
     (MDI    : access Gnome_MDI_Record;
      Object : access Glib.Object.GObject_Record'Class)
   is
      procedure Internal
        (MDI    : System.Address;
         Object : System.Address);
      pragma Import (C, Internal, "gnome_mdi_unregister");
   begin
      Internal (Get_Object (MDI), Get_Object (Object));
   end Unregister;

   ------------------
   -- Update_Child --
   ------------------

   procedure Update_Child
     (MDI   : access Gnome_MDI_Record;
      Child : access Gnome_MDI_Child_Record'Class)
   is
      procedure Internal
        (MDI   : System.Address;
         Child : System.Address);
      pragma Import (C, Internal, "gnome_mdi_update_child");
   begin
      Internal (Get_Object (MDI), Get_Object (Child));
   end Update_Child;

end Gnome.MDI;