This file is indexed.

/usr/share/ada/adainclude/gtkada/gtk-stock.adb 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
-----------------------------------------------------------------------
--               GtkAda - Ada95 binding for Gtk+/Gnome               --
--                                                                   --
--                Copyright (C) 2001-2003 ACT-Europe                 --
--                                                                   --
-- 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 Interfaces.C.Strings;

package body Gtk.Stock is

   package ICS renames Interfaces.C.Strings;

   ---------
   -- Add --
   ---------

   procedure Add (Item : Gtk_Stock_Item) is
      procedure Internal (Item : Gtk_Stock_Item; N_Items : Guint := 1);
      pragma Import (C, Internal, "gtk_stock_add");

   begin
      Internal (Item);
   end Add;

   procedure Add (Items : Gtk_Stock_Item_Array) is
      procedure Internal (Items : Gtk_Stock_Item_Array; N_Items : Guint);
      pragma Import (C, Internal, "gtk_stock_add");

   begin
      Internal (Items, Items'Length);
   end Add;

   ----------------
   -- Add_Static --
   ----------------

   procedure Add_Static (Item : Gtk_Stock_Item) is
      procedure Internal (Item : Gtk_Stock_Item; N_Items : Guint := 1);
      pragma Import (C, Internal, "gtk_stock_add_static");

   begin
      Internal (Item);
   end Add_Static;

   procedure Add_Static (Items : Gtk_Stock_Item_Array) is
      procedure Internal (Items : Gtk_Stock_Item_Array; N_Items : Guint);
      pragma Import (C, Internal, "gtk_stock_add_static");

   begin
      Internal (Items, Items'Length);
   end Add_Static;

   ----------
   -- Free --
   ----------

   procedure Free (Item : in out Gtk_Stock_Item) is
   begin
      ICS.Free (Item.Stock_Id);
      ICS.Free (Item.Label);
      ICS.Free (Item.Translation_Domain);
   end Free;

   -------------
   -- Gtk_New --
   -------------

   procedure Gtk_New
     (Item               : out Gtk_Stock_Item;
      Stock_Id           : String;
      Label              : UTF8_String;
      Modifier           : Gdk.Types.Gdk_Modifier_Type;
      Keyval             : Gdk.Types.Gdk_Key_Type;
      Translation_Domain : String) is
   begin
      Item.Stock_Id           := ICS.New_String (Stock_Id);
      Item.Label              := ICS.New_String (Label);
      Item.Modifier           := Modifier;
      Item.Keyval             := Keyval;
      Item.Translation_Domain := ICS.New_String (Translation_Domain);
   end Gtk_New;

   ------------
   -- Lookup --
   ------------

   procedure Lookup
     (Stock_Id : String;
      Item     : out Gtk_Stock_Item;
      Success  : out Boolean)
   is
      function Internal
        (Stock_Id : String; Item : access Gtk_Stock_Item) return Gboolean;
      pragma Import (C, Internal, "gtk_stock_lookup");

      Tmp : aliased Gtk_Stock_Item;

   begin
      Success := Boolean'Val (Internal (Stock_Id & ASCII.NUL, Tmp'Access));

      if Success then
         Item := Tmp;
      end if;
   end Lookup;

end Gtk.Stock;